/* ============================================================
   PaySlip Pro — Global Stylesheet
   Modern Clean Light Theme (Indian Payroll Admin Dashboard)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---- CSS Variables (Light Theme) ---- */
:root {
  --bg-base:       #f8fafc;
  --bg-card:       #ffffff;
  --bg-card2:      #f1f5f9;
  --bg-input:      #ffffff;
  --border:        #e2e8f0;
  --border-light:  #cbd5e1;

  --accent:        #4f46e5;
  --accent-hover:  #4338ca;
  --accent-soft:   #eef2ff;
  --green:         #059669;
  --green-hover:   #047857;
  --green-soft:    #ecfdf5;
  --red:           #dc2626;
  --red-hover:     #b91c1c;
  --red-soft:      #fef2f2;
  --amber:         #d97706;
  --amber-hover:   #b45309;
  --amber-soft:    #fffbeb;
  --sky:           #0284c7;
  --sky-soft:      #f0f9ff;

  --text-1:        #0f172a;
  --text-2:        #334155;
  --text-3:        #64748b;

  --radius:        10px;
  --radius-lg:     14px;
  --shadow-sm:     0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow:        0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.06);
  --shadow-md:     0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg:     0 10px 25px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);

  --sidebar-w:     245px;
}

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

html, body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-base);
  color: var(--text-1);
  font-size: 14px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ============================================================
   LAYOUT
   ============================================================ */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-w);
  background: #ffffff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  box-shadow: 1px 0 3px 0 rgba(0, 0, 0, 0.02);
}

.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo .app-name {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, #4f46e5, #7c3aed, #0284c7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}
.sidebar-logo .sub { font-size: 11px; color: var(--text-3); margin-top: 4px; font-weight: 500; }

.nav-section { padding: 16px 12px 6px; }
.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 0 10px;
  margin-bottom: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #475569;
  font-size: 13.5px;
  font-weight: 500;
  transition: all .15s ease;
  margin-bottom: 2px;
}
.nav-item:hover { background: #f1f5f9; color: var(--text-1); }
.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.nav-item .icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }

/* ---- Main content ---- */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  transition: all .2s ease;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.topbar-title-wrap {
  min-width: 0;
}
.topbar-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.topbar-title.has-subtitle {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.topbar-subtitle {
  font-size: 12.5px;
  color: #64748b;
  margin-top: 2px;
  font-weight: 500;
  line-height: 1.3;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.topbar-date {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 6px;
}
.topbar-user-btn {
  border-radius: 20px;
  padding: 3px 12px 3px 4px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: all .15s ease;
}
.topbar-user-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.topbar-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.topbar-user-name {
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}
.topbar-logout-btn {
  border-radius: 8px;
  padding: 5px 12px;
  color: #dc2626;
  border-color: #fee2e2;
  background: #fef2f2;
  gap: 6px;
  transition: all .15s ease;
}
.topbar-logout-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

/* Mobile Toggle & Close Buttons (Desktop Hidden) */
.mobile-menu-btn {
  display: none;
}
.sidebar-close-btn {
  display: none;
}
.sidebar-backdrop {
  display: none;
}

.content { padding: 32px; flex: 1; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title { font-size: 15px; font-weight: 700; color: var(--text-1); letter-spacing: -0.01em; }
.card-body  { padding: 24px; }

/* ---- Stat cards (dashboard & payroll run summary) ---- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.stat-card.violet::before { background: linear-gradient(90deg, #4f46e5, #818cf8); }
.stat-card.green::before  { background: linear-gradient(90deg, #059669, #34d399); }
.stat-card.amber::before  { background: linear-gradient(90deg, #d97706, #fbbf24); }
.stat-card.sky::before    { background: linear-gradient(90deg, #0284c7, #38bdf8); }

.stat-label { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.stat-value { font-size: 26px; font-weight: 800; color: var(--text-1); margin: 8px 0 4px; line-height: 1; letter-spacing: -0.02em; }
.stat-sub   { font-size: 12px; color: var(--text-3); font-weight: 500; }
.stat-icon  { position: absolute; right: 20px; top: 20px; font-size: 28px; opacity: .12; }

/* ============================================================
   TABLE
   ============================================================ */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); }
table { width: 100%; border-collapse: collapse; }
thead tr { border-bottom: 2px solid var(--border); }
thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
  background: #f8fafc;
}
tbody tr {
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
  transition: background .12s ease;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #f8fafc; }
tbody td {
  padding: 14px 16px;
  color: var(--text-1);
  font-size: 13.5px;
  vertical-align: middle;
}
.td-right { text-align: right; }
.td-center { text-align: center; }

code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 3px 6px;
  border-radius: 4px;
  font-weight: 600;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
}
.badge-green  { background: var(--green-soft);  color: #065f46; border: 1px solid #a7f3d0; }
.badge-red    { background: var(--red-soft);    color: #991b1b; border: 1px solid #fecaca; }
.badge-amber  { background: var(--amber-soft);  color: #92400e; border: 1px solid #fde68a; }
.badge-violet { background: var(--accent-soft); color: #3730a3; border: 1px solid #c7d2fe; }
.badge-sky    { background: var(--sky-soft);    color: #075985; border: 1px solid #bae6fd; }

/* ============================================================
   BUTTONS (Modern Design System)
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .18s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.25;
  user-select: none;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.btn svg {
  flex-shrink: 0;
  transition: transform .18s ease;
}
.btn:hover {
  transform: translateY(-1.5px);
}
.btn:hover svg {
  transform: translateY(-0.5px);
}
.btn:active {
  transform: translateY(0) scale(0.985);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-primary {
  background: linear-gradient(180deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  border: 1px solid rgba(79, 70, 229, 0.85);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05), 0 3px 10px -1px rgba(79, 70, 229, 0.35);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #4f46e5 0%, #4338ca 100%);
  color: #ffffff;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.08), 0 6px 16px -2px rgba(79, 70, 229, 0.45);
}

.btn-green {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: 1px solid rgba(5, 150, 105, 0.85);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05), 0 3px 10px -1px rgba(5, 150, 105, 0.32);
}
.btn-green:hover {
  background: linear-gradient(180deg, #059669 0%, #047857 100%);
  color: #ffffff;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.08), 0 6px 16px -2px rgba(5, 150, 105, 0.42);
}

.btn-red {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  border: 1px solid rgba(220, 38, 38, 0.85);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05), 0 3px 10px -1px rgba(220, 38, 38, 0.3);
}
.btn-red:hover {
  background: linear-gradient(180deg, #dc2626 0%, #b91c1c 100%);
  color: #ffffff;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.08), 0 6px 16px -2px rgba(220, 38, 38, 0.4);
}

.btn-amber {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  border: 1px solid rgba(217, 119, 6, 0.85);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05), 0 3px 10px -1px rgba(217, 119, 6, 0.3);
}
.btn-amber:hover {
  background: linear-gradient(180deg, #d97706 0%, #b45309 100%);
  color: #ffffff;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.08), 0 6px 16px -2px rgba(217, 119, 6, 0.4);
}

.btn-outline {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}
.btn-outline:hover {
  border-color: #6366f1;
  color: #4f46e5;
  background: #f5f7ff;
  box-shadow: 0 2px 6px 0 rgba(79, 70, 229, 0.12);
}

.btn-ghost {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
}
.btn-ghost:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #0f172a;
}

.btn-white {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}
.btn-white:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
  gap: 6px;
  border-radius: 7px;
}
.btn-sm svg {
  width: 14px;
  height: 14px;
}
.btn-lg {
  padding: 12px 24px;
  font-size: 14.5px;
  border-radius: 11px;
  gap: 9px;
  font-weight: 700;
}
.btn-lg svg {
  width: 18px;
  height: 18px;
}
.btn-icon-only {
  width: 34px;
  height: 34px;
  padding: 0;
  justify-content: center;
  border-radius: 8px;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.form-grid-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }

label {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .04em;
}
input[type="text"], input[type="password"], input[type="email"], input[type="number"],
input[type="date"], input[type="tel"], input[type="search"], textarea {
  background: var(--bg-input);
  border: 1.5px solid var(--border-light);
  border-radius: 8px;
  padding: 10px 13px;
  color: var(--text-1);
  font-size: 14px;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
  box-sizing: border-box;
  outline: none;
}
select {
  background-color: var(--bg-input);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  border: 1.5px solid var(--border-light);
  border-radius: 8px;
  padding: 10px 36px 10px 13px !important;
  color: var(--text-1);
  font-size: 14px;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
input::placeholder, select option { color: #94a3b8; }
select option { background: #ffffff; color: var(--text-1); }
textarea { resize: vertical; min-height: 80px; }

.form-hint { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* Toggle (checkbox styled) */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
.toggle {
  position: relative;
  display: inline-block;
  width: 44px; height: 24px;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: #cbd5e1;
  border-radius: 24px;
  cursor: pointer;
  transition: .2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; bottom: 3px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: .2s;
}
.toggle input:checked + .toggle-slider { background: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle-label { font-size: 13px; color: var(--text-2); font-weight: 500; }

/* ============================================================
   ALERTS / FLASH
   ============================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid transparent;
}
.alert-success { background: var(--green-soft);  border-color: #a7f3d0; color: #065f46; }
.alert-error   { background: var(--red-soft);    border-color: #fecaca; color: #991b1b; }
.alert-warning { background: var(--amber-soft);  border-color: #fde68a; color: #92400e; }
.alert-info    { background: var(--accent-soft); border-color: #c7d2fe; color: #3730a3; }

/* ============================================================
   SALARY BREAKUP PREVIEW
   ============================================================ */
.breakup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #ffffff;
}
.breakup-row {
  display: contents;
}
.breakup-row > div {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.breakup-row:last-child > div { border-bottom: none; }
.breakup-row > div:first-child { color: var(--text-2); }
.breakup-row > div:last-child  { color: var(--text-1); font-weight: 600; text-align: right; }
.breakup-total > div { background: var(--accent-soft); color: var(--accent) !important; font-weight: 700; }

/* ============================================================
   PAYROLL RUN TABLE (editable inputs)
   ============================================================ */
.editable-input {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--text-1);
  font-size: 13.5px;
  font-weight: 600;
  width: 72px;
  text-align: center;
  outline: none;
  transition: all .15s ease;
}
.editable-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
.editable-input.error { border-color: var(--red); background: var(--red-soft); }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modal-in .2s ease;
}
@keyframes modal-in {
  from { transform: scale(.96) translateY(10px); opacity: 0; }
  to   { transform: scale(1) translateY(0);       opacity: 1; }
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-size: 16px; font-weight: 700; color: var(--text-1); }
.modal-close {
  background: none; border: none;
  color: var(--text-3); font-size: 22px; cursor: pointer;
  line-height: 1; padding: 2px 6px; border-radius: 6px;
}
.modal-close:hover { background: #f1f5f9; color: var(--text-1); }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ============================================================
   MISC UTILITIES
   ============================================================ */
.flex        { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-1  { margin-top: 4px; }
.mt-4  { margin-top: 16px; }
.mt-6  { margin-top: 24px; }
.mb-4  { margin-bottom: 16px; }
.mb-6  { margin-bottom: 24px; }
.text-sm { font-size: 12px; }
.text-right { text-align: right; }
.text-2 { color: var(--text-2); }
.text-3 { color: var(--text-3); }
.font-bold { font-weight: 700; }
.font-mono { font-family: monospace; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* Separator */
.sep { height: 1px; background: var(--border); margin: 20px 0; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-3);
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 15px; }

/* Loading */
.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid var(--border-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ============================================================
   SALARY SLIP (print & screen view)
   ============================================================ */
@media print {
  .sidebar, .topbar, .no-print, .no-print-bar { display: none !important; }
  .main { margin-left: 0 !important; }
  .content { padding: 0 !important; }
  .slip-wrapper { box-shadow: none !important; border: 1px solid #ddd !important; width: 100% !important; margin: 0 !important; }
}
.slip-wrapper {
  background: #ffffff;
  color: #0f172a;
  max-width: 780px;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
  overflow: hidden;
  font-family: 'Inter', Arial, sans-serif;
}
.slip-header {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #ffffff;
  padding: 28px 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.slip-company-name { font-size: 22px; font-weight: 800; color: #a5b4fc; }
.slip-company-addr { font-size: 12px; color: #94a3b8; margin-top: 4px; }
.slip-month-label { text-align: right; font-size: 13px; color: #94a3b8; }
.slip-month-label strong { display: block; font-size: 18px; color: #ffffff; margin-top: 4px; }
.slip-section { padding: 20px 32px; border-bottom: 1px solid #e2e8f0; }
.slip-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #4f46e5; margin-bottom: 12px; }
.slip-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.slip-info-row { display: flex; gap: 8px; font-size: 13px; }
.slip-info-label { color: #64748b; min-width: 120px; flex-shrink: 0; }
.slip-info-value { color: #0f172a; font-weight: 500; }
.slip-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.slip-table th { background: #f8fafc; text-align: left; padding: 10px 14px; font-size: 11px; font-weight: 700; text-transform: uppercase; color: #64748b; letter-spacing: .05em; }
.slip-table td { padding: 9px 14px; border-bottom: 1px solid #f1f5f9; color: #334155; }
.slip-table td:last-child { text-align: right; font-weight: 600; color: #0f172a; }
.slip-table tfoot td { font-weight: 700; background: #f8fafc; color: #0f172a; }
.slip-net-bar { background: linear-gradient(135deg, #4338ca, #4f46e5); color: #ffffff; padding: 20px 32px; display: flex; justify-content: space-between; align-items: center; }
.slip-net-label { font-size: 14px; font-weight: 600; opacity: .9; }
.slip-net-amount { font-size: 28px; font-weight: 800; }
.slip-net-words { font-size: 12px; opacity: .85; margin-top: 4px; }
.slip-footer { padding: 14px 32px; text-align: center; font-size: 11px; color: #94a3b8; background: #f8fafc; }

/* ============================================================
   MODERN DASHBOARD SPECIFIC STYLES
   ============================================================ */
.dash-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
.dash-stat-card {
  border-radius: 16px;
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform .2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .2s ease, border-color .2s ease, background-color .2s ease;
}
.dash-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.03);
}
.dash-stat-card:active {
  transform: translateY(-1px) scale(0.992);
}
.card-blue   { background: #f0f7ff; border: 1.5px solid #dbeafe; }
.card-blue:hover  { border-color: #93c5fd; background: #ebf5ff; }
.card-green  { background: #f0fdf4; border: 1.5px solid #dcfce7; }
.card-green:hover { border-color: #86efac; background: #e7faee; }
.card-amber  { background: #fffbeb; border: 1.5px solid #fef3c7; }
.card-amber:hover { border-color: #fde047; background: #fef8db; }
.card-purple { background: #f5f3ff; border: 1.5px solid #ede9fe; }
.card-purple:hover{ border-color: #d8b4fe; background: #f1edff; }

.dash-card-arrow {
  position: absolute;
  top: 16px;
  right: 16px;
  color: #94a3b8;
  opacity: 0;
  transform: translateX(-4px);
  transition: all .2s ease;
  display: flex;
  align-items: center;
  z-index: 3;
}
.dash-stat-card:hover .dash-card-arrow {
  opacity: 0.9;
  transform: translateX(0);
}
.card-blue:hover .dash-card-arrow   { color: #2563eb; }
.card-green:hover .dash-card-arrow  { color: #16a34a; }
.card-amber:hover .dash-card-arrow  { color: #d97706; }
.card-purple:hover .dash-card-arrow { color: #7c3aed; }

.dash-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.bg-blue-subtle   { background: #dbeafe; color: #2563eb; }
.bg-green-subtle  { background: #dcfce7; color: #16a34a; font-weight: 700; font-size: 22px; }
.bg-amber-subtle  { background: #fef3c7; color: #d97706; }
.bg-purple-subtle { background: #ede9fe; color: #7c3aed; }

.dash-stat-content { flex: 1; z-index: 2; }
.dash-stat-label { font-size: 11px; font-weight: 700; color: #64748b; letter-spacing: 0.05em; text-transform: uppercase; }
.dash-stat-val { font-size: 26px; font-weight: 800; color: #0f172a; margin: 4px 0 2px; line-height: 1.1; letter-spacing: -0.02em; }
.dash-stat-sub { font-size: 12px; color: #64748b; font-weight: 500; }
.dash-watermark {
  position: absolute;
  right: 14px;
  bottom: 8px;
  font-size: 38px;
  opacity: 0.12;
  pointer-events: none;
}

.badge-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}
.badge-draft     { background: #fef3c7; color: #d97706; }
.badge-finalized { background: #dcfce7; color: #059669; }

.dash-middle-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
.dash-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  overflow: hidden;
}
.dash-card-header {
  padding: 18px 22px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dash-card-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-quick-card {
  background: #ffffff radial-gradient(circle at 100% 0%, rgba(79, 70, 229, 0.06) 0%, transparent 60%);
}

.qa-btn {
  border-radius: 10px;
  padding: 13px 18px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  transition: all .15s ease;
}
.qa-btn:hover { transform: translateY(-1px); }
.qa-btn:active { transform: translateY(0); }
.qa-btn-primary {
  background: linear-gradient(135deg, #4338ca, #4f46e5);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}
.qa-btn-primary:hover {
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.45);
}
.qa-btn-green {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}
.qa-btn-green:hover {
  background: #059669;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
}
.qa-btn-ghost {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  color: #1e293b;
}
.qa-btn-ghost:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.dash-view-all-btn {
  text-decoration: none;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  background: #ffffff;
  transition: all .15s ease;
}
.dash-view-all-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.dash-table {
  width: 100%;
  border-collapse: collapse;
}
.dash-table thead th {
  padding: 12px 22px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: #f8fafc;
  border-bottom: 1.5px solid #e2e8f0;
  text-align: left;
}
.dash-table tbody td {
  padding: 15px 22px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13.5px;
  vertical-align: middle;
}
.dash-table tbody tr:last-child td {
  border-bottom: none;
}
.dash-table tbody tr:hover {
  background: #f8fafc;
}
.dash-action-view {
  text-decoration: none;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #dbeafe;
  padding: 5px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
  display: inline-block;
  transition: all .15s ease;
}
.dash-action-view:hover {
  background: #dbeafe;
  color: #1d4ed8;
}

/* ============================================================
   HOLIDAYS MODULE (Modern Calendar & KPI Styles)
   ============================================================ */
.hol-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.hol-stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  user-select: none;
  transition: transform .18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .18s ease, border-color .18s ease;
}
.hol-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px -3px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}
.hol-stat-card:active {
  transform: translateY(-1px) scale(0.99);
}
.hol-stat-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hol-stat-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.hol-stat-val {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin: 3px 0 1px;
  line-height: 1.2;
}
.hol-stat-sub {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 500;
}

/* Calendar Date Tile (Mini-Calendar Badge) */
.cal-tile-box {
  display: flex;
  align-items: center;
  gap: 14px;
}
.cal-tile {
  width: 50px;
  height: 52px;
  border-radius: 9px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.04);
  flex-shrink: 0;
  text-align: center;
  transition: transform .15s ease;
}
.cal-tile:hover {
  transform: scale(1.05);
}
.cal-tile-header {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 0;
  color: #ffffff;
}
.cal-tile-day {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
  background: #ffffff;
}
.cal-tile.upcoming .cal-tile-header { background: #4f46e5; }
.cal-tile.today .cal-tile-header    { background: #10b981; }
.cal-tile.passed .cal-tile-header   { background: #94a3b8; }

.cal-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cal-date-str {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}
.cal-weekday-str {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

/* Chips & Quick Presets */
.preset-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.preset-chip {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 16px;
  cursor: pointer;
  transition: all .15s ease;
}
.preset-chip:hover {
  background: #e0e7ff;
  border-color: #c7d2fe;
  color: #4338ca;
  transform: translateY(-1px);
}

/* Modern Delete Button */
.btn-delete-hol {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  text-decoration: none;
  cursor: pointer;
  transition: all .15s ease;
}
.btn-delete-hol:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.15);
}

/* Search input in table header */
.hol-search-input {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 12px 6px 32px;
  font-size: 12.5px;
  color: #0f172a;
  outline: none;
  width: 200px;
  transition: all .18s ease;
}
.hol-search-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
  width: 240px;
}
.hol-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.hol-search-icon {
  position: absolute;
  left: 10px;
  pointer-events: none;
  color: #94a3b8;
  display: flex;
}

.hol-main-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: start;
}

/* ============================================================
   EMPLOYEE DIRECTORY TOOLBAR & FILTERS
   ============================================================ */
.emp-toolbar-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.emp-toolbar-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1;
  min-width: 280px;
}
.emp-search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 260px;
  max-width: 100%;
}
.emp-search-icon {
  position: absolute;
  left: 12px;
  color: #94a3b8;
  display: flex;
  pointer-events: none;
}
.emp-search-input {
  width: 100%;
  height: 38px;
  padding: 0 32px 0 36px;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  transition: all .18s ease;
  box-sizing: border-box;
}
.emp-search-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}
.emp-search-clear {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  display: none;
  font-size: 13px;
  padding: 2px 4px;
}
.emp-search-clear:hover {
  color: #0f172a;
}

.emp-select {
  height: 38px !important;
  width: auto !important;
  min-width: 160px;
  max-width: 220px;
  padding: 0 34px 0 13px !important;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  background-color: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  outline: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: all .15s ease;
}
.emp-select:hover {
  border-color: #94a3b8;
}
.emp-select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.emp-reset-btn {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
}
.emp-reset-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.emp-toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Status Segmented Tabs */
.emp-status-tabs {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 9px;
  gap: 2px;
  height: 38px;
  box-sizing: border-box;
}
.emp-tab-pill {
  border: none;
  background: transparent;
  padding: 0 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .15s ease;
  height: 32px;
  line-height: 1;
}
.emp-tab-pill:hover {
  color: #0f172a;
}
.emp-tab-pill.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.tab-badge {
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
}
.emp-tab-pill.active .tab-badge {
  background: #e0e7ff;
  color: #4338ca;
}

.emp-count-pill {
  height: 38px;
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 0 12px;
  border-radius: 9px;
  white-space: nowrap;
  box-sizing: border-box;
}
.emp-count-pill strong {
  color: #0f172a;
  margin: 0 3px;
}

/* Employee Initial Avatar */
.emp-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e0e7ff, #ede9fe);
  color: #4338ca;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

/* ============================================================
   RESPONSIVE & MOBILE DRAWER ANIMATION
   ============================================================ */

/* Tablet & Smaller Laptops (<= 1024px) */
@media (max-width: 1024px) {
  .hol-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .hol-main-layout { grid-template-columns: 1fr; }
  .dash-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-middle-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Tablets & Mobile Devices (<= 768px) */
@media (max-width: 768px) {
  /* Body lock when mobile menu is active */
  body.sidebar-open {
    overflow: hidden !important;
    touch-action: none;
  }

  /* Main Viewport & Layout */
  .layout {
    flex-direction: column;
    min-height: 100vh;
  }

  .main {
    margin-left: 0;
    width: 100%;
    min-width: 0;
  }

  .content {
    padding: 16px 14px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  /* Topbar Mobile Styles */
  .topbar {
    padding: 0 14px;
    min-height: 60px;
    height: auto;
    gap: 10px;
  }

  .topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
  }

  .topbar-title {
    font-size: 16px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar-title.has-subtitle {
    font-size: 17px !important;
  }

  .topbar-subtitle {
    display: none; /* Hide subtitle to keep mobile header clean and uncluttered */
  }

  .topbar-date {
    display: none !important; /* Hide date on mobile to save space */
  }

  .topbar-right {
    gap: 8px;
    flex-shrink: 0;
  }

  .topbar-user-name {
    max-width: 85px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
  }

  /* Mobile Hamburger Menu Toggle Button */
  .mobile-menu-btn {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }

  .mobile-menu-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
  }

  .mobile-menu-btn:active {
    transform: scale(0.92);
  }

  .hamburger-bar {
    display: block;
    width: 18px;
    height: 2px;
    background: #334155;
    border-radius: 2px;
    transition: transform .26s cubic-bezier(0.16, 1, 0.3, 1), opacity .2s ease, background-color .2s ease;
    transform-origin: center;
  }

  /* Hamburger to Cross icon transition when open */
  body.sidebar-open .mobile-menu-btn {
    background: #eef2ff;
    border-color: #c7d2fe;
  }

  body.sidebar-open .hamburger-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
    background: #4f46e5;
  }

  body.sidebar-open .hamburger-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }

  body.sidebar-open .hamburger-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    background: #4f46e5;
  }

  /* Glassmorphic Backdrop Overlay */
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s ease;
  }

  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* Mobile Navigation Drawer with Silky Smooth Light Animation */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 285px;
    max-width: 84vw;
    height: 100vh;
    height: 100dvh;
    background: #ffffff;
    z-index: 999;
    transform: translateX(-105%);
    visibility: hidden;
    box-shadow: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-right: 1px solid rgba(226, 232, 240, 0.85);
    transition: transform 0.34s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.34s ease, box-shadow 0.34s ease;
    will-change: transform;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
    visibility: visible;
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.32), 0 0 0 1px rgba(15, 23, 42, 0.05);
  }

  /* Sidebar Close Button */
  .sidebar-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
    flex-shrink: 0;
    transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .sidebar-close-btn:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fecaca;
    transform: rotate(90deg);
  }

  .sidebar-close-btn:active {
    transform: scale(0.92) rotate(90deg);
  }

  /* Staggered Navigation Items Entry Animation */
  body.sidebar-open .nav-item {
    animation: drawerItemFadeIn 0.36s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  body.sidebar-open .nav-section:nth-of-type(1) .nav-item:nth-of-type(1) { animation-delay: 0.04s; }
  body.sidebar-open .nav-section:nth-of-type(1) .nav-item:nth-of-type(2) { animation-delay: 0.08s; }
  body.sidebar-open .nav-section:nth-of-type(2) .nav-item:nth-of-type(1) { animation-delay: 0.12s; }
  body.sidebar-open .nav-section:nth-of-type(2) .nav-item:nth-of-type(2) { animation-delay: 0.16s; }
  body.sidebar-open .nav-section:nth-of-type(3) .nav-item:nth-of-type(1) { animation-delay: 0.20s; }
  body.sidebar-open .nav-section:nth-of-type(3) .nav-item:nth-of-type(2) { animation-delay: 0.24s; }
  body.sidebar-open .nav-section:nth-of-type(3) .nav-item:nth-of-type(3) { animation-delay: 0.28s; }

  @keyframes drawerItemFadeIn {
    0% {
      opacity: 0;
      transform: translateX(-16px);
    }
    100% {
      opacity: 1;
      transform: translateX(0);
    }
  }

  /* Dashboard Grid Responsive */
  .dash-stat-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .dash-stat-card {
    padding: 16px 18px;
  }

  .dash-stat-val {
    font-size: 24px;
  }

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

  /* Employee Toolbar & Filter Responsive */
  .emp-toolbar-card {
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .emp-toolbar-left {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    gap: 10px;
  }

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

  .emp-select {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

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

  .emp-toolbar-right {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .emp-status-tabs {
    width: 100%;
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .emp-status-tabs::-webkit-scrollbar {
    display: none;
  }

  .emp-tab-pill {
    flex: 1;
    justify-content: center;
    padding: 0 8px;
    font-size: 12px;
  }

  .emp-count-pill {
    width: 100%;
    justify-content: center;
    font-size: 12px;
  }

  /* Tables Touch Momentum & Horizontal Scroll */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    border-radius: var(--radius);
  }

  table {
    min-width: 720px; /* Keep table cells legible and prevent squashing */
  }

  /* Page Headers Responsive */
  .flex.items-center.justify-between {
    flex-direction: column;
    align-items: stretch !important;
    gap: 14px;
  }

  .flex.items-center.justify-between > a.btn,
  .flex.items-center.justify-between > button.btn {
    width: 100%;
    justify-content: center;
  }

  /* Forms Responsive */
  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .form-grid-3 {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .stat-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Holiday Page Mobile Layout */
  .hol-stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .hol-main-layout {
    grid-template-columns: 1fr;
  }

  /* Settings Page Cards */
  .card-header {
    padding: 16px 18px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .card-body {
    padding: 18px 16px;
  }

  /* History Page Mobile Card Header */
  .history-card-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  .history-header-left {
    justify-content: space-between !important;
    width: 100%;
  }
  .history-header-right {
    justify-content: space-between !important;
    border-top: 1px dashed #e2e8f0;
    padding-top: 10px;
    width: 100%;
  }
}

/* Small Smart Phones (<= 480px) */
@media (max-width: 480px) {
  .topbar {
    padding: 0 10px;
    min-height: 56px;
  }

  .topbar-left {
    gap: 8px;
  }

  .topbar-title {
    font-size: 15px !important;
    max-width: 150px;
  }

  .topbar-user-btn {
    padding: 2px 7px 2px 2px;
    gap: 4px;
  }

  .topbar-user-name {
    display: none; /* Hide username text, keep user avatar badge */
  }

  .topbar-logout-btn {
    padding: 5px 8px;
  }

  .topbar-logout-btn .logout-label {
    display: none; /* Icon-only logout for ultra clean compact mobile header */
  }

  .content {
    padding: 12px 10px;
  }

  .hol-stat-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    padding: 8px 14px;
    font-size: 13px;
  }

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