:root {
  --primary: #0f4c81;
  --primary-soft: #e7f0f7;
  --secondary: #d4af37;
  --background: #f8fafc;
  --surface: #ffffff;
  --border: #e5e7eb;
  --text: #132238;
  --muted: #64748b;
  --success: #2a9d63;
  --warning: #f59e0b;
  --danger: #dc2626;
  --shadow: 0 15px 35px rgba(15, 76, 129, 0.08);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--background);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.nav-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1rem;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.nav-links,
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-links a {
  color: var(--muted);
  font-weight: 500;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(15, 76, 129, 0.16);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-secondary {
  background: white;
  color: var(--primary);
  border-color: var(--border);
}

.hero,
.section,
.footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.hero-landing {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  padding-top: 40px;
  padding-bottom: 40px;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2rem, 3.6vw, 3.3rem);
  margin: 10px 0 16px;
  line-height: 1.15;
}

.hero-copy p,
.section-heading p,
.panel p,
.feature-card p,
.testimonial-card p,
.table-wrapper p {
  color: var(--muted);
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.76rem;
  color: var(--secondary);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}

.hero-stats div,
.stat-card,
.mini-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.hero-stats strong,
.stat-card strong,
.mini-card strong {
  display: block;
  font-size: 1.15rem;
}

.hero-card {
  background: linear-gradient(140deg, white, var(--primary-soft));
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.hero-card-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.chip {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: white;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
}

.chip-gold {
  background: #fff8d8;
  color: var(--secondary);
}

.mini-grid,
.feature-grid,
.testimonial-grid,
.stats-grid,
.gallery-grid {
  display: grid;
  gap: 18px;
}

.feature-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-card,
.testimonial-card,
.panel,
.table-card,
.card,
.list-card,
.assignment-card,
.notification-card,
.material-card,
.profile-card,
.summary-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.section {
  padding-top: 24px;
  padding-bottom: 24px;
}

.section-alt {
  background: linear-gradient(180deg, #fcfdff, #f6f9fc);
  border-radius: 28px;
  margin-top: 24px;
}

.section-heading {
  margin-bottom: 18px;
}

.split-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}

.check-list {
  padding-left: 18px;
  color: var(--muted);
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.testimonial-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-grid {
  grid-template-columns: 1.3fr 1fr 1fr;
}

.gallery-card {
  min-height: 220px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background-size: cover;
  background-position: center;
}

.card-one {
  background: linear-gradient(135deg, rgba(15, 76, 129, 0.9), rgba(212, 175, 55, 0.35));
}

.card-two {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.45), rgba(15, 76, 129, 0.7));
}

.card-three {
  background: linear-gradient(135deg, rgba(46, 73, 117, 0.75), rgba(20, 32, 46, 0.95));
}

.footer {
  padding-top: 12px;
  padding-bottom: 40px;
  color: var(--muted);
  text-align: center;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  background: var(--background);
}

.sidebar {
  background: linear-gradient(180deg, #0d3d64, #0f4c81 65%, #14456e);
  color: white;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar .brand {
  margin-bottom: 8px;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.9);
  transition: background 0.2s, transform 0.2s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(2px);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
}

.main-shell {
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
}

.breadcrumbs {
  color: var(--muted);
  font-size: 0.95rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 999px;
  min-width: 220px;
}

.search-box input {
  border: 0;
  outline: none;
  width: 100%;
  background: transparent;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.metric-card strong {
  display: block;
  font-size: 1.35rem;
  color: var(--primary);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  margin-bottom: 18px;
}

.welcome-banner {
  background: linear-gradient(135deg, var(--primary), #205485);
  color: white;
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.welcome-banner .btn-secondary {
  background: rgba(255, 255, 255, 0.14);
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.list-card ul,
.notification-list,
.timeline-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list-card li,
.notification-list li,
.timeline-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.list-card li:last-child,
.notification-list li:last-child,
.timeline-list li:last-child {
  border-bottom: 0;
}

.status-pill {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill.success {
  background: #eaf8ee;
  color: var(--success);
}

.status-pill.warning {
  background: #fff7e6;
  color: var(--warning);
}

.status-pill.danger {
  background: #fdecec;
  color: var(--danger);
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 18px;
}

.grid-2 {
  grid-template-columns: 1fr 1fr;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.empty-state {
  text-align: center;
  padding: 34px 18px;
  color: var(--muted);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 20, 35, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 40;
}

.modal {
  width: min(560px, 100%);
  background: white;
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: var(--text);
  color: white;
  padding: 12px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: 0.24s ease;
  z-index: 50;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.upload-area {
  border: 2px dashed var(--border);
  border-radius: 20px;
  padding: 28px;
  text-align: center;
  background: linear-gradient(180deg, #fdfefe, #f7fbfe);
}

.upload-area.active {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  background: #e9eef6;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  width: 0;
  transition: width 0.2s ease;
}

.file-preview {
  margin-top: 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  display: none;
}

.profile-card {
  display: grid;
  gap: 16px;
}

.profile-photo {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  font-weight: 700;
}

@media (max-width: 960px) {
  .feature-grid,
  .stats-grid,
  .testimonial-grid,
  .grid-3,
  .dashboard-grid,
  .split-grid,
  .hero-landing,
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }
}

@media (max-width: 720px) {
  .nav-shell,
  .topbar,
  .page-header,
  .hero-actions,
  .hero-stats,
  .quick-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    display: none;
  }

  .feature-grid,
  .stats-grid,
  .testimonial-grid,
  .gallery-grid,
  .grid-2,
  .grid-3,
  .dashboard-grid,
  .hero-landing,
  .split-grid {
    grid-template-columns: 1fr;
  }

  .main-shell {
    padding: 16px;
  }

  .search-box {
    min-width: 0;
    width: 100%;
  }
}

/* ==========================================================================
   Additions for the live app: forms, auth screen, and utility helpers.
   These follow the same tokens as the design system above.
   ========================================================================== */

.hidden {
  display: none !important;
}

/* ---------- Forms ---------- */
.form {
  display: grid;
  gap: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field > span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: white;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.12);
}

.field textarea {
  resize: vertical;
  min-height: 96px;
  font-family: inherit;
}

.field-hint {
  font-size: 0.78rem;
  color: var(--muted);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---------- Auth screen ---------- */
.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 20px;
  background: linear-gradient(135deg, var(--primary), #08304f 55%, #0a1a2b);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: white;
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: 0 30px 60px rgba(3, 20, 35, 0.35);
}

.auth-card .brand {
  justify-content: center;
  margin-bottom: 6px;
}

.auth-tagline {
  text-align: center;
  color: var(--muted);
  margin: 0 0 20px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  background: var(--primary-soft);
  border-radius: 999px;
  margin-bottom: 20px;
}

.auth-tab {
  padding: 9px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
}

.auth-tab.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 8px 18px rgba(15, 76, 129, 0.25);
}

.auth-footnote {
  margin-top: 18px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Role picker on the signup form */
.role-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.role-option {
  position: relative;
}

.role-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-option span {
  display: block;
  padding: 13px 12px;
  text-align: center;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.role-option input:checked + span {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.role-option input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.18);
}

/* ---------- Feedback ---------- */
.form-message {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  min-height: 1.2em;
}

.form-message.error {
  color: var(--danger);
}

.form-message.success {
  color: var(--success);
}

/* ---------- Content bits ---------- */
.note-body {
  background: var(--primary-soft);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 10px 0 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.9rem;
  max-height: 220px;
  overflow: auto;
}

.meta-line {
  color: var(--muted);
  font-size: 0.8rem;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  color: var(--muted);
}

.user-chip strong {
  color: var(--text);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.spinner-row {
  padding: 26px;
  text-align: center;
  color: var(--muted);
}

.submission-item {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.submission-item:first-child {
  border-top: 0;
}

@media (max-width: 720px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* The mockup styled .modal-backdrop but never opened it — this is the open state. */
.modal-backdrop.open {
  display: flex;
}

.modal {
  max-height: 88vh;
  overflow-y: auto;
}

.upload-area {
  cursor: pointer;
}

.welcome-banner {
  margin-bottom: 22px;
}

.welcome-banner h3 {
  margin: 0 0 6px;
}

.welcome-banner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

/* The design system only reset `.list-card ul`, so a <ul class="list-card">
   kept its bullets and indent. Reset the element itself too. */
ul.list-card {
  list-style: none;
}

.list-card li {
  align-items: center;
}

.list-card li .status-pill {
  flex-shrink: 0;
}
