/* ============================================================================
 * ZIVOX — shared app shell (admin dashboard + intern portal)
 *
 * Loaded by both private apps on top of base.css. Holds the parts they have in
 * common: the sign-in screens, the sidebar + topbar shell, quick-action tiles,
 * layout helpers and print rules.
 *
 * The design tokens, buttons, cards, badges, forms, alerts, tables, tabs,
 * modals and empty states all come from base.css.
 * ==========================================================================*/

/* ---------- Auth / login screens ---------- */
/* ---------- Auth / login screens ---------- */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 1000px) { .auth-wrap { grid-template-columns: 1fr 1fr; } }

.auth-art {
  display: none;
  position: relative;
  overflow: hidden;
  padding: 48px;
  background: linear-gradient(150deg, #f7f9ff, #f2edff 55%, #eaf6fd);
  border-right: 1px solid var(--line);
  flex-direction: column;
  justify-content: space-between;
}
@media (min-width: 1000px) { .auth-art { display: flex; } }
.auth-art::before {
  content: '';
  position: absolute; width: 520px; height: 520px; border-radius: 50%;
  background: #dfe7ff; filter: blur(80px); opacity: .7; top: -160px; left: -140px;
}
.auth-art::after {
  content: '';
  position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: #ece2ff; filter: blur(80px); opacity: .7; bottom: -140px; right: -100px;
}
.auth-art > * { position: relative; z-index: 1; }
.auth-art .art-cert {
  max-width: 460px;
  transform: rotateY(-10deg) rotateX(6deg) rotate(-2deg);
  perspective: 900px;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  min-height: 100vh;
}
.auth-card { width: 100%; max-width: 440px; }
.auth-card .top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 26px;
}
.auth-card h1 { font-size: 26px; margin: 0 0 6px; }
.auth-card .sub { font-size: 14px; color: var(--muted); margin: 0 0 22px; }
.auth-foot {
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-2);
  display: grid; gap: 8px; font-size: 12.5px; color: var(--faint);
}
.auth-foot a { color: var(--brand-ink); font-weight: 600; }

/* ---------- App shell ---------- */
/* ---------- App shell ---------- */
.app {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}
@media (min-width: 1024px) { .app { grid-template-columns: 268px 1fr; } }

.sb {
  position: fixed; z-index: 80; top: 0; bottom: 0; left: 0;
  width: 280px;
  transform: translateX(-100%);
  transition: transform .3s var(--ease);
  display: flex; flex-direction: column;
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
  border-right: 1px solid var(--line);
  overflow-y: auto;
}
.sb.open { transform: translateX(0); box-shadow: var(--sh-4); }
@media (min-width: 1024px) {
  .sb { position: sticky; top: 0; height: 100vh; width: auto; transform: none; }
}
.sb-head {
  padding: 18px 18px 14px;
  display: flex; align-items: center; gap: 9px;
  border-bottom: 1px solid var(--line-2);
}
.sb-head .lbl { font-family: 'Sora', sans-serif; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-top: 2px; }
.sb-nav { padding: 14px 12px; flex: 1; }
.sb-group { margin-bottom: 16px; }
.sb-group > p {
  font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint); margin: 0 0 6px; padding: 0 10px;
}
.sb-link {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  min-height: 40px; padding: 8px 10px;
  border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  transition: background .18s var(--ease), color .18s var(--ease);
  margin-bottom: 1px;
}
.sb-link svg { width: 18px; height: 18px; flex: none; color: var(--faint); transition: color .18s var(--ease); }
.sb-link:hover { background: rgba(29, 111, 242, .06); color: var(--ink); }
.sb-link:hover svg { color: var(--brand); }
.sb-link.active {
  background: var(--grad-soft);
  color: var(--brand-ink);
}
.sb-link.active svg { color: var(--brand); }
.sb-link.active::before {
  content: ''; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--grad);
}
.sb-link .pill {
  margin-left: auto; font-size: 11px; font-weight: 700;
  padding: 1px 7px; border-radius: var(--pill);
  background: rgba(20, 40, 90, .07); color: var(--muted);
}
.sb-link .pill.hot { background: var(--warn-bg); color: var(--warn); }
.sb-link .pill.vio { background: var(--vio-bg); color: var(--vio); }
.sb-foot { padding: 12px; border-top: 1px solid var(--line-2); }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.sb-user .nm { font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.sb-user .id { font-size: 11px; color: var(--faint); }
.sb-user form { margin-left: auto; }

/* ---------- Top bar ---------- */
/* ---------- Top bar ---------- */
.app-main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px;
  background: rgba(244, 246, 251, .82);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 640px) { .topbar { padding: 12px 28px; } }
.topbar .crumb { font-size: 11.5px; color: var(--faint); font-weight: 600; letter-spacing: .02em; }
.topbar .ptitle { font-family: 'Sora', sans-serif; font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; margin: 1px 0 0; line-height: 1.2; }
.topbar .grow { flex: 1; min-width: 0; }
.topbar .actions { display: flex; align-items: center; gap: 8px; flex: none; }
@media (max-width: 640px) { .topbar .actions .hide-xs { display: none; } }
.app-content { padding: 20px 16px 48px; flex: 1; }
@media (min-width: 640px) { .app-content { padding: 24px 28px 56px; } }

.scrim-sb {
  position: fixed; inset: 0; z-index: 79;
  background: rgba(15, 25, 50, .35);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: none;
}
.scrim-sb.open { display: block; }
@media (min-width: 1024px) { .scrim-sb { display: none !important; } }

/* ---------- Quick action tiles ---------- */
/* ---------- Quick action tiles ---------- */
.qa-tile {
  display: flex; align-items: center; gap: 13px;
  padding: 16px; border-radius: var(--r);
  background: #fff; border: 1px solid var(--line);
  box-shadow: var(--sh-1);
  color: var(--ink); text-decoration: none;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.qa-tile:hover { transform: translateY(-2px); box-shadow: var(--sh-3); color: var(--ink); }
.qa-tile .t { font-size: 13.5px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.qa-tile .d { font-size: 11.5px; color: var(--faint); margin-top: 1px; }

/* ---------- Responsive layout helpers ---------- */
/* ---------- Responsive helpers ---------- */
.two-col { display: grid; gap: 18px; }
@media (min-width: 1100px) { .two-col { grid-template-columns: 1fr 1fr; } }
.side-layout { display: grid; gap: 18px; align-items: start; }
@media (min-width: 1100px) { .side-layout { grid-template-columns: 380px 1fr; } }
.side-layout.wide { grid-template-columns: 1fr; }
@media (min-width: 1100px) { .side-layout.wide { grid-template-columns: minmax(320px, 380px) 1fr; } }

/* ---------- Print ---------- */
/* ---------- Print ---------- */
@media print {
  .sb, .topbar, .sticky-bar, .toasts, .no-print { display: none !important; }
  .app { grid-template-columns: 1fr; }
  .app-content { padding: 0; }
  body { background: #fff; }
}

/* ---------- Official logo (single source: /assets/logo.png) ----------
   Square badge that already contains the wordmark + tagline. Rendered
   inside a fixed square box with object-fit so the original artwork
   is never stretched or overlapped by neighbouring UI. */
.brand-logo {
  display: block;
  flex: none;
  object-fit: contain;
  width: 40px;
  height: 40px;
  max-width: 100%;
}
.brand-logo-art { width: 56px; height: 56px; }
.brand-logo-card { width: 48px; height: 48px; }
@media (max-width: 359px) {
  .brand-logo-art { width: 46px; height: 46px; }
  .brand-logo-card { width: 42px; height: 42px; }
}
/* keep the sidebar badge from colliding with the version pill */
.sb-head .brand-logo-sm { margin-right: 2px; }
