/* ============================================
   Bedside Internal — App-specific extensions
   Sits on top of styles.css (Slate & Mint theme)
   ============================================ */

/* App shell — sidebar + topbar fixed layout */
.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  background: var(--bg-soft);
}
@media (max-width: 1024px) {
  .app-shell { grid-template-columns: 1fr; }
}

/* Sidebar */
.app-sidebar {
  background: var(--navy-950);
  color: #cbd5e1;
  padding: 1.25rem 0.875rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
}
@media (max-width: 1024px) {
  .app-sidebar {
    position: fixed;
    z-index: 90;
    width: 260px;
    left: -280px;
    transition: left .25s ease;
    box-shadow: var(--shadow-lg);
  }
  .app-sidebar.is-open { left: 0; }
}

.sb-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.5rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 1rem;
}
.sb-brand .logo-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  font-size: 1.1rem;
}
.sb-brand .brand-text {
  font-family: var(--font-display);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.sb-brand .brand-sub {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 2px;
}

.sb-section-title {
  color: rgba(255,255,255,0.4);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 1.25rem 0.65rem 0.4rem;
}

.sb-nav { list-style: none; padding: 0; margin: 0; }
.sb-nav li { margin: 0; }
.sb-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  color: #cbd5e1;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all .15s;
  text-decoration: none;
}
.sb-nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sb-nav a.active {
  background: var(--teal-600);
  color: #fff;
  box-shadow: 0 4px 12px rgba(43,184,138,0.25);
}
.sb-nav a svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.85; }
.sb-nav a.active svg { opacity: 1; }
.sb-nav a .ct {
  margin-left: auto;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 0.68rem;
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 700;
}
.sb-nav a.active .ct { background: rgba(255,255,255,0.2); }
.sb-nav a .ct.danger { background: var(--danger); color: #fff; }

.sb-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.sb-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
  text-decoration: none;
}
.sb-user:hover { background: rgba(255,255,255,0.06); }
.sb-user .av {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff;
  font-size: 0.85rem;
  font-family: var(--font-display);
}
.sb-user .info { flex: 1; min-width: 0; }
.sb-user .nm { color: #fff; font-size: 0.85rem; font-weight: 600; line-height: 1.2; }
.sb-user .rl { color: rgba(255,255,255,0.5); font-size: 0.7rem; }

/* Topbar */
.app-topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
  gap: 1rem;
}
@media (max-width: 640px) { .app-topbar { padding: 0.65rem 1rem; } }
.tb-left { display: flex; align-items: center; gap: 1rem; flex: 1; min-width: 0; }
.tb-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem;
  cursor: pointer;
}
@media (max-width: 1024px) { .tb-menu-btn { display: inline-flex; } }
.tb-menu-btn svg { width: 18px; height: 18px; }

.tb-search { position: relative; max-width: 380px; flex: 1; }
.tb-search input {
  width: 100%;
  padding: 0.55rem 0.875rem 0.55rem 2.25rem;
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--ink);
  font-family: var(--font-body);
  transition: all .15s;
}
.tb-search input:focus {
  outline: none;
  border-color: var(--teal-500);
  background: #fff;
  box-shadow: var(--shadow-glow);
}
.tb-search svg {
  position: absolute;
  left: 0.7rem; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--slate-500);
}

.tb-right { display: flex; align-items: center; gap: 0.6rem; }

.branch-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all .15s;
  font-family: var(--font-body);
}
.branch-pill:hover { background: var(--teal-50); border-color: var(--teal-200); color: var(--teal-700); }
.branch-pill .dt { width: 7px; height: 7px; border-radius: 50%; background: var(--teal-500); }

.icon-btn {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem;
  cursor: pointer;
  position: relative;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-btn:hover { background: var(--bg-soft); border-color: var(--slate-300); }
.icon-btn svg { width: 18px; height: 18px; color: var(--ink-soft); }
.icon-btn .bell-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid #fff;
}

.notif-wrap { position: relative; }
.notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  max-width: 90vw;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  display: none;
}
.notif-panel.is-open { display: block; }
.notif-panel-head {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.notif-panel-head h4 { margin: 0; font-size: 0.9rem; }
.notif-panel-body { max-height: 380px; overflow-y: auto; }
.notif-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background .15s;
}
.notif-item:hover { background: var(--bg-soft); }
.notif-item:last-child { border-bottom: none; }
.notif-item .ni-title { font-size: 0.85rem; font-weight: 600; color: var(--ink); margin: 0; }
.notif-item .ni-sub { font-size: 0.74rem; color: var(--slate-500); margin: 2px 0 0; }
.notif-item.unread { background: var(--teal-50); }

/* Page main area */
.app-main { padding: 1.75rem; max-width: 100%; }
@media (max-width: 640px) { .app-main { padding: 1rem; } }

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.page-head h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.25rem; }
.page-head .ph-sub { color: var(--slate-500); font-size: 0.92rem; margin: 0; }
.page-head .ph-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* KPI extensions */
.kpi { position: relative; overflow: hidden; }
.kpi .kpi-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.5rem;
}
.kpi .ico-sm {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--teal-50);
  color: var(--teal-700);
  display: inline-flex; align-items: center; justify-content: center;
}
.kpi .ico-sm svg { width: 16px; height: 16px; }
.kpi .ico-sm.warn { background: #fef3c7; color: #92400e; }
.kpi .ico-sm.danger { background: #fee2e2; color: #991b1b; }
.kpi .ico-sm.navy { background: var(--navy-900); color: #fff; }

/* Panels */
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.panel-head {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.panel-head h3 { font-size: 1.05rem; font-family: var(--font-display); font-weight: 600; margin: 0; }
.panel-head .head-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.panel-body { padding: 1.25rem; }
.panel-body.flush { padding: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 968px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.grid-3-2 { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 968px) { .grid-3-2 { grid-template-columns: 2fr 1fr; } }

/* Alert row */
.alert-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  transition: background .15s;
}
.alert-row:last-child { border-bottom: none; }
.alert-row:hover { background: var(--bg-soft); }
.alert-row .al-ico {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.alert-row.danger .al-ico { background: #fee2e2; color: #991b1b; }
.alert-row.warn .al-ico { background: #fef3c7; color: #92400e; }
.alert-row.info .al-ico { background: var(--teal-50); color: var(--teal-700); }
.alert-row .al-body { flex: 1; min-width: 0; }
.alert-row .al-title { font-size: 0.9rem; font-weight: 600; color: var(--ink); margin: 0; }
.alert-row .al-sub { font-size: 0.78rem; color: var(--slate-500); margin: 2px 0 0; }
.alert-row .al-action {
  background: transparent;
  border: 1px solid var(--line);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
  font-family: var(--font-body);
  white-space: nowrap;
}
.alert-row .al-action:hover { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }

/* Category tabs */
.cat-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.cat-tabs button {
  background: transparent;
  border: none;
  padding: 0.7rem 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--slate-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color .15s;
}
.cat-tabs button:hover { color: var(--ink); }
.cat-tabs button.active { color: var(--navy-900); border-bottom-color: var(--teal-500); }
.cat-tabs button .ct {
  background: var(--slate-100);
  color: var(--slate-600);
  font-size: 0.66rem;
  padding: 1px 6px;
  border-radius: 999px;
  font-weight: 700;
}
.cat-tabs button.active .ct { background: var(--teal-50); color: var(--teal-700); }

/* Stock bar */
.stock-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
}
.stock-bar .track {
  width: 70px;
  height: 6px;
  background: var(--slate-200);
  border-radius: 999px;
  overflow: hidden;
}
.stock-bar .fill {
  height: 100%;
  background: var(--teal-500);
  border-radius: 999px;
  transition: width .3s ease;
}
.stock-bar.warn .fill { background: var(--warning); }
.stock-bar.danger .fill { background: var(--danger); }
.stock-bar .lbl {
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* Vendor card */
.vendor-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: all .2s;
}
.vendor-card:hover { box-shadow: var(--shadow-md); border-color: var(--slate-300); }
.vendor-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.vendor-logo {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--navy-800), var(--teal-700));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.vendor-name { font-weight: 600; font-size: 1rem; margin: 0; line-height: 1.2; font-family: var(--font-display); }
.vendor-url { font-size: 0.78rem; color: var(--slate-500); }
.cred-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  gap: 0.5rem;
}
.cred-row .k { color: var(--slate-500); font-weight: 500; flex-shrink: 0; }
.cred-row .v {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.82rem;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
}
.cred-row .reveal-btn {
  background: transparent;
  border: none;
  color: var(--teal-700);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: var(--font-body);
}
.cred-row .reveal-btn:hover { background: var(--teal-50); }

/* Clock card */
.clock-card {
  background: linear-gradient(135deg, var(--navy-950), var(--navy-800));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}
.clock-card::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, var(--teal-500), transparent 60%);
  opacity: 0.3;
  filter: blur(40px);
}
.clock-card * { position: relative; z-index: 1; }
.clock-time {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.clock-date {
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
  margin: 0.5rem 0 1.5rem;
}
.clock-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}
.clock-status.on { background: rgba(43,184,138,0.2); border-color: var(--teal-400); }
.clock-status .dt {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--slate-400);
}
.clock-status.on .dt {
  background: var(--teal-300);
  animation: pulse 1.5s ease-in-out infinite;
}
.clock-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--teal-500);
  color: #fff;
  border: none;
  padding: 0.95rem 1.75rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all .18s;
}
.clock-btn:hover { background: var(--teal-400); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.clock-btn.is-out { background: var(--danger); }
.clock-btn.is-out:hover { background: #b91c1c; }

.hours-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}
.hours-grid .cell {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 0.85rem;
}
.hours-grid .cell .k {
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.hours-grid .cell .v {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Notes */
.note-card {
  background: #fffdf5;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 1rem;
  position: relative;
  transition: all .15s;
}
.note-card:hover { box-shadow: var(--shadow-sm); }
.note-card .nt-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--slate-500);
  margin-bottom: 0.5rem;
}
.note-card .nt-body {
  font-size: 0.9rem;
  color: var(--ink);
  white-space: pre-wrap;
  margin: 0;
}
.note-card .nt-tag {
  background: rgba(217,119,6,0.12);
  color: #92400e;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Receipts */
.receipt-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.receipt-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .2s;
  cursor: pointer;
}
.receipt-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.receipt-thumb {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--slate-200), var(--slate-100));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.receipt-thumb svg { width: 32px; height: 32px; color: var(--slate-400); }
.receipt-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.5));
  pointer-events: none;
}
.receipt-thumb .amt {
  position: absolute;
  bottom: 0.5rem; left: 0.5rem;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  z-index: 1;
}
.receipt-meta { padding: 0.65rem 0.75rem; }
.receipt-meta .vn { font-size: 0.82rem; font-weight: 600; color: var(--ink); margin: 0; }
.receipt-meta .dt { font-size: 0.72rem; color: var(--slate-500); margin: 2px 0 0; }

/* Spark bars */
.spark-row { display: flex; align-items: flex-end; gap: 3px; height: 40px; }
.spark-row .bar {
  flex: 1;
  background: var(--teal-200);
  border-radius: 2px 2px 0 0;
  min-height: 4px;
  transition: background .2s;
}
.spark-row .bar.active { background: var(--teal-600); }

/* Permission matrix */
.perm-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.perm-matrix th, .perm-matrix td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.perm-matrix th:first-child, .perm-matrix td:first-child {
  text-align: left;
  font-weight: 600;
}
.perm-matrix th {
  background: var(--bg-soft);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate-600);
  font-weight: 700;
}
.perm-matrix .toggle-cell input { accent-color: var(--teal-600); width: 16px; height: 16px; cursor: pointer; }

/* Toggle switch */
.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--slate-300);
  border-radius: 999px;
  transition: .2s;
}
.switch .slider::before {
  content: '';
  position: absolute;
  height: 16px; width: 16px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.switch input:checked + .slider { background: var(--teal-500); }
.switch input:checked + .slider::before { transform: translateX(16px); }

/* Stat trend */
.trend-up { color: var(--success); font-weight: 600; }
.trend-down { color: var(--danger); font-weight: 600; }
.trend-flat { color: var(--slate-500); font-weight: 600; }

/* Tag chips */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--bg-soft);
  color: var(--ink);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--line);
}
.tag.person { background: var(--teal-50); color: var(--teal-700); border-color: var(--teal-200); }
.tag.dept { background: #f5f3ff; color: #5b21b6; border-color: #ddd6fe; }
.tag.branch { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }

/* Empty value */
.empty { color: var(--slate-400); font-style: italic; font-size: 0.85rem; }

/* Login extras */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(900px 500px at 20% 20%, rgba(20,184,166,0.15), transparent 60%),
    radial-gradient(700px 400px at 80% 80%, rgba(11,31,58,0.05), transparent 60%),
    var(--bg-soft);
  padding: 2rem 1rem;
}
.login-page .portal-card { max-width: 460px; }
.login-page .pre-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
.login-page .pre-brand .logo-mark {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  font-size: 1.15rem;
}
.login-page .pre-brand .pb-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--navy-900);
}
.login-page .pre-brand .pb-sub {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-500);
  font-weight: 700;
}
.otp-input {
  letter-spacing: 0.5em;
  text-align: center;
  font-family: 'SF Mono', monospace;
  font-size: 1.3rem !important;
  padding: 1rem !important;
}

/* Toolbar */
.toolbar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
}
.toolbar .input, .toolbar .select { width: auto; flex: 0 1 220px; padding: 0.5rem 0.75rem; font-size: 0.85rem; }
.toolbar .gap { flex: 1; }

/* Empty state */
.empty-block {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--slate-500);
}
.empty-block .ic {
  width: 56px; height: 56px;
  margin: 0 auto 1rem;
  background: var(--bg-soft);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: var(--slate-400);
}
.empty-block h4 { color: var(--ink); margin-bottom: 0.4rem; }

/* Mobile sidebar backdrop */
.sb-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11,31,58,0.5);
  z-index: 85;
  display: none;
}
.sb-backdrop.is-open { display: block; }

/* Pay summary table */
.pay-table th, .pay-table td { vertical-align: middle; }
.pay-table .rate-input {
  width: 90px;
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
  border: 1px solid var(--slate-300);
  border-radius: 6px;
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
}
.pay-table .rate-input:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: var(--shadow-glow);
}

/* Money cell */
.money { font-variant-numeric: tabular-nums; font-weight: 600; }
.money.pos { color: var(--success); }
.money.neg { color: var(--danger); }

/* Action menu (table row ...) */
.row-actions { display: flex; gap: 0.3rem; justify-content: flex-end; }
.row-actions .btn-icon { padding: 0.3rem 0.55rem; font-size: 0.75rem; }

/* Audit row */
.audit-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.audit-row:last-child { border-bottom: none; }
.audit-row .av-sm {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-700), var(--teal-700));
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
}
.audit-row .au-action { font-size: 0.875rem; color: var(--ink); }
.audit-row .au-action strong { color: var(--ink); font-weight: 600; }
.audit-row .au-time { font-size: 0.75rem; color: var(--slate-500); white-space: nowrap; }

/* Print buttons row */
.print-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; }

@media print {
  .app-sidebar, .app-topbar, .page-head .ph-actions { display: none !important; }
  .app-shell { grid-template-columns: 1fr; }
  .app-main { padding: 0 !important; }
  .panel { box-shadow: none !important; border: 1px solid #ddd !important; }
}
