@import url("https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap");

:root {
  font-family: "Tajawal", Tahoma, Arial, sans-serif;
}

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --text: #162033;
  --muted: #64748b;
  --line: #d8dee9;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --blue: #2563eb;
  --amber: #b45309;
  --red: #b91c1c;
  --green: #15803d;
  --sidebar: #172033;
  --sidebar-muted: #9fb0c7;
  --shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Tajawal", Tahoma, Arial, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.auth-body {
  min-height: 100vh;
  background: #e9eef5;
}

.marketing-body {
  background: #f8fafc;
}

.marketing-nav {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(18px, 5vw, 72px);
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.marketing-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
}

.marketing-logo span {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #f59e0b;
  color: #111827;
  font-weight: 800;
}

.marketing-nav nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #475569;
  font-weight: 700;
}

.marketing-nav nav a:hover {
  color: var(--primary-dark);
}

.nav-cta {
  background: var(--primary);
  color: #fff !important;
  border-radius: 8px;
  padding: 10px 14px;
}

.marketing-hero {
  min-height: calc(82vh - 72px);
  display: flex;
  align-items: center;
  padding: clamp(34px, 7vw, 86px);
  color: #fff;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.34) 0%, rgba(15, 23, 42, 0.68) 48%, rgba(15, 23, 42, 0.94) 100%),
    url("marketing-smart-dashboard.svg") center left / min(760px, 58vw) auto no-repeat,
    #102033;
}

.hero-copy {
  max-width: 680px;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.12;
}

.hero-copy p {
  margin: 0 0 24px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-metrics {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.hero-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.42);
  color: #e2e8f0;
  font-weight: 700;
}

.hero-metrics strong {
  color: #fbbf24;
  font-size: 22px;
}

.marketing-link {
  color: #fef3c7;
  font-weight: 800;
}

.guided-start-section {
  background: #fff;
}

.guided-start-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  gap: 18px;
  align-items: stretch;
}

.guided-flow {
  display: grid;
  gap: 10px;
}

.guided-flow a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.guided-flow span {
  grid-row: span 2;
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #0f766e;
  color: #fff;
  font-weight: 900;
}

.guided-flow strong {
  font-size: 18px;
}

.guided-flow small,
.guided-preview p {
  color: var(--muted);
  line-height: 1.75;
}

.guided-preview {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #172033;
  color: #fff;
  box-shadow: var(--shadow);
}

.guided-preview-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.guided-preview-header a {
  padding: 7px 10px;
  border-radius: 8px;
  background: #f59e0b;
  color: #111827;
  font-weight: 800;
}

.guided-preview table {
  width: 100%;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 4px;
}

.guided-preview th,
.guided-preview td {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  text-align: center;
}

.guided-preview thead th {
  background: rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
}

.guided-preview td small {
  color: #cbd5e1;
}

.conflict-sample {
  background: #451a03 !important;
  color: #fed7aa;
  font-weight: 800;
}

.marketing-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.marketing-strip div {
  padding: 26px clamp(20px, 4vw, 52px);
  background: #fff;
}

.marketing-strip strong,
.marketing-strip span {
  display: block;
}

.marketing-strip strong {
  margin-bottom: 8px;
  font-size: 19px;
}

.marketing-section,
.marketing-cta-band {
  padding: clamp(42px, 7vw, 86px) clamp(18px, 5vw, 72px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 24px;
}

.section-heading h2,
.marketing-cta-band h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
}

.visual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 18px;
}

.visual-grid figure {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.visual-grid img {
  display: block;
  width: 100%;
  height: auto;
}

.visual-grid figcaption {
  padding: 14px 16px 18px;
  color: var(--muted);
}

.process-section {
  background: #eef6f5;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.process-grid div {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.process-grid span {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 8px;
  background: #172033;
  color: #fff;
  font-weight: 800;
}

.process-grid strong {
  display: block;
  margin-bottom: 8px;
}

.process-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.marketing-cta-band {
  background: #172033;
  color: #fff;
  text-align: center;
}

.marketing-cta-band p {
  max-width: 760px;
  margin: 14px auto 24px;
  color: #cbd5e1;
}

.plans-preview {
  max-width: 860px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 auto 24px;
}

.plans-preview span {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #e2e8f0;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
}

.auth-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px clamp(28px, 7vw, 96px);
  background: linear-gradient(135deg, #102033 0%, #0f3a3f 52%, #7c4a13 100%);
  color: #fff;
}

.brand-mark,
.logo span {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #f59e0b;
  color: #111827;
  font-weight: 800;
}

.auth-intro h1 {
  max-width: 760px;
  margin: 28px 0 18px;
  font-size: clamp(32px, 6vw, 62px);
  line-height: 1.08;
}

.auth-intro p {
  max-width: 680px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.9;
}

.auth-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.auth-points span {
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  padding: 8px 14px;
  color: #f8fafc;
}

.auth-panel {
  align-self: center;
  margin: 28px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.activation-shell {
  min-height: calc(100vh - 72px);
  display: grid;
  place-items: center;
  padding: 28px;
}

.activation-panel {
  width: min(520px, 100%);
  padding: 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.activation-panel h1 {
  margin: 0 0 12px;
  font-size: 30px;
}

.activation-code {
  direction: ltr;
  margin: 18px 0;
  padding: 14px;
  border-radius: 8px;
  background: #ecfdf5;
  color: #065f46;
  font-size: 30px;
  font-weight: 800;
  text-align: center;
  letter-spacing: 4px;
}


.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 18px;
  padding: 4px;
  background: #eef2f7;
  border-radius: 8px;
}

.auth-tabs a {
  text-align: center;
  padding: 10px;
  border-radius: 6px;
  color: var(--muted);
}

.auth-tabs a.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--sidebar);
  color: #fff;
  padding: 22px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.nav-list {
  display: grid;
  gap: 4px;
  padding-bottom: 36px;
}

.nav-list a {
  color: var(--sidebar-muted);
  padding: 11px 12px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-list a:hover,
.nav-list a.active {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.main-shell {
  min-width: 0;
}

.topbar {
  min-height: 86px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 28px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(10px);
}

.topbar h1,
.topbar p {
  margin: 0;
}

.topbar h1 {
  font-size: 23px;
}

.topbar-subtitle {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
}

.eyebrow {
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 8px;
}

.topbar-actions,
.inline-form,
.button-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.danger-inline {
  margin-top: 8px;
  justify-content: flex-start;
}

.content {
  padding: 26px 28px 48px;
}

.workflow-strip {
  margin: 16px 28px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.workflow-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.workflow-head strong,
.workflow-head small {
  display: block;
}

.workflow-head strong {
  color: var(--text);
  font-size: 17px;
}

.workflow-head small {
  margin-top: 4px;
  color: var(--muted);
}

.workflow-progress {
  height: 7px;
  margin: 14px 0;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.workflow-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--blue));
}

.workflow-rail {
  display: grid;
  grid-template-columns: repeat(10, minmax(92px, 1fr));
  gap: 8px;
}

.workflow-step {
  min-height: 78px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 4px 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
}

.workflow-step span {
  grid-row: 1 / 3;
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-weight: 900;
  font-size: 12px;
}

.workflow-step strong {
  color: var(--text);
  font-size: 13px;
}

.workflow-step small {
  font-size: 11px;
}

.workflow-step.done,
.workflow-step.active-done {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.workflow-step.done span,
.workflow-step.active-done span {
  background: #dcfce7;
  color: var(--green);
}

.workflow-step.active,
.workflow-step.active-done {
  outline: 2px solid rgba(8, 127, 117, 0.22);
  border-color: var(--primary);
  background: #ecfeff;
}

.workflow-step.blocked {
  opacity: 0.72;
  background: #f8fafc;
}

.hero-band,
.panel,
.toolbar-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-band {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 28px;
  margin-bottom: 18px;
}

.hero-band.compact {
  padding: 22px;
}

.hero-band h2,
.panel h2,
.panel h3 {
  margin: 0 0 10px;
}

.hero-band p,
.panel p {
  margin-top: 0;
}

.quality-card {
  min-width: 190px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.quality-card span,
.quality-card small {
  color: var(--muted);
}

.quality-card strong,
.big-number {
  display: block;
  margin: 8px 0;
  color: var(--primary-dark);
  font-size: 38px;
}

.dashboard-guide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}

.dashboard-guide h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.dashboard-guide ol {
  margin: 0;
  padding-inline-start: 22px;
  color: #334155;
  line-height: 1.9;
}

.next-action-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #ecfdf5;
}

.next-action-card.warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.next-action-card.danger {
  border-color: #fecaca;
  background: #fef2f2;
}

.next-action-card h3,
.next-action-card p {
  margin: 0;
}

.next-action-card h3 {
  margin-bottom: 6px;
  font-size: 20px;
}

.next-action-card p {
  color: var(--muted);
}

.guide-actions {
  display: grid;
  gap: 8px;
  min-width: 210px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.compact-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.stats-grid div {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stats-grid strong {
  display: block;
  font-size: 30px;
  color: var(--blue);
  overflow-wrap: anywhere;
}

.stats-grid span,
.muted,
small {
  color: var(--muted);
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.step-card {
  min-height: 126px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-right: 5px solid #94a3b8;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.step-card span,
.badge {
  width: max-content;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #eef2f7;
  color: #475569;
}

.step-card.ok {
  border-right-color: var(--green);
}

.step-card.warn {
  border-right-color: var(--amber);
}

.step-card.bad {
  border-right-color: var(--red);
}

.badge.ok {
  color: var(--green);
  background: #dcfce7;
}

.badge.warn {
  color: var(--amber);
  background: #fef3c7;
}

.badge.bad {
  color: var(--red);
  background: #fee2e2;
}

.two-column,
.three-column {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-column {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.conditions-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.conditions-manager-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.linked-school-box,
.shared-school-picker {
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}

.shared-school-picker {
  display: grid;
  gap: 8px;
}

.compact-picker {
  margin-top: 8px;
  padding: 10px;
  background: #f8fafc;
  border-color: var(--line);
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
}

.linked-school-check {
  align-items: flex-start;
  padding: 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #fff;
}

.linked-school-check span {
  display: grid;
  gap: 2px;
}

.linked-school-check small,
.shared-school-picker small {
  color: var(--muted);
  font-weight: 500;
}

.toolbar-actions,
.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-pill {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 7px 12px;
  background: #f0fdf4;
  color: #166534;
  font-weight: 800;
}

.editable-teachers input,
.editable-teachers select,
.editable-structure input,
.editable-structure select,
.condition-editor-table input,
.condition-editor-table select {
  min-height: 36px;
  padding: 7px 9px;
}

.editable-teachers td,
.editable-structure td,
.condition-editor-table td {
  vertical-align: top;
}

.small-button {
  min-height: 34px;
  padding: 6px 10px;
}

.small-label {
  display: grid;
  gap: 5px;
  color: #64748b;
  font-size: 12px;
}

.tiny-input {
  max-width: 90px;
}

.panel,
.toolbar-panel {
  padding: 20px;
  margin-bottom: 16px;
}

.toolbar-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.stack-form,
.options-form {
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
}

.full {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(15, 118, 110, 0.18);
  border-color: var(--primary);
}

textarea {
  resize: vertical;
  line-height: 1.7;
  font-family: inherit;
}

.auth-link {
  width: max-content;
  color: var(--primary-dark);
  font-weight: 800;
}

.mail-log-body {
  min-width: 320px;
  min-height: 112px;
  font-size: 12px;
  direction: rtl;
}

.activity-log-body {
  min-height: 88px;
  direction: ltr;
  text-align: left;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.check input {
  width: auto;
  min-height: auto;
}

.chips-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
}

.form-actions {
  display: flex;
  justify-content: flex-start;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 16px;
  font-weight: 700;
}

.primary-button {
  background: var(--primary);
  color: #fff;
}

.primary-button:hover {
  background: var(--primary-dark);
}

.primary-button:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.secondary-button {
  background: #e0f2fe;
  color: #075985;
  border-color: #bae6fd;
}

.secondary-button:disabled {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
}

.ghost-button {
  background: #fff;
  border-color: var(--line);
  color: var(--text);
}

.danger-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 8px 12px;
  background: #fee2e2;
  color: var(--red);
  font-weight: 700;
}

.danger-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  background: #ecfdf5;
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: none;
}

.subscription-usage-grid div {
  align-items: stretch;
  text-align: start;
}

.subscription-usage-grid .usage-warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.subscription-usage-grid .usage-full {
  border-color: #fecaca;
  background: #fef2f2;
}

.usage-meter {
  display: block;
  width: 100%;
  height: 9px;
  margin-top: 12px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.usage-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #0ea5e9);
}

.usage-warning .usage-meter i {
  background: #f59e0b;
}

.usage-full .usage-meter i {
  background: #dc2626;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}

.plan-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.plan-card h3,
.plan-card p {
  margin: 8px 0 0;
}

.plan-card strong {
  display: block;
  color: var(--primary-dark);
  margin-top: 6px;
}

.plan-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  font-weight: 700;
}

.plan-card textarea {
  min-height: 82px;
}

.plan-limits {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-weight: 700;
}

.assistant-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.assistant-action {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #ecfdf5;
  text-decoration: none;
  color: var(--text);
}

.assistant-action.warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.assistant-action.danger {
  border-color: #fecaca;
  background: #fef2f2;
}

.assistant-action span {
  color: var(--muted);
  font-size: 13px;
}

.assistant-hero .quality-card {
  text-align: center;
}

.assistant-score.ok {
  border-color: #bbf7d0;
  background: #ecfdf5;
}

.assistant-score.warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.assistant-score.danger {
  border-color: #fecaca;
  background: #fef2f2;
}

.assistant-stats {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.assistant-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 16px;
  margin-top: 16px;
}

.assistant-insight-list {
  display: grid;
  gap: 10px;
}

.assistant-insight {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  color: var(--text);
}

.assistant-insight.warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.assistant-insight.danger {
  border-color: #fecaca;
  background: #fef2f2;
}

.assistant-insight > span {
  grid-row: 1 / 3;
  min-width: 54px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.assistant-insight small {
  color: var(--muted);
}

.assistant-conflicts {
  grid-template-columns: repeat(2, minmax(130px, 1fr));
}

.assistant-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.flash {
  margin: 14px 28px 0;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.auth-panel .flash {
  margin: 0 0 12px;
}

.flash.success {
  background: #ecfdf5;
  color: #065f46;
  border-color: #bbf7d0;
}

.flash.warning {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

.flash.error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.jadwal-swal-popup,
.jadwal-swal-toast {
  font-family: "Tajawal", Tahoma, Arial, sans-serif;
  border-radius: 8px;
}

.jadwal-swal-popup {
  color: #172235;
}

.jadwal-swal-confirm {
  border-radius: 8px !important;
  background: #087f75 !important;
  font-weight: 800 !important;
  box-shadow: 0 10px 18px rgba(8, 127, 117, 0.20) !important;
}

.jadwal-swal-confirm.danger {
  background: #b42318 !important;
  box-shadow: 0 10px 18px rgba(180, 35, 24, 0.18) !important;
}

.jadwal-swal-cancel {
  border-radius: 8px !important;
  background: #eef2f7 !important;
  color: #172235 !important;
  font-weight: 800 !important;
}

.swal-move-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  text-align: right;
}

.swal-move-list li {
  padding: 10px 12px;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  background: #f8fbfc;
  color: #172235;
  font-weight: 700;
}

.swal-move-list strong,
.swal-move-list span {
  display: block;
}

.swal-move-list span {
  margin-top: 3px;
  color: #516073;
  font-size: .9rem;
  font-weight: 600;
}

.swal-move-quality {
  margin: 10px 0 0;
  color: #516073;
}

.swal-move-layers {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  background: #fbfdff;
  text-align: right;
}

.swal-move-layers ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.swal-move-layers li {
  color: #516073;
  font-size: .92rem;
}

.swal-move-layers li.ok {
  color: #047857;
}

.table-wrap {
  width: 100%;
  overflow: auto;
}

.admin-row-form {
  display: grid;
  gap: 8px;
}

.admin-users-table input,
.admin-users-table select {
  min-width: 150px;
}

.limit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.small-button {
  min-height: 36px;
  padding: 7px 12px;
}

.tiny-input {
  min-width: 78px;
  max-width: 92px;
}

.day-check {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 600;
}

.condition-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.condition-summary div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.condition-summary strong,
.condition-summary span {
  display: block;
}

.condition-summary strong {
  font-size: 24px;
  color: var(--primary-dark);
}

.schedule-settings-table th,
.schedule-settings-table td {
  text-align: center;
  vertical-align: middle;
}

.period-count-input {
  min-width: 72px;
  max-width: 86px;
  margin: 0 auto;
  text-align: center;
}

.assignment-dnd {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(360px, 1.15fr);
  gap: 16px;
}

.assignment-workbench .section-toolbar {
  align-items: flex-start;
}

.assignment-control-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin: 18px 0 10px;
}

.assignment-subject-cards,
.teacher-drop-grid {
  display: grid;
  gap: 10px;
}

.assign-subject-card,
.teacher-drop-zone {
  width: 100%;
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: right;
}

.assign-subject-card {
  cursor: grab;
  border-right: 5px solid var(--primary);
  grid-template-columns: 1fr auto;
  align-items: center;
}

.assign-subject-card.selected {
  border-color: var(--primary);
  background: #eefcf7;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.12);
}

.subject-suggest-button {
  white-space: nowrap;
}

.assign-subject-card.dragging,
.teacher-drop-zone.drop-target {
  outline: 2px solid rgba(15, 118, 110, 0.22);
  border-color: var(--primary);
  background: #ecfdf5;
}

.teacher-drop-zone {
  min-height: 76px;
  background: #f8fafc;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.teacher-card-main,
.teacher-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.teacher-card-meta {
  color: var(--muted);
  font-size: 13px;
}

.teacher-fit-badge {
  padding: 4px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.teacher-drop-zone.teacher-recommended,
.teacher-drop-zone.teacher-specialty-match {
  border-color: rgba(15, 118, 110, 0.55);
  background: #f0fdfa;
}

.teacher-drop-zone.teacher-recommended .teacher-fit-badge,
.teacher-drop-zone.teacher-specialty-match .teacher-fit-badge {
  background: #ccfbf1;
  color: #0f766e;
}

.teacher-drop-zone.teacher-capacity-warning {
  border-color: rgba(217, 119, 6, 0.55);
  background: #fffbeb;
}

.teacher-drop-zone.teacher-capacity-warning .teacher-fit-badge {
  background: #fef3c7;
  color: #92400e;
}

.teacher-pulse {
  animation: teacherPulse 1.4s ease;
}

@keyframes teacherPulse {
  0%, 100% { transform: translateY(0); box-shadow: none; }
  35% { transform: translateY(-2px); box-shadow: 0 18px 34px rgba(15, 118, 110, 0.16); }
}

.assign-subject-card span,
.teacher-drop-zone span {
  color: var(--muted);
}

.disabled-slot {
  background: #f8fafc !important;
}

.muted-chip {
  min-height: 52px;
  background: #eef2f7;
  color: #94a3b8;
}

.section-count-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.editable-subjects input,
.editable-subjects select {
  min-width: 120px;
  margin: 3px 0;
}

.small-label {
  margin-top: 8px;
  font-size: 13px;
}

.stage-plan-form .flash {
  margin: 12px 0;
}

.hidden-form {
  display: none;
}

.small-check {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
}

.ad-strip {
  max-width: 1180px;
  margin: 22px auto 0;
  padding: 0 clamp(18px, 5vw, 72px);
}

.ad-strip a,
.ad-strip div {
  display: block;
  padding: 14px 18px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  font-weight: 700;
}

.ad-strip small {
  display: block;
  margin-top: 4px;
  color: #a16207;
  font-weight: 500;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  vertical-align: top;
}

thead th {
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
}

.color-dot {
  width: 12px;
  height: 12px;
  display: inline-block;
  border-radius: 50%;
  margin-left: 8px;
  vertical-align: middle;
}

.inline-delete {
  margin: 0;
}

.inline-delete button,
.lock-form button {
  border: 0;
  background: #fee2e2;
  color: var(--red);
  border-radius: 6px;
  padding: 5px 8px;
}

.issue-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.issue-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-right: 4px solid var(--amber);
  background: #fffbeb;
  border-radius: 8px;
}

.issue-list li span {
  min-width: 0;
}

.issue-list li a {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 7px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 800;
  font-size: 12px;
}

.empty-state {
  padding: 16px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px dashed var(--line);
  color: var(--muted);
}

.timetable-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.timetable {
  min-width: 880px;
}

.timetable th:first-child {
  width: 130px;
}

.timetable td {
  width: 150px;
  min-width: 150px;
  height: 112px;
  padding: 8px;
  background: #fbfdff;
}

.slot-cell {
  transition: background 0.12s ease, box-shadow 0.12s ease;
}

.slot-cell.drop-target {
  background: #ecfeff;
  box-shadow: inset 0 0 0 2px #06b6d4;
}

.slot-cell.drop-loading {
  background: #f8fafc;
  box-shadow: inset 0 0 0 2px #94a3b8;
}

.slot-cell.drop-allowed {
  background: #ecfdf5;
  box-shadow: inset 0 0 0 2px #10b981;
}

.slot-cell.drop-warning {
  background: #fffbeb;
  box-shadow: inset 0 0 0 2px #f59e0b;
}

.slot-cell.drop-blocked {
  background: #fef2f2;
  box-shadow: inset 0 0 0 2px #ef4444;
}

.timetable-inspector-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.compact-panel {
  padding: 16px;
}

.compact-panel h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.mini-metrics,
.drop-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-metrics span,
.drop-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.legend-ok {
  background: #ecfdf5 !important;
  color: #047857 !important;
}

.legend-warning {
  background: #fffbeb !important;
  color: #92400e !important;
}

.legend-blocked {
  background: #fef2f2 !important;
  color: #b91c1c !important;
}

.compact-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.compact-list li {
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
}

.conflict-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.conflict-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff7f7;
}

.conflict-summary-grid strong {
  color: #b91c1c;
  font-size: 24px;
  line-height: 1;
}

.conflict-summary-grid span {
  color: #7f1d1d;
  font-size: 13px;
  font-weight: 800;
}

.manual-change-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 10px;
}

.manual-change-list div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.manual-change-list strong {
  color: var(--text);
  font-size: 14px;
}

.manual-change-list span,
.manual-change-list small {
  color: var(--muted);
  font-size: 12px;
}

.lesson-card {
  position: relative;
  min-height: 92px;
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 10px 10px 32px;
  border: 2px solid var(--blue);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.lesson-card[draggable="true"] {
  cursor: grab;
}

.lesson-card.dragging {
  opacity: 0.5;
}

.lesson-card strong {
  font-size: 15px;
}

.lesson-card small,
.lesson-card em {
  font-style: normal;
  color: var(--muted);
}

.lesson-card em {
  font-size: 11px;
}

.lock-form {
  position: absolute;
  left: 8px;
  bottom: 7px;
  margin: 0;
}

.suggest-slot-button {
  position: absolute;
  right: 8px;
  bottom: 7px;
  min-height: 24px;
  padding: 3px 8px;
  border: 0;
  border-radius: 6px;
  background: #e0f2fe;
  color: #075985;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.suggest-slot-button:hover {
  background: #bae6fd;
}

.lock-form button {
  background: #eef2ff;
  color: #3730a3;
}

.break-col {
  width: 82px !important;
  min-width: 82px !important;
  text-align: center;
  background: #fff7ed !important;
  color: #9a3412;
  font-weight: 700;
}

.activity-chip,
.free-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 72px;
  border-radius: 8px;
  background: #fef3c7;
  color: #92400e;
  font-weight: 700;
}

.free-chip {
  background: #f1f5f9;
  color: #64748b;
}

.compact-cells .lesson-card {
  min-height: 80px;
}

.print-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.teacher-print-form select {
  min-width: 240px;
}

.print-sheet {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.print-sheet > :not(.print-watermarks) {
  position: relative;
  z-index: 1;
}

.print-watermarks {
  position: absolute;
  inset: 34px 20px 70px;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(120px, 1fr);
  align-items: center;
  justify-items: center;
  pointer-events: none;
}

.print-watermarks span {
  transform: rotate(-28deg);
  color: #0f172a;
  font-size: 30px;
  font-weight: 900;
  opacity: 0.065;
  white-space: nowrap;
}

.print-report-header,
.print-report-footer {
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: 18px;
  align-items: center;
  border: 1px solid #111827;
  padding: 12px 14px;
}

.print-report-header {
  margin-bottom: 14px;
}

.print-report-header div,
.print-report-footer div {
  display: grid;
  gap: 4px;
}

.print-report-title {
  text-align: center;
}

.print-report-title h2 {
  margin: 0;
  font-size: 24px;
}

.print-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 14px;
}

.print-summary-grid div {
  padding: 9px 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #eff6ff;
}

.print-summary-grid span,
.print-summary-grid strong {
  display: block;
}

.print-summary-grid span {
  color: #475569;
  font-size: 11px;
  font-weight: 700;
}

.print-summary-grid strong {
  margin-top: 4px;
  color: #0f172a;
  font-size: 16px;
}

.print-report-header span,
.print-report-footer span {
  color: #475569;
  font-size: 13px;
}

.print-table-wrap {
  overflow: auto;
}

.print-timetable,
.print-subject-table {
  min-width: 100%;
  border: 1px solid #111827;
  font-size: 12px;
}

.print-timetable th,
.print-timetable td,
.print-subject-table th,
.print-subject-table td {
  border: 1px solid #334155;
  padding: 6px;
  text-align: center;
  vertical-align: middle;
}

.print-timetable thead th,
.print-subject-table thead th {
  background: #e5e7eb;
  color: #111827;
  font-weight: 800;
}

.general-print-table th:first-child {
  width: 5%;
}

.teacher-print-table th:first-child {
  width: 7%;
}

.horizontal-week-print {
  table-layout: fixed;
  min-width: 1480px;
  font-size: 9px;
}

.horizontal-week-print th,
.horizontal-week-print td {
  width: 36px;
  min-width: 36px;
  padding: 3px 2px;
  line-height: 1.25;
}

.horizontal-week-print .wide-sticky-col {
  width: 116px;
  min-width: 116px;
}

.horizontal-week-print .load-col {
  width: 5%;
  min-width: 42px;
}

.compact-week-cell {
  min-height: 30px;
  display: grid;
  align-content: center;
  gap: 1px;
  border-right: 3px solid var(--blue);
  padding: 2px;
  background: #fff;
}

.compact-week-cell strong,
.compact-week-cell small {
  display: block;
  overflow-wrap: anywhere;
}

.compact-week-cell strong {
  color: #111827;
  font-size: 9px;
}

.compact-week-cell small {
  color: #475569;
  font-size: 7.5px;
}

.teacher-print-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 10px;
}

.teacher-print-meta span {
  padding: 6px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
}

.print-lesson {
  min-height: 44px;
  display: grid;
  align-content: center;
  gap: 2px;
  border-right: 4px solid var(--blue);
  background: #fff;
  padding: 4px;
}

.print-lesson strong,
.print-lesson span,
.print-empty,
.print-activity {
  display: block;
}

.print-lesson span,
.print-empty {
  color: #64748b;
  font-size: 11px;
}

.print-activity {
  color: #92400e;
  font-weight: 800;
}

.print-break-col {
  width: 54px;
  background: #fff7ed !important;
  color: #9a3412;
  font-weight: 800;
}

.section-print-block h3 {
  margin: 12px 0 8px;
}

.print-report-footer {
  margin-top: 18px;
}

.approval-box {
  text-align: center;
}

.free-plan-mark {
  display: inline-block;
  margin-top: 8px;
  padding: 5px 10px;
  border: 1px solid #111827;
  border-radius: 6px;
  color: #111827;
  font-style: normal;
  font-weight: 800;
}

.mt {
  margin-top: 14px;
}

@media (max-width: 1100px) {
  .app-shell,
  .auth-shell,
  .two-column,
  .three-column,
  .conditions-grid,
  .conditions-manager-grid,
  .process-grid,
  .assignment-dnd,
  .marketing-strip,
  .visual-grid,
  .guided-start-grid,
  .dashboard-guide {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid,
  .step-grid,
  .stats-grid,
  .section-count-grid,
  .assignment-control-grid,
  .condition-summary,
  .check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .assignment-control-grid {
    grid-template-columns: 1fr;
  }

  .assign-subject-card,
  .teacher-card-main,
  .teacher-card-meta {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .teacher-card-main,
  .teacher-card-meta {
    flex-direction: column;
  }

  .marketing-nav {
    height: auto;
    align-items: flex-start;
    flex-direction: column;
    padding-block: 12px;
  }

  .marketing-nav nav {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .marketing-hero {
    min-height: 78vh;
    background:
      linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.80) 68%, rgba(15, 23, 42, 0.42) 100%),
      url("marketing-smart-dashboard.svg") center bottom / 96vw auto no-repeat,
      #102033;
    padding-top: 42px;
    padding-bottom: 180px;
  }

  .content,
  .topbar {
    padding-inline: 14px;
  }

  .topbar,
  .hero-band,
  .toolbar-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .form-grid,
  .step-grid,
  .stats-grid,
  .chips-grid,
  .curriculum-two-col,
  .nav-list,
  .section-count-grid,
  .condition-summary,
  .limit-grid,
  .check-grid {
    grid-template-columns: 1fr;
  }

  .inline-edit-form,
  .curriculum-subject-form {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    margin: 16px;
  }
}

/* Modern interface refresh */
:root {
  --bg: #f3f6fa;
  --surface: #ffffff;
  --text: #111827;
  --muted: #5b687a;
  --line: #dfe7ef;
  --primary: #087f75;
  --primary-dark: #075e58;
  --blue: #1d4ed8;
  --amber: #d97706;
  --red: #b42318;
  --green: #15803d;
  --sidebar: #12222f;
  --sidebar-muted: #b8c7d9;
  --shadow: 0 12px 28px rgba(15, 23, 42, 0.075);
}

body {
  background: linear-gradient(180deg, #f8fafc 0%, var(--bg) 42%, #eef4f7 100%);
}

.marketing-body {
  background: #f8fafc;
}

.marketing-nav {
  height: 76px;
  border-bottom-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.marketing-logo span,
.brand-mark,
.logo span {
  background: #f7b731;
  color: #132033;
}

.marketing-hero {
  min-height: min(760px, calc(100vh - 76px));
  align-items: center;
  background:
    linear-gradient(90deg, rgba(9, 18, 31, 0.30) 0%, rgba(14, 34, 48, 0.66) 48%, rgba(14, 34, 48, 0.96) 100%),
    linear-gradient(180deg, rgba(9, 18, 31, 0.12) 0%, rgba(9, 18, 31, 0.36) 100%),
    url("marketing-smart-dashboard.svg") left 7% center / min(780px, 58vw) auto no-repeat,
    #102033;
}

.hero-copy {
  max-width: 740px;
}

.hero-copy h1 {
  max-width: 760px;
  font-weight: 800;
  text-wrap: balance;
}

.hero-copy p {
  max-width: 700px;
}

.hero-actions .primary-button {
  min-height: 48px;
  padding-inline: 22px;
}

.marketing-link {
  color: #fde68a;
}

.hero-metrics span {
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(8px);
}

.guided-flow a,
.process-grid div,
.visual-grid figure,
.panel,
.toolbar-panel,
.hero-band,
.auth-panel {
  border-color: rgba(148, 163, 184, 0.32);
}

.guided-flow a:hover,
.process-grid div:hover,
.visual-grid figure:hover {
  border-color: rgba(8, 127, 117, 0.38);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.guided-preview {
  background: #132033;
  border-color: rgba(255, 255, 255, 0.10);
}

.app-shell {
  background: transparent;
}

.sidebar {
  background: linear-gradient(180deg, #102033 0%, #12313b 55%, #132033 100%);
  border-inline-start: 1px solid rgba(255, 255, 255, 0.06);
}

.logo {
  padding: 8px 6px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-list {
  gap: 6px;
}

.nav-group-label {
  display: block;
  padding: 16px 12px 5px;
  color: rgba(226, 232, 240, 0.72);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.nav-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  color: var(--sidebar-muted);
  border: 1px solid transparent;
}

.nav-list a:hover,
.nav-list a.active {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.08);
}

.main-shell {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,255,255,0) 260px),
    transparent;
}

.topbar {
  min-height: 84px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.content {
  max-width: 1540px;
  margin-inline: auto;
  width: 100%;
}

.hero-band,
.panel,
.toolbar-panel {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.hero-band {
  position: relative;
  overflow: hidden;
}

.hero-band::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--primary), var(--amber));
}

.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.section-toolbar h2,
.section-toolbar p {
  margin: 0;
}

.smart-form {
  padding-top: 4px;
}

.curriculum-two-col {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(420px, 1.2fr);
  gap: 18px;
  margin-top: 18px;
}

.inline-edit-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 86px auto auto;
  gap: 8px;
  align-items: center;
}

.curriculum-subject-form {
  grid-template-columns: minmax(140px, 1fr) 92px minmax(130px, 0.85fr) 70px 70px 130px 56px 74px auto auto;
}

.compact-table table {
  min-width: 0;
}

label {
  color: #243447;
}

input,
select,
textarea {
  border-color: #d6e0ea;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #b8c6d6;
}

input:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(8, 127, 117, 0.12);
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.primary-button {
  background: linear-gradient(180deg, #0b8f84, var(--primary-dark));
  box-shadow: 0 10px 18px rgba(8, 127, 117, 0.20);
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(8, 127, 117, 0.24);
}

.secondary-button {
  background: #eef6ff;
  color: #144a8b;
  border-color: #c8ddf5;
}

.ghost-button {
  background: #fff;
}

.stats-grid div,
.quality-card,
.dashboard-guide,
.next-action-card {
  border-color: rgba(148, 163, 184, 0.32);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.045);
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

thead th {
  background: #f3f7fb;
  color: #243447;
  border-bottom: 1px solid var(--line);
}

tbody tr:hover td {
  background: #fbfdff;
}

.badge {
  border-radius: 999px;
}

.admin-mail-hero .inline-form {
  min-width: min(100%, 420px);
}

@media (max-width: 860px) {
  .marketing-hero {
    min-height: auto;
    padding: 42px 18px 170px;
    background:
      linear-gradient(180deg, rgba(9, 18, 31, 0.97) 0%, rgba(9, 18, 31, 0.82) 58%, rgba(9, 18, 31, 0.34) 100%),
      url("marketing-smart-dashboard.svg") center bottom / 96vw auto no-repeat,
      #102033;
  }

  .section-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Public marketing and auth redesign */
.marketing-body {
  background: #f4f8fb;
}

.marketing-nav {
  height: 76px;
  color: #172235;
  background: rgba(248, 251, 252, 0.96);
  border-bottom: 1px solid rgba(22, 34, 51, 0.08);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.055);
}

.marketing-logo span,
.brand-mark,
.logo span {
  background: #efb431;
  color: #142033;
}

.marketing-nav nav {
  gap: 10px;
}

.marketing-nav nav a {
  padding: 9px 10px;
  border-radius: 8px;
}

.marketing-nav nav a:not(.nav-cta):hover {
  background: #edf7f6;
  color: #075e58;
}

.marketing-nav .nav-cta {
  background: #087f75;
  color: #fff !important;
  box-shadow: 0 10px 20px rgba(8, 127, 117, 0.20);
}

.public-nav-toggle,
.public-nav-button {
  display: none;
}

.public-nav-button {
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-direction: column;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 8px;
  background: #fff;
}

.public-nav-button span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #172235;
}

.marketing-hero {
  min-height: min(760px, calc(100vh - 76px));
  justify-content: flex-start;
  padding: clamp(48px, 7vw, 94px);
  background:
    linear-gradient(90deg, rgba(244, 248, 251, 0.08) 0%, rgba(10, 31, 43, 0.38) 30%, rgba(8, 28, 39, 0.98) 66%),
    url("marketing-smart-dashboard.svg") left 4vw center / min(690px, 46vw) auto no-repeat,
    linear-gradient(135deg, #0b3f48 0%, #0c2533 58%, #111827 100%);
}

.hero-copy {
  max-width: 560px;
  margin-inline-start: 0;
  margin-inline-end: auto;
}

.hero-copy .eyebrow,
.auth-intro .eyebrow {
  color: #f8d16a;
}

.hero-copy h1 {
  font-size: clamp(36px, 4.8vw, 58px);
  line-height: 1.08;
}

.hero-copy p {
  color: #e7eef4;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hero-metrics span {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.guided-start-section {
  background: #f8fbfc;
}

.marketing-strip {
  gap: 14px;
  padding: 28px clamp(18px, 5vw, 72px);
  background: #f4f8fb;
  border: 0;
}

.marketing-strip div {
  min-height: 150px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.055);
}

.marketing-strip strong {
  color: #0b3f48;
}

.marketing-strip span,
.section-heading p {
  color: #5b687a;
  line-height: 1.8;
}

.visual-grid figure {
  background: #fff;
  border-color: rgba(148, 163, 184, 0.28);
}

.auth-body {
  background:
    linear-gradient(180deg, #f8fbfc 0%, #edf5f6 100%);
}

.auth-shell {
  min-height: calc(100vh - 76px);
  grid-template-columns: minmax(0, 1fr) minmax(360px, 470px);
  gap: 0;
}

.auth-intro {
  position: relative;
  overflow: hidden;
  padding: clamp(38px, 7vw, 92px);
  background:
    linear-gradient(135deg, rgba(9, 31, 43, 0.96) 0%, rgba(9, 62, 70, 0.90) 58%, rgba(14, 25, 39, 0.98) 100%);
}

.auth-intro::after {
  content: "";
  position: absolute;
  inset-inline-start: clamp(18px, 5vw, 76px);
  bottom: 28px;
  width: min(620px, 56vw);
  aspect-ratio: 16 / 10;
  background: url("marketing-teacher-report.svg") center / contain no-repeat;
  opacity: 0.26;
  pointer-events: none;
}

.auth-intro > * {
  position: relative;
  z-index: 1;
}

.auth-intro h1 {
  max-width: 700px;
  font-size: clamp(34px, 5.2vw, 58px);
}

.auth-intro p {
  max-width: 640px;
  color: #dce8ef;
}

.auth-points span {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

.auth-preview-card {
  width: min(520px, 100%);
  display: grid;
  gap: 10px;
  margin-top: 28px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(8px);
}

.auth-preview-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
}

.auth-preview-card span {
  color: #f8d16a;
  font-weight: 900;
}

.auth-panel {
  align-self: center;
  width: min(100% - 36px, 470px);
  margin: 28px auto;
  border: 1px solid rgba(148, 163, 184, 0.26);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
}

.auth-tabs {
  background: #edf5f6;
}

.auth-tabs a.active {
  color: #075e58;
}

.admin-homepage-hero {
  align-items: center;
}

.homepage-editor-form textarea {
  min-height: 112px;
}

.form-divider {
  padding: 12px 0 4px;
  border-top: 1px solid var(--line);
  color: #0b3f48;
  font-size: 15px;
  font-weight: 900;
}

.public-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(18px, 5vw, 72px);
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  background: #f8fbfc;
  color: #172235;
}

.public-footer div {
  display: grid;
  gap: 4px;
}

.public-footer span {
  color: #64748b;
}

.public-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #475569;
  font-weight: 700;
}

.auth-body .public-footer {
  background: #fff;
}

.smart-move-dialog {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.46);
}

.smart-move-dialog section {
  width: min(560px, 100%);
  max-height: min(680px, calc(100vh - 36px));
  overflow: auto;
  padding: 22px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.smart-move-dialog h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.smart-move-dialog p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.8;
}

.smart-move-dialog ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.smart-move-dialog li {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
  color: #172235;
  font-weight: 700;
}

.smart-move-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

@media (max-width: 760px) {
  .marketing-nav {
    position: static;
    top: auto;
    height: auto;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
  }

  .marketing-logo {
    min-width: 0;
  }

  .public-nav-button {
    display: flex;
  }

  .marketing-nav .public-nav-links {
    grid-column: 1 / -1;
    display: none;
    width: 100%;
    grid-template-columns: 1fr;
    gap: 8px;
    padding-top: 8px;
    overflow: visible;
    white-space: normal;
    color: #172235;
  }

  .public-nav-toggle:checked ~ .public-nav-links {
    display: grid;
  }

  .marketing-nav .public-nav-links a {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    background: #fff;
  }

  .marketing-nav .nav-cta {
    background: #087f75;
    color: #fff !important;
  }

  .marketing-hero {
    min-height: auto;
    justify-content: flex-start;
    padding: 34px 18px 178px;
    background:
      linear-gradient(180deg, rgba(8, 28, 39, 0.97) 0%, rgba(8, 28, 39, 0.86) 58%, rgba(8, 28, 39, 0.32) 100%),
      url("marketing-smart-dashboard.svg") center bottom / 94vw auto no-repeat,
      #0b2533;
  }

  .hero-copy {
    max-width: none;
    margin: 0;
  }

  .hero-copy h1 {
    font-size: 32px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .hero-metrics,
  .marketing-strip,
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .marketing-strip {
    padding: 18px;
  }

  .workflow-strip {
    margin: 12px 14px 0;
    padding: 12px;
  }

  .workflow-head {
    align-items: stretch;
    flex-direction: column;
  }

  .workflow-rail {
    grid-template-columns: 1fr;
  }

  .workflow-step {
    min-height: auto;
  }

  .assistant-stats,
  .assistant-layout,
  .assistant-conflicts {
    grid-template-columns: 1fr;
  }

  .issue-list li {
    align-items: stretch;
    flex-direction: column;
  }

  .issue-list li a {
    width: max-content;
  }

  .timetable-inspector-grid {
    grid-template-columns: 1fr;
  }

  .conflict-summary-grid,
  .manual-change-list {
    grid-template-columns: 1fr;
  }

  .auth-shell {
    display: grid;
    min-height: auto;
  }

  .auth-intro {
    padding: 30px 18px;
  }

  .auth-intro::after {
    width: 86vw;
    opacity: 0.14;
  }

  .auth-intro h1 {
    font-size: 29px;
  }

  .auth-panel {
    width: auto;
    margin: 0;
    border-radius: 0;
    border-inline: 0;
    box-shadow: none;
  }

  .public-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media print {
  @page {
    size: A3 landscape;
    margin: 7mm;
  }

  .sidebar,
  .topbar,
  .toolbar-panel,
  .primary-button,
  .secondary-button,
  .ghost-button,
  .lock-form,
  .no-print {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  body {
    background: #fff;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .content {
    padding: 0;
  }

  .main-shell {
    min-width: 0;
  }

  .panel,
  .hero-band,
  .print-sheet {
    box-shadow: none;
    border: 0;
  }

  .print-sheet {
    padding: 0;
    overflow: visible;
  }

  .print-watermarks {
    position: fixed;
    inset: 22mm 10mm 18mm;
  }

  .print-watermarks span {
    opacity: 0.08;
    font-size: 28px;
  }

  .print-table-wrap {
    overflow: visible;
  }

  .print-timetable,
  .print-subject-table {
    page-break-inside: auto;
  }

  .horizontal-week-print {
    min-width: 100%;
    font-size: 8px;
  }

  .horizontal-week-print th,
  .horizontal-week-print td {
    padding: 2px 1px;
  }

  .compact-week-cell {
    min-height: 24px;
  }

  .print-timetable tr,
  .print-subject-table tr {
    break-inside: avoid;
  }

  .print-page-break {
    break-before: page;
  }

  .print-report-header,
  .print-report-footer {
    break-inside: avoid;
  }
}
