/* 
  UDHRASH EXPORT - Executive Attendance & Payroll Portal Design System
  Light & Dark Theme with High-Contrast Typography, Glassmorphism & Enterprise Dashboard
*/

:root {
  /* Cool Brain Theme - Clean Neural Lab (Light) */
  --bg-app: #F1F5F9;
  --bg-surface: #FFFFFF;
  --bg-surface-subtle: #E8F0F8;
  --bg-surface-elevated: #FFFFFF;
  --border-subtle: #CFE0F0;
  --border-medium: #B8D1E6;
  --border-focus: #0284C7;

  --text-primary: #0A1628;
  --text-secondary: #334E68;
  --text-muted: #627D98;
  --text-inverse: #FFFFFF;

  --primary: #0284C7;
  --primary-hover: #0369A1;
  --primary-light: rgba(2, 132, 199, 0.12);
  --primary-text: #0369A1;
  --primary-gradient: linear-gradient(135deg, #0284C7 0%, #4F46E5 100%);
  --brain-glow: 0 0 16px rgba(2, 132, 199, 0.25);

  --emerald: #059669;
  --emerald-hover: #047857;
  --emerald-light: #D1FAE5;
  --emerald-text: #047857;

  --amber: #D97706;
  --amber-hover: #B45309;
  --amber-light: #FEF3C7;
  --amber-text: #92400E;

  --rose: #E11D48;
  --rose-hover: #BE123C;
  --rose-light: #FFE4E6;
  --rose-text: #9F1239;

  --indigo: #6366F1;
  --indigo-light: #EEF2FF;
  --indigo-text: #4338CA;

  --teal: #0891B2;
  --teal-light: #CFFAFE;
  --teal-text: #155E75;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Roboto Mono', monospace;

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 4px rgba(10, 22, 40, 0.05);
  --shadow-md: 0 6px 16px rgba(10, 22, 40, 0.08);
  --shadow-lg: 0 12px 28px rgba(10, 22, 40, 0.12);
}

[data-theme="dark"] {
  /* Cool Brain Cyber Neural Theme (Dark Mode) */
  --bg-app: #060913;               /* Deep Void Cyber Black */
  --bg-surface: #0C1322;           /* Synaptic Glass Slate */
  --bg-surface-subtle: #121D33;    /* Elevated Neural Core */
  --bg-surface-elevated: #182744;  /* Active Synaptic Layer */
  
  --border-subtle: rgba(56, 189, 248, 0.14);   /* Electric Cyan Trace */
  --border-medium: rgba(99, 102, 241, 0.28);   /* Neural Indigo Border */
  --border-focus: #38BDF8;                     /* Luminous Brain Cyan */

  --text-primary: #F8FAFC;         /* Crisp Luminous White */
  --text-secondary: #94A3B8;       /* Cool Neural Silver */
  --text-muted: #64748B;           /* Dim Slate */
  --text-inverse: #060913;

  /* Cool Brain Electric Cyan & Synapse Violet */
  --primary: #0284C7;
  --primary-hover: #38BDF8;
  --primary-light: rgba(56, 189, 248, 0.15);
  --primary-text: #38BDF8;
  --primary-gradient: linear-gradient(135deg, #0284C7 0%, #6366F1 50%, #8B5CF6 100%);
  --brain-glow: 0 0 20px rgba(56, 189, 248, 0.35);

  --emerald: #10B981;
  --emerald-hover: #34D399;
  --emerald-light: rgba(16, 185, 129, 0.16);
  --emerald-text: #34D399;

  --amber: #F59E0B;
  --amber-hover: #FBBF24;
  --amber-light: rgba(245, 158, 11, 0.16);
  --amber-text: #FBBF24;

  --rose: #F43F5E;
  --rose-hover: #FB7185;
  --rose-light: rgba(244, 63, 94, 0.16);
  --rose-text: #FB7185;

  --indigo: #818CF8;
  --indigo-light: rgba(129, 140, 248, 0.16);
  --indigo-text: #A5B4FC;

  --teal: #06B6D4;
  --teal-light: rgba(6, 182, 212, 0.16);
  --teal-text: #22D3EE;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 1px rgba(56, 189, 248, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.65), 0 0 2px rgba(56, 189, 248, 0.25);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 4px rgba(56, 189, 248, 0.3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* ==========================================================================
   Top Bar Brand (replaces sidebar brand)
   ========================================================================== */
.top-bar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.top-bar-brand-logo {
  height: 38px;
  width: auto;
  max-width: 44px;
  object-fit: contain;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.top-bar-brand-logo:hover {
  transform: scale(1.05);
}

[data-theme="dark"] .top-bar-brand-logo {
  filter: brightness(0) invert(1);
}

.top-bar-brand-icon {
  font-size: 20px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(2, 132, 199, 0.35);
}

.top-bar-brand-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--text-primary);
  line-height: 1.2;
  white-space: nowrap;
}

.top-bar-brand-sub {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Top Bar Clock */
.top-bar-clock {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  padding: 4px 11px;
  border-radius: 20px;
  flex-shrink: 0;
}

.top-bar-clock-text {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* badge inside qnd-desc */
.qnd-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary-text);
  font-size: 10px;
  font-weight: 700;
  padding: 0 6px;
  border-radius: 10px;
  margin-left: 4px;
  vertical-align: middle;
}



/* ==========================================================================
   SLIM TOP BAR
   ========================================================================== */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  gap: 12px;
  flex-wrap: wrap;
}

[data-theme="dark"] .top-bar {
  background: rgba(12, 19, 34, 0.95);
  backdrop-filter: blur(12px);
}

.top-bar-left {
  display: flex;
  align-items: center;
}

.page-title-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
}

.page-title-icon {
  font-size: 18px;
}

.page-title-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.2px;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Three-dot Quick Nav */
.quick-nav-wrap {
  position: relative;
}

.quick-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.18s ease;
  font-size: 20px;
  line-height: 1;
  padding: 0;
}

.quick-nav-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-text);
}

.quick-nav-btn.open {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 12px rgba(2, 132, 199, 0.4);
}

.dots-icon {
  display: block;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

/* Dropdown */
.quick-nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 260px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  overflow: hidden;
  animation: dropdownSlideIn 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-nav-dropdown.open {
  display: block;
}

[data-theme="dark"] .quick-nav-dropdown {
  background: #0f1929;
  border-color: rgba(56, 189, 248, 0.2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 1px rgba(56, 189, 248, 0.3);
}

@keyframes dropdownSlideIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)  scale(1); }
}

.qnd-header {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.qnd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
  border-bottom: 1px solid var(--border-subtle);
}

.qnd-item:last-child {
  border-bottom: none;
}

.qnd-item:hover {
  background: var(--primary-light);
}

[data-theme="dark"] .qnd-item:hover {
  background: rgba(56, 189, 248, 0.08);
}

.qnd-item.active {
  background: var(--primary-light);
  border-left: 3px solid var(--primary);
}

[data-theme="dark"] .qnd-item.active {
  background: rgba(2, 132, 199, 0.15);
  border-left-color: #38BDF8;
}

.qnd-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.qnd-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.qnd-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Divider between dot-btn and page title */
.top-bar-divider {
  width: 1px;
  height: 22px;
  background: var(--border-subtle);
  margin: 0 10px;
  flex-shrink: 0;
}

/* ==========================================================================
   Export Dropdown
   ========================================================================== */
.export-wrap {
  position: relative;
  flex-shrink: 0;
}

.export-main-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.export-chevron {
  font-size: 10px;
  transition: transform 0.2s ease;
  display: inline-block;
}

.export-main-btn.open .export-chevron {
  transform: rotate(180deg);
}

.export-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  overflow: hidden;
  animation: dropdownSlideIn 0.16s cubic-bezier(0.4, 0, 0.2, 1);
}

.export-dropdown.open {
  display: block;
}

[data-theme="dark"] .export-dropdown {
  background: #0f1929;
  border-color: rgba(56, 189, 248, 0.2);
  box-shadow: 0 16px 40px rgba(0,0,0,0.7), 0 0 1px rgba(56,189,248,0.25);
}

.export-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}

.export-item:last-child {
  border-bottom: none;
}

.export-item:hover {
  background: var(--emerald-light);
}

[data-theme="dark"] .export-item:hover {
  background: rgba(16, 185, 129, 0.1);
}

.export-item-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.export-item-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.export-item-desc {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Theme Toggle Button */
.btn-theme-toggle {
  background: var(--bg-surface-subtle);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-theme-toggle:hover {
  background: var(--primary-light);
  transform: rotate(20deg);
}

/* Report Selector Pill */
.report-selector-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  padding: 5px 12px;
  border-radius: 30px;
}

.report-selector-pill label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.report-selector-pill select {
  background: transparent;
  color: var(--text-primary);
  border: none;
  font-size: 12px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  max-width: 180px;
}

.report-selector-pill select option {
  background: var(--bg-surface);
  color: var(--text-primary);
}

/* header-left, header-right, header-center: kept for old ref, now hidden */
.app-header { display: none; }
.header-left, .header-center, .header-right { display: none; }
.nav-tabs { display: none; }
.nav-tab-btn { display: none; }
.tab-badge { display: none; }

/* Standard Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  line-height: 1.4;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-success {
  background: var(--emerald);
  color: #FFFFFF;
}
.btn-success:hover {
  background: var(--emerald-hover);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-outline {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}
.btn-outline:hover {
  background: var(--bg-surface-subtle);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-xs {
  padding: 3px 9px;
  font-size: 11px;
}

.btn-sm {
  padding: 5px 11px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* ==========================================================================
   Main Container
   ========================================================================== */
.main-container {
  padding: 20px 24px 40px;
  flex: 1;
}

/* ==========================================================================
   Live Dot (used in sidebar footer)
   ========================================================================== */
.live-dot {
  width: 7px;
  height: 7px;
  background-color: var(--emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--emerald);
  animation: pulseDot 2s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* ==========================================================================
   Navigation Tab Bar (legacy – hidden now, sidebar handles this)
   ========================================================================== */
.portal-nav-bar { display: none; }
.precision-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--emerald-text);
  background: var(--emerald-light);
  border: 1px solid var(--emerald);
  padding: 4px 10px;
  border-radius: 20px;
}

/* ==========================================================================
   Tab Content
   ========================================================================== */
.tab-content {
  display: none;
  animation: fadeInContent 0.2s ease;
}
.tab-content.active {
  display: block;
}

@keyframes fadeInContent {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.kpi-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

@media (max-width: 1300px) {
  .kpi-dashboard-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .kpi-dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .kpi-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 13px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.kpi-card-blue::before { background: var(--primary); }
.kpi-card-indigo::before { background: var(--indigo); }
.kpi-card-emerald::before { background: var(--emerald); }
.kpi-card-amber::before { background: var(--amber); }
.kpi-card-rose::before { background: var(--rose); }
.kpi-card-teal::before { background: var(--teal); }

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-medium);
}

.kpi-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.kpi-card-blue .kpi-icon-wrap { background: var(--primary-light); color: var(--primary); }
.kpi-card-indigo .kpi-icon-wrap { background: var(--indigo-light); color: var(--indigo); }
.kpi-card-emerald .kpi-icon-wrap { background: var(--emerald-light); color: var(--emerald); }
.kpi-card-amber .kpi-icon-wrap { background: var(--amber-light); color: var(--amber); }
.kpi-card-rose .kpi-icon-wrap { background: var(--rose-light); color: var(--rose); }
.kpi-card-teal .kpi-icon-wrap { background: var(--teal-light); color: var(--teal); }

.kpi-content {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.kpi-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.kpi-value {
  font-size: 17px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary);
  margin: 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-subtext {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ==========================================================================
   Navigation Tab Bar
   ========================================================================== */
.portal-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.nav-tabs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  padding: 3px;
  border-radius: var(--radius-md);
  flex-wrap: nowrap;
  white-space: nowrap;
}

.nav-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.nav-tab-btn:hover {
  background: rgba(56, 189, 248, 0.08);
  color: var(--text-primary);
}

.nav-tab-btn.active {
  background: var(--primary-gradient);
  color: #FFFFFF;
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 14px rgba(2, 132, 199, 0.45);
}

.tab-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 700;
}

.nav-tab-btn:not(.active) .tab-badge {
  background: rgba(56, 189, 248, 0.12);
  color: var(--primary-text);
}

.precision-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--emerald-text);
  background: var(--emerald-light);
  border: 1px solid var(--emerald);
  padding: 4px 10px;
  border-radius: 20px;
}

/* ==========================================================================
   Tab Content
   ========================================================================== */
.tab-content {
  display: none;
  animation: fadeInContent 0.2s ease;
}
.tab-content.active {
  display: block;
}

@keyframes fadeInContent {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   TAB 1: Executive Dashboard (Analytics & Insights)
   ========================================================================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}

@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.dash-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dash-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.dash-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.dash-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.dash-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
}

/* Stacked Progress Bar */
.progress-stacked {
  display: flex;
  height: 18px;
  border-radius: 9px;
  overflow: hidden;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
}

.prog-segment {
  height: 100%;
  transition: width 0.3s ease;
}

.seg-present { background: var(--emerald); }
.seg-sunday { background: var(--primary); }
.seg-holiday { background: var(--amber); }
.seg-absent { background: var(--rose); }

.composition-legend-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.legend-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
}

.dot-present { background: var(--emerald); }
.dot-sunday { background: var(--primary); }
.dot-holiday { background: var(--amber); }
.dot-absent { background: var(--rose); }

.legend-lbl {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.legend-val {
  font-size: 14px;
  font-family: var(--font-mono);
  display: block;
}

.legend-pct {
  font-size: 10.5px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* Top Late List */
.top-late-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.top-late-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}

.top-late-item:hover {
  background: var(--border-subtle);
}

.top-late-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.late-rank {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--amber-light);
  color: var(--amber-text);
  font-weight: 700;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.late-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 12.5px;
}

.late-code {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.top-late-stats {
  text-align: right;
}

.late-mins-badge {
  background: var(--rose-light);
  color: var(--rose-text);
  border: 1px solid var(--rose);
  padding: 2px 7px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.late-deduction-val {
  font-size: 11.5px;
  color: var(--rose-text);
  font-family: var(--font-mono);
  font-weight: 700;
  margin-top: 2px;
}

/* Salary Tier & Quick Actions */
.salary-tier-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tier-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.tier-label {
  font-weight: 600;
  color: var(--text-secondary);
}

.tier-count {
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.dash-quick-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.quick-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* ==========================================================================
   TAB 2: Monthly Master Sheet Toolbar & Filters
   ========================================================================== */
.control-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.primary-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toolbar-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.toolbar-row-bottom {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  width: 300px;
  transition: all 0.2s ease;
}

.search-box:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.search-icon {
  margin-right: 8px;
  font-size: 13px;
  color: var(--primary-text);
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  width: 100%;
  font-size: 12.5px;
  outline: none;
}

.calendar-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}

.calendar-pill:hover {
  border-color: var(--primary);
}

.calendar-pill label {
  font-weight: 700;
  white-space: nowrap;
}

.calendar-pill .input-pill {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  outline: none;
  width: 150px;
  transition: all 0.2s ease;
}

.calendar-pill .input-pill:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

.calendar-pill.sun-pill {
  border-color: rgba(56, 189, 248, 0.3);
}
.calendar-pill.sun-pill label {
  color: var(--primary-text);
}
.calendar-pill.sun-pill .input-pill {
  color: var(--primary-text);
}

.calendar-pill.hol-pill {
  border-color: rgba(245, 158, 11, 0.3);
}
.calendar-pill.hol-pill label {
  color: var(--amber-text);
}
.calendar-pill.hol-pill .input-pill {
  color: var(--amber-text);
}

.calendar-auto-badge {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--emerald-text);
  background: var(--emerald-light);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 4px 10px;
  border-radius: 20px;
  margin-left: auto;
}

/* Filter Chips */
.filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip-btn {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip-btn:hover {
  background: rgba(56, 189, 248, 0.08);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.chip-btn.active {
  background: var(--primary-light);
  color: var(--primary-text);
  border-color: var(--primary);
  font-weight: 700;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

/* ==========================================================================
   Data Table Styling
   ========================================================================== */
.table-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: var(--bg-surface-subtle);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 12px 14px;
  border-bottom: 2px solid var(--border-subtle);
  white-space: nowrap;
}

.th-sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.th-sortable:hover {
  color: var(--primary);
  background: var(--border-subtle);
}

.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12.5px;
  color: var(--text-primary);
  white-space: nowrap;
}

.data-table tbody tr {
  transition: background 0.15s ease;
}

.data-table tbody tr:hover {
  background: var(--bg-surface-subtle);
}

.data-table tfoot td {
  background: var(--bg-surface-subtle);
  font-weight: 800;
  color: var(--text-primary);
  padding: 13px 14px;
  border-top: 2px solid var(--border-medium);
}

.th-highlight {
  background: var(--primary-light) !important;
  color: var(--primary-text) !important;
}

.td-highlight {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--emerald-text);
  background: var(--emerald-light);
}

.td-mono {
  font-family: var(--font-mono);
}

.text-right { text-align: right; }
.text-center { text-align: center; }

.text-emerald { color: var(--emerald-text) !important; }
.text-amber { color: var(--amber-text) !important; font-weight: 600; }
.text-rose { color: var(--rose-text) !important; font-weight: 600; }
.text-blue { color: var(--primary-text) !important; }
.text-teal { color: var(--teal-text) !important; }

/* Table Action Buttons */
.row-actions-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-row-action {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-row-action:hover {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

/* ==========================================================================
   TAB 3: Employee Master & Salary Editor
   ========================================================================== */
.editor-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
  gap: 12px;
}

.editor-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.editor-btns {
  display: flex;
  gap: 8px;
}

.table-input {
  width: 100%;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12.5px;
  color: var(--text-primary);
  font-family: inherit;
  outline: none;
}
.table-input:focus {
  border-color: var(--primary);
  background: var(--bg-surface);
}

.table-input.salary-input {
  font-family: var(--font-mono);
  font-weight: 700;
}

/* ==========================================================================
   TAB 4: Shift Clamping & Rules
   ========================================================================== */
.rules-tab-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.rules-panel-header {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.rules-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.rules-panel-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .rules-grid {
    grid-template-columns: 1fr;
  }
}

.setting-card {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.setting-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}

.setting-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.setting-item label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.setting-item input[type="time"],
.setting-item select {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-family: var(--font-mono);
  outline: none;
}

.setting-item input[type="time"]:focus,
.setting-item select:focus {
  border-color: var(--primary);
}

.setting-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.badge-tag {
  background: var(--primary-light);
  color: var(--primary-text);
  border: 1px solid var(--primary);
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.badge-amber {
  background: var(--amber-light);
  color: var(--amber-text);
  border-color: var(--amber);
}

.badge-emerald {
  background: var(--emerald-light);
  color: var(--emerald-text);
  border-color: var(--emerald);
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(11, 15, 25, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 1220px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.modal-small {
  max-width: 560px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--bg-surface-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title-group h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-title-group p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}
.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-kpi-bar {
  display: flex;
  gap: 16px;
  padding: 12px 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.m-kpi {
  font-size: 12.5px;
}
.m-kpi .lbl {
  color: var(--text-muted);
}
.m-kpi strong {
  font-family: var(--font-mono);
}

.modal-table-container {
  overflow-y: auto;
  padding: 16px 24px;
  flex: 1;
}

/* Upload Dropzone */
.upload-area {
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-md);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg-surface-subtle);
}
.upload-area:hover, .upload-area.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.upload-icon {
  font-size: 40px;
  margin-bottom: 8px;
}

.upload-status {
  padding: 0 24px 16px;
  font-size: 12.5px;
}

.step2-header-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--emerald-light);
  border: 1px solid var(--emerald);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.step2-icon {
  font-size: 24px;
}

.step2-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.step2-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.step2-input {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  outline: none;
}

.step2-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  cursor: pointer;
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 10px 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastSlideIn 0.25s ease;
  min-width: 260px;
  max-width: 380px;
}

.toast-success { border-left-color: var(--emerald); }
.toast-error { border-left-color: var(--rose); }
.toast-info { border-left-color: var(--primary); }

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ==========================================================================
   OFFICIAL SALARY SLIP DOCUMENT (SCREEN & PRINT SYSTEM)
   ========================================================================== */
.modal-slip-card {
  max-width: 1100px;
  width: 96%;
  max-height: 94vh;
}

.salary-slip-document {
  padding: 24px 28px;
  overflow-y: auto;
  flex: 1;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-sans);
}

/* Official Slip Header */
.slip-header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--border-medium);
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.slip-brand-col {
  display: flex;
  align-items: center;
  gap: 14px;
}

.slip-company-logo {
  height: 52px;
  width: auto;
  max-width: 60px;
  object-fit: contain;
  flex-shrink: 0;
}

[data-theme="dark"] .slip-company-logo {
  filter: brightness(0) invert(1);
}

.ps-company-logo {
  height: 46px;
  width: auto;
  max-width: 52px;
  object-fit: contain;
  flex-shrink: 0;
}

[data-theme="dark"] .ps-company-logo {
  filter: brightness(0) invert(1);
}

.slip-company-name {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: var(--text-primary);
}

.slip-company-addr {
  font-size: 11.5px;
  color: var(--text-muted);
}

.slip-company-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.slip-title-col {
  text-align: right;
}

.slip-title-badge {
  display: inline-block;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.slip-month-lbl {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
}

.slip-generated-lbl {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Employee Info & Attendance Grid */
.slip-info-grid {
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  background: var(--bg-surface-subtle);
  overflow: hidden;
}

.slip-info-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border-subtle);
}

.slip-info-row:last-child {
  border-bottom: none;
}

.slip-info-cell {
  padding: 8px 12px;
  font-size: 12px;
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.slip-info-cell:last-child {
  border-right: none;
}

.slip-info-cell .c-lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.slip-info-cell strong {
  font-size: 12.5px;
  color: var(--text-primary);
}

.slip-att-row {
  background: rgba(59, 130, 246, 0.04);
}

.slip-att-row2 {
  background: rgba(16, 185, 129, 0.04);
}

/* Financial Statement Table */
.slip-financial-table-wrap {
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 16px;
}

.slip-fin-table {
  width: 100%;
  border-collapse: collapse;
}

.slip-fin-table th,
.slip-fin-table td {
  padding: 8px 14px;
  font-size: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.slip-fin-table th {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.th-earn {
  background: var(--primary-light);
  color: var(--primary-text);
  border-right: 2px solid var(--border-medium);
}

.th-ded {
  background: var(--rose-light);
  color: var(--rose-text);
}

.slip-fin-table tr.sub-head th {
  background: var(--bg-surface-subtle);
  color: var(--text-muted);
  font-size: 10.5px;
}

.slip-fin-table tr.sub-head th:nth-child(2) {
  border-right: 2px solid var(--border-medium);
}

.slip-fin-table td:nth-child(2) {
  border-right: 2px solid var(--border-medium);
}

.slip-fin-table tfoot td {
  background: var(--bg-surface-subtle);
  font-size: 12.5px;
  border-top: 2px solid var(--border-medium);
  border-bottom: none;
}

/* Net Take-Home Salary Box */
.slip-net-takehome-box {
  background: var(--emerald-light);
  border: 2px solid var(--emerald);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 16px;
}

.takehome-amount-side {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.takehome-lbl {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--emerald-text);
  text-transform: uppercase;
}

.takehome-val {
  font-size: 22px;
  font-weight: 900;
  font-family: var(--font-mono);
  color: var(--emerald-text);
}

.takehome-words-side {
  text-align: right;
  max-width: 480px;
}

.takehome-words-lbl {
  font-size: 10.5px;
  color: var(--emerald-text);
  font-weight: 700;
  text-transform: uppercase;
}

.takehome-words-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  font-style: italic;
  margin-top: 2px;
}

/* Signatures Block */
.slip-signatures-container {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  margin-bottom: 20px;
  padding: 0 20px;
}

.slip-sign-box {
  text-align: center;
  width: 200px;
}

.slip-sign-line {
  border-top: 1.5px solid var(--border-medium);
  margin-bottom: 6px;
}

.slip-sign-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.slip-sign-sub {
  font-size: 10.5px;
  color: var(--text-muted);
}

/* Daily Punch Annexure */
.slip-annexure-box {
  margin-top: 24px;
  border-top: 2px dashed var(--border-medium);
  padding-top: 18px;
}

.annexure-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.5px;
}

.annexure-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
}

.slip-annexure-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.slip-annexure-table th,
.slip-annexure-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.slip-annexure-table th {
  background: var(--bg-surface-subtle);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.slip-annexure-table tbody tr:hover {
  background: var(--bg-surface-subtle);
}

.annexure-signatures {
  display: none;
}

/* Calculation Formula Note Box */
.slip-math-note {
  background: var(--bg-surface-subtle);
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  line-height: 1.5;
}

.math-note-icon {
  font-size: 14px;
  flex-shrink: 0;
}

/* Print Summary Letterhead & Signatures (Screen hidden) */
.print-summary-letterhead,
.print-summary-signatures {
  display: none;
}

/* ==========================================================================
   DYNAMIC RESPONSIVE DESIGN SYSTEM (DESKTOP, LAPTOP, TABLET, MOBILE)
   ========================================================================== */

/* Universal Responsive Foundation */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

.table-container,
.modal-table-container,
.annexure-table-scroll,
.slip-financial-table-wrap {
  -webkit-overflow-scrolling: touch;
}

/* Modal header actions & buttons default */
.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-modal-action {
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

.rules-actions-bar {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
}

.btn-rules-apply {
  padding: 10px 24px;
  font-size: 13.5px;
  font-weight: 700;
}

/* -------------------------------------------------------------
   1. LAPTOPS & MEDIUM SCREENS (<= 1200px)
   ------------------------------------------------------------- */
@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }

  .rules-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* -------------------------------------------------------------
   2. TABLETS & SMALL SCREENS (<= 992px)
   ------------------------------------------------------------- */
@media (max-width: 992px) {
  .top-bar {
    padding: 8px 16px;
    gap: 10px;
  }

  /* Hide current page title text in top bar (quick nav already shows it) */
  .page-title-wrap {
    display: none;
  }
  .top-bar-divider:last-of-type {
    display: none;
  }

  .main-container {
    padding: 16px 16px 36px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .rules-grid {
    grid-template-columns: 1fr;
  }

  /* Toolbar Responsive Stack */
  .control-panel {
    padding: 12px 16px;
  }

  .primary-toolbar {
    gap: 12px;
  }

  .toolbar-row-top {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .search-box {
    width: 100%;
    max-width: 100%;
  }

  .filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .toolbar-row-bottom {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .calendar-pill {
    width: 100%;
    justify-content: space-between;
    box-sizing: border-box;
  }

  .calendar-pill .input-pill {
    flex: 1;
    max-width: 240px;
  }

  .calendar-auto-badge {
    margin-left: 0;
    width: 100%;
    justify-content: center;
    display: flex;
    text-align: center;
  }

  /* Sticky First Two Columns for Master Summary Table */
  .table-container {
    position: relative;
    border-radius: var(--radius-md);
  }

  .data-table th:first-child,
  .data-table td:first-child,
  .data-table tfoot td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--bg-surface);
    min-width: 60px;
    max-width: 65px;
  }

  .data-table th:first-child,
  .data-table tfoot td:first-child {
    background: var(--bg-surface-subtle);
    z-index: 4;
  }

  .data-table th:nth-child(2),
  .data-table td:nth-child(2),
  .data-table tfoot td:nth-child(2) {
    position: sticky;
    left: 65px;
    z-index: 2;
    background: var(--bg-surface);
    min-width: 170px;
    box-shadow: 4px 0 8px -2px rgba(0, 0, 0, 0.12);
    border-right: 2px solid var(--border-medium);
  }

  .data-table th:nth-child(2),
  .data-table tfoot td:nth-child(2) {
    background: var(--bg-surface-subtle);
    z-index: 4;
  }

  .data-table tbody tr:hover td:first-child,
  .data-table tbody tr:hover td:nth-child(2) {
    background: var(--bg-surface-subtle);
  }

  [data-theme="dark"] .data-table th:first-child,
  [data-theme="dark"] .data-table th:nth-child(2),
  [data-theme="dark"] .data-table tfoot td:first-child,
  [data-theme="dark"] .data-table tfoot td:nth-child(2) {
    background: #0f1929;
  }

  [data-theme="dark"] .data-table td:first-child,
  [data-theme="dark"] .data-table td:nth-child(2) {
    background: #0c1322;
  }

  [data-theme="dark"] .data-table tbody tr:hover td:first-child,
  [data-theme="dark"] .data-table tbody tr:hover td:nth-child(2) {
    background: #17243b;
  }

  /* Modal Cards Responsive */
  .modal-card {
    width: 96vw;
    max-width: 96vw;
    max-height: 94vh;
  }

  .modal-slip-card {
    width: 96vw;
    max-width: 96vw;
    max-height: 94vh;
  }
}

/* -------------------------------------------------------------
   3. TABLETS PORTRAIT & PHABLETS (<= 768px)
   ------------------------------------------------------------- */
@media (max-width: 768px) {
  .top-bar {
    padding: 8px 12px;
    gap: 8px;
  }

  .top-bar-left {
    gap: 6px;
  }

  .top-bar-brand-logo {
    height: 32px;
    max-width: 36px;
  }

  .top-bar-brand-title {
    font-size: 12.5px;
    letter-spacing: 0.4px;
  }

  /* Clean up subtitle to save width on mobile */
  .top-bar-brand-sub {
    display: none;
  }

  /* Hide live clock on mobile to make room for essential actions */
  .top-bar-clock {
    display: none;
  }

  .top-bar-divider {
    margin: 0 4px;
  }

  .top-bar-right {
    gap: 6px;
  }

  .report-selector-pill {
    padding: 4px 8px;
    gap: 4px;
  }

  .report-selector-pill select {
    max-width: 110px;
    font-size: 11.5px;
  }

  /* Full-bleed responsive dropdowns */
  .quick-nav-dropdown {
    width: calc(100vw - 24px);
    max-width: 290px;
    left: 0;
  }

  .export-dropdown {
    width: calc(100vw - 24px);
    max-width: 260px;
    right: 0;
    left: auto;
  }

  .main-container {
    padding: 12px 10px 30px;
  }

  .kpi-dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .kpi-card {
    padding: 12px 14px;
    gap: 10px;
  }

  /* Donut chart responsive stacking */
  .donut-with-legend {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .donut-legend-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    gap: 8px;
  }

  .quick-btn-row {
    flex-direction: column;
    gap: 8px;
  }

  /* Employee Master Editor */
  .editor-actions-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
  }

  .editor-actions-bar .btn {
    width: 100%;
    justify-content: center;
  }

  /* Rules panel button */
  .rules-actions-bar {
    justify-content: stretch;
  }

  .btn-rules-apply {
    width: 100%;
    justify-content: center;
  }

  /* Salary Slip Modal Header & Controls */
  .modal-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 14px;
    position: relative;
  }

  .modal-title-group {
    padding-right: 36px;
  }

  .modal-close-btn {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 26px;
  }

  .modal-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }

  .btn-modal-action {
    flex: 1 1 calc(50% - 6px);
    font-size: 11.5px;
    padding: 8px 10px;
    justify-content: center;
    text-align: center;
  }

  /* Salary Slip Official Document Responsive */
  .salary-slip-document {
    padding: 16px 12px;
  }

  .slip-header-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .slip-brand-col {
    gap: 10px;
    width: 100%;
  }

  .slip-company-logo {
    height: 42px;
    max-width: 48px;
  }

  .slip-company-name {
    font-size: 17px;
  }

  .slip-company-addr {
    font-size: 10.5px;
    line-height: 1.35;
  }

  .slip-title-col {
    text-align: left;
    width: 100%;
  }

  .slip-title-badge {
    font-size: 11.5px;
    padding: 3px 10px;
  }

  /* 4-column matrix wraps cleanly to 2 columns on tablet/mobile */
  .slip-info-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .slip-info-cell {
    border-right: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    padding: 7px 10px;
  }

  .slip-info-cell:nth-child(2n) {
    border-right: none;
  }

  .slip-info-row:last-child .slip-info-cell:nth-last-child(-n+2) {
    border-bottom: none;
  }

  /* Financial Statement Table */
  .slip-financial-table-wrap {
    overflow-x: auto;
  }

  .slip-fin-table {
    min-width: 540px;
  }

  .slip-fin-table th,
  .slip-fin-table td {
    padding: 6px 10px;
    font-size: 11.5px;
  }

  /* Net Take-Home Salary Banner */
  .slip-net-takehome-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
  }

  .takehome-val {
    font-size: 20px;
  }

  .takehome-words-side {
    text-align: left;
    max-width: 100%;
  }

  .takehome-words-val {
    font-size: 11.5px;
  }

  /* Signatures */
  .slip-signatures-container {
    flex-wrap: wrap;
    gap: 18px;
    justify-content: space-around;
    padding: 0;
  }

  .slip-sign-box {
    width: 45%;
    min-width: 130px;
  }

  .slip-math-note {
    font-size: 10px;
    line-height: 1.4;
    padding: 6px 10px;
  }

  /* Annexure table smooth scrolling */
  .annexure-table-scroll {
    overflow-x: auto;
  }

  .slip-annexure-table {
    min-width: 680px;
  }

  /* Upload Modal */
  .upload-modal-card {
    width: 95vw;
    margin: 8px auto;
  }

  .upload-area {
    padding: 24px 12px;
    margin: 12px 14px;
  }

  .step2-actions {
    flex-direction: column;
    gap: 8px;
  }

  .step2-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* -------------------------------------------------------------
   4. SMARTPHONES & COMPACT MOBILE SCREENS (<= 480px)
   ------------------------------------------------------------- */
@media (max-width: 480px) {
  .top-bar {
    padding: 6px 8px;
    gap: 6px;
  }

  .top-bar-brand-title {
    font-size: 11.5px;
    letter-spacing: 0.2px;
  }

  .top-bar-brand-logo {
    height: 26px;
    max-width: 30px;
  }

  .report-selector-pill select {
    max-width: 85px;
    font-size: 11px;
  }

  .report-selector-pill .btn-xs {
    padding: 3px 5px;
    font-size: 10px;
  }

  .btn-sm {
    padding: 5px 7px;
    font-size: 11px;
  }

  .kpi-dashboard-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .kpi-card {
    padding: 10px 12px;
  }

  .kpi-card-val {
    font-size: 18px;
  }

  .kpi-card-lbl {
    font-size: 10px;
  }

  .kpi-icon {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .donut-legend-list {
    grid-template-columns: 1fr;
  }

  /* Modal action buttons stacked full-width */
  .btn-modal-action {
    flex: 1 1 100%;
  }

  .salary-slip-document {
    padding: 10px 6px;
  }

  /* 4-column matrix wraps to 1 column on phone for clean, spacious readability */
  .slip-info-row {
    grid-template-columns: 1fr;
  }

  .slip-info-cell {
    border-right: none !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    padding: 6px 8px;
  }

  .slip-info-row:last-child .slip-info-cell:last-child {
    border-bottom: none !important;
  }

  .slip-signatures-container {
    flex-direction: column;
    align-items: center;
    gap: 18px;
  }

  .slip-sign-box {
    width: 85%;
  }

  .toast-container {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  .toast-item {
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }
}

/* ==========================================================================
   PRINT MEDIA STYLES - FLAWLESS A4 PRINT FOR SALARY SLIP & MONTHLY SUMMARY
   ========================================================================== */
@media print {
  *, *::before, *::after {
    background: transparent !important;
    color: #000000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  html, body {
    background: #FFFFFF !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 11px !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* -------------------------------------------------------------
     MODE 1: PRINTING EMPLOYEE SALARY SLIP (A4 PORTRAIT)
     ------------------------------------------------------------- */
  body.printing-modal {
    margin: 0 !important;
    padding: 0 !important;
  }

  @page {
    size: A4 portrait;
    margin: 8mm 12mm;
  }

  body.printing-modal .top-bar,
  body.printing-modal .main-container,
  body.printing-modal .portal-nav-bar,
  body.printing-modal .control-panel,
  body.printing-modal .kpi-dashboard-grid,
  body.printing-modal .btn,
  body.printing-modal .col-actions,
  body.printing-modal .toast-container,
  body.printing-modal .modal-close-btn,
  body.printing-modal .modal-header,
  body.printing-modal .print-summary-letterhead,
  body.printing-modal .print-summary-signatures,
  body.printing-modal #uploadModal {
    display: none !important;
  }

  body.printing-modal #dayModal {
    display: block !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    background: #FFFFFF !important;
    padding: 0 !important;
    margin: 0 !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    border: none !important;
  }

  body.printing-modal .modal-card {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #FFFFFF !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body.printing-modal .salary-slip-document {
    overflow: visible !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #FFFFFF !important;
    color: #000000 !important;
  }

  body.printing-modal .slip-official-sheet {
    page-break-inside: avoid !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #FFFFFF !important;
  }

  body.printing-modal .slip-header-wrap {
    border-bottom: 2px solid #000000 !important;
    padding-bottom: 12px !important;
    margin-bottom: 14px !important;
  }

  body.printing-modal .slip-company-logo {
    height: 52px !important;
    width: auto !important;
    filter: none !important;
  }

  body.printing-modal .slip-company-name {
    font-size: 21px !important;
    font-weight: 900 !important;
    color: #000000 !important;
    letter-spacing: 0.5px !important;
  }

  body.printing-modal .slip-company-addr {
    font-size: 11px !important;
    color: #333333 !important;
  }

  body.printing-modal .slip-company-tag {
    font-size: 10px !important;
    font-weight: 700 !important;
    color: #000000 !important;
  }

  body.printing-modal .slip-title-badge {
    background: #000000 !important;
    color: #FFFFFF !important;
    border: 1px solid #000000 !important;
    font-size: 12px !important;
    padding: 4px 12px !important;
  }

  body.printing-modal .slip-month-lbl {
    font-size: 12.5px !important;
    font-weight: 800 !important;
    color: #000000 !important;
  }

  body.printing-modal .slip-generated-lbl {
    font-size: 10px !important;
    color: #444444 !important;
  }

  body.printing-modal .slip-info-grid {
    border: 1.5px solid #000000 !important;
    background: #FFFFFF !important;
    margin-bottom: 14px !important;
  }

  body.printing-modal .slip-info-row {
    border-bottom: 1px solid #444444 !important;
  }

  body.printing-modal .slip-info-cell {
    border-right: 1px solid #444444 !important;
    padding: 7px 10px !important;
  }

  body.printing-modal .slip-info-cell .c-lbl {
    font-size: 9.5px !important;
    color: #444444 !important;
    font-weight: 700 !important;
  }

  body.printing-modal .slip-info-cell strong {
    font-size: 12px !important;
    color: #000000 !important;
  }

  body.printing-modal .slip-financial-table-wrap {
    border: 1.5px solid #000000 !important;
    margin-bottom: 14px !important;
  }

  body.printing-modal .slip-fin-table th,
  body.printing-modal .slip-fin-table td {
    border-bottom: 1px solid #444444 !important;
    padding: 6px 10px !important;
    color: #000000 !important;
  }

  body.printing-modal .th-earn,
  body.printing-modal .th-ded {
    background: #E5E5E5 !important;
    color: #000000 !important;
    font-weight: 900 !important;
    font-size: 11px !important;
  }

  body.printing-modal .slip-fin-table tr.sub-head th {
    background: #F2F2F2 !important;
    color: #333333 !important;
    font-size: 10px !important;
    font-weight: 700 !important;
  }

  body.printing-modal .slip-fin-table tfoot td {
    background: #EEEEEE !important;
    border-top: 2px solid #000000 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
  }

  body.printing-modal .slip-net-takehome-box {
    background: #F7F7F7 !important;
    border: 2px solid #000000 !important;
    padding: 12px 16px !important;
    margin-bottom: 14px !important;
  }

  body.printing-modal .takehome-lbl {
    font-size: 11px !important;
    font-weight: 900 !important;
    color: #000000 !important;
  }

  body.printing-modal .takehome-val {
    font-size: 22px !important;
    font-weight: 900 !important;
    color: #000000 !important;
  }

  body.printing-modal .takehome-words-lbl {
    font-size: 10px !important;
    font-weight: 800 !important;
    color: #333333 !important;
  }

  body.printing-modal .takehome-words-val {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #000000 !important;
  }

  body.printing-modal .slip-math-note {
    background: #F9F9F9 !important;
    border: 1px dashed #666666 !important;
    padding: 6px 10px !important;
    font-size: 9.5px !important;
    color: #333333 !important;
    margin-bottom: 24px !important;
  }

  body.printing-modal .slip-signatures-container {
    display: flex !important;
    justify-content: space-between !important;
    margin-top: 30px !important;
    margin-bottom: 10px !important;
    padding: 0 10px !important;
    page-break-inside: avoid !important;
  }

  body.printing-modal .slip-sign-box {
    text-align: center !important;
    width: 200px !important;
  }

  body.printing-modal .slip-sign-line {
    border-top: 1.5px solid #000000 !important;
    margin-bottom: 5px !important;
  }

  body.printing-modal .slip-sign-title {
    font-size: 11px !important;
    font-weight: 800 !important;
    color: #000000 !important;
  }

  body.printing-modal .slip-sign-sub {
    font-size: 9.5px !important;
    color: #555555 !important;
  }

  /* Single-page payslip print: HIDE Annexure completely */
  body.printing-modal:not(.print-with-annexure) .slip-annexure-box {
    display: none !important;
  }

  /* When printing with Annexure: Page 2 clean punch log */
  body.printing-modal.print-with-annexure .slip-annexure-box {
    display: block !important;
    page-break-before: always !important;
    margin-top: 0 !important;
    padding-top: 10px !important;
    border-top: none !important;
  }

  body.printing-modal.print-with-annexure .annexure-signatures {
    display: flex !important;
    margin-top: 35px !important;
  }

  body.printing-modal.print-with-annexure .annexure-table-scroll {
    overflow: visible !important;
    max-height: none !important;
    border: 1px solid #000000 !important;
  }

  body.printing-modal.print-with-annexure .slip-annexure-table {
    width: 100% !important;
    table-layout: fixed !important;
    border: 1px solid #000000 !important;
    font-size: 8px !important;
  }

  body.printing-modal.print-with-annexure .slip-annexure-table th,
  body.printing-modal.print-with-annexure .slip-annexure-table td {
    padding: 3px 5px !important;
    border: 1px solid #CCCCCC !important;
    white-space: normal !important;
  }

  body.printing-modal.print-with-annexure .slip-annexure-table th {
    background: #EAEAEA !important;
    color: #000000 !important;
    font-weight: 700 !important;
  }

  /* -------------------------------------------------------------
     MODE 2: PRINTING MONTHLY MASTER SUMMARY SHEET (A4 LANDSCAPE)
     ------------------------------------------------------------- */
  body.printing-summary {
    margin: 0 !important;
    padding: 0 !important;
  }

  body.printing-summary @page {
    size: A4 landscape;
    margin: 6mm 8mm;
  }

  body.printing-summary .top-bar,
  body.printing-summary .portal-nav-bar,
  body.printing-summary .primary-toolbar,
  body.printing-summary .control-panel,
  body.printing-summary #tabDashboard,
  body.printing-summary #tabEmployees,
  body.printing-summary #tabRules,
  body.printing-summary #dayModal,
  body.printing-summary #uploadModal,
  body.printing-summary .toast-container,
  body.printing-summary .col-actions,
  body.printing-summary .dash-quick-actions,
  body.printing-summary .btn {
    display: none !important;
  }

  body.printing-summary .main-container {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }

  body.printing-summary #tabSummary {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body.printing-summary .table-container {
    overflow: visible !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body.printing-summary .print-summary-letterhead {
    display: block !important;
    margin-bottom: 10px !important;
    padding-bottom: 8px !important;
    border-bottom: 2px solid #000000 !important;
  }

  body.printing-summary .ps-brand-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
  }

  body.printing-summary .ps-brand-info {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
  }

  body.printing-summary .ps-company-logo {
    height: 46px !important;
    width: auto !important;
    filter: none !important;
  }

  body.printing-summary .ps-company-title {
    font-size: 18px !important;
    font-weight: 900 !important;
    letter-spacing: 0.5px !important;
    margin: 0 !important;
    color: #000000 !important;
  }

  body.printing-summary .ps-company-sub {
    font-size: 9.5px !important;
    color: #444444 !important;
    margin: 2px 0 4px 0 !important;
  }

  body.printing-summary .ps-report-title {
    font-size: 12px !important;
    font-weight: 800 !important;
    color: #000000 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
  }

  body.printing-summary .ps-meta-box {
    text-align: right !important;
  }

  body.printing-summary .ps-month-badge {
    display: inline-block !important;
    background: #000000 !important;
    color: #FFFFFF !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    padding: 3px 10px !important;
    border-radius: 3px !important;
  }

  body.printing-summary .ps-date-badge {
    font-size: 9px !important;
    color: #555555 !important;
    margin-top: 3px !important;
    font-family: monospace !important;
  }

  body.printing-summary .ps-kpi-ribbon {
    display: flex !important;
    gap: 16px !important;
    margin-top: 6px !important;
    background: #F4F4F4 !important;
    padding: 5px 10px !important;
    border: 1px solid #CCCCCC !important;
    border-radius: 3px !important;
    font-size: 9.5px !important;
  }

  body.printing-summary .ps-kpi-item {
    display: flex !important;
    gap: 4px !important;
  }

  body.printing-summary .ps-kpi-item.highlight strong,
  body.printing-summary .ps-kpi-item.highlight span {
    color: #000000 !important;
    font-weight: 800 !important;
  }

  body.printing-summary .data-table {
    width: 100% !important;
    border-collapse: collapse !important;
    border: 1.5px solid #000000 !important;
    font-size: 8.5px !important;
  }

  body.printing-summary .data-table th,
  body.printing-summary .data-table td {
    padding: 3.5px 5px !important;
    border: 1px solid #CCCCCC !important;
    color: #000000 !important;
    white-space: nowrap !important;
    position: static !important;
    box-shadow: none !important;
  }

  body.printing-summary .data-table th {
    background: #EAEAEA !important;
    color: #000000 !important;
    font-weight: 800 !important;
    font-size: 8.5px !important;
    border-bottom: 1.5px solid #000000 !important;
    position: static !important;
    box-shadow: none !important;
  }

  body.printing-summary .data-table tbody tr:nth-child(even) td {
    background: #FBFBFB !important;
  }

  body.printing-summary .data-table tfoot td {
    background: #EEEEEE !important;
    border-top: 2px solid #000000 !important;
    font-weight: 800 !important;
    font-size: 9px !important;
    position: static !important;
    box-shadow: none !important;
  }

  body.printing-summary .print-summary-signatures {
    display: flex !important;
    justify-content: space-between !important;
    margin-top: 25px !important;
    padding: 0 20px !important;
    page-break-inside: avoid !important;
  }

  body.printing-summary .ps-sign-box {
    text-align: center !important;
    width: 220px !important;
  }

  body.printing-summary .ps-sign-line {
    border-top: 1.5px solid #000000 !important;
    margin-bottom: 5px !important;
  }

  body.printing-summary .ps-sign-title {
    font-size: 10.5px !important;
    font-weight: 700 !important;
    color: #000000 !important;
  }

  body.printing-summary .ps-sign-sub {
    font-size: 9px !important;
    color: #555555 !important;
  }
}

