﻿:root {
  --bg: #f3f6fb;
  --bg-strong: #e8eef9;
  --surface: #ffffff;
  --surface-alt: #f8fbff;
  --ink: #20263a;
  --muted: #6f7a93;
  --line: #dfe7f4;
  --line-strong: #ccd8eb;
  --primary: #58b9f8;
  --primary-strong: #2f7be5;
  --accent: #f3d96f;
  --accent-strong: #f2c84b;
  --teal: #4fc5bd;
  --success: #2ea970;
  --danger: #d65268;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-soft: 0 18px 42px rgba(35, 66, 130, 0.08);
  --shadow-float: 0 26px 55px rgba(26, 53, 107, 0.12);
  --sidebar-w: 272px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

h1,
h2,
h3,
h4,
h5,
h6,
.sidebar-brand strong,
.btn,
th {
  font-family: "Sora", "Manrope", sans-serif;
}

.bg-soft {
  background:
    radial-gradient(70rem 40rem at -10% -10%, rgba(88, 185, 248, 0.22), transparent 65%),
    radial-gradient(52rem 30rem at 110% -5%, rgba(243, 217, 111, 0.2), transparent 65%),
    linear-gradient(158deg, #f4f7fc 0%, #f7faff 52%, #eef4fb 100%);
}

.bg-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.bg-ambient-a {
  background:
    radial-gradient(circle at 18% 25%, rgba(88, 185, 248, 0.22), transparent 34%),
    radial-gradient(circle at 80% 80%, rgba(79, 197, 189, 0.15), transparent 36%);
}

.bg-ambient-b {
  background:
    radial-gradient(circle at 92% 14%, rgba(243, 217, 111, 0.24), transparent 24%),
    radial-gradient(circle at 25% 90%, rgba(242, 200, 75, 0.12), transparent 28%);
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -3;
  opacity: 0.45;
  background-image:
    linear-gradient(rgba(105, 136, 189, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(105, 136, 189, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
}

.app-ready .bg-ambient {
  opacity: 1;
}

.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: 1.2rem;
  min-height: 100vh;
  padding: 1rem;
}

.app-sidebar {
  position: sticky;
  top: 1rem;
  align-self: start;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px) saturate(120%);
  box-shadow: var(--shadow-soft);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-badge {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(145deg, var(--primary-strong), var(--teal));
  box-shadow: 0 11px 20px rgba(47, 123, 229, 0.25);
}

.brand-copy strong {
  display: block;
  line-height: 1.1;
  font-size: 1rem;
}

.brand-copy small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

.sidebar-close {
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 34px;
  height: 34px;
  background: #fff;
  color: var(--muted);
}

.sidebar-section {
  margin: 0.9rem 0 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sidebar-links {
  display: grid;
  gap: 0.3rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border-radius: 10px;
  color: #546281;
  text-decoration: none;
  padding: 0.52rem 0.62rem;
  font-weight: 600;
  font-size: 0.87rem;
  transition: all 0.18s ease;
}

.sidebar-link i {
  font-size: 0.95rem;
  width: 18px;
}

.sidebar-link:hover,
.sidebar-link.active {
  color: #2f5fbb;
  background: linear-gradient(120deg, rgba(88, 185, 248, 0.2), rgba(79, 197, 189, 0.16));
}

.app-stage {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.app-topbar {
  position: sticky;
  top: 1rem;
  z-index: 20;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px) saturate(125%);
  box-shadow: var(--shadow-soft);
  padding: 0.72rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.topbar-search {
  width: 340px;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  padding: 0.38rem 0.75rem;
}

.topbar-search i {
  color: #8a95ae;
}

.topbar-search input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 0.9rem;
}

.topbar-search input:focus {
  outline: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.app-install-btn {
  white-space: nowrap;
}

.scope-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.34rem 0.7rem;
}

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

.app-footer {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 0.78rem;
  padding: 0.65rem 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(27, 36, 61, 0.44);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.btn {
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.btn-primary {
  border: none;
  background: linear-gradient(130deg, var(--primary-strong), var(--primary));
  box-shadow: 0 11px 24px rgba(47, 123, 229, 0.24);
}

.btn-primary:hover {
  background: linear-gradient(130deg, #2b69cf, #4daff0);
}

.btn-dark {
  border: none;
  background: linear-gradient(130deg, #3a4d77, #586e9f);
}

.btn-ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: #4f5f81;
}

.btn-ghost:hover {
  border-color: #bfd0e8;
  color: #304f88;
}

.btn-outline-dark {
  border-color: #bfcee3;
  color: #3e5a89;
}

.btn-outline-dark:hover {
  background: #eff5ff;
  border-color: #a8c1e5;
  color: #30508b;
}

.card,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 255, 0.95));
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.stat-card::before {
  content: "";
  position: absolute;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  right: -26px;
  top: -30px;
  opacity: 0.65;
  background: radial-gradient(circle, rgba(88, 185, 248, 0.45), transparent 64%);
}

.icon-pill {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(140deg, var(--primary-strong), var(--teal));
}

.quick-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #3f5786;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0.7rem 0.85rem;
  transition: all 0.18s ease;
}

.quick-link:hover {
  color: #2e5bac;
  border-color: #a9c3e8;
  transform: translateY(-1px);
}

.table {
  color: var(--ink);
}

.table thead th {
  background: #f1f6fd;
  color: #50658f;
  border-bottom: 1px solid var(--line);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.table tbody td {
  border-color: #e5edf9;
}

.table tbody tr:hover {
  background: rgba(88, 185, 248, 0.08);
}

.form-label {
  font-weight: 700;
  font-size: 0.82rem;
  color: #4b5f86;
}

.form-control,
.form-select,
textarea,
input,
select {
  border: 1px solid #c8d6ec;
  border-radius: 12px;
  background: #fbfdff;
  color: var(--ink);
}

.form-control:focus,
.form-select:focus,
textarea:focus,
input:focus,
select:focus {
  border-color: var(--primary-strong);
  box-shadow: 0 0 0 0.2rem rgba(47, 123, 229, 0.12);
}

.input-group-text {
  border-radius: 12px;
  border: 1px solid #c8d6ec;
  background: #f4f8ff;
  color: #5f7399;
}

.pagination {
  gap: 0.35rem;
}

.page-link {
  border-radius: 999px;
  border: 1px solid #c4d4ea;
  color: #3c5a8f;
  background: #fff;
}

.page-item.active .page-link,
.page-link:hover {
  border-color: transparent;
  background: linear-gradient(125deg, var(--primary-strong), var(--primary));
  color: #fff;
}

.badge {
  border-radius: 999px;
  padding: 0.4rem 0.62rem;
}

.app-alert {
  border: 1px solid #d1dff2;
  border-radius: 13px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(88, 185, 248, 0.12), rgba(243, 217, 111, 0.16)), #fff;
  padding: 1.15rem 1.2rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-soft);
}

.page-hero::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -88px;
  top: -110px;
  border-radius: 42% 58% 48% 52%;
  background: radial-gradient(circle at 35% 35%, rgba(88, 185, 248, 0.28), transparent 63%);
}

.page-hero .hero-art {
  width: 116px;
  height: 72px;
  border-radius: 12px;
  border: 1px solid #dce8f8;
  background:
    linear-gradient(120deg, rgba(88, 185, 248, 0.2), rgba(243, 217, 111, 0.23)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 250'%3E%3Crect width='400' height='250' fill='%23f8fbff'/%3E%3Cpath d='M0 188 L92 138 L170 166 L245 102 L316 150 L400 110 L400 250 L0 250 Z' fill='%23dbe8ff'/%3E%3Crect x='56' y='82' width='64' height='40' rx='6' fill='%2389cbff'/%3E%3Crect x='136' y='62' width='84' height='58' rx='8' fill='%2358b9f8'/%3E%3Crect x='246' y='72' width='70' height='52' rx='6' fill='%23f3d96f'/%3E%3Ccircle cx='334' cy='44' r='14' fill='%234fc5bd'/%3E%3C/svg%3E") center/cover no-repeat;
}

.list-toolbar {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.7rem;
  box-shadow: var(--shadow-soft);
  margin-bottom: 0.9rem;
}

.kpi-strip {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 0.9rem;
}

.kpi-tile {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0.7rem 0.8rem;
  box-shadow: var(--shadow-soft);
}

.kpi-tile .label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.kpi-tile .value {
  font-size: 1.18rem;
  font-weight: 700;
}

.empty-state {
  text-align: center;
  padding: 1.9rem 1rem;
  color: var(--muted);
}

.empty-state .icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.68rem;
  background: linear-gradient(130deg, rgba(88, 185, 248, 0.2), rgba(243, 217, 111, 0.2));
  color: #3e74c3;
  font-size: 1.3rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.26rem 0.56rem;
}

.status-paid {
  color: #1f8a5f;
  background: rgba(46, 169, 112, 0.16);
}

.status-partial {
  color: #8d6e0f;
  background: rgba(243, 217, 111, 0.33);
}

.status-unpaid {
  color: #9f3952;
  background: rgba(214, 82, 104, 0.15);
}

.status-overpaid {
  color: #2e5ca7;
  background: rgba(88, 185, 248, 0.2);
}

.progress-soft {
  height: 10px;
  border-radius: 999px;
  background: #e7eef8;
  overflow: hidden;
}

.progress-soft .bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(125deg, var(--primary-strong), var(--teal));
}

.metric-panel {
  border: 1px dashed #bfd0e8;
  border-radius: 12px;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.7);
}

.switch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.switch-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.82rem;
  background: #fff;
}

.switch-card .school-title {
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.tt-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 250px;
  gap: 0.9rem;
}

.tt-side,
.tt-main,
.tt-agenda {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: var(--shadow-soft);
}

.tt-side,
.tt-agenda {
  padding: 0.85rem;
}

.tt-profile {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.tt-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-strong), var(--teal));
}

.tt-name {
  font-size: 0.9rem;
  font-weight: 700;
}

.tt-role {
  color: var(--muted);
  font-size: 0.76rem;
}

.tt-side-group {
  margin-bottom: 0.9rem;
}

.tt-side-title {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  margin-bottom: 0.48rem;
}

.tt-nav-link {
  display: flex;
  align-items: center;
  gap: 0.46rem;
  border-radius: 9px;
  text-decoration: none;
  color: #496390;
  padding: 0.42rem 0.52rem;
  margin-bottom: 0.28rem;
}

.tt-nav-link:hover,
.tt-nav-link.active {
  background: rgba(88, 185, 248, 0.16);
  color: #315fad;
}

.tt-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #d8e4f5;
  border-radius: 9px;
  padding: 0.4rem 0.55rem;
  margin-bottom: 0.34rem;
  font-size: 0.8rem;
}

.tt-main {
  padding: 0.9rem;
}

.tt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.7rem;
}

.tt-overline {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}

.tt-title {
  margin: 0;
  font-size: 1.35rem;
}

.tt-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.tt-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.55rem;
  border: 1px solid #d9e4f5;
  border-radius: 13px;
  background: #fff;
  padding: 0.64rem;
  margin-bottom: 0.75rem;
}

.tt-filter-item {
  min-width: 160px;
}

.tt-filter-buttons {
  display: flex;
  gap: 0.4rem;
}

.tt-grid-wrap {
  overflow-x: auto;
  border: 1px solid #d7e3f4;
  border-radius: 13px;
}

.tt-grid-table {
  min-width: 760px;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.tt-grid-table th,
.tt-grid-table td {
  border-bottom: 1px solid #e6edf8;
  border-right: 1px solid #edf2fb;
  padding: 0.42rem;
  vertical-align: top;
}

.tt-grid-table th {
  background: #f4f8fd;
  color: #54658d;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tt-time-col {
  width: 146px;
  background: #fbfdff;
}

.tt-period-name {
  font-weight: 700;
  font-size: 0.82rem;
}

.tt-period-time {
  font-size: 0.7rem;
  color: var(--muted);
}

.tt-slot-card {
  min-height: 84px;
  border: 1px solid #ccdbf1;
  border-left: 4px solid var(--primary-strong);
  border-radius: 11px;
  padding: 0.48rem;
  background: linear-gradient(145deg, #ffffff, #f6faff);
}

.tt-slot-title {
  font-size: 0.83rem;
  font-weight: 700;
  margin-bottom: 0.14rem;
}

.tt-slot-meta {
  font-size: 0.73rem;
  color: var(--muted);
}

.tt-slot-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.3rem;
}

.tt-slot-actions a {
  color: #4c6391;
}

.tt-slot-actions a:hover {
  color: #2f5eab;
}

.tt-empty-slot {
  height: 84px;
  border-radius: 11px;
  border: 1px dashed #c2d5ed;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6682b2;
  text-decoration: none;
  font-size: 1rem;
}

.tt-empty-slot:hover {
  background: #f2f7ff;
  color: #2f65ba;
}

.tt-agenda-header h2 {
  margin: 0.1rem 0 0.6rem;
  font-size: 1.05rem;
}

.tt-mini-calendar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.33rem;
  margin-bottom: 0.75rem;
}

.tt-mini-calendar span {
  text-align: center;
  font-size: 0.7rem;
  color: #5f79a5;
  border: 1px solid #d7e3f3;
  border-radius: 7px;
  padding: 0.3rem;
}

.tt-mini-calendar span.is-active {
  border-color: #afd0f2;
  background: rgba(88, 185, 248, 0.2);
  color: #2f62af;
}

.tt-agenda-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 0.52rem;
  padding: 0.48rem 0;
  border-bottom: 1px dashed #d8e4f6;
}

.tt-agenda-time {
  font-size: 0.74rem;
  font-weight: 700;
  color: #5878aa;
}

.tt-agenda-title {
  font-size: 0.82rem;
  font-weight: 700;
}

.tt-agenda-meta {
  font-size: 0.72rem;
  color: var(--muted);
}

.inline-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.inline-filter .form-select {
  min-width: 165px;
  width: auto;
}

.mini-chart {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem;
  background: #fff;
}

.bar-chart {
  height: 170px;
  display: flex;
  align-items: end;
  gap: 0.7rem;
  padding-top: 0.7rem;
}

.bar-chart .bar-item {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: end;
}

.bar-chart .bar {
  width: 100%;
  min-height: 8px;
  border-radius: 10px 10px 6px 6px;
  background: linear-gradient(180deg, var(--primary), var(--primary-strong));
  box-shadow: 0 10px 14px rgba(47, 123, 229, 0.19);
}

.bar-chart .bar.alt {
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  box-shadow: 0 10px 14px rgba(242, 200, 75, 0.23);
}

.bar-chart .bar-label {
  margin-top: 0.4rem;
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 700;
}

.bar-chart .bar-value {
  margin-bottom: 0.34rem;
  color: #4a6394;
  font-size: 0.75rem;
  font-weight: 700;
}

.report-sheet {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  padding: 1.1rem;
}

.report-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px dashed #d4e2f4;
  margin-bottom: 0.9rem;
}

.report-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}

.report-metric {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fbff;
  padding: 0.72rem 0.8rem;
}

.report-metric .label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.report-metric .value {
  font-size: 1.3rem;
  font-family: "Sora", "Manrope", sans-serif;
  font-weight: 700;
}

.report-foot {
  border-top: 1px dashed #d4e2f4;
  padding-top: 0.8rem;
}

.to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-strong), #f2ae4b);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 80;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.52s ease, transform 0.52s ease;
}

.reveal.is-visible,
.app-ready .reveal {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.08s;
}

.reveal-delay-2 {
  transition-delay: 0.16s;
}

.ghana-hero {
  margin-bottom: 1rem;
}

.ghana-hero__surface {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(50rem 25rem at 100% 0%, rgba(235, 194, 61, 0.12), transparent 70%),
    radial-gradient(40rem 20rem at 0% 100%, rgba(22, 141, 83, 0.11), transparent 70%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.98));
  box-shadow: var(--shadow-soft);
  padding: 1rem;
}

.ghana-hero__flagline {
  height: 8px;
  border-radius: 999px;
  margin-bottom: 1rem;
  background:
    linear-gradient(90deg,
      #c93b34 0 33.333%,
      #e0b228 33.333% 66.666%,
      #208e59 66.666% 100%);
  box-shadow: 0 6px 16px rgba(34, 52, 87, 0.1);
}

.ghana-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid #e8dcae;
  border-radius: 999px;
  background: rgba(255, 250, 230, 0.9);
  color: #6f5a10;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.38rem 0.65rem;
}

.ghana-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #208e59;
  box-shadow: 0 0 0 4px rgba(32, 142, 89, 0.15);
  animation: ghPulse 1.8s ease-in-out infinite;
}

.ghana-title {
  font-size: clamp(1.35rem, 1.1rem + 1vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ghana-subtitle {
  max-width: 62ch;
  color: #586684;
  line-height: 1.55;
}

.ghana-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ghana-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid #dbe5f3;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #475d89;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.38rem 0.62rem;
}

.ghana-chip i {
  color: #b48709;
}

.ghana-context-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.ghana-context-card {
  border: 1px solid #dfe7f4;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  padding: 0.75rem;
}

.ghana-context-card .label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6f7b95;
}

.ghana-context-card .value {
  margin-top: 0.2rem;
  font-family: "Sora", "Manrope", sans-serif;
  font-weight: 700;
  color: #233459;
  font-size: 1.05rem;
}

.ghana-media-card {
  position: relative;
  border: 1px solid #dfe7f4;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.8rem;
  box-shadow: var(--shadow-soft);
}

.ghana-kente-glow {
  position: absolute;
  inset: auto -30px -34px auto;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  opacity: 0.3;
  background:
    radial-gradient(circle at 50% 50%, rgba(201, 59, 52, 0.6), transparent 56%),
    conic-gradient(from 0deg, #c93b34, #e0b228, #208e59, #c93b34);
  filter: blur(18px);
  pointer-events: none;
}

.ghana-photo-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0.65rem;
}

.ghana-photo-card {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid #d9e4f4;
  background: #eef4fb;
  box-shadow: 0 12px 24px rgba(32, 52, 89, 0.08);
  transform: translateY(0);
  animation: ghFloat 8s ease-in-out infinite;
}

.ghana-photo-card.large {
  grid-row: span 2;
  min-height: 292px;
  animation-duration: 9s;
}

.ghana-photo-card:nth-child(2) {
  animation-delay: -2s;
}

.ghana-photo-card:nth-child(3) {
  animation-delay: -4s;
}

.ghana-photo-card img {
  width: 100%;
  height: 100%;
  min-height: 138px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.ghana-photo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 45%, rgba(16, 22, 34, 0.46)),
    linear-gradient(135deg, rgba(201, 59, 52, 0.12), rgba(32, 142, 89, 0.1));
}

.ghana-photo-card:hover img {
  transform: scale(1.04);
}

.ghana-photo-card figcaption {
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  bottom: 0.45rem;
  z-index: 1;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.ghana-mini-panel {
  margin-top: 0.7rem;
  border: 1px dashed #cfddf2;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(201, 59, 52, 0.04) 0 20%, transparent 20% 40%, rgba(224, 178, 40, 0.05) 40% 60%, transparent 60% 80%, rgba(32, 142, 89, 0.05) 80% 100%),
    #fff;
  padding: 0.7rem;
}

.ghana-mini-panel__title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #30476d;
  margin-bottom: 0.2rem;
}

.gh-stat-card {
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gh-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-float);
}

.gh-stat-caption {
  margin-top: 0.2rem;
  font-size: 0.72rem;
  color: #7b889f;
}

.gh-lane-card {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(249, 252, 255, 0.96)),
    #fff;
}

.gh-lane-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.gh-lane {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
  border: 1px solid #dbe5f3;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.7rem;
}

.gh-lane__icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(201, 59, 52, 0.95), rgba(224, 178, 40, 0.95) 55%, rgba(32, 142, 89, 0.95));
  box-shadow: 0 10px 20px rgba(38, 58, 94, 0.12);
}

.gh-panel {
  background: rgba(255, 255, 255, 0.92);
}

.gh-insight-box {
  border: 1px solid #dfe7f4;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(201, 59, 52, 0.04), rgba(224, 178, 40, 0.06), rgba(32, 142, 89, 0.04)),
    #fff;
  padding: 0.8rem;
}

.gh-insight-box__title {
  font-weight: 700;
  color: #334a72;
  margin-bottom: 0.45rem;
}

.gh-insight-list {
  margin: 0;
  padding-left: 1rem;
  color: #5f6d88;
  font-size: 0.82rem;
}

.gh-insight-list li + li {
  margin-top: 0.3rem;
}

@keyframes ghFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes ghPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(32, 142, 89, 0.2);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(32, 142, 89, 0);
  }
}

@media (max-width: 1199px) {
  .ghana-context-grid,
  .gh-lane-grid {
    grid-template-columns: 1fr;
  }

  .ghana-photo-card.large {
    min-height: 240px;
  }

  .app-layout {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .tt-shell {
    grid-template-columns: 1fr;
  }

  .tt-side,
  .tt-agenda {
    order: 2;
  }
}

@media (max-width: 991px) {
  .app-layout {
    grid-template-columns: 1fr;
    padding: 0.75rem;
  }

  .app-sidebar {
    position: fixed;
    left: 0.75rem;
    top: 0.75rem;
    bottom: 0.75rem;
    width: min(86vw, 300px);
    max-height: none;
    transform: translateX(calc(-100% - 1rem));
    transition: transform 0.2s ease;
    z-index: 70;
  }

  .app-layout.sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  .app-layout.sidebar-open .app-overlay {
    opacity: 1;
    visibility: visible;
  }

  .app-topbar {
    top: 0.75rem;
    padding: 0.62rem 0.72rem;
  }

  .topbar-search {
    width: 100%;
  }

  .topbar-actions {
    gap: 0.35rem;
  }

  .app-footer {
    font-size: 0.72rem;
  }

  .ghana-photo-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ghana-photo-card.large {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 210px;
  }

  .page-hero .hero-art {
    display: none;
  }
}

@media (max-width: 575px) {
  .ghana-hero__surface {
    padding: 0.8rem;
  }

  .ghana-chip-row {
    gap: 0.4rem;
  }

  .ghana-chip {
    width: 100%;
    justify-content: center;
  }

  .ghana-photo-grid {
    grid-template-columns: 1fr;
  }

  .ghana-photo-card.large {
    min-height: 180px;
  }

  .app-layout {
    gap: 0.7rem;
  }

  .app-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions {
    justify-content: space-between;
  }

  .list-toolbar .ms-auto {
    margin-left: 0 !important;
    width: 100%;
  }

  .list-toolbar .ms-auto .btn {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ghana-badge .dot,
  .ghana-photo-card,
  .reveal,
  .to-top {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  body {
    background: #fff;
  }

  .app-sidebar,
  .app-topbar,
  .app-footer,
  .to-top,
  .ghana-hero,
  .page-hero {
    display: none !important;
  }

  .app-layout {
    display: block;
    padding: 0;
  }

  .app-stage {
    display: block;
  }

  .app-main {
    padding: 0;
  }

  .report-sheet {
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
  }
}
