/* Aerya Order Portal — shared shell (nav + footer + base) */
:root {
  --aerya-ink: #0f172a;
  --aerya-muted: #64748b;
  --aerya-line: #e2e8f0;
  --aerya-bg: #f1f5f9;
  --aerya-card: #ffffff;
  --aerya-brand: #4f46e5;
  --aerya-brand-dark: #3730a3;
  --aerya-accent: #1e293b;
  --aerya-ok: #059669;
  --aerya-warn: #d97706;
  --aerya-danger: #e11d48;
  --aerya-radius: 0.75rem;
  --aerya-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px -8px rgba(15, 23, 42, 0.08);
  --aerya-nav-h: 3.25rem;
  --aerya-footer-h: 3rem;
  --aerya-font: "Source Sans 3", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --aerya-fs-body: clamp(0.95rem, 0.9rem + 0.28vw, 1.0625rem);
  --aerya-fs-h1: clamp(1.35rem, 1.12rem + 1vw, 1.85rem);
  --aerya-fs-h2: clamp(1.12rem, 1.02rem + 0.5vw, 1.4rem);
  --aerya-lh-body: 1.5;
  --aerya-lh-heading: 1.22;
}

*, *::before, *::after { box-sizing: border-box; }

html { height: 100%; }

body.aerya-body {
  margin: 0;
  min-height: 100%;
  font-family: var(--aerya-font);
  color: var(--aerya-ink);
  background: var(--aerya-bg);
  display: flex;
  flex-direction: column;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* —— Top navigation —— */
.aerya-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--aerya-ink);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.25);
}
.aerya-nav-inner {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 1rem;
  min-height: var(--aerya-nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.aerya-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: #fff;
  min-width: 0;
}
.aerya-mark {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.45rem;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.aerya-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.aerya-brand-text strong {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aerya-brand-text span {
  font-size: 0.65rem;
  color: #94a3b8;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.aerya-nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.aerya-nav-links a,
.aerya-nav-links button.aerya-nav-btn {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.65rem;
  border-radius: 0.45rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.aerya-nav-links a:hover,
.aerya-nav-links button.aerya-nav-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.aerya-nav-links a.is-active {
  color: #fff;
  background: rgba(99, 102, 241, 0.35);
}
.aerya-nav-links .aerya-logout {
  background: #334155;
  color: #fff !important;
  margin-left: 0.25rem;
}
.aerya-nav-links .aerya-logout:hover {
  background: #475569;
}

/* —— Main —— */
.aerya-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
}
.aerya-main.wide { max-width: 56rem; }
.aerya-main.narrow { max-width: 28rem; }

.aerya-page-title {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--aerya-ink);
}
.aerya-page-sub {
  margin: 0 0 1.25rem;
  font-size: 0.88rem;
  color: var(--aerya-muted);
}

/* —— Cards / forms —— */
.aerya-card,
.card {
  background: var(--aerya-card);
  border-radius: var(--aerya-radius);
  padding: 1.15rem 1.2rem;
  box-shadow: var(--aerya-shadow);
  border: 1px solid rgba(226, 232, 240, 0.8);
  margin-bottom: 0.85rem;
}
.aerya-card h2,
.card h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 700;
}

label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--aerya-muted);
  margin: 0.55rem 0 0.25rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
input, select, textarea {
  font-family: inherit;
  font-size: 0.9rem;
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--aerya-line);
  border-radius: 0.5rem;
  background: #f8fafc;
  color: var(--aerya-ink);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #818cf8;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
button {
  font-family: inherit;
  cursor: pointer;
}
.btn-primary, .btn-go, button.btn-primary {
  background: var(--aerya-brand);
  color: #fff;
  border: none;
  border-radius: 0.55rem;
  padding: 0.6rem 0.9rem;
  font-weight: 600;
  font-size: 0.88rem;
}
.btn-primary:hover, .btn-go:hover { background: var(--aerya-brand-dark); }
.btn-dark {
  background: var(--aerya-accent);
  color: #fff;
  border: none;
  border-radius: 0.55rem;
  padding: 0.6rem 0.9rem;
  font-weight: 600;
}
.btn-muted {
  background: #e2e8f0;
  color: #334155;
  border: none;
  border-radius: 0.55rem;
  padding: 0.55rem 0.8rem;
  font-weight: 600;
  font-size: 0.82rem;
}
.btn-danger {
  background: #fee2e2;
  color: #9f1239;
  border: none;
  border-radius: 0.55rem;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  font-size: 0.82rem;
}
.btn-warn {
  background: #fef3c7;
  color: #92400e;
  border: none;
  border-radius: 0.55rem;
  padding: 0.55rem 0.8rem;
  font-weight: 600;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--aerya-brand);
  font-size: 0.8rem;
}
.meta, .hint { font-size: 0.78rem; color: var(--aerya-muted); }
/* Light surfaces keep muted text; dark/brand surfaces inherit readable contrast */
.hist-header .meta,
.hist-header .hint,
.on-dark .meta,
.on-dark .hint,
.banner .meta {
  color: inherit;
}
.err { color: var(--aerya-danger); font-size: 0.82rem; }
.ok { color: var(--aerya-ok); font-size: 0.82rem; }
.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 0.3rem;
  background: #e2e8f0;
  color: #334155;
}

/* Portal hub buttons */
.aerya-hub-btn {
  display: block;
  text-align: center;
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  margin-top: 0.65rem;
  color: #fff;
  font-size: 0.95rem;
  transition: transform 0.12s, filter 0.12s;
}
.aerya-hub-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
@media (hover: none) {
  .aerya-hub-btn:hover { filter: none; transform: none; }
  .aerya-nav-links a:hover,
  .aerya-menu-btn:hover { background: transparent; }
}
.aerya-hub-btn.student { background: var(--aerya-brand); }
.aerya-hub-btn.staff { background: var(--aerya-accent); }
.aerya-hub-btn.mgmt { background: #7c3aed; }

/* —— Footer —— */
.aerya-footer {
  flex-shrink: 0;
  background: #0b1220;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding: 0.85rem 1rem;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  line-height: 1.4;
}
.aerya-footer strong {
  color: #cbd5e1;
  font-weight: 600;
}
.aerya-footer a {
  color: #a5b4fc;
  text-decoration: none;
}
.aerya-footer a:hover { text-decoration: underline; }

@media (max-width: 520px) {
  .aerya-brand-text span { display: none; }
  .aerya-nav-links a { padding: 0.35rem 0.5rem; font-size: 0.72rem; }
  .aerya-page-title { font-size: 1.2rem; }
}

/* —— Mobile menu —— */
.aerya-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}
.aerya-menu-btn:hover { background: rgba(255, 255, 255, 0.12); }
.aerya-menu-btn[data-unread]::after,
.aerya-menu-btn::before,
.aerya-menu-btn::after {
  display: none !important;
  content: none !important;
}
.aerya-menu-btn:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}
.aerya-menu-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 1.15rem;
}
.aerya-menu-icon span {
  display: block;
  height: 2px;
  width: 100%;
  background: #e2e8f0;
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}
.aerya-nav.is-open .aerya-menu-icon span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.aerya-nav.is-open .aerya-menu-icon span:nth-child(2) {
  opacity: 0;
}
.aerya-nav.is-open .aerya-menu-icon span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.aerya-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 90;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
}
.aerya-nav.is-open .aerya-nav-backdrop {
  display: block;
}

@media (max-width: 768px) {
  .aerya-menu-btn {
    display: inline-flex;
    order: 99;
    margin-left: 0;
  }
  .aerya-nav-inner {
    flex-wrap: nowrap;
    height: 3.25rem;
    max-height: 3.25rem;
  }
  .aerya-nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.65rem 0.85rem 0.85rem;
    background: #0f172a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.35);
    z-index: 100;
  }
  .aerya-nav.is-open .aerya-nav-links {
    display: flex;
  }
  .aerya-nav-links a,
  .aerya-nav-links button.aerya-nav-btn {
    width: 100%;
    text-align: left;
    padding: 0.75rem 0.85rem;
    font-size: 0.9rem;
    border-radius: 0.5rem;
  }
  .aerya-nav-links .aerya-logout {
    margin-left: 0;
    margin-top: 0.35rem;
    text-align: center;
  }
  .aerya-brand-text span {
    display: none;
  }
}

@media (min-width: 769px) {
  .aerya-menu-btn,
  .aerya-nav-backdrop {
    display: none !important;
  }
  .aerya-nav-links {
    display: flex !important;
  }
}


/* —— Auth-aware nav control —— */
.aerya-auth-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 0.25rem;
}
.aerya-nav-who {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  max-width: 9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aerya-nav-who:empty,
.aerya-nav-who[hidden] {
  display: none !important;
}
@media (max-width: 768px) {
  .aerya-nav.is-open .aerya-auth-wrap {
    width: 100%;
    margin-left: 0;
    margin-top: 0.35rem;
    flex-direction: column;
    align-items: stretch;
  }
  .aerya-nav.is-open .aerya-nav-who {
    max-width: none;
    text-align: left;
    color: #cbd5e1;
    padding: 0.25rem 0.85rem;
  }
  .aerya-nav.is-open .aerya-auth-wrap .aerya-logout {
    width: 100%;
    text-align: center;
  }
}


/* —— Loading spinner —— */
.aerya-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.85rem;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.aerya-loading-overlay.is-on {
  opacity: 1;
  pointer-events: auto;
}
.aerya-spinner {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #a5b4fc;
  border-right-color: #818cf8;
  animation: aerya-spin 0.7s linear infinite;
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.2);
}
@keyframes aerya-spin {
  to { transform: rotate(360deg); }
}
.aerya-loading-label {
  color: #f8fafc;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.aerya-btn-spin {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  animation: aerya-spin 0.65s linear infinite;
  vertical-align: -0.15em;
  margin-right: 0.4rem;
}
.btn .aerya-btn-spin,
button .aerya-btn-spin {
  border-top-color: currentColor;
  border-right-color: transparent;
  border-bottom-color: transparent;
  border-left-color: transparent;
}

/* =========================================================
   Premium design system — consistent across all portals
   ========================================================= */

:root {
  --aerya-surface: #f8fafc;
  --aerya-shadow-lg: 0 10px 40px -12px rgba(15, 23, 42, 0.18);
  --aerya-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Smooth scrolling & selection */
html { scroll-behavior: smooth; }
::selection { background: rgba(99, 102, 241, 0.22); color: #0f172a; }

/* Unified button base (.btn used heavily in management) */
.btn,
button.btn {
  background: var(--aerya-brand);
  color: #fff;
  border: none;
  border-radius: 0.55rem;
  padding: 0.6rem 0.95rem;
  font-weight: 600;
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s var(--aerya-ease), transform 0.12s var(--aerya-ease), box-shadow 0.15s;
}
.btn:hover { background: var(--aerya-brand-dark); }
.btn:active,
.btn-primary:active,
.btn-go:active,
.btn-dark:active { transform: translateY(1px); }
.btn:disabled,
.btn-primary:disabled,
.btn-go:disabled,
.btn-muted:disabled,
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

/* Tabs — consistent across staff / management / packing */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  padding: 0.3rem;
  background: #e2e8f0;
  border-radius: 0.7rem;
}
.tabs button {
  background: transparent;
  color: #475569;
  border: none;
  border-radius: 0.5rem;
  padding: 0.45rem 0.85rem;
  font-weight: 600;
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.tabs button:hover { color: #0f172a; background: rgba(255, 255, 255, 0.55); }
.tabs button.on,
.tabs button.tab-on {
  background: #fff;
  color: var(--aerya-brand);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.tabs button.tab-off { background: transparent; }

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
th {
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid var(--aerya-line);
  background: #f8fafc;
}
td {
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
  color: #0f172a;
}
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #f8fafc; }

/* Status pills */
.status-pill,
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
  background: #e2e8f0;
  color: #334155;
  white-space: nowrap;
}
.status-pill.ok, .status-pill.ready, .status-pill.completed { background: #d1fae5; color: #065f46; }
.status-pill.warn, .status-pill.awaiting, .status-pill.pending { background: #fef3c7; color: #92400e; }
.status-pill.info, .status-pill.fulfillment, .status-pill.packing { background: #dbeafe; color: #1e40af; }
.status-pill.danger, .status-pill.cancelled { background: #ffe4e6; color: #9f1239; }
.status-pill.muted { background: #f1f5f9; color: #64748b; }

/* Empty / loading states */
.aerya-empty {
  text-align: center;
  padding: 2rem 1.25rem;
  color: var(--aerya-muted);
  font-size: 0.9rem;
  background: #fff;
  border: 1px dashed var(--aerya-line);
  border-radius: var(--aerya-radius);
}
.aerya-empty strong {
  display: block;
  color: var(--aerya-ink);
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

/* Grid helpers used across portals */
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 0.65rem;
}
@media (max-width: 560px) {
  .grid2 { grid-template-columns: 1fr; }
}
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.hidden { display: none !important; }

/* Premium landing hero */
.aerya-hero {
  text-align: center;
  padding: 0.5rem 0 0.25rem;
}
.aerya-hero .aerya-page-title {
  font-size: 1.55rem;
  letter-spacing: -0.03em;
}
.aerya-hero .aerya-page-sub {
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
}
.aerya-hub-grid {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.15rem;
}
.aerya-hub-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.1rem;
  box-shadow: 0 4px 14px -4px rgba(15, 23, 42, 0.25);
}
.aerya-hub-btn .hub-kicker {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  opacity: 0.85;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.aerya-hub-btn .hub-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
}
.aerya-hub-stack {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-align: center;
}

/* Card polish */
.aerya-card,
.card {
  transition: box-shadow 0.2s var(--aerya-ease);
}
.aerya-card:focus-within,
.card:focus-within {
  box-shadow: var(--aerya-shadow-lg);
}

/* Links inside content */
.aerya-main a:not(.aerya-hub-btn):not(.btn):not(.btn-primary) {
  color: #4f46e5;
  text-decoration: none;
  font-weight: 500;
}
.aerya-main a:not(.aerya-hub-btn):not(.btn):not(.btn-primary):hover {
  text-decoration: underline;
}

/* Modal shell */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 80;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem;
  overflow: auto;
}
.modal-card {
  background: #fff;
  border-radius: 1rem;
  padding: 1.25rem 1.35rem;
  max-width: 36rem;
  width: 100%;
  margin: 1.25rem 0;
  box-shadow: var(--aerya-shadow-lg);
  border: 1px solid rgba(226, 232, 240, 0.9);
  animation: aerya-rise 0.22s var(--aerya-ease);
  position: relative;
}
.aerya-x {
  width: 2rem;
  height: 2rem;
  padding: 0 !important;
  border: 0 !important;
  border-radius: .45rem;
  background: #e2e8f0 !important;
  color: #0f172a !important;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}
.aerya-x:hover { background: #cbd5e1 !important; }
@keyframes aerya-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Focus visible for keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Safe area for notched phones */
@supports (padding: max(0px)) {
  .aerya-nav-inner {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
  .aerya-footer {
    padding-bottom: max(0.85rem, env(safe-area-inset-bottom));
  }
}

/* —— DESK METRICS LOCK (staff + management orders) —— */
.wrap,
.aerya-main {
  max-width: 56rem;
  width: 100%;
  margin: 0 auto;
  padding: 1rem;
  box-sizing: border-box;
}
.aerya-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
  gap: 0.45rem;
  margin: 0 0 0.75rem;
}
.aerya-stat {
  background: #fff;
  border: 1px solid var(--aerya-line, #e2e8f0);
  border-radius: 0.65rem;
  padding: 0.55rem 0.6rem;
  text-align: center;
  box-shadow: var(--aerya-shadow);
}
.aerya-stat b {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--aerya-ink, #0f172a);
  letter-spacing: -0.02em;
}
.aerya-stat span {
  display: block;
  font-size: 0.68rem;
  color: var(--aerya-muted, #64748b);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 0.12rem;
}
.aerya-stat.warn { border-color: #fed7aa; background: #fffbeb; }
.aerya-stat.ok { border-color: #a7f3d0; background: #ecfdf5; }
.aerya-stat.info { border-color: #bfdbfe; background: #eff6ff; }
.aerya-stat.accent { border-color: #c7d2fe; background: #eef2ff; }
.inv-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #312e81 100%);
  color: #e2e8f0;
  border-radius: 0.9rem;
  padding: 1rem 1.1rem;
  margin: 0 0 0.85rem;
  box-shadow: 0 8px 28px -10px rgba(15, 23, 42, 0.45);
}
.inv-card h3 { margin: 0 0 0.35rem; font-size: 0.95rem; color: #fff; }
.inv-stats { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; margin: 0.5rem 0 0.65rem; }
.inv-stats b { color: #fff; font-size: 1.1rem; }
.inv-stats span { display: block; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.04em; color: #94a3b8; }
.low-list { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.low-chip {
  font-size: 0.7rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  color: #fde68a;
}
.aerya-logo, img.aerya-logo, .aerya-mark img {
  width: 1.85rem;
  height: 1.85rem;
  object-fit: contain;
  border-radius: 0.35rem;
  background: #fff;
}
@media (max-width: 640px) {
  .aerya-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* —— Durable style-regression contract (keep in shell, not page-only) —— */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  font-size: .72rem;
  font-weight: 800;
  padding: .15rem .45rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
}
.status-badge .dot {
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: currentColor;
}
.aerya-stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: .55rem;
  margin: .65rem 0;
}
.ann-admin-list { display: flex; flex-direction: column; gap: .45rem; }
.ann-admin-item {
  border: 1px solid #e2e8f0;
  border-radius: .65rem;
  background: #fff;
  padding: .65rem .7rem;
}
.ann-admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  font-weight: 800;
}
.ann-admin-body {
  margin: .35rem 0 0;
  font-size: .85rem;
  color: #334155;
  white-space: pre-wrap;
}
.ann-admin-badge {
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: #eef2ff;
  color: #3730a3;
  border-radius: 999px;
  padding: .12rem .45rem;
}
.stu-ann-item {
  margin: 0 0 .7rem;
  border-radius: .9rem;
  padding: .85rem 1rem;
  color: #fff;
  overflow: hidden;
  text-align: left;
}
.stu-ann-item.tone-info { background: linear-gradient(135deg, #312e81, #4f46e5); }
.stu-ann-item.tone-warn { background: linear-gradient(135deg, #9a3412, #ea580c); }
.stu-ann-item.tone-success { background: linear-gradient(135deg, #064e3b, #059669); }
.stu-ann-kicker {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 .25rem;
}
.stu-ann-body {
  display: none;
  margin-top: .45rem;
  font-size: .88rem;
  line-height: 1.5;
  white-space: pre-wrap;
}
.stu-ann-item.is-open .stu-ann-body { display: block; }
.dm-wrap { max-width: 56rem; margin: 0 auto; }
.dm-board { display: flex; flex-direction: column; gap: .75rem; }
.dm-group {
  border: 1px solid #e2e8f0;
  border-radius: .75rem;
  background: #fff;
  overflow: hidden;
}
.dm-plan {
  border: 1px solid #c7d2fe;
  border-radius: .75rem;
  background: linear-gradient(180deg, #eef2ff, #fff);
  padding: .85rem;
}

