:root{
  --bg:#0b1220;
  --card:#ffffff;
  --muted:#6b7280;
  --border:#e5e7eb;
  --shadow: 0 10px 25px rgba(17,24,39,.08);
  --shadow-sm: 0 8px 18px rgba(17,24,39,.06);
  --radius: 16px;
  --sidebar-w: 288px;
  --accent: #4f46e5;
  --accent2:#22c55e;
}

*{font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;}
.bg-app{background: #f6f7fb;}

.app-shell{display:flex;min-height:100vh;gap:0;}
.app-sidebar{
  width:var(--sidebar-w);
  background: linear-gradient(180deg, #0b1220 0%, #0b1220 35%, #0e1730 100%);
  color:#e5e7eb;
  display:flex;flex-direction:column;
  position:sticky;top:0;height:100vh;
  border-right: 1px solid rgba(255,255,255,.06);
}
.sidebar-brand{padding:18px 18px 12px;}
.brand-mark{
  width:140px;height:36px;border-radius:14px;
  display:flex;align-items:center;justify-content:center;
  background: rgba(79,70,229,.15);
  color:#c7d2fe;font-weight:800;letter-spacing:.5px;
  border: 1px solid rgba(199,210,254,.18);
}
.sidebar-nav{padding:10px 12px;display:flex;flex-direction:column;gap:6px;}
.sidebar-nav .nav-link{
  display:flex;align-items:center;gap:10px;
  border-radius:14px;
  padding:10px 12px;
  color:#d1d5db;
  font-weight:600;
}
.sidebar-nav .nav-link i{font-size:1.05rem;opacity:.95;}
.sidebar-nav .nav-link span{white-space:nowrap;}
.sidebar-nav .nav-link:hover{background: rgba(255,255,255,.06); color:#fff;}
.sidebar-nav .nav-link.active{
  background: rgba(79,70,229,.18);
  border: 1px solid rgba(79,70,229,.25);
  color:#fff;
}
.nav-section{
  margin-top:10px;
  font-size:.72rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  color: rgba(229,231,235,.55);
  padding:10px 12px 4px;
}
.sidebar-footer{margin-top:auto;padding:12px 14px 16px;border-top:1px solid rgba(255,255,255,.06);}
.user-chip{display:flex;align-items:center;gap:10px;background:rgba(255,255,255,.04);padding:10px 12px;border-radius:16px;border:1px solid rgba(255,255,255,.06);}
.user-avatar{width:34px;height:34px;border-radius:12px;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.08);color:#fff;font-weight:800;}
.min-w-0{min-width:0;}

.app-main{flex:1;min-width:0;display:flex;flex-direction:column;}
.app-topbar{
  background:#fff;
  border-bottom:1px solid var(--border);
  padding:14px 16px;
  display:flex;
  align-items:center;
  gap:12px;
}
.page-kicker{font-size:.75rem;color:var(--muted);font-weight:600;letter-spacing:.02em;}
.btn-icon{
  width:40px;height:40px;border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  display:flex;align-items:center;justify-content:center;
}
.btn-icon:hover{box-shadow:var(--shadow-sm);}
.badge-soft{
  background: rgba(79,70,229,.10);
  border: 1px solid rgba(79,70,229,.18);
  color:#3730a3;
  font-weight:700;
  border-radius:999px;
  padding:.45rem .65rem;
}

.container-fluid{max-width:1200px;}

.card{
  border:1px solid rgba(17,24,39,.06)!important;
  border-radius: var(--radius)!important;
  box-shadow: var(--shadow-sm);
}
.card .card-body{padding:18px;}
.table{margin-bottom:0;}
.table thead th{font-size:.78rem;text-transform:uppercase;letter-spacing:.06em;color:#6b7280;border-bottom:1px solid var(--border);}
.table td{vertical-align:middle;}
.btn-primary{
  background: var(--accent);
  border-color: var(--accent);
  border-radius: 14px;
  font-weight:700;
}
.btn-primary:hover{filter:brightness(.97);}
.btn-outline-dark, .btn-light{
  border-radius:14px;
}
.btn-soft{
  /* Soft button used across light pages. Keep text readable on white/gray backgrounds. */
  background: rgba(17,24,39,.04);
  color:#111827;
  border:1px solid rgba(17,24,39,.10);
  border-radius:14px;
  font-weight:700;
}
.btn-soft:hover{
  background: rgba(17,24,39,.06);
  color:#111827;
}
.alert{border-radius:16px;}

.kpi{
  display:flex;align-items:center;justify-content:space-between;
  gap:14px;
}
.kpi .kpi-label{color:var(--muted);font-size:.85rem;font-weight:600;}
.kpi .kpi-value{font-size:1.65rem;font-weight:800;letter-spacing:-.02em;}
.kpi .kpi-icon{
  width:44px;height:44px;border-radius:16px;
  display:flex;align-items:center;justify-content:center;
  border:1px solid rgba(17,24,39,.08);
  background:#f8fafc;
}
.kpi .kpi-icon i{font-size:1.2rem;color:#111827;}
.pill{
  display:inline-flex;align-items:center;gap:8px;
  border-radius:999px;padding:.35rem .65rem;
  font-weight:700;font-size:.78rem;
}
.pill-active{background: rgba(34,197,94,.12); border:1px solid rgba(34,197,94,.20); color:#166534;}
.pill-invited{background: rgba(245,158,11,.12); border:1px solid rgba(245,158,11,.20); color:#92400e;}
.pill-terminated{background: rgba(239,68,68,.12); border:1px solid rgba(239,68,68,.20); color:#991b1b;}

.section-card{
  border:1px solid rgba(17,24,39,.06);
  border-radius: var(--radius);
  padding:16px;
  background:#fff;
}
.section-title{font-weight:800;margin-bottom:10px;letter-spacing:-.01em;}
.brand-badge{width:52px;height:52px;border-radius:18px;display:flex;align-items:center;justify-content:center;background:#0b1220;color:#fff;font-weight:900;}

@media (max-width: 991px){
  .app-shell{flex-direction:column;}
  .app-sidebar{
    width: 100%;
    height:auto;
    position:relative;
    display:none;
  }
  .app-sidebar.open{display:flex;}
}


/* Auth pages */
.auth-wrap{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:
    radial-gradient(1200px 500px at 20% 10%, rgba(79,70,229,.18), transparent 60%),
    radial-gradient(900px 450px at 80% 20%, rgba(34,197,94,.12), transparent 60%),
    #f6f7fb;
}
.auth-card{
  width:100%;
  max-width: 420px;
  border-radius: 22px !important;
  box-shadow: var(--shadow);
  overflow:hidden;
}
.auth-card .auth-head{
  padding:18px 18px 0;
}
.auth-logo{
  width:160px;height:48px;border-radius:16px;
  display:flex;align-items:center;justify-content:center;
  background: rgba(79,70,229,.12);
  border:1px solid rgba(79,70,229,.18);
  color:#3730a3;font-weight:900;
}
.form-control, .form-select{
  border-radius: 14px;
  padding: 10px 12px;
  border-color: rgba(17,24,39,.10);
}
.form-control:focus, .form-select:focus{
  box-shadow: 0 0 0 .25rem rgba(79,70,229,.14);
  border-color: rgba(79,70,229,.35);
}
.btn{border-radius:14px;}
.btn-link{color:var(--accent);font-weight:700;text-decoration:none;}
.btn-link:hover{text-decoration:underline;}

/* Syncfusion EJ2 (MultiSelect) helpers - used in Leave Records filters */
.e-control.e-multiselect, .e-multiselect.e-control { width: 100% !important; }
.e-multi-select-wrapper { border-radius: 14px; border-color: rgba(17,24,39,.10); }
.e-multi-select-wrapper.e-input-focus { box-shadow: 0 0 0 .25rem rgba(79,70,229,.14); border-color: rgba(79,70,229,.35); }
.e-popup.e-multi-select-list-wrapper { z-index: 2000; }

/* Stepper */
.stepper{
  display:flex;gap:10px;align-items:center;flex-wrap:wrap;
}
.step{
  display:flex;align-items:center;gap:8px;
  padding:8px 10px;
  border:1px solid rgba(17,24,39,.08);
  border-radius:999px;
  background:#fff;
  font-weight:700;
  color:#111827;
  font-size:.82rem;
}
.step .dot{
  width:10px;height:10px;border-radius:999px;background:rgba(17,24,39,.20);
}
.step.active{
  border-color: rgba(79,70,229,.22);
  background: rgba(79,70,229,.08);
  color:#3730a3;
}
.step.active .dot{background: var(--accent);}
.helper{
  color:var(--muted);
  font-size:.85rem;
}


/* Logo containment fixes */
.brand-mark img.brand-logo{max-width:100%;max-height:100%;object-fit:contain;display:block;}
.auth-logo img.auth-logo-img{max-width:100%;max-height:100%;object-fit:contain;display:block;}
.brand-mark{overflow:hidden;}
.auth-logo{overflow:hidden;}



/* ===== Salary Slip / Payment Slip (Employee) ===== */
.salary-slip{
  background:#fff;
  position:relative;
  padding:18px 18px 28px 18px;
  border:2px solid #1f6feb;
  border-radius:2px;
  max-width: 980px;
  margin: 0 auto;
}

.salary-slip-border{
  position:absolute;
  left:0; top:88px;
  width:100%;
  height:34px;
  background: linear-gradient(90deg, rgba(31,111,235,0.15), rgba(31,111,235,0.05));
  border-top:6px solid rgba(31,111,235,0.85);
  border-bottom:6px solid rgba(31,111,235,0.55);
  transform: skewY(-2deg);
  transform-origin:left;
  pointer-events:none;
}

.salary-slip-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  position:relative;
  z-index:1;
  min-height:90px;
}

.salary-slip-header .slip-logo img{
  max-height:56px;
  height:auto;
  width:auto;
  display:block;
}

.salary-slip-header .slip-company{
  text-align:right;
  font-size:14px;
  line-height:1.35;
}

.salary-slip-title{
  margin: 40px 0 18px 0;
  text-align:center;
  font-weight:700;
  font-size:22px;
  font-family: Georgia, 'Times New Roman', serif;
}

.salary-slip-meta{
  display:flex;
  justify-content:space-between;
  gap:16px;
  font-size:16px;
  font-family: Georgia, 'Times New Roman', serif;
  margin: 0 0 14px 0;
}

.salary-slip-table{
  width:100%;
  border-collapse:collapse;
  font-family: Georgia, 'Times New Roman', serif;
}

.salary-slip-table th,
.salary-slip-table td{
  border:1px solid rgba(0,0,0,0.55);
  padding:8px 10px;
}

.salary-slip-table th{
  font-size:18px;
  font-weight:700;
  background:#fff;
}

.salary-slip-table td{
  font-size:16px;
}

.salary-slip-table .totals-row td{
  font-weight:700;
}

.salary-slip-net{
  border:1px solid rgba(0,0,0,0.55);
  border-top:none;
  padding:10px 12px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size:16px;
}

.salary-slip-sign{
  display:flex;
  justify-content:space-between;
  gap:16px;
  margin-top: 80px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size:16px;
}

.salary-slip-sign .sig-line{
  width:260px;
  border-top:2px dashed rgba(0,0,0,0.7);
  margin-bottom:8px;
}

.salary-slip-footer{
  margin-top: 70px;
  height:42px;
  background: rgba(31,111,235,0.9);
  color:#000;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  border-radius:2px;
}

/* Print */
@media print{
  .no-print{display:none !important;}
  body{background:#fff !important;}
  .salary-slip{box-shadow:none !important; margin:0 !important; max-width:none !important;}
  .salary-slip-footer{background: rgba(31,111,235,0.9) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact;}
  .salary-slip-border{ -webkit-print-color-adjust: exact; print-color-adjust: exact;}
}
