:root {
  --brand: #1f4b99;
  --brand-dark: #15356e;
  --surface: #ffffff;
  --bg: #f4f7fb;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --danger-text: #b91c1c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.12);
}

.app-header__bar, .app-header__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.app-header__panel {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  min-width: 0;
}

.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.nav-toggle-btn {
  display: none;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0.45rem;
  padding: 0.32rem 0.7rem;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.app-brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff !important;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.app-header nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.app-header a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.4rem 0.7rem;
  border-radius: 0.5rem;
  transition: background 0.15s ease;
}

.app-header a:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.theme-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.inline { display: inline-flex; gap: 0.35rem; align-items: center; margin: 0; }

.app-header button {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0.45rem;
  padding: 0.32rem 0.7rem;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
}

.app-header button:hover {
  background: rgba(255, 255, 255, 0.26);
}

.switcher select, .switcher-label {
  color: #fff;
  font-size: 0.84rem;
}

.switcher select {
  width: auto;
  min-width: 10rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0.45rem;
  padding: 0.32rem 0.5rem;
}

.switcher option { color: #0f172a; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  flex: 1;
}

/* Auth / Login Split Layout */
.auth-wrap {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 2rem;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  margin: 1rem auto;
}

@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
}

.auth-hero {
  background: linear-gradient(145deg, var(--brand) 0%, #0f172a 100%);
  color: #fff;
  padding: 2.75rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  margin-bottom: 1.25rem;
}

.auth-hero h2 {
  font-size: 1.95rem;
  font-weight: 700;
  line-height: 1.22;
  margin: 0 0 0.9rem;
}

.auth-hero p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.98rem;
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

.auth-pills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.auth-pill {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 0.75rem 0.9rem;
  border-radius: 0.75rem;
  font-size: 0.86rem;
}

.auth-pill strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.2rem;
}

.auth-card {
  padding: 2.75rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-card h1 {
  font-size: 1.65rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.auth-sub {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 1.5rem;
}

.alert {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-text);
  padding: 0.75rem 1rem;
  border-radius: 0.65rem;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.field-group {
  margin-bottom: 1.1rem;
}

label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.4rem;
}

input, select, textarea {
  width: 100%;
  padding: 0.68rem 0.85rem;
  font-size: 0.95rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.6rem;
  background: #f8fafc;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31, 75, 153, 0.15);
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.captcha-box {
  background: #eef2ff;
  color: #1e3a8a;
  border: 1px dashed #93c5fd;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.62rem 1rem;
  border-radius: 0.6rem;
  white-space: nowrap;
}

.btn-primary-modern {
  width: 100%;
  padding: 0.78rem 1.2rem;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  font-weight: 600;
  font-size: 0.98rem;
  border: none;
  border-radius: 0.65rem;
  cursor: pointer;
  margin-top: 0.5rem;
  box-shadow: 0 8px 20px rgba(31, 75, 153, 0.22);
}

.btn-primary-modern:hover {
  filter: brightness(1.06);
}

/* Home & Dashboard Cards */
.hero-banner {
  background: linear-gradient(135deg, var(--brand) 0%, #0f172a 100%);
  color: #fff;
  border-radius: 1.25rem;
  padding: 2.4rem 2rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.hero-banner--compact { padding: 1.6rem 1.4rem; }
.hero-banner--compact h1 { font-size: 1.85rem; margin-bottom: 0.35rem; }
.hero-banner--compact p { margin-bottom: 0; font-size: 0.98rem; }

/* Command Center dashboard */
.command-center { margin-bottom: 1.5rem; }

.welcome-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid #d7efe9;
  border-radius: 1.15rem;
  padding: 1.05rem 1.25rem;
  margin-bottom: 1.1rem;
  box-shadow: 0 10px 28px rgba(15, 60, 55, 0.06);
}

.welcome-strip__copy h1 {
  margin: 0 0 0.2rem;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #134e4a;
}

.welcome-strip__copy p {
  margin: 0;
  color: #3f6f6a;
  font-size: 0.95rem;
}

.welcome-strip .auth-badge {
  background: #e7f7f4;
  color: #0f766e;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.kpi-row--command {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.95rem;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 0.95rem 1.05rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.kpi-row--command .kpi-card {
  background: #fff;
  border: 1px solid #d7efe9;
  border-radius: 1.15rem;
  padding: 1.15rem 1.2rem;
  box-shadow: 0 10px 28px rgba(15, 60, 55, 0.05);
  min-height: 6.2rem;
}

.kpi-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.kpi-row--command .kpi-card span { color: #0f766e; }

.kpi-card strong {
  display: block;
  margin-top: 0.3rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.kpi-row--command .kpi-card strong {
  margin-top: 0.55rem;
  font-size: 1.65rem;
  color: #134e4a;
}

.module-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.module-tile {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: #fff;
  border: 1px solid #d7efe9;
  border-radius: 1.05rem;
  padding: 1rem 1.05rem;
  text-decoration: none;
  color: #134e4a;
  box-shadow: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.module-tile:hover {
  border-color: #0f766e;
  background: #f3fbf9;
  transform: translateY(-1px);
}

.module-tile__icon {
  flex: 0 0 2.4rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.75rem;
  background: #e7f7f4 center / 1.15rem no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%230f766e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E");
}

.module-tile[data-module="people"] .module-tile__icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%230f766e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}
.module-tile[data-module="academics"] .module-tile__icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%230f766e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3C/svg%3E");
}
.module-tile[data-module="finance"] .module-tile__icon,
.module-tile[data-module="payroll"] .module-tile__icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%230f766e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cpath d='M2 10h20'/%3E%3C/svg%3E");
}
.module-tile[data-module="library"] .module-tile__icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%230f766e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3C/svg%3E");
}
.module-tile[data-module="transport"] .module-tile__icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%230f766e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='M10 17h4V5H2v12h3'/%3E%3Cpath d='M20 17h2v-3.34a4 4 0 0 0-1.17-2.83L19 9h-5v8h1'/%3E%3Ccircle cx='7.5' cy='17.5' r='2.5'/%3E%3Ccircle cx='17.5' cy='17.5' r='2.5'/%3E%3C/svg%3E");
}
.module-tile[data-module="notices"] .module-tile__icon,
.module-tile[data-module="messages"] .module-tile__icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%230f766e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3C/svg%3E");
}
.module-tile[data-module="exams"] .module-tile__icon,
.module-tile[data-module="admissions"] .module-tile__icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%230f766e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M16 13H8'/%3E%3Cpath d='M16 17H8'/%3E%3Cpath d='M10 9H8'/%3E%3C/svg%3E");
}
.module-tile[data-module="schools"] .module-tile__icon,
.module-tile[data-module="operators"] .module-tile__icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%230f766e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='M3 21h18'/%3E%3Cpath d='M5 21V7l7-4 7 4v14'/%3E%3Cpath d='M9 21v-6h6v6'/%3E%3C/svg%3E");
}

.module-tile__body h3 {
  margin: 0 0 0.2rem;
  font-size: 0.98rem;
  font-weight: 700;
  color: #134e4a;
}

.module-tile__body p {
  margin: 0;
  color: #3f6f6a;
  font-size: 0.82rem;
  line-height: 1.35;
}

.command-insights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.insight-tile {
  background: #fff;
  border: 1px solid #d7efe9;
  border-radius: 1.05rem;
  padding: 1rem 1.1rem;
  box-shadow: none;
}

.insight-tile h2 {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  color: #0f766e;
}

.insight-tile p,
.insight-tile .agenda-item,
.insight-tile .message-item {
  color: #3f6f6a;
  font-size: 0.88rem;
  margin: 0 0 0.45rem;
}

.hero-banner h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin: 0 0 0.75rem;
}

.hero-banner p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 680px;
  margin: 0 0 1.5rem;
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.btn-hero {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border-radius: 0.65rem;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}

.btn-hero--light {
  background: #fff;
  color: #0f172a;
}

.btn-hero--outline {
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 1rem;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.row-actions input, .row-actions select {
  width: auto;
  min-width: 6.5rem;
  padding: 0.35rem 0.5rem;
}

.row-actions button {
  width: auto;
  margin-top: 0;
  padding: 0.4rem 0.7rem;
  border-radius: 0.45rem;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-weight: 600;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.35rem 1.4rem;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.feature-card p {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0;
}

.document-header { border-bottom: 1px solid #ccc; margin-bottom: 1rem; }

.app-frame {
  display: flex;
  flex: 1;
  min-height: 100vh;
  align-items: stretch;
}

.app-frame__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

#sidebarMenu {
  width: 272px;
  flex: 0 0 272px;
  background: #111827;
  color: #e5e7eb;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow: auto;
  z-index: 30;
}

.sidebar-sticky { padding: 1rem 0.7rem 1.5rem; }

.sidebar-school {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  padding: 0.2rem 0.7rem 0.8rem;
}

.sidebar-control-bar { padding: 0 0.35rem 0.85rem; }

.sidebar-pin, .sidebar-show-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0.5rem;
  padding: 0.4rem 0.7rem;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.sidebar-pin:hover, .sidebar-show-toggle:hover { background: rgba(255, 255, 255, 0.08); }

#sidebarMenu .nav-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: rgba(255, 255, 255, 0.88);
  border-radius: 0.5rem;
  padding: 0.48rem 0.7rem;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}

#sidebarMenu .nav-link:hover,
#sidebarMenu .nav-link:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

#sidebarMenu .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 700;
}

#sidebarMenu .sidebar-group {
  font-weight: 700;
  justify-content: space-between;
}

#sidebarMenu .sidebar-group > span {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.sidebar-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}

.sidebar-chevron {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  margin-right: 0.35rem;
}

.sidebar-chevron.rotated { transform: rotate(-135deg); }

.sidebar-nested { margin-left: 0.85rem; }

.sidebar-show-toggle {
  display: none;
  position: fixed;
  left: 0.7rem;
  bottom: 0.8rem;
  z-index: 40;
  width: auto;
  background: #111827;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
}

body.sidebar-autohide #sidebarMenu {
  position: fixed;
  left: 1rem;
  top: 0;
  flex: 0 0 0;
  width: 248px;
  min-width: 0;
  transform: translateX(calc(-100% - 1.5rem));
  transition: transform 0.18s ease;
}

body.sidebar-autohide #sidebarMenu:hover,
body.sidebar-autohide.sidebar-peek #sidebarMenu,
body.sidebar-narrow.sidebar-peek #sidebarMenu {
  transform: none;
}

body.sidebar-autohide .sidebar-show-toggle,
body.sidebar-narrow .sidebar-show-toggle { display: inline-flex; }

body.sidebar-peek .sidebar-show-toggle { display: none; }

@media (max-width: 1100px) {
  .kpi-row--command { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .app-header { align-items: flex-start; }
  .app-header__bar, .app-header__right { width: 100%; }
  .hero-banner, .hero-banner--compact { padding: 1.35rem 1.05rem; }
  .hero-banner h1 { font-size: 1.65rem; }
  .welcome-strip__copy h1 { font-size: 1.35rem; }
  .kpi-row--command { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .command-insights { grid-template-columns: 1fr; }
  .container { padding: 1.1rem 0.85rem; }
  .auth-card, .auth-hero { padding: 1.5rem 1.15rem; }
  #sidebarMenu {
    position: fixed;
    left: 0;
    top: 0;
    flex: 0 0 0;
    width: min(84vw, 300px);
    min-width: 0;
    transform: translateX(-105%);
    transition: transform 0.18s ease;
  }
  .sidebar-control-bar { display: none; }
}

/* Full-width admin workspace */
.workspace-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.workspace-hero h1 {
  margin: 0.35rem 0 0;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #134e4a;
}
.workspace-note { margin: 0.45rem 0 0; color: #3f6f6a; max-width: 42rem; }
.workspace-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.workspace-kpi {
  background: #fff;
  border: 1px solid #d7efe9;
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  box-shadow: 0 8px 24px rgba(15, 60, 55, 0.05);
}
.workspace-kpi span {
  display: block;
  color: #3f6f6a;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.workspace-kpi strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.35rem;
  color: #134e4a;
}
.workspace-panel {
  background: #fff;
  border: 1px solid #d7efe9;
  border-radius: 1.1rem;
  padding: 1.1rem 1.2rem 1.25rem;
  margin-bottom: 1.15rem;
  box-shadow: 0 10px 28px rgba(15, 60, 55, 0.05);
  width: 100%;
}
.workspace-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.workspace-panel__head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 750;
  color: #0f766e;
}
.workspace-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem 1rem;
  align-items: end;
}
.workspace-field { min-width: 0; }
.workspace-form__actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.6rem;
}
.workspace-table { width: 100%; }
.workspace-row-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.workspace-inline-form { display: inline; margin: 0; }
.workspace-hero .auth-badge {
  background: #e7f7f4;
  color: #0f766e;
}

.workspace-kpi--tab { cursor: pointer; transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.workspace-kpi--tab:hover, .workspace-kpi--tab.is-active {
  border-color: #0f766e;
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.12);
  transform: translateY(-2px);
}
.workspace-kpi--tab.is-active strong { color: #0f766e; }
.workspace-tabs {
  gap: 0.45rem;
  margin: 0 0 1rem;
  flex-wrap: wrap;
}
.workspace-tabs .nav-link {
  border-radius: 999px;
  color: #0f766e;
  font-weight: 700;
  background: #f3fbf9;
  border: 1px solid #d7efe9;
  padding: 0.45rem 0.95rem;
}
.workspace-tabs .nav-link:hover { background: #e7f7f4; }
.workspace-tabs .nav-link.active {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}
.workspace-tab-content > .tab-pane > .workspace-panel { margin-bottom: 0; }
.workspace-modal-content {
  border: 0;
  border-radius: 1.2rem;
  box-shadow: 0 24px 60px rgba(15, 60, 55, 0.18);
}
.workspace-modal-content .modal-header {
  border-bottom: 1px solid #d7efe9;
  padding: 1rem 1.2rem;
}
.workspace-modal-content .modal-body { padding: 1.2rem; }
.workspace-form-error { margin-bottom: 0; }
