:root {
  --color-bg: #eef3fb;
  --color-surface: #ffffff;
  --color-surface-soft: #f7f9fd;
  --color-primary: #0f4fbf;
  --color-primary-strong: #0b3f99;
  --color-text: #172033;
  --color-muted: #6b7486;
  --color-border: #dfe6f1;
  --color-success: #167a56;
  --color-success-soft: #d9f2e7;
  --color-danger: #b42332;
  --color-danger-soft: #ffe1e5;
  --color-warning: #765000;
  --color-warning-soft: #fff2c7;
  --color-special: #6b4bc2;
  --color-special-soft: #ece6ff;
  --color-cyan-soft: #dff2fb;
  --color-blue-soft: #dce7ff;
  --color-green-soft: #e0f4de;
  --color-red-soft: #fbe1e3;
  --color-violet-soft: #e6e5ff;
  --color-info-soft: #e8f1ff;
  --color-info: #174d93;
  --color-neutral-soft: #eef1f5;
  --color-neutral: #596579;
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --radius-sm: .65rem;
  --radius-md: 1rem;
  --radius-lg: 1.4rem;
  --radius-xl: 2rem;
  --shadow-sm: 0 8px 24px rgba(27, 52, 91, .07);
  --shadow-md: 0 16px 40px rgba(27, 52, 91, .09);
  --focus: 0 0 0 3px rgba(15, 79, 191, .22);
  --print-teal: #0b8985;
  --print-yellow: #fff200;
  --print-light-blue: #d6e7f7;
  --print-cream: #fff0c2;
  --print-blue: #1558d6;
  --print-red: #ea2027;
  --print-green: #1aa653;
  --print-purple: #9d33dc;
}

* { box-sizing: border-box; }
html { background: var(--color-bg); }
body {
  margin: 0;
  color: var(--color-text);
  font-family: 'Noto Sans Lao', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--color-bg);
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}
a { color: inherit; text-decoration: none; }
button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; opacity: .58; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app-frame {
  width: min(1460px, calc(100% - 40px));
  min-height: calc(100vh - 40px);
  margin: 20px auto;
  background: rgba(246, 249, 255, .92);
  border: 1px solid rgba(211, 220, 235, .9);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: clip;
}
.topbar {
  min-height: 72px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 12px 22px;
  border-bottom: 1px solid rgba(223, 230, 241, .9);
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 40;
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; letter-spacing: .035em; }
.brand-mark { width: 28px; height: 11px; display: inline-block; background: linear-gradient(135deg, transparent 18%, var(--color-primary) 19% 36%, transparent 37% 44%, var(--color-primary) 45% 62%, transparent 63% 70%, var(--color-primary) 71% 88%, transparent 89%); transform: skewX(-18deg); }
.brand-inverse { color: #fff; }
.brand-inverse .brand-mark { filter: brightness(0) invert(1); }
.nav-pill {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 5px;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(15, 79, 191, 0.05);
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-pill::-webkit-scrollbar { display: none; }
.nav-pill a {
  position: relative;
  padding: 8px 13px;
  border-radius: 11px;
  white-space: nowrap;
  font-size: .83rem;
  font-weight: 650;
  color: var(--color-muted);
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  user-select: none;
}
.nav-pill a:hover {
  background: var(--color-surface-soft);
  color: var(--color-primary-strong);
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(15, 79, 191, 0.09);
}
.nav-pill a:active {
  transform: translateY(0) scale(0.96);
}
.nav-pill a.active {
  color: #fff;
  background: linear-gradient(135deg, #1059db 0%, #0b3f99 100%);
  font-weight: 800;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 89, 219, 0.38);
}
.nav-pill a.active::after {
  content: '';
  position: absolute;
  bottom: 2.5px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 2.5px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
}
.tablet-menu { display: none; position: relative; justify-self: center; }
.tablet-menu summary { list-style: none; cursor: pointer; min-height: 40px; display: grid; place-items: center; padding: 7px 14px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); font-weight: 750; transition: all 0.2s ease; }
.tablet-menu summary:hover { border-color: var(--color-primary); color: var(--color-primary); }
.tablet-menu summary::-webkit-details-marker { display: none; }
.tablet-menu nav { position: absolute; z-index: 80; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: min(320px, 80vw); display: grid; gap: 4px; padding: 8px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: 0 12px 32px rgba(27, 52, 91, 0.15); animation: menu-fade-in 0.18s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes menu-fade-in { from { opacity: 0; transform: translateX(-50%) translateY(-6px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
.tablet-menu nav a { padding: 10px 12px; border-radius: 9px; color: var(--color-muted); transition: all 0.18s ease; }
.tablet-menu nav a:hover { background: var(--color-surface-soft); color: var(--color-text); transform: translateX(3px); }
.tablet-menu nav a.active { color: #fff; background: linear-gradient(135deg, #1059db, #0b3f99); font-weight: 800; box-shadow: 0 3px 10px rgba(16, 89, 219, 0.28); }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.mode-badge, .role-badge { border: 1px solid var(--color-border); border-radius: 999px; padding: 5px 9px; font-size: .72rem; font-weight: 750; white-space: nowrap; }
.mode-badge { display: inline-flex; align-items: center; gap: 5px; color: var(--color-neutral); background: var(--color-surface-soft); }
.mode-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #16a34a; }
.role-badge { color: var(--color-primary-strong); background: var(--color-surface); }
.role-switch { width: auto; min-height: 38px !important; max-width: 185px; }
.content { padding: 24px 26px 32px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.page-head h1 { margin: 0 0 5px; font-size: clamp(1.45rem, 2vw, 2rem); }
.page-head p { margin: 0; color: var(--color-muted); }
.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }

.btn { min-height: 42px; border: 1px solid transparent; border-radius: 11px; padding: 9px 15px; cursor: pointer; font-weight: 760; display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); user-select: none; }
.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(27, 52, 91, 0.12); }
.btn:active:not(:disabled) { transform: translateY(0) scale(0.97); }
.btn-primary { background: linear-gradient(135deg, #1059db 0%, #0b3f99 100%); color: #fff; box-shadow: 0 3px 10px rgba(15, 79, 191, 0.25); }
.btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, #1463eb 0%, #0d46b0 100%); box-shadow: 0 6px 18px rgba(15, 79, 191, 0.38); }
.btn-secondary { background: #fff; color: var(--color-text); border-color: var(--color-border); box-shadow: 0 2px 6px rgba(27, 52, 91, 0.04); }
.btn-secondary:hover:not(:disabled) { background: #fbfdff; border-color: #cbd5e1; color: var(--color-primary-strong); }
.btn-danger { background: var(--color-danger-soft); color: var(--color-danger); border-color: #f7bec7; }
.btn-ghost { background: transparent; color: var(--color-muted); }
.btn-ghost:hover:not(:disabled) { background: var(--color-surface-soft); color: var(--color-text); }
.btn-sm { min-height: 36px; padding: 7px 11px; font-size: .84rem; }
.grid { display: grid; gap: 16px; }
.kpi-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi { border-radius: var(--radius-lg); padding: 18px; min-height: 112px; border: 1px solid rgba(255, 255, 255, .78); }
.kpi strong { display: block; font-size: clamp(1.45rem, 2vw, 2rem); margin-top: 16px; }
.kpi small { color: var(--color-muted); }
.kpi.primary { background: var(--color-primary); color: #fff; }
.kpi.primary small { color: #d9e6ff; }
.kpi.cyan { background: var(--color-cyan-soft); }
.kpi.green { background: var(--color-green-soft); }
.kpi.red { background: var(--color-red-soft); }
.kpi.violet { background: var(--color-violet-soft); }
.kpi-money { font-size: 1.28rem !important; }
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px; gap: 12px; }
.card-head h2, .card-head h3 { margin: 0; font-size: 1rem; }
.card-body { padding: 14px 18px 18px; }
.section-gap { margin-top: 16px; }
.dashboard-grid { grid-template-columns: 1.35fr 1fr; margin-top: 16px; }
.bottom-grid { grid-template-columns: 1fr 1fr 1fr; margin-top: 16px; }
.report-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.bar-chart { display: flex; align-items: end; gap: 8px; height: 210px; padding-top: 18px; border-bottom: 1px dashed var(--color-border); }
.bar-wrap { flex: 1; min-width: 24px; display: flex; flex-direction: column; align-items: center; justify-content: end; height: 100%; gap: 7px; }
.bar { width: 100%; max-width: 34px; height: var(--bar-height, 5px); border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #4ca6e8, var(--color-primary)); min-height: 5px; }
.bar-label { font-size: .72rem; color: var(--color-muted); }
.line-track { height: 200px; position: relative; border-left: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); overflow: hidden; color: var(--color-primary); }
.sparkline { position: absolute; inset: 8px 6px 8px 8px; width: calc(100% - 14px); height: calc(100% - 16px); }
.donut { width: 150px; aspect-ratio: 1; border-radius: 50%; margin: 10px auto; background: conic-gradient(var(--color-primary) 0 var(--p1), var(--color-success) var(--p1) var(--p2), var(--color-danger) var(--p2) var(--p3), var(--color-special) var(--p3) var(--p4)); position: relative; }
.donut::after { content: 'ລາຍເດືອນ'; position: absolute; inset: 29px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: .78rem; font-weight: 700; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; font-size: .75rem; color: var(--color-muted); }
.legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 3px; }
.dot-present { background: var(--color-primary); }
.dot-special { background: var(--color-success); }
.dot-absent { background: var(--color-danger); }
.dot-partial { background: var(--color-special); }
.payroll-preview-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--color-border); }
.payroll-preview-row:last-child { border-bottom: 0; }

.form-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.field { display: grid; gap: 6px; }
.field-wide { grid-column: 1 / -2; }
.field label { font-size: .82rem; font-weight: 700; color: #4d5870; }
.input, select.input, textarea.input { width: 100%; min-height: 42px; border: 1px solid var(--color-border); background: #fff; border-radius: 11px; padding: 9px 11px; color: var(--color-text); }
textarea.input { min-height: 88px; resize: vertical; }
.password-field { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.checkbox-field { align-content: center; }
.checkbox-field label { display: flex; gap: 8px; align-items: flex-start; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px; border: 1px solid var(--color-border); border-radius: 14px; background: rgba(255, 255, 255, .72); margin-bottom: 14px; }
.attendance-date { width: auto; }
.month-picker { width: auto; min-width: 145px; }
.attendance-list { display: grid; gap: 12px; }
.person-card { display: grid; grid-template-columns: minmax(180px, 1.1fr) 1.8fr 1fr minmax(160px, 1fr); gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--color-border); border-radius: 16px; background: #fff; }
.person-ident strong { display: block; }
.person-ident small { color: var(--color-muted); }
.status-group { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.status-btn { min-height: 44px; border: 1px solid var(--color-border); background: var(--color-surface-soft); border-radius: 10px; color: #4d5870; font-weight: 700; cursor: pointer; }
.status-btn[aria-pressed="true"] { border-color: var(--color-primary); box-shadow: inset 0 0 0 1px var(--color-primary); background: var(--color-blue-soft); color: var(--color-primary-strong); }
.status-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px; border-radius: 999px; font-size: .77rem; white-space: nowrap; }
.status-chip.success { background: var(--color-success-soft); color: var(--color-success); }
.status-chip.danger { background: var(--color-danger-soft); color: var(--color-danger); }
.status-chip.special { background: var(--color-special-soft); color: var(--color-special); }
.status-chip.warning { background: var(--color-warning-soft); color: var(--color-warning); }
.status-chip.muted { background: var(--color-neutral-soft); color: var(--color-neutral); }
.table-wrap { width: 100%; overflow: auto; border: 1px solid var(--color-border); border-radius: 14px; background: #fff; }

/* ==========================================================================
   Attendance Redesign (v1.2.0)
   ========================================================================== */

.attendance-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.attendance-head-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.attendance-head-main h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 1.9rem);
  font-weight: 850;
  color: var(--color-text);
  letter-spacing: -0.01em;
}
.attendance-head-main p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.88rem;
}
.attendance-head-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.attendance-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-primary-strong);
  box-shadow: var(--shadow-sm);
}

/* Breadcrumb Navigation */
.att-breadcrumb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  font-size: 0.82rem;
}
.att-breadcrumb-left {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-muted);
}
.att-bc-icon {
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
}
.att-bc-root {
  font-weight: 600;
  color: var(--color-muted);
}
.att-bc-sep {
  color: #cbd5e1;
  font-size: 0.8rem;
}
.att-bc-parent {
  font-weight: 600;
  color: var(--color-text);
}
.att-bc-active {
  font-weight: 750;
  color: var(--color-primary-strong);
  background: rgba(59, 130, 246, 0.08);
  padding: 2px 8px;
  border-radius: 6px;
}

/* 2-Column Dashboard Grid Layout */
.attendance-dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}
.att-main-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.att-side-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Centerpiece Timeline Card */
.att-timeline-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 20px;
  padding: 18px 20px;
  box-shadow: 0 10px 30px rgba(15, 79, 191, 0.04), 0 2px 8px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.att-timeline-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}
.att-timeline-title h3 {
  margin: 0 0 3px;
  font-size: 1.05rem;
  font-weight: 850;
  color: var(--color-text);
}
.att-timeline-title p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--color-muted);
}
.att-timeline-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.att-legend-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 750;
}
.att-legend-tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.att-legend-tag.tag-o { background: #eff6ff; color: #1d4ed8; }
.att-legend-tag.tag-o .dot { background: #3b82f6; }
.att-legend-tag.tag-t { background: #f5f3ff; color: #6d28d9; }
.att-legend-tag.tag-t .dot { background: #8b5cf6; }
.att-legend-tag.tag-x { background: #fdf2f8; color: #be185d; }
.att-legend-tag.tag-x .dot { background: #ec4899; }
.att-legend-tag.tag-p { background: #fffbeb; color: #b45309; }
.att-legend-tag.tag-p .dot { background: #f59e0b; }

/* 7-Day Timeline Ruler */
.att-timeline-ruler {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 14px;
  border: 1px solid #f1f5f9;
}
.att-ruler-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--color-muted);
  font-size: 0.72rem;
  position: relative;
  min-width: 38px;
  transition: all 0.2s ease;
}
.ruler-day-name {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
}
.ruler-day-num {
  font-size: 0.88rem;
  font-weight: 800;
}
.att-ruler-item.active {
  background: #ffffff;
  color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(15, 79, 191, 0.12);
}
.ruler-active-dot {
  width: 4px;
  height: 4px;
  background: var(--color-primary);
  border-radius: 50%;
  position: absolute;
  bottom: 2px;
}

/* Horizontal Progress Capsule Bars */
.att-timeline-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.att-timeline-row {
  display: grid;
  grid-template-columns: 135px 1fr;
  align-items: center;
  gap: 14px;
}
.att-bar-label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.att-label-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 850;
  flex-shrink: 0;
}
.circle-o { background: #eff6ff; color: #2563eb; }
.circle-t { background: #f5f3ff; color: #7c3aed; }
.circle-x { background: #fdf2f8; color: #db2777; }
.circle-p { background: #fffbeb; color: #d97706; }

.att-label-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.att-label-meta strong {
  font-size: 0.82rem;
  color: var(--color-text);
  white-space: nowrap;
}
.att-label-meta small {
  font-size: 0.68rem;
  color: var(--color-muted);
}

.att-capsule-track {
  background: #f1f5f9;
  border-radius: 999px;
  height: 32px;
  padding: 3px;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
}
.att-capsule-fill {
  height: 100%;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 750;
  gap: 6px;
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  white-space: nowrap;
}
.fill-o { background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%); }
.fill-t { background: linear-gradient(135deg, #c084fc 0%, #8b5cf6 100%); }
.fill-x { background: linear-gradient(135deg, #f472b6 0%, #ec4899 100%); }
.fill-p { background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%); }
.capsule-circle {
  font-size: 0.6rem;
  opacity: 0.9;
}
.capsule-text {
  font-weight: 700;
}
.capsule-pct {
  font-weight: 850;
  margin-left: auto;
}

/* Cards Head Row */
.att-cards-head-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 4px;
  padding: 0 4px;
  flex-wrap: wrap;
  gap: 6px;
}
.att-section-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 850;
  color: var(--color-text);
}
.att-section-sub {
  font-size: 0.76rem;
  color: var(--color-muted);
}
.attendance-toolbar-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 18px rgba(15, 79, 191, 0.04);
}
.att-toolbar-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.att-date-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.att-date-controls .btn {
  border-radius: 10px;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#prev-day:hover {
  transform: translateX(-3px);
  color: var(--color-primary-strong);
  border-color: var(--color-primary);
  box-shadow: 0 3px 10px rgba(15, 79, 191, 0.15);
}
#next-day:hover {
  transform: translateX(3px);
  color: var(--color-primary-strong);
  border-color: var(--color-primary);
  box-shadow: 0 3px 10px rgba(15, 79, 191, 0.15);
}
#today-btn {
  font-weight: 750;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#today-btn:hover {
  transform: translateY(-2px);
  color: var(--color-primary-strong);
  border-color: var(--color-primary);
  background: #eff6ff;
  box-shadow: 0 4px 12px rgba(15, 79, 191, 0.18);
}
#today-btn:active,
.att-date-controls .btn:active {
  transform: scale(0.92);
}
.att-date-input {
  width: auto;
  min-height: 38px !important;
  padding: 6px 12px;
  font-weight: 750;
  font-size: 0.88rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  transition: all 0.2s ease;
  background: var(--color-surface);
}
.att-date-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(16, 89, 219, 0.15);
}
.att-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
#mark-all-present {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #86efac;
  color: #166534;
  font-weight: 750;
  border-radius: 10px;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#mark-all-present:hover:not(:disabled) {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border-color: #4ade80;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.28);
  color: #14532d;
}
#mark-all-present:active:not(:disabled) {
  transform: scale(0.94);
}
#undo-mark-all {
  border-radius: 10px;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#undo-mark-all:hover {
  transform: translateY(-2px);
  background: #f1f5f9;
}
#undo-mark-all:active {
  transform: scale(0.94);
}
#stage-mode-btn {
  border-radius: 10px;
  font-weight: 750;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#stage-mode-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 79, 191, 0.16);
}
#stage-mode-btn:active {
  transform: scale(0.94);
}
#stage-mode-btn.btn-primary {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-color: #d97706;
  color: #fff;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.38);
  animation: pulse-stage-glow 2.5s infinite ease-in-out;
}
@keyframes pulse-stage-glow {
  0%, 100% { box-shadow: 0 4px 14px rgba(245, 158, 11, 0.38); }
  50% { box-shadow: 0 4px 22px rgba(245, 158, 11, 0.65); }
}
.att-toolbar-row-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--color-surface-soft);
}
.att-search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 380px;
}
.att-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-muted);
  pointer-events: none;
  transition: color 0.2s ease;
}
.att-search-input {
  padding-left: 34px !important;
  min-height: 38px !important;
  font-size: 0.85rem;
  border-radius: 10px;
  width: 100%;
  border: 1px solid var(--color-border);
  transition: all 0.2s ease;
}
.att-search-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(16, 89, 219, 0.12);
}
.att-search-wrap:focus-within .att-search-icon {
  color: var(--color-primary);
}
.att-filter-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  background: var(--color-surface-soft);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
}
.att-filter-chip {
  padding: 6px 12px;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  white-space: nowrap;
}
.att-filter-chip:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-text);
  transform: translateY(-1.5px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
.att-filter-chip:active {
  transform: scale(0.94);
}
.att-filter-chip.active {
  font-weight: 800;
  transform: translateY(-1px);
}
.att-filter-chip[data-filter="all"].active {
  background: linear-gradient(135deg, #1059db 0%, #0b3f99 100%);
  color: #fff;
  box-shadow: 0 3px 12px rgba(16, 89, 219, 0.35);
}
.att-filter-chip[data-filter="unset"].active {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  color: #fff;
  box-shadow: 0 3px 12px rgba(100, 116, 139, 0.35);
}
.att-filter-chip[data-filter="present"].active {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #fff;
  box-shadow: 0 3px 12px rgba(22, 163, 74, 0.35);
}
.att-filter-chip[data-filter="special"].active {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #fff;
  box-shadow: 0 3px 12px rgba(124, 58, 237, 0.35);
}
.att-filter-chip[data-filter="absent"].active {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #fff;
  box-shadow: 0 3px 12px rgba(220, 38, 38, 0.35);
}
.att-filter-chip[data-filter="partial"].active {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #fff;
  box-shadow: 0 3px 12px rgba(217, 119, 6, 0.35);
}

/* Musician Attendance Cards */
.att-cards-grid {
  display: grid;
  gap: 12px;
}
.att-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 4px 20px rgba(15, 79, 191, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.att-card:hover {
  box-shadow: 0 10px 28px rgba(15, 79, 191, 0.08);
  transform: translateY(-2px);
}
.att-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.att-musician-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.att-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dbeafe 0%, #ede9fe 100%);
  color: var(--color-primary-strong);
  font-weight: 850;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(15, 79, 191, 0.12);
  flex-shrink: 0;
}
.att-musician-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.att-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.att-musician-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-text);
}
.att-code-pill {
  font-size: 0.72rem;
  font-weight: 750;
  padding: 2px 6px;
  background: var(--color-neutral-soft);
  color: var(--color-neutral);
  border-radius: 4px;
}
.att-sub-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--color-muted);
}
.att-position-tag {
  font-weight: 600;
}
.att-shift-badge {
  background: var(--color-surface-soft);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--color-border);
  font-size: 0.72rem;
}

/* Save Status Indicator Pill */
.att-save-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--color-surface-soft);
  color: var(--color-muted);
  border: 1px solid var(--color-border);
}
.att-save-pill.saved {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}
.att-save-pill.saving {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.att-save-pill.unset {
  background: #fafaf9;
  border-color: #e7e5e4;
  color: #78716c;
}
.att-save-pill.danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
.spinner-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse-dot 1s infinite alternate;
}

/* Modern Segmented Status Control */
.att-status-segmented {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.att-status-btn {
  min-height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 7px 8px;
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  color: #4b5563;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  position: relative;
  overflow: hidden;
}
.att-status-btn:hover:not(:disabled) {
  border-color: #cbd5e1;
  background: var(--color-surface-soft);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.att-status-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.95);
}
.att-status-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}
.att-btn-code {
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.att-status-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.05);
  margin-bottom: 2px;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-o .att-status-badge { background: #eff6ff; color: #2563eb; }
.btn-t .att-status-badge { background: #f5f3ff; color: #7c3aed; }
.btn-x .att-status-badge { background: #fdf2f8; color: #db2777; }
.btn-p .att-status-badge { background: #fffbeb; color: #d97706; }

.att-status-btn.btn-o[aria-pressed="true"] .att-status-badge {
  background: #22c55e;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.4);
}
.att-status-btn.btn-t[aria-pressed="true"] .att-status-badge {
  background: #8b5cf6;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(139, 92, 246, 0.4);
}
.att-status-btn.btn-x[aria-pressed="true"] .att-status-badge {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}
.att-status-btn.btn-p[aria-pressed="true"] .att-status-badge {
  background: #f59e0b;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
}
.att-status-btn:hover:not(:disabled) .att-btn-code {
  transform: scale(1.12);
}
.att-btn-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
}

/* Active Segmented States with luminous radiance and spring pop */
.att-status-btn.btn-o[aria-pressed="true"] {
  border-color: #22c55e;
  background: linear-gradient(145deg, #f0fdf4 0%, #dcfce7 100%);
  color: #15803d;
  box-shadow: 0 0 0 1.5px #22c55e, 0 6px 18px rgba(34, 197, 94, 0.28);
  transform: translateY(-1px);
}
.att-status-btn.btn-o[aria-pressed="true"] .att-btn-code {
  transform: scale(1.15);
  color: #166534;
}
.att-status-btn.btn-o[aria-pressed="true"] .att-btn-label {
  font-weight: 750;
  color: #166534;
}

.att-status-btn.btn-t[aria-pressed="true"] {
  border-color: #8b5cf6;
  background: linear-gradient(145deg, #f5f3ff 0%, #ede9fe 100%);
  color: #6d28d9;
  box-shadow: 0 0 0 1.5px #8b5cf6, 0 6px 18px rgba(139, 92, 246, 0.28);
  transform: translateY(-1px);
}
.att-status-btn.btn-t[aria-pressed="true"] .att-btn-code {
  transform: scale(1.15);
  color: #5b21b6;
}
.att-status-btn.btn-t[aria-pressed="true"] .att-btn-label {
  font-weight: 750;
  color: #5b21b6;
}

.att-status-btn.btn-x[aria-pressed="true"] {
  border-color: #ef4444;
  background: linear-gradient(145deg, #fef2f2 0%, #fee2e2 100%);
  color: #b91c1c;
  box-shadow: 0 0 0 1.5px #ef4444, 0 6px 18px rgba(239, 68, 68, 0.28);
  transform: translateY(-1px);
}
.att-status-btn.btn-x[aria-pressed="true"] .att-btn-code {
  transform: scale(1.15);
  color: #991b1b;
}
.att-status-btn.btn-x[aria-pressed="true"] .att-btn-label {
  font-weight: 750;
  color: #991b1b;
}

.att-status-btn.btn-p[aria-pressed="true"] {
  border-color: #f59e0b;
  background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
  color: #b45309;
  box-shadow: 0 0 0 1.5px #f59e0b, 0 6px 18px rgba(245, 158, 11, 0.28);
  transform: translateY(-1px);
}
.att-status-btn.btn-p[aria-pressed="true"] .att-btn-code {
  transform: scale(1.15);
  color: #92400e;
}
.att-status-btn.btn-p[aria-pressed="true"] .att-btn-label {
  font-weight: 750;
  color: #92400e;
}

/* Card Foot: Shift & Notes */
.att-card-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--color-surface-soft);
}
.att-shift-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 180px;
}
.att-foot-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-muted);
  white-space: nowrap;
}
.att-shift-select {
  min-height: 36px !important;
  font-size: 0.82rem;
  padding: 4px 8px;
  border-radius: 8px;
}
.att-note-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 200px;
}
.att-note-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--color-muted);
  white-space: nowrap;
  padding: 4px 8px;
}
.att-note-toggle.has-note {
  color: var(--color-primary-strong);
  font-weight: 700;
}
.att-note-input-wrap {
  flex: 1;
  display: none;
}
.att-note-input-wrap.expanded {
  display: block;
}
.att-note-input {
  min-height: 36px !important;
  font-size: 0.82rem;
  padding: 4px 10px;
  border-radius: 8px;
  width: 100%;
}

/* Stage Quick Check-in Mode */
.stage-mode-active .att-card {
  background: #182234;
  border-color: #2b3a53;
  color: #fff;
  padding: 16px 18px;
}
.stage-mode-active .att-card .att-musician-name {
  color: #fff;
  font-size: 1.15rem;
}
.stage-mode-active .att-card .att-avatar {
  background: #233148;
  color: #93c5fd;
  border-color: #3b82f6;
}
.stage-mode-active .att-card .att-code-pill {
  background: #233148;
  color: #cbd5e1;
}
.stage-mode-active .att-card .att-sub-row {
  color: #94a3b8;
}
.stage-mode-active .att-status-btn {
  min-height: 56px;
  background: #233148;
  border-color: #334155;
  color: #cbd5e1;
}
.stage-mode-active .att-status-btn .att-btn-code {
  font-size: 1.3rem;
}
.stage-mode-active .att-status-btn .att-btn-label {
  font-size: 0.78rem;
}
.stage-mode-active .att-status-btn.btn-o[aria-pressed="true"] {
  background: #15803d;
  border-color: #4ade80;
  color: #fff;
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.4);
}
.stage-mode-active .att-status-btn.btn-t[aria-pressed="true"] {
  background: #6d28d9;
  border-color: #a78bfa;
  color: #fff;
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.4);
}
.stage-mode-active .att-status-btn.btn-x[aria-pressed="true"] {
  background: #b91c1c;
  border-color: #f87171;
  color: #fff;
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.4);
}
.stage-mode-active .att-status-btn.btn-p[aria-pressed="true"] {
  background: #b45309;
  border-color: #fbbf24;
  color: #fff;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
}
.stage-mode-active .att-card-foot {
  border-top-color: #2b3a53;
}
.stage-mode-active .att-foot-label {
  color: #94a3b8;
}
.stage-mode-active .att-shift-select {
  background: #233148;
  color: #fff;
  border-color: #334155;
}
.stage-mode-active .att-note-input {
  background: #233148;
  color: #fff;
  border-color: #334155;
}
.stage-mode-active .att-note-toggle {
  color: #93c5fd;
}

/* Side Column Cards (Inspired by Reference UI) */
.att-side-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 4px 18px rgba(15, 79, 191, 0.03);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.att-side-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.att-side-head h4 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 850;
  color: var(--color-text);
}
.att-efficiency-stat {
  font-size: 0.74rem;
  font-weight: 700;
  color: #2563eb;
  background: #eff6ff;
  padding: 2px 7px;
  border-radius: 6px;
}

/* Floral Emblem in Profile Card */
.att-profile-card {
  text-align: center;
  align-items: center;
  padding: 20px 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.att-emblem-wrap {
  margin-bottom: 6px;
}
.att-flower-emblem {
  position: relative;
  width: 44px;
  height: 44px;
  margin: 0 auto;
}
.att-flower-emblem .petal {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50% 50% 50% 0;
  opacity: 0.88;
}
.petal-1 { top: 0; left: 0; background: #3b82f6; transform: rotate(0deg); }
.petal-2 { top: 0; right: 0; background: #8b5cf6; transform: rotate(90deg); }
.petal-3 { bottom: 0; right: 0; background: #ec4899; transform: rotate(180deg); }
.petal-4 { bottom: 0; left: 0; background: #f59e0b; transform: rotate(270deg); }

.att-profile-title {
  font-size: 0.98rem;
  font-weight: 850;
  color: var(--color-text);
}
.att-profile-sub {
  margin: 0;
  font-size: 0.74rem;
  color: var(--color-muted);
}

/* Plan List */
.att-plan-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.att-plan-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #f1f5f9;
  font-size: 0.78rem;
}
.att-plan-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
}
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-purple { background: #ede9fe; color: #5b21b6; }
.att-plan-time {
  font-weight: 750;
  color: var(--color-text);
}
.att-plan-label {
  color: var(--color-muted);
  font-size: 0.72rem;
}

/* Efficiency Radial Gauges */
.att-gauge-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  text-align: center;
}
.att-gauge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.att-svg-gauge {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}
.att-gauge-num {
  position: absolute;
  font-size: 0.7rem;
  font-weight: 850;
  color: var(--color-text);
}
.att-gauge-code {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--color-muted);
}
.gauge-blue .att-gauge-code { color: #2563eb; }
.gauge-purple .att-gauge-code { color: #7c3aed; }
.gauge-pink .att-gauge-code { color: #db2777; }
.gauge-amber .att-gauge-code { color: #d97706; }

/* Mini Vertical Bar Chart */
.att-mini-chart-wrap {
  padding-top: 4px;
}
.att-mini-bars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  align-items: flex-end;
  height: 75px;
}
.att-mini-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  height: 100%;
}
.att-mini-bar-track {
  flex: 1;
  width: 14px;
  background: #f1f5f9;
  border-radius: 999px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.att-mini-bar-fill {
  width: 100%;
  border-radius: 999px;
  transition: height 0.3s ease;
}
.bar-blue { background: linear-gradient(180deg, #60a5fa, #2563eb); }
.bar-purple { background: linear-gradient(180deg, #c084fc, #7c3aed); }
.bar-pink { background: linear-gradient(180deg, #f472b6, #db2777); }
.bar-amber { background: linear-gradient(180deg, #fbbf24, #d97706); }
.bar-gray { background: #94a3b8; }
.att-mini-val {
  font-size: 0.74rem;
  font-weight: 850;
  color: var(--color-text);
  line-height: 1;
}
.att-mini-label {
  font-size: 0.65rem;
  color: var(--color-muted);
  font-weight: 700;
}

@media (max-width: 1080px) {
  .attendance-dashboard-layout {
    grid-template-columns: 1fr;
  }
  .att-side-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    position: static;
  }
  .att-timeline-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
/* Special Time Page Modern Styles */
.sp-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.sp-kpi-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 4px 18px rgba(15, 79, 191, 0.04);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.sp-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 79, 191, 0.08);
}
.sp-kpi-card.card-violet {
  border-color: rgba(139, 92, 246, 0.25);
  background: linear-gradient(135deg, #ffffff 0%, #faf5ff 100%);
}
.sp-kpi-card.card-violet .sp-kpi-icon { background: #ede9fe; color: #7c3aed; }
.sp-kpi-card.card-blue {
  border-color: rgba(59, 130, 246, 0.25);
  background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}
.sp-kpi-card.card-blue .sp-kpi-icon { background: #dbeafe; color: #2563eb; }
.sp-kpi-card.card-amber {
  border-color: rgba(245, 158, 11, 0.25);
  background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
}
.sp-kpi-card.card-amber .sp-kpi-icon { background: #fef3c7; color: #d97706; }
.sp-kpi-card.card-green {
  border-color: rgba(34, 197, 94, 0.25);
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}
.sp-kpi-card.card-green .sp-kpi-icon { background: #dcfce7; color: #16a34a; }

.sp-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.sp-kpi-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sp-kpi-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--color-muted);
}
.sp-kpi-value {
  font-size: 1.25rem;
  font-weight: 850;
  color: var(--color-text);
  line-height: 1.1;
}
.sp-kpi-value small {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-muted);
}

.sp-form-card,
.sp-table-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 20px;
  box-shadow: 0 6px 24px rgba(15, 79, 191, 0.04);
  overflow: hidden;
}
.sp-card-head {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}
.sp-card-title h3 {
  margin: 0 0 3px;
  font-size: 1.05rem;
  font-weight: 850;
  color: var(--color-text);
}
.sp-card-title p {
  margin: 0;
  font-size: 0.76rem;
  color: var(--color-muted);
}
.sp-card-body {
  padding: 18px 20px;
}

.sp-filter-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sp-filter-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-muted);
}
.sp-filter-select {
  width: auto;
  min-height: 36px !important;
  font-size: 0.82rem;
  border-radius: 8px;
}
.sp-filter-hours-tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: #ede9fe;
  color: #6d28d9;
  font-size: 0.82rem;
  font-weight: 850;
}

.sp-date-col {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sp-date-text {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--color-text);
}
.sp-day-sub {
  font-size: 0.72rem;
  color: var(--color-muted);
}

.sp-musician-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sp-mus-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dbeafe 0%, #ede9fe 100%);
  color: #1d4ed8;
  font-weight: 850;
  font-size: 0.75rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1.5px solid #ffffff;
  box-shadow: 0 2px 6px rgba(15, 79, 191, 0.1);
}
.sp-mus-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sp-mus-info strong {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--color-text);
}
.sp-mus-code {
  font-size: 0.72rem;
  color: var(--color-muted);
  font-weight: 600;
}

.sp-time-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  font-size: 0.78rem;
  font-weight: 750;
  color: #334155;
  white-space: nowrap;
}
.sp-hours-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f5f3ff;
  color: #7c3aed;
  font-size: 0.82rem;
  font-weight: 850;
  border: 1px solid #ddd6fe;
  white-space: nowrap;
}
.sp-detail-text {
  font-size: 0.82rem;
  color: #475569;
}

table.data { width: 100%; border-collapse: collapse; min-width: 780px; }
table.data.wide-table { min-width: 1040px; }
table.data.payroll-table { min-width: 1500px; }
table.data th, table.data td { padding: 11px 12px; border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: middle; }
table.data th { position: sticky; top: 0; background: #f8fafd; color: #5e687c; font-size: .78rem; z-index: 2; }
table.data tbody tr:hover { background: #f9fbfe; }
table.data tfoot td { background: #f7f9fd; border-top: 2px solid var(--color-border); }
.money { text-align: right !important; font-variant-numeric: tabular-nums; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filter-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-inline .input { width: auto; min-width: 170px; }
.muted { color: var(--color-muted); }
.notice { padding: 12px 14px; border-radius: 12px; background: var(--color-warning-soft); color: var(--color-warning); border: 1px solid #e8cf79; margin-bottom: 12px; }
.success-note { background: var(--color-success-soft); color: #0d694a; border-color: #b5dfcc; }
.info-note { background: var(--color-info-soft); color: var(--color-info); border-color: #c4daf6; margin: 0; }
.warning-banner { margin-bottom: 16px; }
.empty { text-align: center; padding: 36px 16px; color: var(--color-muted); }
.activity-list { display: grid; gap: 9px; }
.activity { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: start; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-primary); margin-top: 7px; }
.activity time { color: var(--color-muted); font-size: .72rem; white-space: nowrap; }
.detail-row td { background: #f8fafc; padding: 12px 14px !important; }
.summary-detail { padding: 8px; }
.summary-detail h3 { margin-top: 0; }
.detail-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.detail-pill { display: inline-flex; gap: 7px; align-items: center; padding: 4px 8px; background: #fff; border: 1px solid var(--color-border); border-radius: 8px; font-size: 0.8rem; }
.detail-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 12px; }

/* Summary Page Modern & Compact Styles */
.summary-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.summary-month-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.table-wrap.summary-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: #fff;
}
table.data.summary-table {
  width: 100%;
  min-width: 680px;
  table-layout: auto;
}
table.data.summary-table th {
  padding: 8px 6px;
  font-size: 0.75rem;
  font-weight: 750;
  color: #475569;
  background: #f8fafc;
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}
table.data.summary-table td {
  padding: 7px 6px;
  font-size: 0.83rem;
  border-bottom: 1px solid #edf2f7;
  vertical-align: middle;
}
table.data.summary-table tbody tr:hover {
  background: #f8fafc;
}

.text-center { text-align: center !important; }

.mus-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 750;
  color: var(--color-primary);
  background: var(--color-blue-soft);
  padding: 2px 6px;
  border-radius: 5px;
  letter-spacing: 0.02em;
}

.sum-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  margin-right: 2px;
  vertical-align: middle;
}
.sum-tag-o { background: #e0f2fe; color: #0369a1; }
.sum-tag-t { background: #dcfce7; color: #15803d; }
.sum-tag-x { background: #fee2e2; color: #b91c1c; }
.sum-tag-p { background: #f3e8ff; color: #7e22ce; }

.badge-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  padding: 0 5px;
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 750;
}
.badge-o { background: #e0f2fe; color: #0284c7; }
.badge-t { background: #dcfce7; color: #16a34a; }
.badge-x { background: #fee2e2; color: #dc2626; font-weight: 850; }
.badge-p { background: #f3e8ff; color: #9333ea; }

.badge-zero {
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 500;
}

.badge-units {
  display: inline-block;
  padding: 2px 7px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  color: #1d4ed8;
  font-weight: 750;
  font-size: 0.82rem;
}

.badge-units-total {
  color: #1d4ed8;
  font-size: 0.88rem;
}

.badge-special-h {
  font-weight: 700;
  color: #0d9488;
}

.badge-advance {
  font-weight: 700;
  color: #b45309;
}

.summary-total-row td {
  background: #f8fafc !important;
  border-top: 2px solid var(--color-border) !important;
  font-size: 0.83rem;
  padding: 8px 6px !important;
}

.total-label {
  color: var(--color-text);
  font-weight: 800;
}

/* Summary Detail Card */
.summary-detail-card {
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.summary-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}
.summary-detail-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.summary-detail-title h4 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: #1e293b;
}
.summary-detail-badge {
  font-size: 0.72rem;
  padding: 2px 7px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-weight: 600;
  color: #475569;
}
.summary-detail-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.summary-detail-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 10px 12px;
}
.summary-detail-box h5 {
  margin: 0 0 8px 0;
  font-size: 0.76rem;
  font-weight: 750;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}
.summary-detail-box ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.8rem;
  color: #334155;
  line-height: 1.6;
}

.shift-setting { display: grid; grid-template-columns: 1.1fr .8fr .8fr 1.4fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--color-border); }
.shift-setting:last-of-type { margin-bottom: 12px; }
.more-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.more-card { display: grid; gap: 6px; min-height: 110px; padding: 16px; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.more-card:hover { border-color: #b6c9e8; transform: translateY(-1px); }
.more-card span { color: var(--color-muted); font-size: .84rem; }
.mobile-nav { display: none; }

/* Reports Month Navigator & Archive Styles */
.report-month-nav-card { background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); border-color: #cbd5e1; }
.report-month-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.active-month-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.active-month-heading { font-size: 1.25rem; font-weight: 900; color: var(--color-primary); }
.report-overview-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.report-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi-mini { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 1px 3px rgba(0,0,0,0.03); }
.kpi-mini-label { font-size: 0.76rem; color: var(--color-muted); font-weight: 600; }
.kpi-mini-value { font-size: 1.15rem; font-weight: 850; color: var(--color-text); }
.kpi-mini.highlight { background: #f0fdf4; border-color: #bbf7d0; }
.kpi-mini.highlight .money-accent { color: #166534; font-size: 1.2rem; }
.month-pill-badge { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; border-radius: 999px; padding: 2px 10px; font-size: 0.78rem; font-weight: 800; }
.status-tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: 0.75rem; font-weight: 800; }
.status-tag.status-locked { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.status-tag.status-draft { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.current-month-badge { margin-left: 6px; background: #e0f2fe; color: #0369a1; padding: 1px 6px; border-radius: 4px; font-size: 0.68rem; font-weight: 700; }
.active-month-row { background: #f0f7ff !important; font-weight: 600; }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 15% 15%, #dcecff, transparent 36%), radial-gradient(circle at 85% 85%, #e6e5ff, transparent 38%), var(--color-bg); }
.login-card { width: min(790px, 100%); display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; background: #fff; border: 1px solid var(--color-border); border-radius: 28px; box-shadow: var(--shadow-md); }
.login-visual { background: linear-gradient(145deg, #0e4db9, #153067); color: #fff; padding: 34px; min-height: 480px; display: flex; flex-direction: column; justify-content: space-between; }
.login-visual h1 { font-size: 2.4rem; margin: 36px 0 0; letter-spacing: .08em; }
.login-form { padding: 34px; display: grid; align-content: center; gap: 15px; }
.login-form h2 { margin: 0; }
.divider { height: 1px; background: var(--color-border); margin: 4px 0; }

#toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 120; pointer-events: none; }
.toast { background: var(--color-text); color: #fff; padding: 11px 14px; border-radius: 12px; box-shadow: var(--shadow-md); max-width: min(360px, calc(100vw - 36px)); }
.toast.success { background: #0d694a; }
.toast.danger { background: #8f1c29; }
.error-state { width: min(650px, 100%); margin: 15vh auto 0; }
.skeleton-page { display: grid; gap: 18px; }
.skeleton { background: linear-gradient(90deg, #e8edf5 25%, #f5f7fb 50%, #e8edf5 75%); background-size: 200% 100%; animation: skeleton 1.3s infinite linear; border-radius: 12px; }
.skeleton-title { width: 260px; height: 44px; }
.skeleton-card { min-height: 112px; }
.skeleton-panel { min-height: 330px; }
@keyframes skeleton { to { background-position: -200% 0; } }

/* Official print forms — deliberately separate from dashboard UI. */
.print-page { background: #fff; color: #000; padding: 6mm; min-height: 100vh; font-family: 'Noto Sans Lao', Arial, sans-serif; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.print-toolbar { position: sticky; top: 8px; z-index: 10; display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 8px; }
.official-title { text-align: center; line-height: 1.25; }
.official-title .aurora { font-size: 24px; font-weight: 900; letter-spacing: .05em; }

/* Attendance Print Head */
.attendance-print-head { display: grid; grid-template-columns: 1fr 2fr 1fr; align-items: center; margin-bottom: 2mm; }
.attendance-print-head .head-left { display: flex; align-items: center; }
.attendance-print-head .official-logo { height: 12.5mm; width: auto; object-fit: contain; }
.attendance-print-head .aurora-sub { font-size: 8px; font-weight: 800; letter-spacing: 0.1em; color: var(--print-teal); display: block; }
.attendance-print-head .attendance-title b { font-size: 14.5px; font-weight: 900; display: block; margin: 1px 0; color: #0f172a; }
.attendance-print-head .month-sub { font-size: 9px; font-weight: 700; color: #334155; }
.attendance-meta-card {
  display: grid;
  gap: 1.5px;
  justify-self: end;
  font-size: 7.5px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 1.8mm 3mm;
  min-width: 32mm;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.attendance-meta-card .meta-item { display: flex; justify-content: space-between; gap: 2mm; }
.attendance-meta-card .meta-label { color: #64748b; font-weight: 600; }

table.official { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: 7.2px; }
table.official th, table.official td { border: 1px solid #cbd5e1; padding: 2px 3px; text-align: center; vertical-align: middle; height: 14.5px; }
table.official th.teal, .teal-band { background: var(--print-teal); color: #fff; font-weight: 800; border-color: #0c6a65; }
table.official tbody tr:nth-child(even) { background: #fafbfc; }
table.official .left { text-align: left; }
.section-title { text-align: center; padding: 2px 6px; font-size: 7.6px; font-weight: 800; border: 1px solid #0c6a65; border-bottom: 0; }
.attendance-grid { font-size: 6.2px !important; margin-bottom: 1.5mm; }
.attendance-grid td { padding: 1px 0 !important; }
.print-attendance .daycol { width: 2.12%; }
.print-attendance .numbercol { width: 3%; }
.print-attendance .codecol { width: 6.4%; }
.print-attendance .membercol { width: 10.5%; }
.print-attendance .shiftcol { width: 7.2%; }

/* Weekend Column and Cell Styling */
th.weekend-col { background: #095954 !important; color: #fef08a !important; font-weight: 900; }
td.weekend-cell { background: #f1f5f9; }
table.official tbody tr:nth-child(even) td.weekend-cell { background: #e8edf5; }

.invalid-day { opacity: .35; }
.invalid-day-cell { background: #e2e8f0 !important; }

/* Modern Status Pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13.5px;
  height: 12px;
  border-radius: 2.5px;
  font-size: 6.5px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}
.status-pill.success {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.status-pill.special {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.status-pill.danger {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.status-pill.warning {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

/* Count Pills for Summary */
.count-pill {
  display: inline-block;
  font-weight: 800;
  padding: 0.5px 3.5px;
  border-radius: 2.5px;
  min-width: 15px;
  text-align: center;
  font-size: 7px;
}
.count-pill.present-pill { color: #0369a1; background: #e0f2fe; border: 1px solid #bae6fd; }
.count-pill.special-pill { color: #15803d; background: #dcfce7; border: 1px solid #bbf7d0; }
.count-pill.absent-pill { color: #b91c1c; background: #fee2e2; border: 1px solid #fecaca; }

.special-text { color: #15803d; font-weight: 800; }
.absent-text { color: #b91c1c; font-weight: 800; }
.special-hours-text { color: #7e22ce; font-weight: 800; }

/* Dual Grid for Attendance Middle Section */
.attendance-dual-grid { display: grid; grid-template-columns: 1fr 1.18fr; gap: 3.5mm; margin-top: 1.5mm; align-items: start; }
.dual-col-left, .dual-col-right { display: flex; flex-direction: column; }
.summary-official-table, .special-official-table, .hours-official-table { font-size: 6.8px !important; }
.summary-official-table th, .summary-official-table td,
.special-official-table th, .special-official-table td,
.hours-official-table th, .hours-official-table td { height: 13.5px; padding: 1.5px 2px; }
.legend-card {
  border: 1px solid #cbd5e1;
  border-top: none;
  background: #f8fafc;
  padding: 1.8mm 3mm;
  font-size: 7px;
  display: grid;
  gap: 1.2mm;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}
.legend-row { display: flex; align-items: center; gap: 3mm; flex-wrap: wrap; }
.legend-title { font-weight: 800; color: var(--print-teal); }
.legend-markers { gap: 3.5mm; }
.legend-item { display: inline-flex; align-items: center; gap: 1.5mm; font-size: 7px; }
.total-row { font-weight: 800; background: #f1f5f9; }

/* Attendance Signatures */
.attendance-signatures { grid-template-columns: repeat(3, 1fr); margin-top: 3mm; gap: 12mm; }
.signature-row { display: grid; text-align: center; font-size: 7.8px; }
.attendance-signatures .sign-box,
.payroll-signatures .sign-box {
  min-height: 25mm;
  height: 25mm;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  background: #fafbfc;
  border: 1px dashed #cbd5e1;
  border-radius: 4px;
  padding: 2mm 3mm 1.8mm;
  box-sizing: border-box;
}
.sign-role {
  font-weight: 800;
  color: #1e293b;
  font-size: 8.2px;
  width: 100%;
  text-align: center;
}
.sign-space {
  flex: 1;
  width: 100%;
  min-height: 12mm;
}
.sign-line {
  border-top: 1px dotted #94a3b8;
  width: 90%;
  padding-top: 1.2mm;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8mm;
}
.sign-name-slot {
  font-size: 7.5px;
  color: #334155;
  white-space: nowrap;
}
.sign-name-slot .signature-name {
  color: #0369a1;
  font-weight: 800;
}
.sign-date-slot {
  font-size: 7px;
  color: #64748b;
}

/* Payroll Print Head */
.payroll-print-head { display: grid; grid-template-columns: 1fr 2fr 1fr; align-items: center; margin-bottom: 2.5mm; }
.payroll-print-head .head-left { display: flex; align-items: center; }
.payroll-print-head .official-logo { height: 13.5mm; width: auto; object-fit: contain; }
.payroll-print-head .payroll-title b { font-size: 15px; font-weight: 900; display: block; margin: 1px 0; color: #0f172a; }
.payroll-sub-band { display: inline-flex; align-items: center; gap: 2.5mm; margin-top: 1mm; font-size: 8.2px; }
.badge-dept, .badge-month {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  padding: 1px 6px;
  color: #334155;
}
.badge-dept b, .badge-month b { color: #0f766e; }
.payroll-meta-card { min-width: 32mm; }

/* Payroll Table Styling */
.payroll-official { font-size: 7.2px !important; margin-bottom: 2mm; }
.payroll-official th { height: 16px !important; font-size: 7.2px; border-color: #0c6a65; }
.payroll-official td { height: 16px !important; padding: 2px 4px; }
.payroll-official .member-name { font-weight: 600; }
.payroll-official .right { text-align: right; font-variant-numeric: tabular-nums; }
.net-pay-cell { background: #f0fdf4 !important; color: #166534; font-weight: 900; }
table.official tbody tr:nth-child(even) td.net-pay-cell { background: #e7f9ed !important; }
.payroll-total-row { background: #fef9c3 !important; font-weight: 900; border-top: 1.5px solid #0c6a65; }
.payroll-total-row td { border-color: #d97706; }
.net-pay-total { background: #dcfce7 !important; color: #15803d !important; font-weight: 900; font-size: 8px; }

/* Payroll Signatures */
.payroll-signatures { grid-template-columns: repeat(4, 1fr); margin-top: 3.5mm; gap: 8mm; }

/* Payslip Modal & Payout Checklist Styles */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}

.payslip-card {
  background: #ffffff;
  width: min(540px, 100%);
  border-radius: 20px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
  border: 1px solid var(--color-border);
  overflow: hidden;
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.payslip-head {
  background: linear-gradient(135deg, #0e4db9 0%, #0b3f99 100%);
  color: #ffffff;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.payslip-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.payslip-brand-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.payslip-brand-sub {
  margin: 0;
  font-size: 0.76rem;
  color: #bfdbfe;
}

.payslip-body {
  padding: 20px 22px;
  display: grid;
  gap: 14px;
}

.payslip-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 11px 14px;
}

.payslip-meta-item small {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
}

.payslip-meta-item strong {
  font-size: 0.88rem;
  color: #1e293b;
}

.payslip-bank-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.payslip-bank-icon {
  font-size: 1.35rem;
}

.payslip-bank-info small {
  display: block;
  font-size: 0.72rem;
  color: #166534;
  font-weight: 700;
}

.payslip-bank-info strong {
  font-size: 0.88rem;
  color: #14532d;
  font-family: ui-monospace, SFMono-Regular, monospace;
}

.payslip-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}

.payslip-table th {
  text-align: left;
  padding: 6px 8px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: 4px;
}

.payslip-table td {
  padding: 7px 8px;
  border-bottom: 1px solid #edf2f7;
}

.payslip-net-box {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 2px solid #86efac;
  border-radius: 14px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.payslip-net-label {
  font-size: 0.86rem;
  font-weight: 750;
  color: #15803d;
}

.payslip-net-amount {
  font-size: 1.45rem;
  font-weight: 900;
  color: #14532d;
}

.payslip-foot {
  padding: 14px 22px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

/* Payout Checklist */
.payout-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 750;
  white-space: nowrap;
}

.payout-tag-paid {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.payout-tag-pending {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.payout-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

/* Phase 2: Executive Analytics Styles */
.analytics-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.trend-bars-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  min-height: 220px;
  padding: 20px 10px 10px;
  border-bottom: 2px solid var(--color-border);
  overflow-x: auto;
}

.trend-month-group {
  flex: 1;
  min-width: 65px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 160px;
  width: 100%;
  justify-content: center;
}

.trend-bar {
  width: 18px;
  border-radius: 6px 6px 0 0;
  transition: height 0.3s ease, transform 0.15s ease;
  position: relative;
}

.trend-bar:hover {
  transform: scaleY(1.05);
}

.trend-bar-work {
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
}

.trend-bar-net {
  background: linear-gradient(180deg, #10b981 0%, #047857 100%);
}

.trend-month-label {
  font-size: 0.74rem;
  font-weight: 750;
  color: var(--color-muted);
  text-align: center;
}

.trend-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
  margin-top: 12px;
  font-size: 0.8rem;
}

.delta-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 750;
}

.delta-pill-up {
  background: #dcfce7;
  color: #15803d;
}

.delta-pill-down {
  background: #fee2e2;
  color: #b91c1c;
}

.delta-pill-neutral {
  background: #f1f5f9;
  color: #64748b;
}

.score-bar-wrap {
  background: #f1f5f9;
  border-radius: 999px;
  height: 8px;
  width: 100%;
  overflow: hidden;
  margin-top: 4px;
}

.score-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.score-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 750;
  white-space: nowrap;
}

.score-badge.excellent { background: #dcfce7; color: #15803d; }
.score-badge.good { background: #e0f2fe; color: #0369a1; }
.score-badge.attention { background: #fef3c7; color: #b45309; }

/* Phase 3: Musician Self-Check Portal Styles */
.portal-hero {
  background: linear-gradient(135deg, #0e4db9 0%, #072a6b 100%);
  color: #ffffff;
  border-radius: 20px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  box-shadow: 0 10px 25px rgba(14, 77, 185, 0.2);
}

.portal-profile-ident {
  display: flex;
  align-items: center;
  gap: 16px;
}

.portal-avatar {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.portal-profile-text h2 {
  font-size: 1.35rem;
  font-weight: 850;
  margin: 0;
  color: #ffffff;
}

.portal-profile-text p {
  margin: 3px 0 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
}

.portal-bank-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  color: #ffffff;
}

.portal-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.portal-itemized-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.portal-itemized-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 10px;
  font-size: 0.86rem;
}


@media (max-width: 1120px) {
  .topbar { grid-template-columns: auto 1fr auto; }
  .nav-pill { display: none; }
  .tablet-menu { display: block; }
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .bottom-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: repeat(2, 1fr); }
  .field-wide { grid-column: 1 / -1; }
  .person-card { grid-template-columns: 1fr 2fr; }
  .shift-setting { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .app-frame { width: 100%; margin: 0; min-height: 100vh; border-radius: 0; border: 0; box-shadow: none; }
  .topbar { min-height: 60px; padding: 10px 14px; grid-template-columns: 1fr auto; gap: 8px; }
  .topbar .nav-pill, .topbar .tablet-menu { display: none; }
  .top-actions { gap: 5px; }
  .top-actions .role-badge, .top-actions .role-switch, .top-actions .mode-badge { display: none; }
  .content { padding: 18px 14px 88px; }
  .page-head { flex-direction: column; }
  .actions { justify-content: flex-start; width: 100%; }
  .month-picker { width: 100%; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi.primary { grid-column: span 2; }
  .bottom-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .field-wide { grid-column: 1; }
  .person-card { grid-template-columns: 1fr; }
  .status-group { grid-template-columns: 1fr 1fr; }
  .status-btn { min-height: 48px; }
  .login-card { grid-template-columns: 1fr; }
  .login-visual { min-height: 210px; padding: 26px; }
  .login-form { padding: 26px; }
  .detail-columns { grid-template-columns: 1fr; }
  .shift-setting { grid-template-columns: 1fr; }
  .filter-inline { width: 100%; }
  .filter-inline .input { width: 100%; }
  .mobile-nav {
    position: fixed;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 60;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(15, 79, 191, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
    padding: 5px;
    gap: 4px;
    overflow: hidden;
  }
  .mobile-nav a {
    min-height: 54px;
    display: grid;
    place-items: center;
    font-size: 0.72rem;
    color: var(--color-muted);
    text-align: center;
    padding: 6px 4px;
    border-radius: 14px;
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    user-select: none;
  }
  .mobile-nav a:active {
    transform: scale(0.92);
  }
  .mobile-nav a.active {
    color: var(--color-primary-strong);
    font-weight: 850;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    box-shadow: 0 2px 8px rgba(16, 89, 219, 0.16);
    transform: translateY(-1px);
  }
  #toast-region { left: 14px; right: 14px; bottom: 84px; }
  .toast { max-width: none; }
}

/* ==========================================================================
   21. STREAMEX NEO-CARD DASHBOARD (#dashboard)
   ========================================================================== */

.dash-stream-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

/* 1. Top Executive Hero Card */
.dash-stream-hero {
  background: #ffffff;
  border-radius: 26px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 12px 36px rgba(27, 52, 91, 0.05);
  padding: 32px 36px;
  display: grid;
  grid-template-columns: minmax(280px, 1.3fr) 1px minmax(200px, 1fr) minmax(260px, 1.1fr);
  align-items: center;
  gap: 32px;
  position: relative;
}

.dash-sub-label {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.dash-hero-amount {
  font-size: 2.25rem;
  font-weight: 850;
  color: #0f172a;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.dash-hero-sub {
  font-size: 0.82rem;
  color: #94a3b8;
  margin-top: 6px;
  margin-bottom: 20px;
}

.dash-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.dash-badge-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 14px;
  transition: transform 0.18s ease;
}
.dash-badge-pill:hover {
  transform: translateY(-2px);
}

.pill-income {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}
.pill-income .badge-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #22c55e;
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
}
.pill-income strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: #15803d;
}
.pill-income small {
  font-size: 0.72rem;
  color: #16a34a;
  font-weight: 600;
}

.pill-expense {
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
}
.pill-expense .badge-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #8b5cf6;
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
}
.pill-expense strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: #6d28d9;
}
.pill-expense small {
  font-size: 0.72rem;
  color: #7c3aed;
  font-weight: 600;
}

.dash-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.dash-btn-gradient {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 750;
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.dash-btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  color: #ffffff;
}
.dash-btn-gradient:active {
  transform: scale(0.96);
}

.btn-cyan {
  background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
}
.btn-indigo {
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
}

.dash-hero-divider {
  width: 1px;
  height: 80%;
  background: #e2e8f0;
}

/* Donut Chart Center */
.dash-hero-donut {
  display: flex;
  justify-content: center;
  align-items: center;
}

.dash-donut-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  display: grid;
  place-items: center;
}

.dash-donut-svg {
  transform: rotate(-90deg);
  width: 180px;
  height: 180px;
}

.dash-donut-bg {
  fill: none;
  stroke: #f1f5f9;
  stroke-width: 15;
}

.dash-donut-seg {
  fill: none;
  stroke-width: 15;
  stroke-linecap: round;
  transition: stroke-dasharray 0.8s ease, stroke-dashoffset 0.8s ease;
}

.seg-amber { stroke: #f59e0b; }
.seg-blue  { stroke: #3b82f6; }
.seg-cyan  { stroke: #06b6d4; }
.seg-green { stroke: #10b981; }

.dash-donut-center {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.dash-donut-val {
  font-size: 1.85rem;
  font-weight: 850;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1;
}

.dash-donut-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  margin-top: 4px;
}

/* Legend Breakdown */
.dash-hero-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dash-legend-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
  border-radius: 12px;
  transition: background 0.15s ease;
}
.dash-legend-item:hover {
  background: #f8fafc;
}

.dash-legend-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.bg-amber-soft { background: #fef3c7; color: #d97706; }
.bg-blue-soft  { background: #dbeafe; color: #2563eb; }
.bg-cyan-soft  { background: #cffafe; color: #0891b2; }
.bg-green-soft { background: #d1fae5; color: #059669; }

.legend-char {
  font-weight: 850;
  font-size: 0.8rem;
}

.dash-legend-text strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 750;
  color: #1e293b;
  line-height: 1.2;
}
.dash-legend-text small {
  font-size: 0.7rem;
  color: #94a3b8;
}

.dash-legend-stat {
  text-align: right;
}
.dash-legend-stat strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 800;
  color: #0f172a;
}
.stat-delta {
  font-size: 0.68rem;
  font-weight: 700;
}
.text-green { color: #16a34a; }
.text-blue  { color: #2563eb; }
.text-red   { color: #dc2626; }
.text-amber { color: #d97706; }

/* 2. Middle Grid: Wallets + Progress */
.dash-middle-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: stretch;
}

.dash-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  padding: 0 4px;
}
.dash-section-head h3 {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #64748b;
  text-transform: uppercase;
  margin: 0;
}
.dash-more-link {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s ease;
}
.dash-more-link:hover {
  color: #2563eb;
}

.dash-wallets-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.dash-wallet-card {
  position: relative;
  border-radius: 22px;
  padding: 22px 20px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 190px;
  overflow: hidden;
  transition: all 0.26s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.dash-wallet-card:hover {
  transform: translateY(-5px);
}

.wallet-waves {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  pointer-events: none;
}

.w-amber {
  background: linear-gradient(145deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28);
}
.w-blue {
  background: linear-gradient(145deg, #3b82f6 0%, #1d4ed8 100%);
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.28);
}
.w-cyan {
  background: linear-gradient(145deg, #06b6d4 0%, #0284c7 100%);
  box-shadow: 0 12px 28px rgba(6, 182, 212, 0.28);
}
.w-green {
  background: linear-gradient(145deg, #10b981 0%, #059669 100%);
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.28);
}

.wallet-top {
  position: relative;
  z-index: 2;
}

.wallet-icon-emblem {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  color: #ffffff;
  margin-bottom: 12px;
}

.wallet-title {
  font-size: 0.85rem;
  font-weight: 750;
  color: rgba(255, 255, 255, 0.95);
  display: block;
}

.wallet-bottom {
  position: relative;
  z-index: 2;
  margin-top: 20px;
}

.wallet-val {
  display: block;
  font-size: 1.3rem;
  font-weight: 850;
  color: #ffffff;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.wallet-sub {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  display: block;
  margin-top: 4px;
}

/* Progress Cards */
.dash-progress-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dash-progress-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 8px 24px rgba(27, 52, 91, 0.04);
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.18s ease;
}
.dash-progress-card:hover {
  transform: translateY(-2px);
}

.pcard-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pcard-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.icon-cyan-soft   { background: #e0f2fe; color: #0284c7; }
.icon-purple-soft { background: #ede9fe; color: #7c3aed; }

.pcard-meta {
  display: flex;
  flex-direction: column;
}

.pcard-val {
  font-size: 1.45rem;
  font-weight: 850;
  color: #0f172a;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.pcard-lbl {
  font-size: 0.72rem;
  font-weight: 650;
  color: #64748b;
  margin-top: 3px;
}

.pcard-bar-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: #f1f5f9;
  overflow: hidden;
}

.pcard-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.8s ease;
}
.fill-cyan   { background: linear-gradient(90deg, #06b6d4, #0284c7); }
.fill-purple { background: linear-gradient(90deg, #8b5cf6, #6366f1); }

/* 3. Bottom Grid: Transactions + Security */
.dash-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
}

.dash-tx-card {
  background: #ffffff;
  border-radius: 22px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 8px 24px rgba(27, 52, 91, 0.04);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dash-tx-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 8px 10px;
  border-radius: 12px;
  transition: background 0.15s ease;
}
.dash-tx-row:hover {
  background: #f8fafc;
}

.tx-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 850;
}
.icon-cyan   { background: #e0f2fe; color: #0284c7; }
.icon-purple { background: #ede9fe; color: #7c3aed; }

.tx-arrow {
  font-size: 0.95rem;
}

.tx-info {
  display: flex;
  flex-direction: column;
}

.tx-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #1e293b;
}

.tx-role {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 2px;
}

.tx-amount {
  font-size: 0.92rem;
  font-weight: 850;
  letter-spacing: -0.01em;
}
.tx-cyan   { color: #0284c7; }
.tx-purple { color: #7c3aed; }

/* Security Cards */
.dash-sec-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dash-sec-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 8px 24px rgba(27, 52, 91, 0.04);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.18s ease;
}
.dash-sec-card:hover {
  transform: translateY(-2px);
}

.sec-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.icon-amber-bg { background: #fef3c7; color: #d97706; }
.icon-green-bg { background: #d1fae5; color: #059669; }

.sec-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.sec-meta strong {
  font-size: 0.84rem;
  font-weight: 750;
  color: #1e293b;
}
.sec-meta small {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 2px;
}

.sec-toggle {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #e2e8f0;
  position: relative;
  transition: background 0.22s ease;
  cursor: pointer;
}
.toggle-circle {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.22s ease;
}
.toggle-on {
  background: #22c55e;
}
.toggle-on .toggle-circle {
  transform: translateX(20px);
}

/* Responsive Breakpoints */
@media (max-width: 1180px) {
  .dash-stream-hero {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .dash-hero-divider { display: none; }
  .dash-middle-grid, .dash-bottom-grid {
    grid-template-columns: 1fr;
  }
  .dash-wallets-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .dash-stream-hero {
    grid-template-columns: 1fr;
    padding: 22px 18px;
  }
  .dash-wallets-grid {
    grid-template-columns: 1fr;
  }
  .dash-hero-amount {
    font-size: 1.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

@media print {
  @page { size: A4 landscape; margin: 5mm 6mm; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  html, body { background: #fff !important; }
  body { margin: 0; }
  .print-toolbar, #toast-region { display: none !important; }
  .print-page { padding: 0; min-height: 0; width: 100%; }
  .print-attendance, .print-payroll { max-height: 198mm !important; overflow: hidden !important; page-break-inside: avoid !important; break-inside: avoid !important; page-break-after: avoid !important; break-after: avoid !important; }
  .app-frame, .topbar, .mobile-nav { display: none !important; }
  .attendance-dual-grid, .print-summary-layout, .special-grid, .hour-summary-block, .signature-row, .payroll-signatures { break-inside: avoid; }
  .payroll-official { break-inside: avoid; }
  .modal-overlay { position: static !important; background: none !important; padding: 0 !important; backdrop-filter: none !important; display: block !important; }
  .payslip-card { box-shadow: none !important; border: 1px solid #94a3b8 !important; width: 100% !important; max-width: 170mm !important; margin: 8mm auto !important; break-inside: avoid !important; }
  .payslip-foot { display: none !important; }
}
