/* ============================================================
   PeopleCore HRM — Main Stylesheet
   Font: Outfit (headings) + DM Sans (body)
   Theme: Deep navy sidebar + clean white content
   ============================================================ */

:root {
  --navy:        #0f172a;
  --navy-mid:    #1e293b;
  --navy-light:  #334155;
  --accent:      #3b82f6;
  --accent-dark: #2563eb;
  --accent-soft: #eff6ff;
  --violet:      #8b5cf6;
  --emerald:     #10b981;
  --amber:       #f59e0b;
  --rose:        #f43f5e;
  --success:     #22c55e;
  --warning:     #f59e0b;
  --danger:      #ef4444;

  --bg:          #f1f5f9;
  --surface:     #ffffff;
  --border:      #e2e8f0;
  --border-dark: #cbd5e1;

  --text:        #0f172a;
  --text-muted:  #64748b;
  --text-light:  #94a3b8;

  --sidebar-w:   260px;
  --topbar-h:    64px;
  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.12);

  --font-head:   'Outfit', sans-serif;
  --font-body:   'DM Sans', sans-serif;
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button, input, select, textarea { font-family: var(--font-body); }

/* ── Scrollbar ─────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 3px; }

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

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 16px;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
  white-space: nowrap;
}

.sidebar-toggle {
  background: none; border: none;
  color: var(--text-light);
  cursor: pointer; font-size: 16px;
  padding: 4px;
  border-radius: 6px;
  transition: color .2s;
}
.sidebar-toggle:hover { color: #fff; }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-light);
  padding: 12px 10px 4px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0.6;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: #94a3b8;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all .18s ease;
  white-space: nowrap;
}
.nav-item i { width: 18px; text-align: center; font-size: 15px; flex-shrink: 0; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); text-decoration: none; }
.nav-item.active { color: #fff; background: var(--accent); box-shadow: 0 4px 12px rgba(59,130,246,.4); }

.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  overflow: hidden;
}

.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.user-info { overflow: hidden; }
.user-name { color: #fff; font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { color: #64748b; font-size: 0.72rem; text-transform: capitalize; white-space: nowrap; }

.btn-logout {
  background: none; border: none;
  color: #64748b; cursor: pointer;
  font-size: 15px; padding: 6px;
  border-radius: 6px; transition: color .2s;
  flex-shrink: 0;
}
.btn-logout:hover { color: var(--rose); }

/* ── Sidebar collapsed ───────────────────── */
.sidebar.collapsed { width: 64px !important; }
.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .user-info { display: none !important; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 10px !important; }
.sidebar.collapsed .nav-item i { width: auto; }

/* REMOVED: .sidebar.collapsed + .main-wrapper { margin-left: 64px; }
   NOTE: Margin-left is now controlled by JavaScript inline styles in main.js
This prevents CSS/JS conflicts and ensures consistency across all navigation. */

/* Force sidebar always expanded on Team Leaders and Users pages */
.sidebar:not(.collapsed) .nav-section-label,
.sidebar:not(.collapsed) .nav-item span,
.sidebar:not(.collapsed) .user-info {
  display: block !important;
  visibility: visible !important;
}

/* ============================================================
   MAIN WRAPPER
   ============================================================ */
.main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left .25s ease;
}

/* ── Topbar ────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left { display: flex; align-items: center; gap: 16px; }

.menu-btn {
  background: none; border: none;
  color: var(--text-muted); cursor: pointer;
  font-size: 18px; padding: 4px;
  border-radius: 6px; display: none;
}

.page-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.topbar-right { display: flex; align-items: center; gap: 16px; }

.topbar-date {
  color: var(--text-muted);
  font-size: 0.82rem;
  display: flex; align-items: center; gap: 6px;
}

/* ── Toasts ────────────────────────────────── */
.toast {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  animation: slideIn .3s ease;
}
.toast-success { background: #dcfce7; color: #166534; }
.toast-error   { background: #fee2e2; color: #991b1b; }

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

/* ── Content ───────────────────────────────── */
.content {
  flex: 1;
  padding: 28px 28px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* ============================================================
   TYPOGRAPHY HELPERS
   ============================================================ */
.fw-500   { font-weight: 500; }
.fw-600   { font-weight: 600; }
.text-muted { color: var(--text-muted); }
.text-sm  { font-size: 0.8rem; }
.text-center { text-align: center; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }
.mt-2 { margin-top: .75rem; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.card-header h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.card-body { padding: 20px; }

.link-muted {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
}
.link-muted:hover { color: var(--accent); text-decoration: none; }

/* ============================================================
   DASHBOARD
   ============================================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

/* Stats Row — spans full width */
.stats-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.stat-card::after {
  content: '';
  position: absolute;
  right: -10px; top: -10px;
  width: 80px; height: 80px;
  border-radius: 50%;
  opacity: .08;
}

.stat-blue  { border-left: 4px solid var(--accent); }
.stat-blue .stat-icon  { background: var(--accent-soft); color: var(--accent); }
.stat-blue::after  { background: var(--accent); }

.stat-violet { border-left: 4px solid var(--violet); }
.stat-violet .stat-icon { background: #f5f3ff; color: var(--violet); }
.stat-violet::after { background: var(--violet); }

.stat-amber  { border-left: 4px solid var(--amber); }
.stat-amber .stat-icon  { background: #fffbeb; color: var(--amber); }
.stat-amber::after  { background: var(--amber); }

.stat-emerald { border-left: 4px solid var(--emerald); }
.stat-emerald .stat-icon { background: #ecfdf5; color: var(--emerald); }
.stat-emerald::after { background: var(--emerald); }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.stat-body { flex: 1; }
.stat-value {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.stat-trend {
  position: absolute;
  top: 12px; right: 14px;
  font-size: 0.72rem;
  color: var(--emerald);
  font-weight: 600;
  display: flex; align-items: center; gap: 3px;
}
.stat-trend.pending { color: var(--amber); }

/* ── Attendance Today ─────────────────────── */
.attendance-today { padding-top: 0; }
.att-circles {
  display: flex;
  justify-content: space-around;
  padding: 20px;
}
.att-circle {
  text-align: center;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
}
.att-present { background: #ecfdf5; }
.att-absent  { background: #fff1f2; }
.att-leave   { background: #eff6ff; }
.att-half    { background: #fffbeb; }

.circle-val {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
}
.att-present .circle-val { color: var(--emerald); }
.att-absent  .circle-val { color: var(--rose); }
.att-leave   .circle-val { color: var(--accent); }
.att-half    .circle-val { color: var(--amber); }

.circle-lbl { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; font-weight: 500; }

/* ── People List ──────────────────────────── */
.people-list { padding: 8px 0; }
.person-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.person-row:last-child { border-bottom: none; }
.person-row:hover { background: var(--bg); }

.person-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.82rem;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.person-avatar img { width: 100%; height: 100%; object-fit: cover; }
.person-info { flex: 1; }
.person-name { font-weight: 600; font-size: 0.9rem; }
.person-meta { font-size: 0.77rem; color: var(--text-muted); margin-top: 1px; }
.person-date { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }

/* ── Payroll Card ─────────────────────────── */
.payroll-card .card-body { padding: 20px; }
.payroll-stats { display: flex; gap: 24px; padding: 20px; }
.pay-stat { flex: 1; }
.pay-val {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
}
.pay-lbl { font-size: 0.78rem; color: var(--text-muted); margin-top: 3px; }
.generate-form { padding: 0 20px 20px; }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}
.page-header h2 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}
.page-sub { color: var(--text-muted); font-size: 0.85rem; margin-top: 3px; }

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.filter-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.filter-form input[type="text"],
.filter-form select {
  height: 38px;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-size: 0.875rem;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color .2s;
}
.filter-form input[type="text"] { min-width: 220px; }
.filter-form input:focus,
.filter-form select:focus { border-color: var(--accent); }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrap { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.table th {
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table-hover tbody tr:hover td { background: #f8fafc; }

.emp-cell { display: flex; align-items: center; gap: 10px; }
.emp-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.emp-avatar img { width: 100%; height: 100%; object-fit: cover; }

.action-btns { display: flex; gap: 6px; }

code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.78rem;
  color: var(--accent-dark);
  font-family: monospace;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-green  { background: #dcfce7; color: #166534; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-blue   { background: #dbeafe; color: #1d4ed8; }
.badge-amber  { background: #fef3c7; color: #92400e; }
.badge-gray   { background: #f1f5f9; color: #475569; }
.badge-violet { background: #f5f3ff; color: #5b21b6; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .18s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59,130,246,.3);
}
.btn-primary:hover { background: var(--accent-dark); box-shadow: 0 4px 12px rgba(59,130,246,.4); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline:hover { background: var(--accent-soft); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border-dark);
}
.btn-ghost:hover { background: var(--bg); }

.btn-success {
  background: var(--emerald);
  color: #fff;
}
.btn-success:hover { background: #059669; }

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover { background: #dc2626; }

.btn-icon {
  width: 32px; height: 32px;
  padding: 0;
  justify-content: center;
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border-dark);
}
.btn-icon:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

.btn-sm  { padding: 6px 14px; font-size: 0.82rem; }
.btn-xs  { padding: 4px 10px; font-size: 0.76rem; }
.btn-full { width: 100%; justify-content: center; }

/* ============================================================
   FORMS
   ============================================================ */
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.form-grid-2 { grid-template-columns: repeat(2, 1fr); }
.form-col-full { grid-column: 1 / -1; }

.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
}
.form-section-header {
  background: var(--bg);
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  display: flex; align-items: center; gap: 10px;
}
.form-section-header i { color: var(--accent); }
.form-section-body { padding: 20px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.form-group input,
.form-group select,
.form-group textarea {
  height: 40px;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-size: 0.875rem;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.form-group textarea { height: auto; padding: 10px 12px; resize: vertical; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px 14px;
  margin-top: 6px;
}
.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 500;
}
.form-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--border);
}

.form-actions {
  display: flex;
  gap: 12px;
  padding: 20px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  justify-content: flex-end;
}

/* Icon input wrap */
.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon-wrap > i:first-child {
  position: absolute;
  left: 12px;
  color: var(--text-light);
  font-size: 14px;
  pointer-events: none;
}
.input-icon-wrap input {
  padding-left: 36px !important;
  width: 100%;
}
.eye-toggle {
  position: absolute;
  right: 10px;
  background: none; border: none;
  color: var(--text-light);
  cursor: pointer; font-size: 14px;
  padding: 4px;
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 16px;
}
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 32px 20px;
  color: var(--text-muted);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.empty-state i { font-size: 18px; opacity: .5; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-body {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

.login-split {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.login-brand {
  width: 44%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  position: relative;
  overflow: hidden;
}
.login-brand::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 300px; height: 300px;
  background: var(--accent);
  border-radius: 50%;
  opacity: .08;
}
.login-brand::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -60px;
  width: 260px; height: 260px;
  background: var(--violet);
  border-radius: 50%;
  opacity: .07;
}

.login-brand-inner { position: relative; z-index: 1; max-width: 360px; }

.brand-logo {
  width: 60px; height: 60px;
  background: var(--accent);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(59,130,246,.4);
}

.login-brand h1 {
  font-family: var(--font-head);
  font-size: 2.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}
.login-brand p {
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 32px;
}

.brand-features { display: flex; flex-direction: column; gap: 12px; }
.brand-feat {
  display: flex; align-items: center; gap: 10px;
  color: #cbd5e1;
  font-size: 0.9rem;
}
.brand-feat i { color: var(--emerald); }

.login-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: var(--surface);
}

.login-form-inner { width: 100%; max-width: 380px; }
.login-form-inner h2 {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.login-subtitle { color: var(--text-muted); margin-bottom: 28px; }

.login-form { display: flex; flex-direction: column; gap: 18px; }
.login-form .form-group { gap: 8px; }
.login-form .form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
}
.login-form .input-icon-wrap input {
  height: 46px;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}
.login-form .input-icon-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.login-form .btn-primary {
  height: 48px;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  margin-top: 4px;
}
.login-hint {
  margin-top: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

/* ============================================================
   DETAIL VIEW (Employee Profile)
   ============================================================ */
.profile-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: start;
}
.profile-card {
  text-align: center;
  padding: 28px 20px;
}
.profile-photo {
  width: 96px; height: 96px;
  border-radius: 50%;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  color: #fff;
  font-family: var(--font-head);
  font-size: 2rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
}
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; }
.profile-desig { color: var(--text-muted); font-size: 0.85rem; margin: 4px 0 12px; }
.profile-meta { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; text-align: left; }
.meta-row { display: flex; justify-content: space-between; font-size: 0.83rem; padding: 6px 0; border-bottom: 1px solid var(--border); }
.meta-row:last-child { border-bottom: none; }
.meta-key { color: var(--text-muted); }
.meta-val { font-weight: 500; }

.detail-tabs { display: flex; gap: 4px; margin-bottom: 16px; }
.tab-btn {
  padding: 8px 18px;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--surface);
  color: var(--text-muted);
  transition: all .18s;
}
.tab-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ============================================================
   KANBAN / PIPELINE (Recruitment)
   ============================================================ */
.pipeline {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.pipeline-col {
  min-width: 220px;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 12px;
  flex-shrink: 0;
}
.pipeline-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 0.85rem;
}
.pipeline-count {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.pipeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  font-size: 0.85rem;
}
.pipeline-card-name { font-weight: 600; margin-bottom: 4px; }
.pipeline-card-meta { color: var(--text-muted); font-size: 0.78rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-wrapper { margin-left: 0 !important; }
  .menu-btn { display: flex; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .content { padding: 16px; }
}


#mainWrapper {
  margin-left: 260px;
  transition: margin-left 0.3s ease;
}

#mainWrapper.sidebar-collapsed {
  margin-left: 64px;
}