@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

/* PAGE BACKGROUND - clearly different from white cards */
body {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #1E293B;
  background-color: #CDD5E0;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

a { color: #4F46E5; text-decoration: none; }
a:hover { text-decoration: none; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #CDD5E0; }
::-webkit-scrollbar-thumb { background: #94A3B8; border-radius: 10px; }

/* LAYOUT */
.app-layout { display: flex; min-height: 100vh; }

/* SIDEBAR */
.sidebar {
  width: 250px;
  background: linear-gradient(180deg, #3730A3 0%, #2D2A6E 60%, #1E1B4B 100%);
  height: 100vh;
  position: fixed; top: 0; left: 0; z-index: 100;
  display: flex; flex-direction: column;
  transition: width 0.3s ease;
  overflow: hidden;
  box-shadow: 4px 0 20px rgba(30,27,75,0.5);
}
.sidebar.collapsed { width: 68px; }

.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px; height: 64px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  flex-shrink: 0;
}
.krr-logo-wrap {
  width: 40px; height: 40px; border-radius: 10px;
  flex-shrink: 0; overflow: hidden;
  background: #FFFFFF;
  border: 2px solid rgba(255,255,255,0.4);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.krr-logo-wrap img { width: 36px; height: 36px; object-fit: contain; display: block; }
.brand-text { overflow: hidden; white-space: nowrap; }
.brand-name { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 17px; font-weight: 800; color: #FFFFFF; display: block; line-height: 1.2; }
.brand-name span { color: #A5B4FC; }
.brand-sub { font-size: 10px; color: rgba(255,255,255,0.5); letter-spacing: 1px; text-transform: uppercase; }

.sidebar-section {
  font-size: 10px; font-weight: 700; letter-spacing: 1.8px;
  text-transform: uppercase; color: rgba(255,255,255,0.4);
  padding: 18px 18px 5px; white-space: nowrap; overflow: hidden;
}
.collapsed .sidebar-section { display: none; }

.sidebar-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; margin: 2px 8px;
  border-radius: 8px;
  color: rgba(255,255,255,0.72); font-size: 13px; font-weight: 500;
  cursor: pointer; text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap; overflow: hidden; position: relative;
}
.sidebar-item i { font-size: 15px; flex-shrink: 0; width: 20px; text-align: center; }
.sidebar-item:hover { background: rgba(255,255,255,0.14); color: #fff; text-decoration: none; }
.sidebar-item.active { background: rgba(129,140,248,0.28); color: #FFFFFF; font-weight: 600; border-left: 3px solid #A5B4FC; }
.sidebar-item.active i { color: #C7D2FE; }
.sidebar-badge { margin-left: auto; background: #EF4444; color: #fff; font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 20px; flex-shrink: 0; }
.collapsed .sidebar-item span, .collapsed .sidebar-badge, .collapsed .brand-text, .collapsed .sidebar-section { display: none; }
.collapsed .sidebar-item { justify-content: center; padding: 12px; }

.sidebar-profile {
  margin-top: 0; padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; transition: 0.2s; flex-shrink: 0;
}
.sidebar-profile:hover { background: rgba(255,255,255,0.08); }
.sp-avatar { width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0; overflow: hidden; }
.sp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sp-name { font-size: 13px; font-weight: 600; color: #FFFFFF; white-space: nowrap; }
.sp-role { font-size: 10px; color: rgba(255,255,255,0.5); }
.collapsed .sp-name, .collapsed .sp-role { display: none; }

/* MAIN AREA */
.main-area { margin-left: 250px; flex: 1; display: flex; flex-direction: column; transition: margin-left 0.3s ease; min-height: 100vh; }
.main-area.collapsed { margin-left: 68px; }

/* TOPBAR */
.topbar {
  height: 64px; background: #FFFFFF;
  border-bottom: 2px solid #B8C4D8;
  display: flex; align-items: center; padding: 0 24px;
  position: sticky; top: 0; z-index: 50; gap: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}
.topbar-toggle { width: 36px; height: 36px; border-radius: 8px; border: 2px solid #B8C4D8; background: #fff; color: #475569; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 15px; transition: 0.2s; flex-shrink: 0; }
.topbar-toggle:hover { border-color: #4F46E5; color: #4F46E5; background: #EEF2FF; }

.topbar-search { display: flex; align-items: center; gap: 8px; background: #F1F5F9; border: 2px solid #B8C4D8; border-radius: 8px; padding: 8px 14px; flex: 0 0 260px; transition: 0.2s; }
.topbar-search:focus-within { border-color: #4F46E5; background: #fff; }
.topbar-search input { border: none; background: none; color: #1E293B; font-family: 'Inter', sans-serif; font-size: 13px; outline: none; width: 100%; }
.topbar-search input::placeholder { color: #94A3B8; }
.topbar-search i { color: #94A3B8; font-size: 13px; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* CLOCK FIX - explicit colors no variables */
.topbar-time { font-size: 12px; font-weight: 500; color: #475569; background: #F1F5F9; border: 2px solid #B8C4D8; border-radius: 8px; padding: 6px 12px; white-space: nowrap; }
.live-date { color: #475569; font-weight: 500; }
.live-time { color: #4F46E5; font-weight: 700; }
.t-time { color: #4F46E5; font-weight: 700; }

.icon-btn { width: 36px; height: 36px; border-radius: 8px; background: #fff; border: 2px solid #B8C4D8; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #475569; transition: all 0.2s; position: relative; }
.icon-btn:hover { border-color: #4F46E5; color: #4F46E5; background: #EEF2FF; }
.notif-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; background: #EF4444; border-radius: 50%; border: 2px solid #fff; }

.topbar-avatar { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 10px 4px 4px; background: #F1F5F9; border: 2px solid #B8C4D8; border-radius: 8px; transition: 0.2s; }
.topbar-avatar:hover { border-color: #4F46E5; background: #EEF2FF; }
.ta-img { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, #4F46E5, #3730A3); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; overflow: hidden; }
.ta-img img { width: 100%; height: 100%; object-fit: cover; }
.ta-name { font-size: 12px; font-weight: 600; color: #0F172A; }
.ta-role { font-size: 10px; color: #94A3B8; }

/* PAGE CONTENT */
.page-content { flex: 1; padding: 24px 28px; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 12px; }
.page-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 22px; font-weight: 800; color: #0F172A; }
.page-sub { font-size: 13px; color: #475569; margin-top: 3px; }

/* WELCOME BANNER */
.welcome-banner {
  background: linear-gradient(135deg, #4F46E5 0%, #3730A3 100%);
  border-radius: 20px; padding: 28px 32px;
  margin-bottom: 22px; color: #fff; position: relative; overflow: hidden;
  box-shadow: 0 8px 24px rgba(79,70,229,0.4);
}
.welcome-banner::before { content: ''; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,0.07); top: -60px; right: -40px; }
.welcome-banner::after  { content: ''; position: absolute; width: 140px; height: 140px; border-radius: 50%; background: rgba(255,255,255,0.05); bottom: -40px; right: 200px; }
.wb-inner { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.wb-label { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,0.7); margin-bottom: 8px; }
.wb-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 26px; font-weight: 800; color: #FFFFFF; margin-bottom: 6px; }
.wb-sub { font-size: 13px; color: rgba(255,255,255,0.82); }
.wb-bar-wrap { background: rgba(255,255,255,0.22); border-radius: 100px; height: 7px; margin-top: 16px; max-width: 320px; }
.wb-bar { height: 100%; border-radius: 100px; background: #FCD34D; transition: width 1.2s ease; }
.wb-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.wb-stat { text-align: center; background: rgba(255,255,255,0.17); border-radius: 12px; padding: 14px 20px; border: 1px solid rgba(255,255,255,0.22); }
.wb-stat-val { font-size: 28px; font-weight: 800; font-family: 'Plus Jakarta Sans', sans-serif; color: #FFFFFF; }
.wb-stat-lbl { font-size: 11px; color: rgba(255,255,255,0.72); margin-top: 3px; font-weight: 500; }

/* ===================================================
   STAT CARDS — WHITE on GRAY-BLUE background
   High contrast, heavy border, strong shadow
   =================================================== */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 18px; margin-bottom: 24px; }

.stat-card {
  background: #FFFFFF !important;
  border-radius: 16px;
  border-left: 5px solid #4F46E5;
  border-top: 1px solid #B8C4D8;
  border-right: 1px solid #B8C4D8;
  border-bottom: 1px solid #B8C4D8;
  padding: 20px 18px 18px;
  cursor: pointer; position: relative; overflow: hidden;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15), 0 1px 4px rgba(0,0,0,0.1);
}
.stat-card:hover { transform: translateY(-5px); box-shadow: 0 12px 32px rgba(0,0,0,0.18); }

/* Left border colors per type */
.stat-card.indigo  { border-left-color: #4F46E5; }
.stat-card.emerald { border-left-color: #059669; }
.stat-card.rose    { border-left-color: #DC2626; }
.stat-card.amber   { border-left-color: #D97706; }
.stat-card.cyan    { border-left-color: #0891B2; }
.stat-card.violet  { border-left-color: #7C3AED; }

/* Hover glow per type */
.stat-card.indigo:hover  { box-shadow: 0 12px 32px rgba(79,70,229,0.25); }
.stat-card.emerald:hover { box-shadow: 0 12px 32px rgba(5,150,105,0.25); }
.stat-card.rose:hover    { box-shadow: 0 12px 32px rgba(220,38,38,0.25); }
.stat-card.amber:hover   { box-shadow: 0 12px 32px rgba(217,119,6,0.25); }
.stat-card.cyan:hover    { box-shadow: 0 12px 32px rgba(8,145,178,0.25); }

.stat-label { font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: #475569; margin-bottom: 10px; }
.stat-value { font-size: 36px; font-weight: 800; font-family: 'Plus Jakarta Sans', sans-serif; color: #0F172A; line-height: 1; margin-bottom: 8px; }
.stat-change { font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.stat-change.up   { color: #059669; }
.stat-change.down { color: #DC2626; }
.stat-change.neutral { color: #475569; }

.stat-icon { position: absolute; top: 18px; right: 16px; width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; transition: all 0.3s; }
.stat-card:hover .stat-icon { transform: scale(1.1) rotate(-6deg); }
.stat-card.indigo  .stat-icon { background: #EEF2FF; color: #4F46E5; }
.stat-card.emerald .stat-icon { background: #D1FAE5; color: #059669; }
.stat-card.rose    .stat-icon { background: #FEE2E2; color: #DC2626; }
.stat-card.amber   .stat-icon { background: #FEF3C7; color: #D97706; }
.stat-card.cyan    .stat-icon { background: #CFFAFE; color: #0891B2; }
.stat-card.violet  .stat-icon { background: #EDE9FE; color: #7C3AED; }

/* ===================================================
   ALL OTHER CARDS — white on gray-blue
   =================================================== */
.card {
  background: #FFFFFF !important;
  border-radius: 16px;
  border: 1px solid #B8C4D8;
  padding: 22px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transition: all 0.2s;
}
.card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.card-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 15px; font-weight: 700; color: #0F172A; margin-bottom: 4px; }
.card-sub   { font-size: 12px; color: #475569; margin-bottom: 18px; }

/* CHART CARDS */
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-bottom: 22px; }
.chart-card { background: #FFFFFF !important; border-radius: 16px; border: 1px solid #B8C4D8; padding: 22px; box-shadow: 0 4px 16px rgba(0,0,0,0.12); transition: 0.2s; }
.chart-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.chart-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; font-weight: 700; color: #0F172A; margin-bottom: 2px; }
.chart-sub   { font-size: 11px; color: #475569; margin-bottom: 18px; }

/* TABLE CARDS */
.table-card { background: #FFFFFF !important; border-radius: 16px; border: 1px solid #B8C4D8; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.table-toolbar { padding: 14px 20px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-bottom: 2px solid #B8C4D8; background: #F1F5F9; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: #475569; padding: 12px 16px; text-align: left; background: #F1F5F9; border-bottom: 2px solid #B8C4D8; }
.data-table td { font-size: 13px; padding: 13px 16px; border-bottom: 1px solid #E2E8F0; color: #1E293B; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: #F8FAFC; }

/* QUICK ACTIONS */
.quick-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; margin-bottom: 22px; }
.quick-btn { background: #FFFFFF !important; border: 1px solid #B8C4D8; border-radius: 16px; padding: 18px 12px; text-align: center; cursor: pointer; transition: all 0.25s ease; text-decoration: none; display: block; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.quick-btn:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); border-color: #4F46E5; text-decoration: none; }
.quick-btn:hover .q-icon { transform: scale(1.12) rotate(-5deg); }
.quick-btn:hover p { color: #4F46E5; }
.q-icon { width: 46px; height: 46px; border-radius: 13px; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; font-size: 19px; transition: all 0.25s; }
.quick-btn p { font-size: 12px; font-weight: 600; color: #475569; }

/* BADGES */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-present,.badge-active,.badge-approved,.badge-paid,.badge-online,.badge-success { background: #D1FAE5; color: #065F46; }
.badge-absent,.badge-danger,.badge-rejected,.badge-terminated,.badge-offline { background: #FEE2E2; color: #991B1B; }
.badge-leave,.badge-lav,.badge-in_progress { background: #EEF2FF; color: #3730A3; }
.badge-pending,.badge-warning,.badge-draft { background: #FEF3C7; color: #92400E; }
.badge-late,.badge-info { background: #CFFAFE; color: #155E75; }
.badge-dept { background: #EEF2FF; color: #3730A3; font-size: 11px; padding: 3px 9px; border-radius: 6px; font-weight: 500; }
.badge-critical,.badge-high { background: #FEE2E2; color: #991B1B; }
.badge-medium { background: #FEF3C7; color: #92400E; }
.badge-low    { background: #D1FAE5; color: #065F46; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; border-radius: 8px; font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; text-decoration: none; white-space: nowrap; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: #4F46E5; color: #fff; box-shadow: 0 4px 12px rgba(79,70,229,0.35); }
.btn-primary:hover { background: #3730A3; color: #fff; box-shadow: 0 6px 18px rgba(79,70,229,0.45); }
.btn-outline { background: #fff; border: 2px solid #B8C4D8; color: #475569; }
.btn-outline:hover { border-color: #4F46E5; color: #4F46E5; background: #EEF2FF; }
.btn-danger  { background: #FEE2E2; color: #DC2626; border: 2px solid #FECACA; }
.btn-danger:hover  { background: #DC2626; color: #fff; border-color: #DC2626; }
.btn-success { background: #D1FAE5; color: #059669; border: 2px solid #A7F3D0; }
.btn-success:hover { background: #059669; color: #fff; border-color: #059669; }
.btn-sm   { padding: 6px 13px; font-size: 12px; }
.btn-lg   { padding: 12px 26px; font-size: 14px; }
.btn-full { width: 100%; justify-content: center; }

/* FORMS */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form-label { font-size: 12px; font-weight: 600; color: #1E293B; }
.form-label .req { color: #DC2626; }
.form-control { padding: 10px 13px; border: 2px solid #B8C4D8; border-radius: 8px; font-family: 'Inter', sans-serif; font-size: 13px; color: #1E293B; outline: none; background: #fff; transition: all 0.2s; }
.form-control:focus { border-color: #4F46E5; box-shadow: 0 0 0 3px rgba(79,70,229,0.12); }
.form-control::placeholder { color: #94A3B8; }
select.form-control option { background: #fff; color: #1E293B; }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row.col-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-hint  { font-size: 11px; color: #94A3B8; }
.form-error { font-size: 11px; color: #DC2626; }

/* ALERTS */
.alert { padding: 13px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; display: flex; align-items: center; gap: 10px; font-weight: 500; }
.alert-success { background: #D1FAE5; color: #065F46; border: 2px solid #6EE7B7; }
.alert-danger  { background: #FEE2E2; color: #991B1B; border: 2px solid #FCA5A5; }
.alert-warning { background: #FEF3C7; color: #92400E; border: 2px solid #FCD34D; }
.alert-info    { background: #EEF2FF; color: #3730A3; border: 2px solid #C7D2FE; }

/* PROGRESS */
.progress-bar-wrap { background: #CBD5E1; border-radius: 100px; height: 7px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 100px; transition: width 1s ease; }

/* EMP CELLS */
.emp-cell { display: flex; align-items: center; gap: 10px; }
.emp-avatar { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0; overflow: hidden; }
.emp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.emp-name { font-weight: 600; font-size: 13px; color: #0F172A; }
.emp-role-text { font-size: 11px; color: #475569; }

/* NOTIF PANEL */
.notif-panel { position: absolute; top: 50px; right: 0; width: 340px; background: #fff; border: 2px solid #B8C4D8; border-radius: 16px; box-shadow: 0 16px 40px rgba(0,0,0,0.2); z-index: 200; display: none; animation: slideDown 0.2s ease; }
.notif-panel.open { display: block; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.notif-panel-header { padding: 14px 16px; border-bottom: 2px solid #E2E8F0; display: flex; align-items: center; justify-content: space-between; background: #F1F5F9; border-radius: 14px 14px 0 0; }
.notif-panel-title  { font-size: 13px; font-weight: 700; color: #0F172A; }
.notif-mark-read    { font-size: 11px; color: #4F46E5; cursor: pointer; font-weight: 600; }
.notif-item { display: flex; gap: 11px; align-items: flex-start; padding: 12px 16px; border-bottom: 1px solid #E2E8F0; cursor: pointer; transition: 0.15s; }
.notif-item:hover { background: #F8FAFC; }
.notif-item-dot   { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.notif-item-title { font-size: 12px; font-weight: 600; color: #0F172A; margin-bottom: 2px; }
.notif-item-body  { font-size: 11px; color: #475569; }
.notif-item-time  { font-size: 10px; color: #94A3B8; margin-top: 3px; }
.notif-footer { padding: 12px 16px; text-align: center; }
.notif-footer a { font-size: 12px; color: #4F46E5; font-weight: 600; }

/* STEP FORM */
.step-indicators { display: flex; gap: 0; margin-bottom: 28px; }
.step-indicator { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; position: relative; }
.step-indicator::before { content: ''; position: absolute; top: 16px; right: -50%; width: 100%; height: 2px; background: #B8C4D8; z-index: 0; }
.step-indicator:last-child::before { display: none; }
.step-indicator.completed::before { background: #059669; }
.step-num { width: 32px; height: 32px; border-radius: 50%; background: #E2E8F0; color: #475569; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; position: relative; z-index: 1; transition: 0.3s; border: 2px solid #B8C4D8; }
.step-indicator.active .step-num    { background: #4F46E5; color: #fff; border-color: #4F46E5; box-shadow: 0 0 0 4px rgba(79,70,229,0.15); }
.step-indicator.completed .step-num { background: #059669; color: #fff; border-color: #059669; }
.step-label { font-size: 11px; font-weight: 600; color: #475569; text-align: center; }
.step-indicator.active .step-label { color: #4F46E5; }
.step-panel { display: none; }
.step-panel.active { display: block; }

/* UPLOAD ZONE */
.upload-zone { border: 2px dashed #94A3B8; border-radius: 12px; background: #F1F5F9; text-align: center; padding: 22px 14px; position: relative; cursor: pointer; transition: 0.25s; }
.upload-zone:hover, .upload-zone.drag-on { border-color: #4F46E5; background: #EEF2FF; }
.upload-zone.done { border-color: #059669; background: #D1FAE5; }
.upload-zone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 5; }
.uz-body  { pointer-events: none; }
.uz-icon  { font-size: 26px; color: #94A3B8; margin-bottom: 7px; }
.uz-main  { font-size: 12px; font-weight: 600; color: #475569; }
.uz-hint  { font-size: 11px; color: #94A3B8; margin-top: 3px; }
.uz-img   { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 2px solid #B8C4D8; margin-bottom: 4px; }
.uz-name  { font-size: 11px; color: #059669; font-weight: 600; word-break: break-all; padding: 0 4px; }

/* CALENDAR */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-day-label { font-size: 10px; font-weight: 700; color: #94A3B8; text-align: center; padding: 6px 0; }
.cal-day { aspect-ratio: 1; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 500; color: #475569; cursor: pointer; transition: 0.15s; }
.cal-day:hover  { background: #EEF2FF; color: #4F46E5; }
.cal-day.present{ background: #D1FAE5; color: #065F46; }
.cal-day.absent { background: #FEE2E2; color: #991B1B; }
.cal-day.leave  { background: #EEF2FF; color: #3730A3; }
.cal-day.today  { background: #4F46E5; color: #fff; font-weight: 700; }
.cal-day.holiday{ background: #FEF3C7; color: #92400E; }
.cal-day.weekend{ color: #CBD5E1; }
.cal-day.empty  { visibility: hidden; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.leg-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #475569; }
.leg-dot  { width: 8px; height: 8px; border-radius: 3px; }

/* CHAT */
.chat-messages { padding: 16px; max-height: 380px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.msg-wrap { display: flex; flex-direction: column; }
.msg-wrap.sent { align-items: flex-end; }
.msg-wrap.recv { align-items: flex-start; }
.msg-bubble { max-width: 72%; padding: 11px 15px; border-radius: 14px; font-size: 13px; line-height: 1.5; }
.msg-wrap.sent .msg-bubble { background: #4F46E5; color: #fff; border-bottom-right-radius: 3px; }
.msg-wrap.recv .msg-bubble { background: #F1F5F9; color: #1E293B; border-bottom-left-radius: 3px; border: 1px solid #B8C4D8; }
.msg-meta { font-size: 10px; color: #94A3B8; margin-top: 4px; }

/* PAYSLIP */
.payslip-wrapper { background: #fff; border: 2px solid #B8C4D8; border-radius: 16px; max-width: 680px; box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.payslip-header  { padding: 26px; border-bottom: 2px solid #B8C4D8; display: flex; justify-content: space-between; background: linear-gradient(135deg, #EEF2FF, #DBEAFE); border-radius: 14px 14px 0 0; }
.payslip-company { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 20px; font-weight: 800; color: #0F172A; }
.payslip-body    { padding: 24px 26px; }
.payslip-section-title { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #475569; margin-bottom: 12px; }
.payslip-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid #E2E8F0; font-size: 13px; color: #1E293B; }
.payslip-row:last-child { border-bottom: none; }
.payslip-total { background: linear-gradient(135deg, #4F46E5, #3730A3); border-radius: 12px; padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.payslip-total-label { color: rgba(255,255,255,0.85); font-size: 14px; }
.payslip-total-value { color: #fff; font-size: 28px; font-weight: 800; }

/* EMPLOYEE SIDEBAR */
.emp-sidebar { background: linear-gradient(180deg, #0F766E 0%, #0D6460 50%, #134E4A 100%) !important; }
.emp-sidebar .sidebar-item.active { background: rgba(110,231,183,0.2) !important; border-left-color: #6EE7B7 !important; }
.emp-sidebar .sidebar-item.active i { color: #6EE7B7 !important; }
.emp-sidebar .brand-name span { color: #6EE7B7 !important; }

/* UTILITIES */
.d-flex { display: flex; } .align-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-6{gap:6px;} .gap-8{gap:8px;} .gap-10{gap:10px;} .gap-12{gap:12px;} .gap-14{gap:14px;} .gap-16{gap:16px;} .gap-20{gap:20px;}
.mb-0{margin-bottom:0;} .mb-12{margin-bottom:12px;} .mb-18{margin-bottom:18px;} .mb-24{margin-bottom:24px;} .mb-28{margin-bottom:28px;}
.mt-12{margin-top:12px;} .mt-16{margin-top:16px;}
.text-muted { color: #475569; } .text-sm { font-size: 12px; } .fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; } .text-right { text-align: right; }
.color-blue   { color: #4F46E5; } .color-orange { color: #D97706; } .color-green { color: #059669; } .color-red { color: #DC2626; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.full-col { grid-column: 1 / -1; }

/* RESPONSIVE */

/* ============================================================
   COMPLETE RESPONSIVE SYSTEM — Mobile First
   Breakpoints: 480 | 640 | 768 | 1024 | 1280
   ============================================================ */

/* ── OVERLAY for mobile sidebar ── */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 99;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* ── MOBILE BOTTOM NAV ── */
.mobile-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #FFFFFF;
  border-top: 2px solid #B8C4D8;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.1);
  z-index: 200;
  padding: 6px 0 env(safe-area-inset-bottom, 6px);
}
.mobile-nav-inner {
  display: flex; justify-content: space-around; align-items: center;
}
.mobile-nav-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 6px 10px; text-decoration: none;
  color: #94A3B8; font-size: 10px; font-weight: 600;
  border-radius: 10px; transition: all .2s; min-width: 52px;
}
.mobile-nav-item i { font-size: 18px; }
.mobile-nav-item.active, .mobile-nav-item:hover { color: #4F46E5; }
.mobile-nav-item.emp-active { color: #059669; }
.mobile-nav-item .mn-badge {
  position: absolute; top: 3px; right: 8px;
  background: #EF4444; color: #fff;
  font-size: 9px; font-weight: 700;
  padding: 1px 5px; border-radius: 20px;
}

/* ── TOPBAR HAMBURGER (mobile only) ── */
.topbar-hamburger {
  display: none;
  width: 36px; height: 36px; border-radius: 8px;
  border: 2px solid #B8C4D8; background: #fff;
  color: #475569; cursor: pointer;
  align-items: center; justify-content: center;
  font-size: 15px; transition: .2s; flex-shrink: 0;
}

/* ── TABLE RESPONSIVE WRAPPER ── */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0 0 16px 16px;
}
.table-responsive .data-table { min-width: 640px; }

/* ── SCROLLBAR HIDE on mobile ── */
@media (max-width: 768px) {
  .table-responsive::-webkit-scrollbar { height: 4px; }
  .table-responsive::-webkit-scrollbar-track { background: #F1F5F9; }
  .table-responsive::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 10px; }
}

/* ============================================================
   1280px+ — Large desktops (default, nothing to override)
   ============================================================ */

/* ============================================================
   1024px — Laptops / Small desktops
   ============================================================ */
@media (max-width: 1024px) {
  .chart-grid { grid-template-columns: 1fr 1fr; }
  .feat-grid  { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   900px — iPad Landscape
   ============================================================ */
@media (max-width: 900px) {
  :root { --sidebar-w: 220px; }
  .chart-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
}

/* ============================================================
   768px — Tablets (iPad portrait, Android tablets)
   ============================================================ */
@media (max-width: 768px) {
  :root { --sidebar-w: 260px; }

  /* Sidebar becomes a drawer */
  .sidebar {
    transform: translateX(-100%);
    transition: transform .3s ease;
    width: 260px !important;
    z-index: 100;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  /* Show all text again (was hidden for collapsed) */
  .sidebar .sidebar-section,
  .sidebar .sidebar-item span,
  .sidebar .sidebar-badge,
  .sidebar .brand-text,
  .sidebar .sp-name,
  .sidebar .sp-role { display: block !important; }
  .sidebar .sidebar-item { justify-content: flex-start !important; padding: 10px 12px !important; }
  .sidebar .sidebar-brand { justify-content: flex-start !important; padding: 0 16px; }

  /* Main area fills full width */
  .main-area { margin-left: 0 !important; }

  /* Topbar adjustments */
  .topbar { padding: 0 14px; gap: 8px; }
  .topbar-search { display: none; }
  .topbar-hamburger { display: flex; }
  .topbar-time .live-date { display: none; }
  .topbar-time { padding: 6px 9px; font-size: 11px; }

  /* Page content */
  .page-content { padding: 14px 14px 80px; }
  .page-header { margin-bottom: 14px; gap: 8px; }
  .page-header .d-flex { flex-wrap: wrap; }
  .page-title { font-size: 18px; }
  .page-sub   { font-size: 12px; }

  /* Stat cards — 2 columns */
  .stat-cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-value { font-size: 28px; }
  .stat-icon  { width: 38px; height: 38px; font-size: 16px; top: 14px; right: 12px; }

  /* Cards and grids */
  .card { padding: 16px; }
  .chart-card { padding: 16px; }
  .chart-grid { grid-template-columns: 1fr; gap: 14px; }
  .grid-2 { grid-template-columns: 1fr; gap: 16px; }
  .grid-3 { grid-template-columns: 1fr; gap: 16px; }

  /* Form rows all stack */
  .form-row,
  .form-row.col-3 { grid-template-columns: 1fr; gap: 0; }

  /* Quick actions */
  .quick-actions { grid-template-columns: repeat(4, 1fr); gap: 10px; }

  /* Tables */
  .table-card { border-radius: 14px; }
  .table-toolbar { padding: 12px 14px; flex-wrap: wrap; gap: 8px; }
  .data-table th,
  .data-table td { padding: 10px 12px; font-size: 12px; }

  /* Welcome banner */
  .welcome-banner { padding: 20px; border-radius: 16px; }
  .wb-title { font-size: 20px; }
  .wb-stats { gap: 8px; }
  .wb-stat { padding: 10px 14px; }
  .wb-stat-val { font-size: 20px; }

  /* Step indicators */
  .step-label { display: none; }

  /* Mobile nav show */
  .mobile-nav { display: block; }

  /* Hide desktop sidebar profile on mobile */
  .sidebar-profile { display: flex; }

  /* Topbar avatar compress */
  .ta-name, .ta-role { display: none; }
  .topbar-avatar { padding: 3px; }
}

/* ============================================================
   640px — Large phones (iPhone Pro Max, Samsung)
   ============================================================ */
@media (max-width: 640px) {
  /* Stat cards — 2 columns still */
  .stat-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px 12px 12px; }
  .stat-label { font-size: 10px; }
  .stat-value { font-size: 26px; }

  /* Quick actions 4 columns */
  .quick-actions { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .q-icon { width: 38px; height: 38px; font-size: 16px; }
  .quick-btn { padding: 12px 8px; }
  .quick-btn p { font-size: 10px; }

  /* Page header stack */
  .page-header { flex-direction: column; align-items: flex-start; }
  .page-header > .d-flex,
  .page-header > a,
  .page-header > button { align-self: flex-start; }

  /* Payslip */
  .payslip-header { flex-direction: column; gap: 12px; }
  .payslip-total { flex-direction: column; gap: 8px; text-align: center; }
  .payslip-total-value { font-size: 22px; }

  /* Chart smaller */
  .chart-card canvas { max-height: 180px; }

  /* Banner */
  .wb-stats { display: none; }
  .welcome-banner { padding: 16px 18px; }

  /* Table toolbar */
  .table-toolbar input[type="text"] { width: 100% !important; margin-left: 0 !important; }

  /* Buttons compact */
  .btn { padding: 8px 14px; font-size: 12px; }
  .btn-lg { padding: 11px 20px; font-size: 13px; }
}

/* ============================================================
   480px — Standard phones (iPhone, Pixel)
   ============================================================ */
@media (max-width: 480px) {
  .page-content { padding: 12px 12px 80px; }

  /* Cards single column */
  .stat-cards { grid-template-columns: 1fr 1fr; gap: 8px; }

  /* Quick actions 4 icons */
  .quick-actions { grid-template-columns: repeat(4, 1fr); gap: 6px; }

  /* Tables must scroll */
  .data-table th:nth-child(n+4),
  .data-table td:nth-child(n+4) { display: none; }

  /* Step numbers smaller */
  .step-num { width: 26px; height: 26px; font-size: 11px; }

  /* Topbar */
  .topbar { height: 56px; padding: 0 12px; }
  .topbar-time { display: none; }

  /* Notif panel width */
  .notif-panel { width: calc(100vw - 24px); right: -60px; }

  /* Upload zone */
  .upload-zone { padding: 18px 12px; }

  /* Modal full width */
  #nModal .card,
  [id$="Modal"] .card { width: 94vw !important; max-height: 88vh !important; padding: 20px 16px !important; margin: 0; }

  /* Calendar */
  .cal-day { font-size: 10px; border-radius: 6px; }
  .cal-day-label { font-size: 9px; }

  /* Chat bubbles */
  .msg-bubble { max-width: 88%; font-size: 12px; padding: 9px 12px; }

  /* Payslip grid */
  .payslip-body > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Profile banner */
  .page-content > div[style*="linear-gradient(135deg,#059669"] { padding: 16px !important; }
}

/* ============================================================
   FORCE ALL CARDS VISIBLE (no animation interference)
   ============================================================ */
.stat-card,
.card,
.chart-card,
.table-card,
.quick-btn {
  opacity: 1 !important;
  visibility: visible !important;
}
.stat-card:hover  { transform: translateY(-5px) !important; }
.quick-btn:hover  { transform: translateY(-4px) !important; }

/* Prevent horizontal overflow on mobile */
@media (max-width: 768px) {
  html, body { overflow-x: hidden; max-width: 100vw; }
  * { max-width: 100%; }
  img { max-width: 100%; height: auto; }
  table { word-break: break-word; }
}

/* ============================================================
   EMPLOYEE SIDEBAR — Force teal colors on all devices
   ============================================================ */
.emp-sidebar { background: linear-gradient(180deg, #0F766E 0%, #0D6460 50%, #134E4A 100%) !important; box-shadow: 4px 0 20px rgba(13,100,96,0.4) !important; }
.emp-sidebar .sidebar-section     { color: rgba(255,255,255,0.4) !important; }
.emp-sidebar .sidebar-item        { color: rgba(255,255,255,0.72) !important; }
.emp-sidebar .sidebar-item i      { color: rgba(255,255,255,0.72) !important; }
.emp-sidebar .sidebar-item:hover  { background: rgba(255,255,255,0.14) !important; color: #FFFFFF !important; }
.emp-sidebar .sidebar-item:hover i { color: #FFFFFF !important; }
.emp-sidebar .sidebar-item.active { background: rgba(110,231,183,0.22) !important; color: #FFFFFF !important; border-left: 3px solid #6EE7B7 !important; }
.emp-sidebar .sidebar-item.active i { color: #6EE7B7 !important; }
.emp-sidebar .sidebar-badge       { background: #F59E0B !important; color: #fff !important; }
.emp-sidebar .brand-name          { color: #FFFFFF !important; }
.emp-sidebar .brand-name span     { color: #6EE7B7 !important; }
.emp-sidebar .brand-sub           { color: rgba(255,255,255,0.5) !important; }
.emp-sidebar .sp-name             { color: #FFFFFF !important; }
.emp-sidebar .sp-role             { color: rgba(255,255,255,0.5) !important; }
.emp-sidebar .sidebar-profile     { border-top: 1px solid rgba(255,255,255,0.12) !important; }
.emp-sidebar .sidebar-profile:hover { background: rgba(255,255,255,0.08) !important; }

/* ============================================================
   HOMEPAGE RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .feat-grid { grid-template-columns: repeat(2,1fr); }
  .testi-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr !important; text-align: center; }
  .hero-visual { display: none; }
  .hero-title { font-size: 34px !important; }
  .hero-btns { justify-content: center; }
  .hero-stats { justify-content: center; }
  .about-inner { grid-template-columns: 1fr !important; }
  .testi-grid { grid-template-columns: 1fr; }
  .feat-grid { grid-template-columns: 1fr; }
  .login-cards { grid-template-columns: 1fr !important; }
  .nav-links { display: none; }
  .nav-inner { padding: 0 18px; }
  .sec-title { font-size: 26px !important; }
  .cta-title { font-size: 26px !important; }
  .footer-inner { flex-direction: column; gap: 14px; text-align: center; }
  .footer-links { justify-content: center; flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .nav-btns .btn-emp { display: none; }
  .hero { padding: 90px 18px 40px; }
  .sec { padding: 50px 18px; }
  .about-sec { padding: 50px 18px; }
  .cta-section { padding: 50px 18px; }
  .login-sec { padding: 50px 18px; }
  footer { padding: 30px 18px; }
}

/* Print styles */
@media print {
  .sidebar, .topbar, .mobile-nav, .sidebar-overlay, .no-print { display: none !important; }
  .main-area { margin-left: 0 !important; }
  .page-content { padding: 0 !important; }
  body { background: white !important; }
}

/* TOPBAR — desktop shows toggle button, mobile shows hamburger */
@media (min-width: 769px) {
  .topbar-hamburger { display: none !important; }
  .topbar-toggle { display: flex !important; }
}
@media (max-width: 768px) {
  .topbar-toggle { display: none !important; }
  .topbar-hamburger { display: flex !important; }
}

/* ══════════════════════════════════════════════════
   SIDEBAR SCROLL FIX
   The <nav> middle section takes remaining height
   and scrolls. Brand + Profile stay fixed.
   KEY: min-height:0 on nav allows flex shrinking.
   (Also set inline on <nav> in both header files)
══════════════════════════════════════════════════ */

.sidebar-brand  { flex-shrink: 0 !important; }
.sidebar-profile { flex-shrink: 0 !important; }

.sidebar nav,
.emp-sidebar nav {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.18) transparent;
}
.sidebar nav::-webkit-scrollbar,
.emp-sidebar nav::-webkit-scrollbar      { width: 3px; }
.sidebar nav::-webkit-scrollbar-track,
.emp-sidebar nav::-webkit-scrollbar-track { background: transparent; }
.sidebar nav::-webkit-scrollbar-thumb,
.emp-sidebar nav::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.22);
  border-radius: 3px;
}