:root {
  --navy: #0f1f3d;
  --navy-2: #162b52;
  --navy-3: #24497a;
  --gold: #c9a85d;
  --gold-soft: #efe4c6;
  --white: #ffffff;
  --bg: #f4f7fb;
  --card: rgba(255,255,255,0.92);
  --text: #142033;
  --muted: #63738f;
  --line: #dde5f1;
  --danger: #b83a32;
  --success: #1b8b5e;
  --shadow: 0 22px 54px rgba(15,31,61,0.12);
  --shadow-soft: 0 12px 30px rgba(15,31,61,0.08);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(201,168,93,.12), transparent 26%),
    radial-gradient(circle at top right, rgba(15,31,61,.10), transparent 32%),
    linear-gradient(180deg,#f8fbff 0%,#eef3f9 100%);
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; }

.container { width: min(calc(100% - 32px), var(--max)); margin: 0 auto; }
.hidden { display: none !important; }
.page-shell { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

.card,
.compact-panel,
.content-card,
.announcement-card,
.event-card,
.highlight-card,
.shortcut-card,
.faq-card,
.contact-card,
.support-card,
.history-item,
.manager-card,
.summary-card,
.quick-link,
.banner-note,
.chat-window,
.chat-list-item,
.restricted-card,
.auth-card {
  min-width: 0;
}

.card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(16px);
  background: rgba(255,255,255,.82);
  border-bottom: 1px solid rgba(15,31,61,.08);
}

.nav {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  object-fit: contain;
  background: #fff;
  padding: 6px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(15,31,61,.08);
}

.brand-badge {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg,var(--navy),var(--navy-2));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}

.brand-text h1,
.brand-text p,
.page-title,
.page-lead,
.card-title,
.card-text,
.kicker,
.eyebrow,
.section-head h2,
.section-head p {
  margin: 0;
}

.brand-text h1 { font-size: 1rem; }
.brand-text p { color: var(--muted); font-size: .86rem; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.nav-links a,
.nav-links button {
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: .25s ease;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links button:hover,
.nav-links .active {
  background: rgba(15,31,61,.08);
  color: var(--navy);
}

.btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
  font-weight: 600;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg,var(--navy),var(--navy-2));
  color: #fff;
  box-shadow: 0 14px 34px rgba(15,31,61,.18);
}

.btn-secondary {
  background: rgba(15,31,61,.08);
  color: var(--navy);
}

.btn-gold {
  background: linear-gradient(135deg,#d2b16a,#b99143);
  color: #1c1f27;
  box-shadow: 0 14px 34px rgba(185,145,67,.2);
}

.btn-danger {
  background: rgba(184,58,50,.1);
  color: var(--danger);
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: .82rem;
  background: rgba(15,31,61,.06);
  color: var(--navy);
  max-width: 100%;
}

.chip.gold {
  background: rgba(201,168,93,.18);
  color: #7b5b1f;
}

.section { padding: 28px 0; }
.section-lg { padding: 44px 0; }

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

.hero-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.inline-actions { margin-top: 16px; }

.banner-shell {
  position: relative;
  overflow: hidden;
  min-height: 310px;
  padding: 0;
  background:
    radial-gradient(circle at 82% 24%, rgba(255,255,255,.16), transparent 18%),
    radial-gradient(circle at 90% 80%, rgba(201,168,93,.26), transparent 20%),
    linear-gradient(135deg,#0b1a36 0%, #15305d 54%, #224879 100%);
  color: #fff;
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.banner-shell::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.08);
  pointer-events: none;
}

.banner-shell::after {
  content: "";
  position: absolute;
  left: -90px;
  top: -90px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.12), transparent 68%);
}

.banner-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0,1.15fr) minmax(320px,.85fr);
  gap: 28px;
  padding: 34px;
  align-items: stretch;
}

.banner-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.banner-title {
  margin: 0;
  font-size: clamp(2.35rem, 4vw, 3.4rem);
  line-height: 1.03;
  letter-spacing: -.04em;
  max-width: 10ch;
}

.banner-text {
  color: rgba(255,255,255,.84);
  line-height: 1.72;
  margin-top: 14px;
  max-width: 58ch;
}

.banner-mini {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.banner-mini span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.12);
  font-size: .9rem;
}

.banner-side {
  display: grid;
  grid-template-rows: minmax(190px,1fr) auto;
  gap: 14px;
  min-width: 0;
}

.banner-logo-box {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 190px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.banner-logo {
  max-width: 190px;
  max-height: 190px;
  object-fit: contain;
  filter: drop-shadow(0 20px 34px rgba(0,0,0,.18));
}

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

.banner-note {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
}

.banner-note strong,
.summary-card strong,
.table-row strong,
.quick-link h3,
.card-title,
.chat-list-item h4,
.history-item h4 {
  display: block;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.banner-note span,
.summary-card span,
.quick-link p,
.card-text,
.history-item p,
.chat-list-item p,
.table-row span,
.page-lead,
.banner-text,
.notice,
.auth-subtitle,
.helper-text,
.small-muted {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.banner-note strong { font-size: .98rem; }

.banner-note span {
  display: block;
  margin-top: 6px;
  color: rgba(255,255,255,.78);
  line-height: 1.58;
  font-size: .92rem;
}

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

.section-head p,
.page-lead,
.card-text,
.helper-text,
.small-muted {
  color: var(--muted);
  line-height: 1.7;
}

.page-title {
  font-size: clamp(1.85rem,3vw,2.7rem);
  line-height: 1.1;
  letter-spacing: -.03em;
}

.kicker {
  color: var(--gold);
  font-size: .83rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(201,168,93,.14);
  color: #d8b46a;
  font-size: .9rem;
  margin-bottom: 16px;
  width: fit-content;
}

.announcement-card,
.event-card,
.highlight-card,
.shortcut-card,
.faq-card,
.contact-card,
.support-card,
.history-item,
.manager-card,
.compact-panel,
.content-card {
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.97), rgba(247,250,255,.92));
  border: 1px solid rgba(15,31,61,.07);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.announcement-image {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 14px;
  border: 1px solid rgba(15,31,61,.08);
}

.meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.card-title { font-size: 1.08rem; }
.compact-stack { display: grid; gap: 18px; }

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0,1.15fr) minmax(320px,.85fr);
  gap: 20px;
  align-items: start;
}

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

.summary-card {
  padding: 18px;
  border-radius: 18px;
  background: rgba(15,31,61,.045);
  overflow: hidden;
}

.summary-card strong {
  font-size: 1.08rem;
  line-height: 1.25;
}

.summary-card span {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.55;
  margin-top: 8px;
  display: block;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
}

.quick-link {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(15,31,61,.06);
  transition: .25s ease;
  overflow: hidden;
}

.quick-link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.quick-link h3,
.quick-link p {
  margin: 0;
}

.quick-link p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.table-like { display: grid; gap: 8px; }

.table-row {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid rgba(15,31,61,.08);
}

.table-row:last-child { border-bottom: 0; }
.table-row strong { line-height: 1.4; }
.table-row span { line-height: 1.65; }

.footer {
  padding: 26px 0 12px;
  border-top: 1px solid rgba(15,31,61,.08);
  background: rgba(255,255,255,.62);
  margin-top: 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1fr;
  gap: 20px;
}

.footer h4,
.footer p { margin: 0; }

.footer p,
.footer li,
.footer a {
  color: var(--muted);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid rgba(15,31,61,.08);
  color: var(--muted);
  font-size: .92rem;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.auth-screen::before,
.auth-screen::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: .6;
}

.auth-screen::before {
  width: 320px;
  height: 320px;
  background: rgba(201,168,93,.28);
  top: -70px;
  left: -40px;
}

.auth-screen::after {
  width: 340px;
  height: 340px;
  background: rgba(15,31,61,.18);
  right: -60px;
  bottom: -100px;
}

.auth-card {
  position: relative;
  z-index: 2;
  width: min(100%, 530px);
  padding: 32px;
  border-radius: 30px;
  background: rgba(255,255,255,.84);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: var(--shadow);
}

.auth-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  margin-bottom: 22px;
}

.auth-logo {
  max-width: 150px;
  max-height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 18px 38px rgba(15,31,61,.14));
}

.auth-title {
  margin: 0;
  font-size: 1.8rem;
}

.auth-subtitle {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.notice {
  margin: 16px 0 20px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(15,31,61,.05);
  color: var(--navy);
  line-height: 1.55;
}

.form-group {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

label {
  font-weight: 600;
  font-size: .95rem;
}

.input,
.textarea {
  width: 100%;
  border: 1px solid rgba(15,31,61,.12);
  background: rgba(255,255,255,.94);
  color: var(--text);
  border-radius: 14px;
  padding: 13px 14px;
  outline: none;
  transition: .2s ease;
}

.textarea {
  min-height: 130px;
  resize: vertical;
}

.input:focus,
.textarea:focus {
  border-color: rgba(15,31,61,.34);
  box-shadow: 0 0 0 4px rgba(15,31,61,.08);
}

.error-text,
.success-text,
.helper-text {
  margin-top: 10px;
  font-size: .92rem;
}

.error-text { color: var(--danger); }
.success-text { color: var(--success); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  margin: 18px 0;
  font-size: .92rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(15,31,61,.12);
}

.google-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(15,31,61,.12);
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.login-loading-card {
  text-align: center;
  display: grid;
  gap: 14px;
  justify-items: center;
}

.loading-spinner {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 6px solid rgba(15,31,61,.10);
  border-top-color: var(--navy);
  animation: cmpms-spin 0.85s linear infinite;
  box-shadow: 0 16px 32px rgba(15,31,61,.10);
}

@keyframes cmpms-spin {
  to {
    transform: rotate(360deg);
  }
}

.restricted-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.restricted-card {
  width: min(100%, 620px);
  padding: 34px;
  text-align: center;
}

.restricted-card h2,
.restricted-card p {
  margin: 0;
}

.restricted-card p {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.guard-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin: 0 auto 18px;
  filter: drop-shadow(0 14px 28px rgba(15,31,61,.14));
}

.chat-shell {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  gap: 20px;
}

.chat-list {
  display: grid;
  gap: 14px;
  align-content: start;
}

.chat-list-item {
  padding: 16px;
  border-radius: 18px;
  background: rgba(15,31,61,.04);
  border: 1px solid rgba(15,31,61,.06);
  cursor: pointer;
  transition: .2s ease;
  overflow: hidden;
}

.chat-list-item:hover,
.chat-list-item.active {
  background: rgba(15,31,61,.08);
}

.chat-list-item h4,
.chat-list-item p,
.chat-list-item span {
  margin: 0;
}

.chat-list-item p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.chat-window {
  min-height: 420px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
}

.chat-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.chat-messages {
  min-height: 260px;
  max-height: 500px;
  overflow: auto;
  display: grid;
  gap: 12px;
  padding-right: 4px;
}

.chat-bubble {
  max-width: min(100%, 78%);
  padding: 12px 14px;
  border-radius: 18px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.chat-bubble.student { background: rgba(15,31,61,.08); }
.chat-bubble.admin { background: rgba(201,168,93,.16); margin-left: auto; }

.chat-compose { display: grid; gap: 12px; }

.empty-box {
  padding: 24px;
  border-radius: 18px;
  border: 1px dashed rgba(15,31,61,.14);
  background: rgba(15,31,61,.02);
  text-align: center;
}

.empty-state {
  padding: 24px;
  border-radius: 18px;
  border: 1px dashed rgba(15,31,61,.14);
  background: rgba(15,31,61,.03);
}

.empty-state h3,
.empty-state p {
  margin: 0;
}

.empty-state p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.65;
}

.status-open { color: #875f0d; }
.status-accepted { color: #116a4a; }
.status-denied { color: var(--danger); }
.status-resolved { color: #2f5bb7; }

.small-muted {
  font-size: .9rem;
  color: var(--muted);
}

.chat-window h3,
.chat-window p {
  margin: 0;
}

.chat-window p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.bubble-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.bubble-role {
  font-size: .84rem;
  font-weight: 800;
  letter-spacing: .01em;
}

.bubble-time {
  font-size: .78rem;
  color: var(--muted);
}

.chat-bubble.me {
  margin-left: auto;
  background: linear-gradient(135deg, rgba(201,168,93,.22), rgba(201,168,93,.14));
  border-top-right-radius: 8px;
}

.chat-bubble.other {
  background: rgba(15,31,61,.07);
  border-top-left-radius: 8px;
}

.chat-bubble.system {
  max-width: 100%;
  background: rgba(47,91,183,.08);
  border: 1px dashed rgba(47,91,183,.22);
}

.chat-bubble p {
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.history-note {
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(15,31,61,.04);
  border: 1px dashed rgba(15,31,61,.12);
  color: var(--muted);
  line-height: 1.65;
}

.denied-window {
  min-height: 220px;
  place-items: center;
}

.denied-note-hero {
  background: rgba(184,58,50,.08);
  border-color: rgba(184,58,50,.18);
  color: #7e2d29;
  width: 100%;
}

.chat-list-item p + p { margin-top: 4px; }

@media (max-width: 1080px) {
  .footer-grid,
  .grid-4,
  .grid-3,
  .banner-grid,
  .chat-shell,
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  .quick-links,
  .mini-summary,
  .banner-side-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  .banner-title { max-width: none; }
}

@media (max-width: 760px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 0;
  }

  .nav-links { width: 100%; }

  .nav-links a,
  .nav-links button {
    flex: 1 1 auto;
    text-align: center;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .footer-grid,
  .quick-links,
  .banner-grid,
  .chat-shell,
  .overview-grid,
  .mini-summary,
  .banner-side-grid {
    grid-template-columns: 1fr;
  }

  .auth-card,
  .restricted-card,
  .content-card,
  .compact-panel {
    padding: 22px;
  }

  .banner-shell { min-height: unset; }
  .banner-grid { padding: 24px; }
  .banner-logo-box { min-height: 150px; }
  .table-row { grid-template-columns: 1fr; gap: 6px; }
  .chat-window { min-height: unset; }
}