/* ==========================================================================
   MYLESSON.AI - PROFESSIONAL SAAS DESIGN SYSTEM
   Ghana Education Service & NaCCA Standards-Based Suite
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Brand Colors */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-dark: #3730a3;
  --primary-light: #eef2ff;
  --primary-border: #c7d2fe;
  --primary-glow: rgba(79, 70, 229, 0.25);

  /* Dark Slate Sidebar */
  --sidebar-bg: #0f172a;
  --sidebar-surface: #1e293b;
  --sidebar-hover: #1e293b;
  --sidebar-active: #4f46e5;
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --sidebar-text: #94a3b8;
  --sidebar-text-muted: #64748b;
  --sidebar-text-white: #ffffff;

  /* Surfaces & Backgrounds */
  --bg-app: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-alt: #f8fafc;
  --bg-input: #ffffff;

  /* Typography */
  --text-main: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  /* Borders */
  --border-subtle: #f1f5f9;
  --border-default: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-focus: #4f46e5;

  /* Accent Badges & Status */
  --amber-bg: #fffbeb;
  --amber-border: #fde68a;
  --amber-text: #b45309;

  --green-bg: #ecfdf5;
  --green-border: #a7f3d0;
  --green-text: #047857;

  --indigo-bg: #eef2ff;
  --indigo-border: #c7d2fe;
  --indigo-text: #4338ca;

  --purple-bg: #faf5ff;
  --purple-border: #e9d5ff;
  --purple-text: #7e22ce;

  --red-bg: #fef2f2;
  --red-border: #fecaca;
  --red-text: #b91c1c;

  /* Elevation Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-paper: 0 10px 30px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.04);

  /* Border Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================= RESET & BASE ================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  display: flex;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ================= APP LAYOUT ================= */
.app-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* ================= SIDEBAR ================= */
.app-sidebar {
  width: 260px;
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid var(--sidebar-border);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 50;
  user-select: none;
}

.sidebar-brand {
  padding: 24px 20px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--sidebar-border);
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.brand-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--sidebar-text-white);
  letter-spacing: -0.03em;
}

.brand-badge {
  font-size: 10px;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(99, 102, 241, 0.4);
}

.sidebar-nav {
  padding: 24px 14px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex-grow: 1;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--sidebar-text-muted);
  letter-spacing: 0.1em;
  padding: 0 12px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  transition: all var(--transition-fast);
}

.nav-item:hover {
  background-color: var(--sidebar-hover);
  color: var(--sidebar-text-white);
  transform: translateX(2px);
}

.nav-item.active {
  background-color: var(--primary);
  color: var(--sidebar-text-white);
  font-weight: 700;
  box-shadow: 0 4px 16px var(--primary-glow);
}

.nav-icon {
  font-size: 17px;
  width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.15);
}

.pro-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.15);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(99, 102, 241, 0.35);
}

.btn-sidebar-settings {
  background: transparent;
  border: none;
  color: var(--sidebar-text);
  cursor: pointer;
  font-size: 18px;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-sidebar-settings:hover {
  color: var(--sidebar-text-white);
  background: var(--sidebar-hover);
  transform: rotate(30deg);
}

/* ================= MAIN CONTENT APP ================= */
.app-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
}

/* Topbar */
.app-topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-default);
  padding: 22px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: var(--shadow-xs);
}

.topbar-greeting h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

.topbar-greeting p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 500;
}

.btn-primary-action {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
  border: none;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: all var(--transition-normal);
}

.btn-primary-action:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.content-body {
  padding: 36px;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

/* ================= STATS CARDS ROW ================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-bottom: 36px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  transition: background var(--transition-normal);
}

.stat-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

.stat-card:hover::after {
  background: linear-gradient(90deg, #6366f1, #4f46e5);
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: capitalize;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

.stat-icon-wrapper {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.stat-icon-slate { background-color: #f1f5f9; color: #334155; }
.stat-icon-amber { background-color: var(--amber-bg); color: var(--amber-text); }
.stat-icon-indigo { background-color: var(--indigo-bg); color: var(--indigo-text); }
.stat-icon-green { background-color: var(--green-bg); color: var(--green-text); }

/* ================= DASHBOARD MAIN SPLIT GRID ================= */
.dashboard-split-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
  margin-bottom: 36px;
}

.section-heading-row {
  margin-bottom: 18px;
}

.section-heading-row h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.action-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  text-decoration: none;
  color: inherit;
  position: relative;
}

.action-card:hover {
  border-color: var(--primary);
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.09);
  transform: translateY(-3px);
}

.action-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.action-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.action-card p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.45;
  font-weight: 500;
}

/* Tips & Resources Card */
.tips-widget-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tips-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.tips-header h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
}

.tip-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.tip-block:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tip-tag {
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tip-block p {
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.5;
  font-weight: 500;
}

/* ================= TEACHER TOOLS CAROUSEL ROW ================= */
.teacher-tools-section {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 36px;
}

.tools-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.tools-header-row h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}

.btn-link-action {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition-fast);
}

.btn-link-action:hover {
  gap: 9px;
  color: var(--primary-hover);
}

.tools-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.tool-feature-card {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 20px;
  background: var(--bg-card-alt);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all var(--transition-normal);
}

.tool-feature-card:hover {
  background: var(--bg-card);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.tool-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tool-icon-box {
  font-size: 26px;
}

.tool-card-meta h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.tool-card-meta span {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.tool-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.btn-tool-outline {
  flex: 1;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
}

.btn-tool-outline:hover {
  background: var(--bg-app);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-tool-primary {
  flex: 1;
  background: var(--primary);
  border: 1px solid var(--primary);
  color: white;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 2px 6px var(--primary-glow);
  transition: all var(--transition-fast);
}

.btn-tool-primary:hover {
  background: var(--primary-hover);
}

/* ================= FORMS, INPUTS & CARDS ================= */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.card-header h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.02em;
}

.step-badge {
  background: var(--indigo-bg);
  color: var(--indigo-text);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid var(--indigo-border);
}

.step-badge.success {
  background: var(--green-bg);
  color: var(--green-text);
  border-color: var(--green-border);
}

.grid {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Prevent long curriculum text (strands, standards, indicators) from
   blowing the select out of its grid column and stretching the page */
.grid > .field {
  min-width: 0; /* allow grid cell to shrink below content width */
}

.field select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* collapsed select shows clipped text, never expands */
}

.field select,
.field input[type="text"],
.field input[type="number"],
.field input[type="password"],
.field textarea {
  padding: 11px 16px;
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  background: var(--bg-input);
  color: var(--text-main);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs);
}

.field select:focus,
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.field select:disabled,
.field input:disabled {
  background-color: #f1f5f9;
  cursor: not-allowed;
  opacity: 0.75;
  border-color: #e2e8f0;
}

.req {
  color: #ef4444;
  font-weight: 800;
}

.info-banner {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  font-size: 14px;
  color: #1e40af;
  line-height: 1.5;
  font-weight: 500;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
  border: none;
  padding: 13px 26px;
  border-radius: var(--radius-md);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: all var(--transition-normal);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(79, 70, 229, 0.4);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-outline {
  background: white;
  border: 1.5px solid var(--border-strong);
  color: var(--text-main);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-app);
}

.btn-outline.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-export {
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.btn-word {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.btn-word:hover {
  background: #dbeafe;
  transform: translateY(-1px);
}

.btn-emerald {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.btn-emerald:hover {
  background: #d1fae5;
  transform: translateY(-1px);
}

.btn-pdf {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
.btn-pdf:hover {
  background: #fee2e2;
  transform: translateY(-1px);
}

.btn-print {
  background: #f8fafc;
  color: #334155;
  border-color: #cbd5e1;
}
.btn-print:hover {
  background: #e2e8f0;
}

.btn-indigo {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}
.btn-indigo:hover {
  background: #e0e7ff;
  transform: translateY(-1px);
}

.btn-green {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}
.btn-green:hover {
  background: #dcfce7;
  transform: translateY(-1px);
}

/* ==========================================================================
   COMBINED WORD DOCUMENT STAGING & BUILDER
   ========================================================================== */

.doc-mode-option-card {
  transition: all var(--transition-fast);
}
.doc-mode-option-card:hover {
  border-color: #3b82f6 !important;
  background: #f0f9ff !important;
}
.doc-mode-option-card.active-choice {
  border-color: #2563eb !important;
  background: #eff6ff !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.combined-doc-control-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #eff6ff 100%);
  border: 1.5px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.combined-doc-control-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.combined-doc-status-banner {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: #1e3a8a;
  animation: fadeIn 0.3s ease;
}

.combined-doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 10px;
}
.combined-doc-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  padding: 10px 12px;
  border-bottom: 2px solid #e2e8f0;
  text-align: left;
}
.combined-doc-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}
.combined-doc-table tr:hover td {
  background: #f8fafc;
}
.combined-doc-item-num {
  font-weight: 800;
  color: #2563eb;
  font-size: 13px;
}
.btn-icon-action {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
}
.btn-icon-action:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}
.btn-icon-action.danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
  font-weight: 600;
}
.btn-icon-action.danger:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.combined-doc-class-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.combined-doc-class-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid #cbd5e1;
  border-radius: 20px;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}
.combined-doc-class-tab:hover {
  border-color: #3b82f6;
  background: #eff6ff;
  color: #1d4ed8;
}
.combined-doc-class-tab.active {
  background: #2563eb !important;
  border-color: #1d4ed8 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}
.combined-doc-class-tab .tab-badge {
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 700;
}
.combined-doc-class-tab.active .tab-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}
.combined-doc-class-header {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 12px;
  font-size: 12.5px;
  color: #166534;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   LESSON SCHEDULE & CLASSROOM PARAMETERS (STEP 1 TILES)
   ========================================================================== */

.lesson-params-container {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px 22px;
  margin-top: 22px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.params-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid #e2e8f0;
}

.params-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.params-header-icon {
  font-size: 26px;
  background: #e0e7ff;
  padding: 8px;
  border-radius: 10px;
}

.params-header-title h4 {
  font-size: 15px;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 2px 0;
  letter-spacing: -0.01em;
}

.params-header-title p {
  font-size: 12.5px;
  color: #64748b;
  margin: 0;
}

.params-header-badge {
  font-size: 12px;
  font-weight: 700;
  color: #4338ca;
  background: #eef2ff;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid #c7d2fe;
}

.params-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 16px;
}

@media (max-width: 1024px) {
  .params-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .params-cards-grid {
    grid-template-columns: 1fr;
  }
}

.param-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.param-card:hover {
  border-color: #818cf8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
}

.param-card.highlight {
  background: #fafbff;
  border-color: #c7d2fe;
}

.param-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.param-card-icon {
  font-size: 18px;
}

.param-card-header label {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  cursor: pointer;
}

.param-input-wrap {
  width: 100%;
}

.param-input-wrap input[type="text"],
.param-input-wrap select {
  width: 100%;
  padding: 9px 12px;
  font-size: 13.5px;
  font-weight: 600;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  color: #0f172a;
  transition: all var(--transition-fast);
}

.param-input-wrap input[type="text"]:focus,
.param-input-wrap select:focus {
  background: #ffffff;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
  outline: none;
}

.stepper-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 3px 4px;
}

.stepper-wrap input[type="number"] {
  flex: 1;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  color: #1e293b;
  padding: 4px 0;
  outline: none;
  -moz-appearance: textfield;
}

.stepper-wrap input[type="number"]::-webkit-outer-spin-button,
.stepper-wrap input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.param-step-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 800;
  color: #334155;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.param-step-btn:hover {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
}

.param-step-btn:active {
  transform: scale(0.94);
}

.param-helper-text {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 8px;
  display: block;
  line-height: 1.35;
}

.step-header-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap;
  gap: 10px;
}

.selection-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  color: #475569;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
  border: 1px solid #e2e8f0;
  transition: all var(--transition-fast);
}

.selection-pill.active {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}

.selection-pill.limit-reached {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.step-filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 16px 0;
  flex-wrap: wrap;
}

.tlr-category-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chip-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #cbd5e1;
}

.chip-btn.active {
  background: #4f46e5;
  color: #ffffff;
  border-color: #4f46e5;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.step-quick-actions {
  display: flex;
  gap: 8px;
}

.btn-ghost-sm {
  background: transparent;
  border: 1px dashed #cbd5e1;
  color: #64748b;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-ghost-sm:hover {
  background: #f8fafc;
  color: #1e293b;
  border-color: #94a3b8;
}

/* TLR Grid & Card Styles */
.tlr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.tlr-card {
  position: relative;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.tlr-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tlr-card:hover {
  border-color: #a5b4fc;
  background: #fafbff;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(99, 102, 241, 0.08);
}

.tlr-card.selected {
  background: #f5f3ff;
  border-color: #6366f1;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.14);
}

.tlr-icon-box {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 10px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all var(--transition-fast);
}

.tlr-card.selected .tlr-icon-box {
  background: #e0e7ff;
  transform: scale(1.05);
}

.tlr-card-body {
  flex: 1;
  min-width: 0;
}

.tlr-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.35;
  transition: color var(--transition-fast);
}

.tlr-card.selected .tlr-card-title {
  color: #312e81;
  font-weight: 700;
}

.tlr-check-indicator {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 6px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: transparent;
  transition: all var(--transition-fast);
}

.tlr-card:hover .tlr-check-indicator {
  border-color: #818cf8;
}

.tlr-card.selected .tlr-check-indicator {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.35);
}

/* Custom TLR Input Container */
.custom-tlr-wrapper {
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 14px;
}

.custom-tlr-wrapper label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.custom-tlr-wrapper input {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13.5px;
  width: 100%;
}

.custom-tlr-wrapper input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

/* Pedagogy Grid & Card Styles */
.pedagogy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.pedagogy-card {
  position: relative;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  min-height: 110px;
}

.pedagogy-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pedagogy-card:hover {
  border-color: #a5b4fc;
  background: #fafbff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.09);
}

.pedagogy-card.selected {
  background: #f5f3ff;
  border-color: #6366f1;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.15);
}

.pedagogy-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.pedagogy-card-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pedagogy-badge-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 8px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.pedagogy-card.selected .pedagogy-badge-icon {
  background: #e0e7ff;
}

.pedagogy-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.3;
}

.pedagogy-card.selected .pedagogy-card-title {
  color: #312e81;
}

.pedagogy-check-badge {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: transparent;
  transition: all var(--transition-fast);
}

.pedagogy-card:hover .pedagogy-check-badge {
  border-color: #818cf8;
}

.pedagogy-card.selected .pedagogy-check-badge {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.35);
}

.pedagogy-card-desc {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.45;
}

.pedagogy-card.selected .pedagogy-card-desc {
  color: #475569;
}

/* Pedagogy Footer Bar */
.pedagogy-action-bar {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
}

.generate-btn-lg {
  padding: 13px 28px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.generate-btn-lg:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
  background: linear-gradient(135deg, #4338ca 0%, #312e81 100%);
}

.generate-btn-lg:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Official Lesson Note Preview Sheet */
.ges-lesson-document {
  margin-bottom: 32px;
  background: #ffffff;
  padding: 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-paper);
  border: 1px solid var(--border-default);
}

.ges-table-week-header {
  text-align: center;
  font-family: 'Times New Roman', Times, serif;
  font-size: 14pt;
  font-weight: bold;
  color: #000000;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.ges-official-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-family: 'Times New Roman', Times, serif;
  font-size: 12pt;
}

.ges-official-table td,
.ges-official-table th {
  border: 1.5px solid #000000;
  padding: 10px 12px;
  vertical-align: top;
  color: #000000;
  line-height: 1.45;
}

.ges-official-table p,
.sol-table p,
.combined-doc-table p,
table p {
  margin-top: 0;
  margin-bottom: 0;
}

.phase-header-row td {
  font-weight: bold;
  background-color: #f8fafc;
}

.editable-cell {
  outline: none;
  min-height: 24px;
  padding: 2px;
  border-radius: 4px;
  transition: background var(--transition-fast);
}

.editable-cell:focus {
  background-color: #fef9c3;
  box-shadow: 0 0 0 2px #ca8a04;
}

/* ==========================================================================
   FACILITATOR & LEARNER TEACHING NOTE DOCUMENT DISPLAY
   ========================================================================== */
.guiding-note-document {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--text-main);
}

.gn-header-badge-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.gn-badge {
  background: #f1f5f9;
  color: #334155;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.gn-badge.primary {
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

.gn-badge.accent {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.gn-curriculum-reference-box {
  background: #f8fafc;
  border-left: 4px solid #3b82f6;
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.gn-title-hero {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e2e8f0;
}

.gn-title-hero h2 {
  font-size: 22px;
  font-weight: 800;
  color: #1e3a8a;
  margin: 0 0 6px 0;
  line-height: 1.3;
}

.gn-title-hero p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0;
}

.gn-section-block {
  margin-bottom: 24px;
}

.gn-section-block h3 {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gn-content-box {
  background: #f8fafc;
  border-left: 4px solid var(--primary);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  font-size: 14px;
  line-height: 1.65;
  color: #334155;
  white-space: pre-line;
}

/* Natural Pedagogical Teaching & Learner Note Styles */
.tn-intro-card {
  font-size: 14.5px;
  line-height: 1.7;
  color: #1e293b;
  background: #f8fafc;
  border-left: 4px solid #4f46e5;
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 22px;
  white-space: pre-line;
}

.tn-section-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 18px 22px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.tn-section-card h3 {
  font-size: 16.5px;
  font-weight: 700;
  color: #1e3a8a;
  margin: 0 0 10px 0;
}

.tn-section-text {
  font-size: 14px;
  line-height: 1.65;
  color: #334155;
  white-space: pre-line;
  margin-bottom: 12px;
}

.tn-examples-block {
  margin-top: 10px;
  margin-bottom: 12px;
}

.tn-examples-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
}

.tn-examples-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tn-example-pill {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
}

.tn-structure-flow {
  background: #f0fdf4;
  border: 1px dashed #22c55e;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: #15803d;
  display: inline-block;
  margin-top: 8px;
}

.tn-math-block {
  background: #0f172a;
  color: #38bdf8;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  line-height: 1.5;
  padding: 14px 18px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 10px 0;
  white-space: pre;
}

.tn-comparison-card {
  margin: 24px 0;
}

.tn-comparison-card h3 {
  font-size: 16.5px;
  font-weight: 700;
  color: #1e3a8a;
  margin: 0 0 10px 0;
}

.tn-comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin-top: 8px;
}

.tn-comparison-table th {
  background: #1e3a8a;
  color: #ffffff;
  padding: 10px 14px;
  border: 1px solid #1e3a8a;
  font-weight: 700;
  text-align: left;
}

.tn-comparison-table td {
  padding: 9px 14px;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  line-height: 1.5;
  vertical-align: top;
}

.tn-comparison-table tr:nth-child(even) td {
  background: #f8fafc;
}

.tn-rule-card {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-left: 5px solid #d97706;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 22px 0;
}

.tn-rule-card h3 {
  font-size: 15.5px;
  font-weight: 700;
  color: #92400e;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tn-rule-card p {
  font-size: 14px;
  line-height: 1.6;
  color: #78350f;
  margin: 0;
  white-space: pre-line;
  font-weight: 500;
}

.tn-practice-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px 24px;
  margin-top: 24px;
}

.tn-practice-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tn-practice-list {
  padding-left: 20px;
  margin: 0;
}

.tn-practice-list li {
  font-size: 14px;
  line-height: 1.65;
  color: #334155;
  margin-bottom: 8px;
}

/* Status Box */
.status-box {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 14px;
}

.status-box.info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.status-box.success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.status-box.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100005;
  padding: 20px;
}

.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-default);
}

.modal-content.modal-lg {
  max-width: 900px;
}

.modal-header {
  padding: 22px 28px;
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 26px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 28px;
}

.modal-footer {
  padding: 18px 28px;
  border-top: 1px solid var(--border-default);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: var(--bg-card-alt);
}

/* Quiz & Rubrics Cards */
.quiz-question-card {
  background: var(--bg-card-alt);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.quiz-q-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 800;
  font-size: 14px;
  color: var(--primary);
}

.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.quiz-opt-item {
  background: #ffffff;
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all var(--transition-fast);
}

.quiz-opt-item.correct {
  border-color: var(--green-border);
  background: var(--green-bg);
  color: var(--green-text);
  font-weight: 700;
}

.rubric-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.rubric-table th, .rubric-table td {
  border: 1px solid var(--border-default);
  padding: 14px 16px;
  font-size: 13.5px;
  text-align: left;
}

.rubric-table th {
  background: #f1f5f9;
  font-weight: 800;
  color: var(--text-main);
}

/* Textbook Hub Cards */
.resource-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.resource-card {
  background: #ffffff;
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.resource-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.rc-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.rc-icon {
  font-size: 28px;
}

.rc-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rc-meta-tags {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.rc-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.rc-tag.subj { background: var(--indigo-bg); color: var(--indigo-text); }
.rc-tag.cls { background: var(--amber-bg); color: var(--amber-text); }
.rc-tag.size { background: #f1f5f9; color: var(--text-muted); }

.rc-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.rc-btn-view {
  flex: 1;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  color: var(--primary);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.rc-btn-view:hover {
  background: #e0e7ff;
}

.rc-btn-use {
  flex: 1;
  background: var(--primary);
  border: 1px solid var(--primary);
  color: white;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.rc-btn-use:hover {
  background: var(--primary-hover);
}

.rc-btn-download-icon {
  background: #f8fafc;
  border: 1px solid var(--border-default);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 13px;
}

.rc-btn-delete {
  background: #fff5f5;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
}
.rc-btn-delete:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

/* Responsive */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-split-grid { grid-template-columns: 1fr; }
  .tools-cards-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .app-layout { flex-direction: column; }
  .app-sidebar { width: 100%; height: auto; position: relative; }
  .stats-grid { grid-template-columns: 1fr; }
  .quick-actions-grid { grid-template-columns: 1fr; }
  .content-body { padding: 18px; }
  .app-topbar { padding: 18px; flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* Document Reader Modal */
.modal-content.modal-xl {
  max-width: 96vw;
  width: 96vw;
  height: 92vh;
  display: flex;
  flex-direction: column;
}

.resource-iframe-view {
  width: 100%;
  height: 100%;
  border: none;
  background: #1e293b;
}

.rv-loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #94a3b8;
  gap: 14px;
  font-size: 15px;
}

.rv-html-reader {
  padding: 32px;
  background: #ffffff;
  color: #1e293b;
  overflow-y: auto;
  height: 100%;
  line-height: 1.7;
}

.rv-doc-title-bar {
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 16px;
  margin-bottom: 24px;
}

/* ==========================================================================
   EXECUTIVEITECH POS STYLE ENTERPRISE AUTHENTICATION SYSTEM
   ========================================================================== */

.auth-fullscreen-shell {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  background: radial-gradient(circle at 15% 20%, #1e293b 0%, #0f172a 60%, #020617 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 24px;
}

.auth-fullscreen-shell.hidden {
  display: none !important;
}

.auth-background-mesh {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  opacity: 0.6;
  pointer-events: none;
}

.auth-split-wrapper {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  max-width: 1100px;
  width: 100%;
  min-height: 640px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 40px rgba(79, 70, 229, 0.15);
  overflow: hidden;
}

/* Left Hero Panel */
.auth-hero-panel {
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.auth-brand-logo {
  font-size: 32px;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  padding: 8px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.auth-brand-name {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.auth-brand-sub {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.02em;
  margin-top: 2px;
}

.auth-hero-content {
  margin: 32px 0;
}

.auth-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 20px;
}

.status-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.auth-hero-content h1 {
  font-size: 30px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.auth-hero-content p {
  font-size: 14.5px;
  color: #94a3b8;
  line-height: 1.65;
  margin-bottom: 28px;
}

.auth-features-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-feature-pill {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.auth-feature-pill:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateX(4px);
}

.auth-feature-pill .feat-icon {
  font-size: 22px;
  background: rgba(255, 255, 255, 0.08);
  padding: 6px;
  border-radius: 8px;
}

.auth-feature-pill strong {
  display: block;
  font-size: 13.5px;
  color: #f1f5f9;
  margin-bottom: 2px;
}

.auth-feature-pill p {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.4;
}

.auth-hero-footer {
  font-size: 12px;
  color: #64748b;
}

/* Right Card Panel */
.auth-card-panel {
  position: relative;
  padding: 48px 44px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-card-top-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #4f46e5 0%, #06b6d4 50%, #10b981 100%);
}

.auth-card-header {
  margin-bottom: 24px;
}

.auth-avatar-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border: 1px solid #c7d2fe;
}

.auth-card-header h2 {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.auth-card-header p {
  font-size: 13.5px;
  color: #64748b;
}

.auth-alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 18px;
}

.auth-alert.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.auth-alert.success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.auth-field {
  margin-bottom: 18px;
}

.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.auth-field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.auth-link-btn {
  background: none;
  border: none;
  color: #4f46e5;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.auth-link-btn:hover {
  text-decoration: underline;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  font-size: 16px;
  color: #94a3b8;
  pointer-events: none;
}

.auth-input-wrapper input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  font-size: 14px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  color: #0f172a;
  transition: all var(--transition-fast);
}

.auth-input-wrapper input:focus {
  background: #ffffff;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
  outline: none;
}

.auth-eye-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
}

.auth-eye-btn:hover {
  color: #334155;
}

.auth-extra-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.auth-remember-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
}

.auth-submit-btn {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
  background: linear-gradient(135deg, #4338ca 0%, #0891b2 100%);
}

.auth-submit-btn:active {
  transform: translateY(0);
}

.auth-footer-actions {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-auth-reset {
  width: 100%;
  padding: 10px 16px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-auth-reset:hover {
  background: #eef2ff;
  border-color: #818cf8;
  color: #4338ca;
  transform: translateY(-1px);
}

.auth-support-note {
  text-align: center;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.auth-support-note strong {
  color: #0f172a;
}

/* User Management Modal & Tables */
.user-mgmt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.user-table-wrap {
  border: 1px solid var(--border-default);
  border-radius: 10px;
  overflow-x: auto;
  background: #ffffff;
  margin-top: 12px;
}

.user-mgmt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.user-mgmt-table th {
  background: #f8fafc;
  padding: 12px 16px;
  font-weight: 700;
  color: #334155;
  border-bottom: 1px solid #e2e8f0;
}

.user-mgmt-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.user-mgmt-table tr:hover {
  background: #fafbff;
}

.role-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.role-badge.developer { background: #fee2e2; color: #991b1b; }
.role-badge.teacher { background: #e0e7ff; color: #3730a3; }

.class-badge-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.subject-badge-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.table-btn-group {
  display: flex;
  gap: 6px;
}

.table-action-btn {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.table-action-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.table-action-btn.delete {
  color: #dc2626;
  border-color: #fca5a5;
}

.table-action-btn.delete:hover {
  background: #fef2f2;
}

/* Modal Tabs */
.modal-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 20px;
  padding-bottom: 8px;
}

.modal-tab-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #64748b;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-tab-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.modal-tab-btn.active {
  background: #eef2ff;
  color: #4338ca;
}

@media (max-width: 900px) {
  .auth-split-wrapper {
    grid-template-columns: 1fr;
    max-width: 500px;
  }
  .auth-hero-panel {
    display: none;
  }
  .auth-card-panel {
    padding: 36px 24px;
  }
}

/* ==========================================================================
   OFFICIAL GES SAMPLE NOTES LIBRARY MODAL STYLES
   ========================================================================== */
.sample-cat-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.sample-filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-default, #e2e8f0);
  background: #ffffff;
  color: #475569;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.sample-filter-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #cbd5e1;
}

.sample-filter-btn.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #1d4ed8;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

.sample-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.18s ease-in-out;
}

.sample-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.sample-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
}

.sample-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.sample-badge-class {
  background: #e0e7ff;
  color: #3730a3;
}

.sample-badge-cat {
  background: #f1f5f9;
  color: #475569;
}

.sample-card-title {
  margin: 0 0 6px 0;
  font-size: 14.5px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.4;
}

.sample-sub {
  margin: 0 0 8px 0;
  font-size: 12.5px;
  color: #334155;
  line-height: 1.45;
}

.sample-snippet {
  font-size: 12.5px;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 6px;
  padding: 8px 12px;
  line-height: 1.5;
}

.no-samples {
  text-align: center;
  padding: 48px 20px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: var(--text-muted, #64748b);
  margin: 12px 0;
}


/* ==========================================================================
   SCHEME OF LEARNING (SOL) STYLES
   ========================================================================== */
.sol-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 10px;
  background: #ffffff;
}

.sol-table th {
  background: #1e3a8a;
  color: #ffffff;
  font-weight: 700;
  padding: 10px 12px;
  border: 1px solid #1e3a8a;
  text-align: left;
  font-size: 12.5px;
  letter-spacing: 0.02em;
}

.sol-table td {
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  vertical-align: top;
  font-size: 12.5px;
  line-height: 1.5;
  color: #1e293b;
}

.sol-table tr:nth-child(even) td {
  background: #f8fafc;
}

.sol-table tr.sol-revision-row td {
  background: #f1f5f9;
  font-weight: 600;
  color: #1e3a8a;
}

.sol-table td[contenteditable="true"]:hover {
  background: #eff6ff;
  outline: 1px dashed #3b82f6;
}

.sol-header-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 14px;
}

/* Multi-aspect SOL cell internal division line */
.sol-aspect-block {
  padding: 4px 0;
}
.sol-aspect-block + .sol-aspect-block {
  border-top: 1px solid #94a3b8;
  margin-top: 6px;
  padding-top: 6px;
}

/* Distinct separation border at the end of each multi-aspect week row */
.sol-table tr.sol-week-last-row td {
  border-bottom: 2px solid #1e3a8a !important;
}
