/* Modular CSS slice extracted from style.css (5025-5743) */
#mvs-canvas-viewport {
  user-select: none;
  touch-action: pan-y pinch-zoom;
  background: #f1f5f9;
  background-image: radial-gradient(#e2e8f0 1.2px, transparent 1.2px);
  background-size: 24px 24px;
}

#mvs-canvas-viewport .viewer-canvas-area {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 1.25rem;
  box-sizing: border-box;
}

#mvs-canvas-viewport .document-page-wrapper {
  position: relative;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.06);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  transition: transform 0.15s ease-out;
}

#mvs-canvas-viewport .document-page-image {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  display: block;
}

/* Student Portal Submissions Cards */
.my-submission-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.my-submission-card:hover {
  border-color: #818cf8;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.08);
  transform: translateY(-2px);
}

/* Responsive Table Submissions */
.submissions-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.submissions-table th,
.submissions-table td {
  padding: 0.85rem 0.75rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}

.submissions-table tbody tr:hover {
  background: #f8fafc;
}/* ====================================================================
   AM-GRADING ENTERPRISE AUTH GATE & UNAUTHENTICATED SECURITY SHIELD
   ==================================================================== */

/* Unauthenticated State: Hide All Sensitive Internal Cockpit Views & Mobile Dock */
body.unauthenticated .cockpit-sidebar,
body.unauthenticated .studio-topbar,
body.unauthenticated #teacher-dashboard-view,
body.unauthenticated .mobile-bottom-dock,
body.unauthenticated #mobile-fab-camera {
  display: none !important;
}

body.unauthenticated .workspace-container {
  padding: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  background: transparent !important;
  min-height: 100vh;
}

body.unauthenticated .app-cockpit-layout {
  display: block !important;
  min-height: 100vh;
  background: linear-gradient(135deg, #0b132b 0%, #1c2541 50%, #0f172a 100%);
}

/* Auth Gate Wrapper */
.auth-gate-wrapper {
  display: none;
  width: 100%;
  min-height: 100vh;
  padding: 1.25rem 1.5rem 2.5rem;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: radial-gradient(circle at 20% 20%, rgba(79, 70, 229, 0.15) 0%, transparent 40%),
              radial-gradient(circle at 80% 80%, rgba(6, 182, 212, 0.12) 0%, transparent 50%),
              linear-gradient(135deg, #0b132b 0%, #131c38 60%, #0f172a 100%);
  animation: authFadeIn 0.35s ease-out;
}

/* Auth Gate Header Bar & Actions */
.auth-gate-header-bar {
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto 1.5rem;
  padding: 0 0.5rem;
  z-index: 20;
}

.auth-header-brand-mini {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.auth-header-brand-title {
  display: flex;
  flex-direction: column;
}

.auth-brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main, #ffffff);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.auth-brand-badge-mini {
  font-size: 0.62rem;
  font-weight: 800;
  color: #818cf8;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.auth-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.btn-guest-pricing-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.15) 0%, rgba(99, 102, 241, 0.2) 100%);
  color: #818cf8;
  border: 1px solid rgba(129, 140, 248, 0.4);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.btn-guest-pricing-trigger:hover {
  background: #4f46e5;
  color: #ffffff;
  border-color: #6366f1;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.pricing-label-mobile {
  display: none;
}

/* Auth Gate B2B Legal Trust Footer */
.auth-gate-footer {
  width: 100%;
  max-width: 1240px;
  margin: 3.5rem auto 1.5rem;
  padding: 2.25rem 2rem 1.5rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  box-shadow: 0 10px 30px -4px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  text-align: left;
  box-sizing: border-box;
  color: #334155;
}

[data-theme="dark"] .auth-gate-footer {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px -4px rgba(0, 0, 0, 0.4);
  color: #94a3b8;
}

.auth-footer-top-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #e2e8f0;
}

[data-theme="dark"] .auth-footer-top-strip {
  border-color: rgba(255, 255, 255, 0.08);
}

.auth-footer-brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.auth-footer-brand-title {
  font-size: 1.22rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.02em;
}

[data-theme="dark"] .auth-footer-brand-title {
  color: #f8fafc;
}

.auth-footer-brand-sub {
  font-size: 0.76rem;
  color: #64748b;
  font-weight: 600;
}

[data-theme="dark"] .auth-footer-brand-sub {
  color: #94a3b8;
}

.auth-footer-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
}

[data-theme="dark"] .auth-footer-trust-badge {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

/* 4-column B2B Enterprise Grid */
.auth-footer-grid {
  display: grid;
  grid-template-columns: 2.1fr 1.15fr 1.25fr 1.35fr;
  gap: 2rem;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
}

@media (max-width: 1024px) {
  .auth-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
  }
}

@media (max-width: 640px) {
  .auth-footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .auth-gate-footer {
    padding: 1.5rem 1rem 1rem;
    border-radius: 16px;
  }
}

.auth-footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  text-align: left;
}

.footer-company-name {
  font-size: 0.88rem;
  font-weight: 850;
  color: #0284c7;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0.25rem;
}

[data-theme="dark"] .footer-company-name {
  color: #38bdf8;
}

.footer-meta-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #475569;
  line-height: 1.5;
}

[data-theme="dark"] .footer-meta-list {
  color: #94a3b8;
}

.footer-meta-list li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.footer-meta-list .meta-icon {
  flex-shrink: 0;
  font-size: 0.85rem;
  margin-top: 1px;
}

.footer-meta-list .meta-label {
  font-weight: 700;
  color: #1e293b;
}

[data-theme="dark"] .footer-meta-list .meta-label {
  color: #e2e8f0;
}

.footer-link-highlight {
  color: #0284c7;
  text-decoration: none;
  font-weight: 700;
}

.footer-link-highlight:hover {
  text-decoration: underline;
  color: #0369a1;
}

[data-theme="dark"] .footer-link-highlight {
  color: #38bdf8;
}

.footer-link-plain {
  color: #475569;
  text-decoration: none;
}

.footer-link-plain:hover {
  text-decoration: underline;
  color: #0284c7;
}

[data-theme="dark"] .footer-link-plain {
  color: #cbd5e1;
}

.auth-footer-heading {
  font-size: 0.82rem;
  font-weight: 850;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.45rem 0;
  padding-bottom: 0.4rem;
  border-bottom: 1.5px solid #e2e8f0;
}

[data-theme="dark"] .auth-footer-heading {
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.1);
}

.auth-footer-nav-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.auth-footer-nav-list li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.auth-legal-link {
  color: #475569;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.auth-legal-link:hover {
  color: #0284c7;
  transform: translateX(2px);
}

[data-theme="dark"] .auth-legal-link {
  color: #cbd5e1;
}

[data-theme="dark"] .auth-legal-link:hover {
  color: #38bdf8;
}

.auth-footer-bank-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.85rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .auth-footer-bank-card {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.1);
}

.bct-badge-box {
  margin-top: 0.75rem;
  background: #ffffff;
  border: 1.5px solid #bfdbfe;
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
  transition: all 0.2s ease;
}

.bct-badge-box:hover {
  border-color: #2563eb;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.16);
  transform: translateY(-1px);
}

[data-theme="dark"] .bct-badge-box {
  background: #1e293b;
  border-color: rgba(59, 130, 246, 0.4);
}

.bct-badge-emblem {
  font-size: 1.35rem;
  line-height: 1;
}

.bct-badge-text-group {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.bct-badge-status {
  font-size: 0.68rem;
  color: #0284c7;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.bct-badge-ministry {
  font-size: 0.84rem;
  color: #1e293b;
  font-weight: 900;
  letter-spacing: 0.02em;
}

[data-theme="dark"] .bct-badge-ministry {
  color: #f8fafc;
}

.auth-footer-copyright-row {
  border-top: 1px solid #e2e8f0;
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: #64748b;
}

[data-theme="dark"] .auth-footer-copyright-row {
  border-color: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

body.unauthenticated .auth-gate-wrapper {
  display: flex !important;
}
/* Zero FOUC & Display rules for Digitization & Assessment Rubric Studio & Math Visual 3D */
html.utility-mode #auth-gate-view,
html.utility-mode .auth-gate-wrapper,
body.utility-mode #auth-gate-view,
body.utility-mode .auth-gate-wrapper,
body.unauthenticated.utility-mode .auth-gate-wrapper,
html.studio-mode #auth-gate-view,
html.studio-mode .auth-gate-wrapper,
body.studio-mode #auth-gate-view,
body.studio-mode .auth-gate-wrapper,
body.unauthenticated.studio-mode .auth-gate-wrapper,
html.math-visual-mode #auth-gate-view,
html.math-visual-mode .auth-gate-wrapper,
body.math-visual-mode #auth-gate-view,
body.math-visual-mode .auth-gate-wrapper,
body.unauthenticated.math-visual-mode .auth-gate-wrapper {
  display: none !important;
}

html.utility-mode #student-portal-view,
body.utility-mode #student-portal-view,
body.unauthenticated.utility-mode #student-portal-view,
html.studio-mode #student-portal-view,
body.studio-mode #student-portal-view,
body.unauthenticated.studio-mode #student-portal-view,
html.math-visual-mode #student-portal-view,
body.math-visual-mode #student-portal-view,
body.unauthenticated.math-visual-mode #student-portal-view {
  display: none !important;
}

html.utility-mode #teacher-dashboard-view,
body.utility-mode #teacher-dashboard-view,
body.unauthenticated.utility-mode #teacher-dashboard-view,
body.unauthenticated.studio-mode #teacher-dashboard-view,
html.math-visual-mode #teacher-dashboard-view,
body.math-visual-mode #teacher-dashboard-view,
body.unauthenticated.math-visual-mode #teacher-dashboard-view {
  display: none !important;
}

html.math-ocr-mode #math-ocr-view,
body.math-ocr-mode #math-ocr-view,
html.utility-mode #math-ocr-view,
body.utility-mode #math-ocr-view,
body.unauthenticated.math-ocr-mode #math-ocr-view {
  display: flex !important;
  flex-direction: column !important;
  gap: 1.25rem !important;
  width: 100% !important;
  max-width: 1360px !important;
  margin: 0 auto !important;
}

html.studio-mode #assessment-studio-view,
body.studio-mode #assessment-studio-view,
body.unauthenticated.studio-mode #assessment-studio-view {
  display: block !important;
  width: 100% !important;
  max-width: 1360px !important;
  margin: 0 auto !important;
}

html.studio-mode #math-ocr-view,
body.studio-mode #math-ocr-view,
html.studio-mode.utility-mode #math-ocr-view,
body.studio-mode.utility-mode #math-ocr-view {
  display: none !important;
}

html.math-ocr-mode #assessment-studio-view,
body.math-ocr-mode #assessment-studio-view {
  display: none !important;
}

html.math-visual-mode #math-visual-studio-view,
body.math-visual-mode #math-visual-studio-view,
body.unauthenticated.math-visual-mode #math-visual-studio-view {
  display: flex !important;
  flex-direction: column !important;
}

html.math-visual-mode #math-ocr-view,
body.math-visual-mode #math-ocr-view,
body.unauthenticated.math-visual-mode #math-ocr-view {
  display: none !important;
}

html.math-ocr-mode #math-visual-studio-view,
body.math-ocr-mode #math-visual-studio-view,
body.unauthenticated.math-ocr-mode #math-visual-studio-view {
  display: none !important;
}

html.utility-mode .cockpit-sidebar,
body.utility-mode .cockpit-sidebar,
html.utility-mode .studio-topbar,
body.utility-mode .studio-topbar,
body.unauthenticated.utility-mode .cockpit-sidebar,
body.unauthenticated.utility-mode .studio-topbar,
body.unauthenticated.utility-mode .mobile-bottom-dock,
body.unauthenticated.studio-mode .cockpit-sidebar,
body.unauthenticated.studio-mode .studio-topbar,
body.unauthenticated.studio-mode .mobile-bottom-dock,
body.unauthenticated.studio-mode #mobile-fab-camera,
html.math-visual-mode .cockpit-sidebar,
body.math-visual-mode .cockpit-sidebar,
html.math-visual-mode .studio-topbar,
body.math-visual-mode .studio-topbar,
body.unauthenticated.math-visual-mode .cockpit-sidebar,
body.unauthenticated.math-visual-mode .studio-topbar,
body.unauthenticated.math-visual-mode .mobile-bottom-dock {
  display: none !important;
}

body.utility-mode .workspace-container,
body.unauthenticated.utility-mode .workspace-container,
body.studio-mode .workspace-container,
body.unauthenticated.studio-mode .workspace-container {
  padding: 1rem 1.5rem !important;
  max-width: 1400px !important;
  margin: 0 auto !important;
  background: #f8fafc !important;
  min-height: 100vh;
}

[data-theme="dark"] body.studio-mode .workspace-container,
[data-theme="dark"] body.unauthenticated.studio-mode .workspace-container {
  background: var(--bg-canvas, #090d16) !important;
}

/* Allow switching to student portal while unauthenticated / on portal routes */
html.portal-mode #auth-gate-view,
html.portal-mode .auth-gate-wrapper,
body.portal-mode #auth-gate-view,
body.portal-mode .auth-gate-wrapper,
body.unauthenticated.portal-mode .auth-gate-wrapper {
  display: none !important;
}

/* Hide teacher desktop and mobile navigation in portal mode */
html.portal-mode .mobile-bottom-dock,
body.portal-mode .mobile-bottom-dock,
html.portal-mode .cockpit-sidebar,
body.portal-mode .cockpit-sidebar,
html.portal-mode .studio-topbar,
body.portal-mode .studio-topbar {
  display: none !important;
}

body.unauthenticated.portal-mode #student-portal-view,
body.portal-mode #student-portal-view,
html.portal-mode #student-portal-view {
  display: block !important;
  max-width: 1100px;
  margin: 1.5rem auto;
  padding: 0 1.5rem;
  background: #ffffff;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  animation: authFadeIn 0.3s ease-out;
}

@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Auth Gate Container: 2 Columns on Desktop */
.auth-gate-container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 3.5rem;
  align-items: center;
}

/* Left Hero Branding */
.auth-gate-hero {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  color: #ffffff;
}
