:root {
  --brand: #ff5c00;
  --brand-dark: #e04e00;
  --bg: #fff8f3;
  --surface: #ffffff;
  --surface-soft: #fff1e7;
  --line: #ead8ca;
  --text: #111111;
  --muted: #5d5d5d;
  --success: #168a45;
  --warning: #c76a00;
  --danger: #b42318;
  --shadow: 0 18px 36px rgba(17, 17, 17, 0.08);
  --radius-lg: 22px;
  --radius-md: 14px;
  --sidebar-width: 270px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: var(--text);
}
button, input, select, textarea { font: inherit; }
a { color: inherit; }
label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}
input, select, textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
}
textarea { min-height: 110px; resize: vertical; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small-text { font-size: 0.86rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: none;
  padding: 11px 16px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
}
.button--primary {
  background: var(--brand-dark);
  color: #fff;
}
.button--secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid rgba(255, 92, 0, 0.28);
}
.button--soft {
  background: var(--surface-soft);
  color: var(--text);
  border: 1px solid rgba(255, 92, 0, 0.16);
}
.button:hover { opacity: 0.94; }

.landing-body,
.auth-body {
  min-height: 100vh;
  background: linear-gradient(180deg, #fff7f0 0%, #fff 100%);
}
.landing-shell,
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.landing-hero,
.auth-card {
  width: min(100%, 720px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 34px;
}
.brand-logo {
  display: block;
  width: min(220px, 58%);
  height: auto;
  margin: 0 0 22px;
}
.brand-logo--hero {
  width: min(280px, 70%);
  margin-inline: auto;
}
.site-brand__img {
  width: 56px;
  height: 56px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}
.landing-hero {
  text-align: center;
  padding: 44px 40px;
}
.landing-hero .landing-copy {
  max-width: 560px;
  margin: 14px auto 0;
}
.landing-actions {
  justify-content: center;
  margin-top: 26px;
}
.auth-card {
  padding: 36px 28px 32px;
  text-align: center;
}
.auth-card .brand-logo {
  width: 88px;
  margin: 0 auto 18px;
}
.auth-card h1 {
  margin-top: 0;
}
.landing-kicker {
  margin: 0 0 12px;
  color: var(--brand-dark);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.landing-hero h1,
.auth-card h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.04;
}
.landing-copy,
.auth-copy,
.auth-note,
.auth-linkline {
  color: var(--muted);
  font-size: 1rem;
}
.landing-actions,
.auth-tabs,
.portal-toolbar,
.inline-actions,
.class-meta,
.metrics-grid,
.cards-grid,
.form-grid,
.filter-row,
.detail-grid,
.notice-list,
.portal-grid,
.split-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.auth-tabs {
  margin: 22px 0 24px;
  justify-content: center;
}
.auth-tab {
  border: 1px solid rgba(255, 92, 0, 0.18);
  background: #fff;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 700;
  color: var(--muted);
}
.auth-tab.is-active {
  background: var(--surface-soft);
  color: var(--text);
  border-color: rgba(255, 92, 0, 0.24);
}
.auth-form {
  display: grid;
  gap: 14px;
  text-align: left;
}
.auth-form__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}
.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--muted);
}
.checkbox-row input {
  width: 16px;
  height: 16px;
  margin: 0;
}
.auth-reset {
  border: none;
  background: transparent;
  color: var(--brand-dark);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.message {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(22, 138, 69, 0.12);
  color: var(--success);
  font-weight: 700;
}
.auth-note { margin-top: 16px; }
.auth-linkline { margin-top: 12px; }

.site-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 92, 0, 0.16);
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.site-brand strong,
.site-brand span {
  display: block;
}
.site-brand strong {
  font-size: 1.05rem;
  line-height: 1.1;
}
.site-brand span {
  color: rgba(255,255,255,0.84);
  font-size: 0.84rem;
}
.portal-toolbar {
  align-items: center;
}
.portal-shell {
  padding: 20px;
}
.portal-grid {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: 20px;
  align-items: start;
}
.sidebar,
.panel,
.metric-card,
.class-card,
.course-card,
.request-card,
.notification-card,
.announcement-card,
.program-card,
.sidebar-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.sidebar {
  position: sticky;
  top: 86px;
  padding: 18px;
}
.sidebar-welcome {
  background: var(--surface-soft);
  border: 1px solid rgba(255, 92, 0, 0.16);
  border-radius: 18px;
  padding: 16px;
}
.sidebar-section { margin-top: 18px; }
.sidebar-title {
  margin: 0 0 10px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.nav-list,
.sidebar-list,
.notice-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nav-item {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  text-align: left;
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 700;
}
.nav-item:hover { background: rgba(255, 92, 0, 0.08); }
.nav-item.is-active {
  background: rgba(255, 92, 0, 0.14);
  border-color: rgba(255, 92, 0, 0.22);
}
.sidebar-card { padding: 12px 14px; background: var(--surface-soft); }
.portal-main { min-width: 0; }
.portal-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}
.portal-header h1 {
  margin: 0;
  font-size: 2rem;
}
.portal-banner {
  background: var(--brand);
  color: #111;
  border-radius: 24px;
  padding: 24px;
}
.portal-banner h2 { margin: 0 0 8px; }
.portal-banner p { margin: 0; max-width: 760px; color: #111; }
.pill,
.filter-chip,
.status-chip,
.request-chip,
.count-chip,
.role-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 700;
}
.role-chip,
.count-chip { background: var(--surface-soft); color: var(--text); }
.filter-chip {
  background: #fff;
  color: var(--muted);
  border: 1px solid var(--line);
  cursor: pointer;
}
.filter-chip.is-active {
  background: var(--surface-soft);
  color: var(--text);
  border-color: rgba(255, 92, 0, 0.22);
}
.status-chip--live { background: rgba(22,138,69,0.12); color: var(--success); }
.status-chip--upcoming { background: rgba(199,106,0,0.12); color: var(--warning); }
.status-chip--completed { background: rgba(93,93,93,0.12); color: var(--muted); }
.request-chip--pending { background: rgba(199,106,0,0.12); color: var(--warning); }
.request-chip--approved { background: rgba(22,138,69,0.12); color: var(--success); }
.request-chip--rejected { background: rgba(180,35,24,0.12); color: var(--danger); }
.metrics-grid { margin-top: 18px; }
.metric-card,
.class-card,
.course-card,
.request-card,
.notification-card,
.announcement-card,
.program-card { flex: 1 1 280px; padding: 18px; }
.metric-card strong { display: block; margin-top: 8px; font-size: 1.95rem; }
.panel { padding: 20px; }
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.panel-header h3,
.card-title { margin: 0; }
.form-grid > div,
.detail-grid > div,
.split-grid > section,
.split-grid > article { flex: 1 1 240px; }
.form-grid .full { flex-basis: 100%; }
.embed-frame {
  width: 100%;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-top: 16px;
  background: #fff;
}
.notice-strip {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--text);
  border: 1px solid rgba(255, 92, 0, 0.16);
}

@media (max-width: 1100px) {
  .portal-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}
@media (max-width: 760px) {
  .site-topbar,
  .portal-header,
  .panel-header { flex-direction: column; align-items: stretch; }
  .portal-shell,
  .landing-shell,
  .auth-shell { padding: 14px; }
  .landing-hero,
  .auth-card,
  .panel,
  .sidebar { padding: 18px; }
  .brand-logo--hero,
  .auth-card .brand-logo {
    margin-left: auto;
    margin-right: auto;
  }
  .auth-form__meta {
    flex-direction: column;
    align-items: flex-start;
  }
  .site-brand__img {
    width: 48px;
    height: 48px;
  }
  .site-toolbar,
  .portal-toolbar,
  .button { width: 100%; }
}
