/* ============================================================
   OMSAI PAYROLL — PROFESSIONAL BLUE THEME
   ============================================================ */

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

:root {
  /* Blue Palette */
  --primary:        #1a56db;
  --primary-dark:   #1048c0;
  --primary-light:  #e8f0fd;
  --primary-mid:    #3b82f6;
  --secondary:      #0ea5e9;
  --accent:         #06b6d4;

  /* Sidebar */
  --sidebar-bg:     #0c1e3c;
  --sidebar-hover:  #162d52;
  --sidebar-active: #1a3a6e;
  --sidebar-border: rgba(255,255,255,.07);
  --sidebar-text:   #94afc8;
  --sidebar-head:   #e2eeff;

  /* Backgrounds */
  --bg-page:        #f0f4f8;
  --bg-card:        #ffffff;
  --bg-input:       #f8fafc;

  /* Text */
  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;
  --text-light:     #cbd5e1;

  /* Borders */
  --border:         #e2e8f0;
  --border-focus:   #1a56db;

  /* Status */
  --success:        #059669;
  --success-bg:     #ecfdf5;
  --warning:        #d97706;
  --warning-bg:     #fffbeb;
  --danger:         #dc2626;
  --danger-bg:      #fef2f2;
  --info:           #0284c7;
  --info-bg:        #e0f2fe;
  --purple:         #7c3aed;
  --purple-bg:      #f5f3ff;

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:      0 4px 6px rgba(0,0,0,.05), 0 2px 4px rgba(0,0,0,.04);
  --shadow-md:   0 10px 25px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.04);
  --shadow-lg:   0 20px 40px rgba(0,0,0,.12), 0 8px 16px rgba(0,0,0,.06);

  /* Radius */
  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  14px;
  --radius-xl:  20px;
  --radius-pill:100px;

  /* Sidebar width */
  --sidebar-w:  260px;
  --topbar-h:   64px;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

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

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 1000;
  transition: transform .25s ease;
}

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-logo .logo-icon {
  width: 40px; height: 40px;
  background: var(--primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 800; font-size: 16px; color: #fff;
  flex-shrink: 0;
}
.sidebar-logo .logo-text { line-height: 1.2; }
.sidebar-logo .logo-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 700; font-size: 15px; color: #fff;
  letter-spacing: -.2px;
}
.sidebar-logo .logo-sub { font-size: 11px; color: var(--sidebar-text); }

.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }

.nav-section {
  font-size: 10px; font-weight: 700; color: rgba(148,175,200,.5);
  text-transform: uppercase; letter-spacing: .12em;
  padding: 16px 20px 4px;
}
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 13.5px; font-weight: 500;
  transition: all .15s;
  position: relative;
  border-radius: 0;
  margin: 1px 8px;
  border-radius: 8px;
}
.nav-link i { font-size: 18px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-link:hover { background: var(--sidebar-hover); color: #fff; }
.nav-link.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(26,86,219,.4);
}
.nav-link.active::before {
  content: '';
  position: absolute;
  left: -8px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--primary-mid);
  border-radius: 0 3px 3px 0;
}
.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: var(--radius-pill);
  min-width: 20px; text-align: center;
}
.nav-badge.yellow { background: var(--warning); }

.sidebar-footer {
  padding: 12px 12px 16px;
  border-top: 1px solid var(--sidebar-border);
}
.user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--sidebar-hover);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s;
}
.user-card:hover { background: var(--sidebar-active); }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: #fff;
  flex-shrink: 0;
}
.user-info .user-name { font-size: 13px; font-weight: 600; color: #fff; }
.user-info .user-role { font-size: 11px; color: var(--sidebar-text); }
.user-card .logout-icon { margin-left: auto; color: var(--sidebar-text); font-size: 16px; }

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

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 28px;
  position: sticky; top: 0; z-index: 100;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}
.topbar-breadcrumb { display: flex; align-items: center; gap: 6px; }
.topbar-breadcrumb .page-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700; font-size: 17px; color: var(--text-primary);
}
.topbar-breadcrumb .sep { color: var(--text-muted); font-size: 13px; }
.topbar-breadcrumb .page-sub { font-size: 13px; color: var(--text-muted); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar-date {
  font-size: 12px; color: var(--text-muted);
  background: var(--bg-page);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}
.topbar-icon-btn {
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: all .15s;
  text-decoration: none;
}
.topbar-icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--danger); border-radius: 50%;
  border: 2px solid var(--bg-card);
}

/* ============================================================
   PAGE CONTENT
   ============================================================ */
.page-content { padding: 28px; flex: 1; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 18px 22px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.card-title {
  font-size: 14px; font-weight: 700; color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
}
.card-title i { color: var(--primary); font-size: 18px; }
.card-actions { display: flex; align-items: center; gap: 8px; }
.card-body { padding: 20px 22px; }
.card-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-page);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  border-radius: 50%;
  opacity: .08;
  transform: translate(20px, -20px);
}
.stat-card.blue::after  { background: var(--primary); }
.stat-card.green::after { background: var(--success); }
.stat-card.amber::after { background: var(--warning); }
.stat-card.red::after   { background: var(--danger); }
.stat-card.cyan::after  { background: var(--accent); }

.stat-card .stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 14px;
}
.stat-card.blue .stat-icon  { background: var(--primary-light); color: var(--primary); }
.stat-card.green .stat-icon { background: var(--success-bg); color: var(--success); }
.stat-card.amber .stat-icon { background: var(--warning-bg); color: var(--warning); }
.stat-card.red .stat-icon   { background: var(--danger-bg); color: var(--danger); }
.stat-card.cyan .stat-icon  { background: #e0fafb; color: var(--accent); }
.stat-card.purple .stat-icon { background: var(--purple-bg); color: var(--purple); }

.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-family: 'Poppins', sans-serif; font-size: 28px; font-weight: 700; color: var(--text-primary); margin: 4px 0 6px; line-height: 1; }
.stat-change { font-size: 12px; display: flex; align-items: center; gap: 4px; }
.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }
.stat-change.neutral { color: var(--text-muted); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 13px; font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  line-height: 1;
}
.btn i { font-size: 16px; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-sm i { font-size: 14px; }
.btn-lg { padding: 12px 24px; font-size: 14px; }

.btn-primary   { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 2px 8px rgba(26,86,219,.25); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); box-shadow: 0 4px 12px rgba(26,86,219,.35); }
.btn-secondary { background: var(--bg-page); color: var(--text-secondary); border-color: var(--border); }
.btn-secondary:hover { background: var(--border); color: var(--text-primary); }
.btn-success   { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { background: #047857; }
.btn-danger    { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #b91c1c; }
.btn-warning   { background: var(--warning); color: #fff; border-color: var(--warning); }
.btn-outline   { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-ghost     { background: transparent; color: var(--text-secondary); border-color: transparent; }
.btn-ghost:hover { background: var(--bg-page); color: var(--primary); }
.btn-icon      { padding: 8px; width: 36px; height: 36px; justify-content: center; }
.btn-icon.sm   { width: 30px; height: 30px; padding: 6px; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px; letter-spacing: .02em;
}
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,.1);
  background: #fff;
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:disabled { opacity: .6; cursor: not-allowed; }
.input-group { display: flex; }
.input-group .input-prefix {
  padding: 9px 13px;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  color: var(--text-muted);
  font-size: 13px;
  white-space: nowrap;
}
.input-group .form-control { border-radius: 0 var(--radius) var(--radius) 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
.form-text { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 11px; color: var(--danger); margin-top: 4px; }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); }
.table {
  width: 100%; border-collapse: collapse;
  font-size: 13.5px; white-space: nowrap;
}
.table th {
  background: var(--bg-page);
  padding: 12px 16px;
  text-align: left;
  font-size: 11.5px; font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--primary-light); }
.table .emp-cell { display: flex; align-items: center; gap: 10px; }
.table .emp-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; flex-shrink: 0;
}
.table .emp-name { font-weight: 600; font-size: 13.5px; }
.table .emp-code { font-size: 11px; color: var(--text-muted); }
.table-actions { display: flex; align-items: center; gap: 4px; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 700;
  letter-spacing: .02em; white-space: nowrap;
}
.badge-success    { background: var(--success-bg);  color: var(--success); }
.badge-warning    { background: var(--warning-bg);  color: var(--warning); }
.badge-danger     { background: var(--danger-bg);   color: var(--danger); }
.badge-info       { background: var(--info-bg);     color: var(--info); }
.badge-primary    { background: var(--primary-light); color: var(--primary); }
.badge-secondary  { background: #f1f5f9; color: var(--text-secondary); }
.badge-purple     { background: var(--purple-bg); color: var(--purple); }
.badge-pink       { background: #fdf2f8; color: #9d174d; }

/* ============================================================
   ALERTS / FLASH
   ============================================================ */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 13px;
}
.alert i { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--success-bg); color: #065f46; border: 1px solid #a7f3d0; }
.alert-danger  { background: var(--danger-bg);  color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: var(--warning-bg); color: #92400e; border: 1px solid #fde68a; }
.alert-info    { background: var(--info-bg);    color: #075985; border: 1px solid #bae6fd; }

/* ============================================================
   SEARCH BAR
   ============================================================ */
.search-wrapper { position: relative; }
.search-wrapper i {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted); font-size: 16px;
}
.search-input {
  width: 280px;
  padding: 9px 13px 9px 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-page);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  outline: none;
  transition: all .15s;
}
.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,.1);
  background: #fff;
  width: 320px;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.page-header .ph-left h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 20px; font-weight: 700;
  color: var(--text-primary);
}
.page-header .ph-left p { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.page-header .ph-right { display: flex; align-items: center; gap: 10px; }

/* ============================================================
   TABS
   ============================================================ */
.tabs { display: flex; gap: 4px; background: var(--bg-page); padding: 4px; border-radius: var(--radius); margin-bottom: 20px; border: 1px solid var(--border); width: fit-content; }
.tab-btn {
  padding: 7px 18px;
  border-radius: calc(var(--radius) - 2px);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  border: none; background: transparent;
  transition: all .15s;
  font-family: 'Inter', sans-serif;
}
.tab-btn.active { background: var(--bg-card); color: var(--primary); box-shadow: var(--shadow-sm); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============================================================
   PROGRESS BARS
   ============================================================ */
.progress { background: var(--bg-page); border-radius: var(--radius-pill); height: 7px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: var(--radius-pill); transition: width .5s ease; }
.progress-bar.blue   { background: var(--primary); }
.progress-bar.green  { background: var(--success); }
.progress-bar.amber  { background: var(--warning); }
.progress-bar.red    { background: var(--danger); }
.progress-bar.cyan   { background: var(--accent); }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15,23,42,.55);
  z-index: 2000;
  align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
  animation: fadeIn .15s ease;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  width: 100%; max-width: 620px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp .2s ease;
}
.modal-lg { max-width: 900px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 0;
}
.modal-title { font-family: 'Poppins', sans-serif; font-size: 16px; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-muted);
  border: none; background: var(--bg-page); font-size: 18px;
  transition: all .15s;
}
.modal-close:hover { background: var(--danger-bg); color: var(--danger); }
.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-end;
  background: var(--bg-page);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* ============================================================
   PAYSLIP STYLES
   ============================================================ */
.payslip-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.payslip-header {
  background: var(--primary);
  color: #fff;
  padding: 24px 28px;
  display: flex; justify-content: space-between; align-items: center;
}
.payslip-header h2 { font-family: 'Poppins', sans-serif; font-size: 18px; font-weight: 700; }
.payslip-header .company { font-size: 12px; opacity: .8; margin-top: 4px; }
.payslip-body { padding: 24px 28px; }
.payslip-section { margin-bottom: 20px; }
.payslip-section h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 10px; }
.payslip-row {
  display: flex; justify-content: space-between;
  padding: 7px 0; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.payslip-row:last-child { border-bottom: none; }
.payslip-row .label { color: var(--text-secondary); }
.payslip-row .amount { font-weight: 600; color: var(--text-primary); }
.payslip-row .amount.deduction { color: var(--danger); }
.payslip-net {
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 16px;
}
.payslip-net .net-label { font-size: 15px; font-weight: 700; color: var(--primary); }
.payslip-net .net-amount { font-family: 'Poppins', sans-serif; font-size: 22px; font-weight: 800; color: var(--primary); }

/* ============================================================
   ATTENDANCE CALENDAR
   ============================================================ */
.att-calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.att-cal-head { text-align: center; font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; padding: 6px 0; }
.att-day {
  text-align: center; padding: 8px 4px;
  border-radius: var(--radius);
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s;
  color: var(--text-secondary);
}
.att-day:hover { background: var(--primary-light); color: var(--primary); }
.att-day.present { background: var(--success-bg); color: var(--success); border-color: #a7f3d0; }
.att-day.absent  { background: var(--danger-bg);  color: var(--danger);  border-color: #fecaca; }
.att-day.half    { background: var(--warning-bg); color: var(--warning); border-color: #fde68a; }
.att-day.holiday { background: var(--info-bg);    color: var(--info);    border-color: #bae6fd; }
.att-day.weekend { color: var(--text-light); background: var(--bg-page); }
.att-day.today   { border-color: var(--primary); font-weight: 700; }
.att-day.empty   { cursor: default; }

/* ============================================================
   CHARTS CONTAINER
   ============================================================ */
.chart-container { position: relative; }

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.mt-1 { margin-top:  4px; } .mt-2 { margin-top:  8px; } .mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; } .mt-5 { margin-top: 24px; } .mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 24px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.flex { display: flex; } .flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.w-100 { width: 100%; } .text-right { text-align: right; }
.text-center { text-align: center; } .fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; } .text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); } .text-success { color: var(--success); }
.text-danger { color: var(--danger); } .text-warning { color: var(--warning); }
.font-mono { font-family: 'Courier New', monospace; font-size: 12px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.info-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.info-item .info-label { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.info-item .info-value { font-size: 13.5px; color: var(--text-primary); font-weight: 600; margin-top: 2px; }

/* Pagination */
.pagination { display: flex; align-items: center; gap: 4px; list-style: none; }
.page-item .page-link {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px; font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all .15s;
}
.page-item .page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-item.active .page-link { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Section divider with title */
.section-title {
  font-size: 12px; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .1em;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.section-title::after {
  content: ''; flex: 1;
  height: 1px; background: var(--border);
}

/* Empty state */
.empty-state {
  text-align: center; padding: 48px 24px;
}
.empty-state i { font-size: 48px; color: var(--text-light); display: block; margin-bottom: 12px; }
.empty-state h3 { font-size: 15px; font-weight: 600; color: var(--text-secondary); }
.empty-state p  { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* Loading spinner */
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid rgba(26,86,219,.2); border-top-color: var(--primary); border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Tooltip */
[data-tip] { position: relative; cursor: pointer; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--text-primary); color: #fff;
  font-size: 11px; white-space: nowrap; padding: 4px 10px;
  border-radius: var(--radius-sm); pointer-events: none;
  opacity: 0; transition: opacity .15s; z-index: 9999;
}
[data-tip]:hover::after { opacity: 1; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0c1e3c 0%, #1a3a6e 50%, #0c1e3c 100%);
  position: relative; overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 80%, rgba(26,86,219,.15) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(6,182,212,.1) 0%, transparent 50%);
}
.login-card {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 48px 44px;
  width: 100%; max-width: 440px;
  box-shadow: 0 40px 80px rgba(0,0,0,.3);
  position: relative;
}
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo .icon {
  width: 60px; height: 60px;
  background: var(--primary);
  border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 800; font-size: 22px; color: #fff;
  margin-bottom: 12px;
}
.login-logo h1 { font-family: 'Poppins', sans-serif; font-size: 22px; font-weight: 800; color: var(--text-primary); }
.login-logo p  { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.login-demo { background: var(--primary-light); border: 1px solid #bfdbfe; border-radius: var(--radius); padding: 10px 14px; font-size: 12px; color: var(--primary); margin-bottom: 20px; }
.login-demo strong { display: block; margin-bottom: 2px; }

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  .sidebar, .topbar, .btn, .page-header .ph-right { display: none !important; }
  .main-area { margin-left: 0 !important; }
  .page-content { padding: 0 !important; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1280px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin-left: 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
