/* =====================================================
   HR & Payroll Management System — Stylesheet
   ===================================================== */

:root {
    --bg: #0a0d14;
    --surface: #111520;
    --surface2: #161b2a;
    --border: #1e2638;
    --accent: #4f7cff;
    --accent2: #00e5c0;
    --accent3: #ff6b6b;
    --accent4: #ffc84a;
    --text: #e8eaf0;
    --muted: #6b7494;
    --sidebar-w: 240px;
    --header-h: 64px;
  }

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

  body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
  }

  /* ── SIDEBAR ── */
  .sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0;
    z-index: 100;
    transition: transform .3s ease;
  }

  .logo {
    padding: 20px 22px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
  }

  .logo-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
  }

  .logo-text {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.1;
  }
  .logo-text span { display: block; color: var(--muted); font-weight: 400; font-size: 11px; font-family: 'DM Sans', sans-serif; }

  .nav-section {
    padding: 16px 12px 4px;
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
  }

  .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    margin: 2px 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13.5px;
    color: var(--muted);
    transition: all .2s;
    position: relative;
  }

  .nav-item:hover { background: var(--surface2); color: var(--text); }
  .nav-item.active { background: rgba(79,124,255,.14); color: var(--accent); }
  .nav-item.active::before {
    content: '';
    position: absolute; left: -8px;
    top: 50%; transform: translateY(-50%);
    height: 60%; width: 3px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
  }

  .nav-icon { width: 18px; text-align: center; font-size: 14px; }

  .badge {
    margin-left: auto;
    background: var(--accent3);
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 99px;
    font-weight: 500;
  }

  .badge.green { background: var(--accent2); color: #000; }

  .sidebar-footer {
    margin-top: auto;
    padding: 16px 12px;
    border-top: 1px solid var(--border);
  }

  .user-card {
    display: flex; align-items: center; gap: 10px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .2s;
  }
  .user-card:hover { background: var(--surface2); }

  .avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c5cff, var(--accent));
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
    flex-shrink: 0;
  }

  .user-info { flex: 1; min-width: 0; }
  .user-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .user-role { font-size: 11px; color: var(--muted); }

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

  /* ── HEADER ── */
  .header {
    height: var(--header-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 16px;
    position: sticky; top: 0;
    z-index: 50;
  }

  .page-title {
    font-family: 'Syne', sans-serif;
    font-size: 17px;
    font-weight: 700;
  }

  .breadcrumb {
    font-size: 12px;
    color: var(--muted);
    display: flex; align-items: center; gap: 6px;
    margin-left: 4px;
  }
  .breadcrumb span { color: var(--muted); }

  .header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }

  .search-box {
    display: flex; align-items: center; gap: 8px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 13px;
    color: var(--muted);
    cursor: text;
    width: 200px;
    transition: border .2s;
  }
  .search-box:hover { border-color: var(--accent); }

  .icon-btn {
    width: 36px; height: 36px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 14px;
    position: relative;
    transition: all .2s;
  }
  .icon-btn:hover { border-color: var(--accent); color: var(--accent); }

  .notif-dot {
    position: absolute;
    top: 7px; right: 7px;
    width: 7px; height: 7px;
    background: var(--accent3);
    border-radius: 50%;
    border: 1.5px solid var(--surface);
  }

  /* ── CONTENT ── */
  .content {
    padding: 28px;
    flex: 1;
  }

  /* ── PAGE TABS ── */
  .page-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
    width: fit-content;
  }

  .tab {
    padding: 7px 16px;
    border-radius: 7px;
    font-size: 13px;
    cursor: pointer;
    color: var(--muted);
    transition: all .2s;
    font-weight: 500;
  }
  .tab.active { background: var(--accent); color: #fff; }
  .tab:hover:not(.active) { color: var(--text); }

  /* ── STAT CARDS ── */
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
  }

  .stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: border-color .2s, transform .2s;
  }
  .stat-card:hover { border-color: rgba(79,124,255,.4); transform: translateY(-1px); }

  .stat-card::after {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 90px; height: 90px;
    border-radius: 50%;
    opacity: .06;
  }
  .stat-card:nth-child(1)::after { background: var(--accent); }
  .stat-card:nth-child(2)::after { background: var(--accent2); }
  .stat-card:nth-child(3)::after { background: var(--accent4); }
  .stat-card:nth-child(4)::after { background: var(--accent3); }

  .stat-label {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .06em;
  }

  .stat-value {
    font-family: 'Syne', sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
  }

  .stat-change {
    font-size: 12px;
    display: flex; align-items: center; gap: 4px;
  }
  .stat-change.up { color: var(--accent2); }
  .stat-change.down { color: var(--accent3); }

  .stat-icon {
    position: absolute; top: 18px; right: 18px;
    font-size: 20px;
    opacity: .5;
  }

  /* ── TWO COLUMN ── */
  .two-col { display: grid; grid-template-columns: 1fr 380px; gap: 20px; margin-bottom: 20px; }
  .three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 20px; }

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

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

  .card-title {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 14px;
  }
  .card-subtitle { font-size: 12px; color: var(--muted); margin-top: 2px; }

  .card-action {
    font-size: 12px;
    color: var(--accent);
    cursor: pointer;
    font-weight: 500;
    display: flex; align-items: center; gap: 4px;
  }
  .card-action:hover { text-decoration: underline; }

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

  /* ── TABLE ── */
  .table-wrap { overflow-x: auto; }
  table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
  thead th {
    padding: 10px 14px;
    text-align: left;
    font-size: 11px;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
    border-bottom: 1px solid var(--border);
  }
  tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background .15s;
    cursor: pointer;
  }
  tbody tr:last-child { border-bottom: none; }
  tbody tr:hover { background: rgba(255,255,255,.03); }
  td { padding: 11px 14px; }

  .emp-cell { display: flex; align-items: center; gap: 10px; }
  .emp-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    font-size: 11px; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .emp-name { font-size: 13.5px; font-weight: 500; }
  .emp-dept { font-size: 11.5px; color: var(--muted); }

  /* ── TAGS ── */
  .tag {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px;
    border-radius: 99px;
    font-size: 11.5px;
    font-weight: 500;
  }
  .tag.active { background: rgba(0,229,192,.12); color: var(--accent2); }
  .tag.inactive { background: rgba(255,107,107,.12); color: var(--accent3); }
  .tag.pending { background: rgba(255,200,74,.12); color: var(--accent4); }
  .tag.approved { background: rgba(79,124,255,.12); color: var(--accent); }

  .tag::before { content: '●'; font-size: 7px; }

  /* ── METHOD BADGES ── */
  .method {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Syne', monospace;
    letter-spacing: .04em;
  }
  .method.get { background: rgba(0,229,192,.15); color: var(--accent2); }
  .method.post { background: rgba(79,124,255,.15); color: var(--accent); }
  .method.put { background: rgba(255,200,74,.15); color: var(--accent4); }
  .method.delete { background: rgba(255,107,107,.15); color: var(--accent3); }
  .method.patch { background: rgba(180,79,255,.15); color: #c77dff; }

  /* ── PROGRESS ── */
  .progress-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
  .progress-label { font-size: 13px; min-width: 100px; color: var(--text); }
  .progress-bar { flex: 1; height: 6px; background: var(--surface2); border-radius: 99px; overflow: hidden; }
  .progress-fill { height: 100%; border-radius: 99px; transition: width 1s ease; }
  .progress-val { font-size: 12px; color: var(--muted); min-width: 35px; text-align: right; font-weight: 500; }

  /* ── MINI CHART ── */
  .mini-chart { display: flex; align-items: flex-end; gap: 4px; height: 60px; }
  .bar {
    flex: 1;
    border-radius: 4px 4px 0 0;
    background: rgba(79,124,255,.25);
    transition: background .2s;
    cursor: pointer;
  }
  .bar:hover, .bar.active-bar { background: var(--accent); }

  /* ── LEAVE REQUESTS ── */
  .leave-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }
  .leave-item:last-child { border-bottom: none; }

  .leave-av {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; flex-shrink: 0;
  }
  .leave-info { flex: 1; }
  .leave-name { font-size: 13.5px; font-weight: 500; }
  .leave-meta { font-size: 11.5px; color: var(--muted); margin-top: 1px; }

  .btn-group { display: flex; gap: 6px; }
  .btn-sm {
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .15s;
  }
  .btn-approve { background: rgba(0,229,192,.15); color: var(--accent2); }
  .btn-approve:hover { background: rgba(0,229,192,.3); }
  .btn-reject { background: rgba(255,107,107,.1); color: var(--accent3); }
  .btn-reject:hover { background: rgba(255,107,107,.25); }

  /* ── API DOCS ── */
  .api-section { margin-bottom: 16px; }
  .api-section-title {
    font-family: 'Syne', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border);
  }

  .api-row {
    display: flex; align-items: center; gap: 14px;
    padding: 10px 20px;
    border-bottom: 1px solid rgba(255,255,255,.04);
    font-size: 13px;
    transition: background .15s;
    cursor: pointer;
  }
  .api-row:hover { background: rgba(255,255,255,.03); }
  .api-row:last-child { border-bottom: none; }

  .endpoint {
    font-family: 'DM Sans', monospace;
    font-size: 13px;
    color: var(--text);
    flex: 1;
  }

  .api-desc { font-size: 12.5px; color: var(--muted); }

  /* ── PAYROLL SUMMARY ── */
  .payroll-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13.5px;
  }
  .payroll-row:last-child { border-bottom: none; }
  .payroll-label { color: var(--muted); }
  .payroll-value { font-weight: 600; font-family: 'Syne', sans-serif; font-size: 14px; }
  .payroll-value.green { color: var(--accent2); }
  .payroll-value.red { color: var(--accent3); }
  .payroll-value.total { color: var(--accent); font-size: 18px; }

  /* ── FEATURE CHIPS ── */
  .features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
  }

  .feature-chip {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex; align-items: center; gap: 10px;
    font-size: 13px;
    transition: all .2s;
  }
  .feature-chip:hover { border-color: var(--accent); transform: translateY(-1px); }
  .feature-chip-icon { font-size: 18px; }
  .feature-chip-text { font-weight: 500; }
  .feature-chip-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }

  /* ── BUTTONS ── */
  .btn {
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .2s;
    display: inline-flex; align-items: center; gap: 7px;
    font-family: 'DM Sans', sans-serif;
  }
  .btn-primary { background: var(--accent); color: #fff; }
  .btn-primary:hover { background: #3d6aff; }
  .btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
  }
  .btn-outline:hover { border-color: var(--accent); color: var(--accent); }

  /* ── ATTENDANCE DOTS ── */
  .attendance-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 4px 0; }
  .att-day { text-align: center; }
  .att-label { font-size: 10px; color: var(--muted); margin-bottom: 4px; }
  .att-dot {
    width: 28px; height: 28px;
    border-radius: 6px;
    margin: 0 auto;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px;
    font-weight: 600;
  }
  .att-present { background: rgba(0,229,192,.15); color: var(--accent2); }
  .att-absent { background: rgba(255,107,107,.12); color: var(--accent3); }
  .att-late { background: rgba(255,200,74,.12); color: var(--accent4); }
  .att-weekend { background: var(--surface2); color: var(--muted); }
  .att-today { outline: 2px solid var(--accent); outline-offset: 2px; }

  /* ── NOTIFICATION ── */
  .notif-item {
    display: flex; gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    transition: background .15s;
    cursor: pointer;
  }
  .notif-item:hover { background: rgba(255,255,255,.03); }
  .notif-item:last-child { border-bottom: none; }
  .notif-dot-icon { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
  .notif-text { font-size: 13px; line-height: 1.5; }
  .notif-time { font-size: 11px; color: var(--muted); margin-top: 2px; }

  /* ── ROLE PILLS ── */
  .role-grid { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0; }
  .role-pill {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    border: 1px solid;
  }
  .role-admin { background: rgba(79,124,255,.1); color: var(--accent); border-color: rgba(79,124,255,.3); }
  .role-hr { background: rgba(0,229,192,.1); color: var(--accent2); border-color: rgba(0,229,192,.3); }
  .role-acc { background: rgba(255,200,74,.1); color: var(--accent4); border-color: rgba(255,200,74,.3); }
  .role-emp { background: rgba(255,107,107,.1); color: var(--accent3); border-color: rgba(255,107,107,.3); }

  /* ── FORM STYLES ── */
  .form-page { max-width: 860px; }

  .steps-bar {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 32px;
  }

  .step-item {
    display: flex; align-items: center; gap: 10px;
    flex: 1;
    position: relative;
  }

  .step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: calc(50% + 18px);
    right: calc(-50% + 18px);
    top: 18px;
    height: 2px;
    background: var(--border);
    z-index: 0;
    transition: background .4s;
  }

  .step-item.done:not(:last-child)::after { background: var(--accent); }

  .step-num {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Syne', sans-serif;
    font-size: 13px; font-weight: 700;
    color: var(--muted);
    background: var(--surface);
    position: relative; z-index: 1;
    transition: all .3s;
    flex-shrink: 0;
  }

  .step-item.active .step-num {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(79,124,255,.1);
    box-shadow: 0 0 0 4px rgba(79,124,255,.12);
  }

  .step-item.done .step-num {
    border-color: var(--accent2);
    background: rgba(0,229,192,.15);
    color: var(--accent2);
  }

  .step-label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
    white-space: nowrap;
  }

  .step-item.active .step-label { color: var(--text); }
  .step-item.done .step-label { color: var(--accent2); }

  .form-section { display: none; animation: fadeIn .3s ease; }
  .form-section.active { display: block; }

  .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .form-grid.three { grid-template-columns: 1fr 1fr 1fr; }
  .form-grid.full { grid-template-columns: 1fr; }

  .form-group { display: flex; flex-direction: column; gap: 7px; }
  .form-group.span2 { grid-column: span 2; }
  .form-group.span3 { grid-column: span 3; }

  .form-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    display: flex; align-items: center; gap: 5px;
  }

  .form-label .req { color: var(--accent3); }

  .form-input, .form-select, .form-textarea {
    background: var(--surface2);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 13.5px;
    padding: 11px 14px;
    outline: none;
    transition: border .2s, box-shadow .2s, background .2s;
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
  }

  .form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--accent);
    background: rgba(79,124,255,.05);
    box-shadow: 0 0 0 3px rgba(79,124,255,.1);
  }

  .form-input.error { border-color: var(--accent3); }
  .form-input.error:focus { box-shadow: 0 0 0 3px rgba(255,107,107,.15); }
  .form-input.valid { border-color: var(--accent2); }

  .form-input::placeholder { color: #3d4560; }
  .form-textarea { resize: vertical; min-height: 90px; line-height: 1.6; }

  .form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7494' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
  }

  .form-select option { background: #161b2a; }

  .input-hint { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
  .input-error { font-size: 11.5px; color: var(--accent3); margin-top: 2px; display: none; }
  .input-error.show { display: block; }

  /* Input with icon */
  .input-wrap { position: relative; }
  .input-icon {
    position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
    font-size: 14px; color: var(--muted); pointer-events: none;
  }
  .input-wrap .form-input { padding-left: 38px; }

  .input-suffix {
    position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
    font-size: 12px; color: var(--muted); pointer-events: none;
  }

  /* Salary input with currency */
  .salary-wrap { position: relative; }
  .currency-prefix {
    position: absolute; left: 0; top: 0; bottom: 0;
    display: flex; align-items: center; justify-content: center;
    width: 42px;
    background: var(--border);
    border-radius: 10px 0 0 10px;
    font-size: 13px; font-weight: 700;
    color: var(--muted);
    border: 1.5px solid var(--border);
    border-right: none;
  }
  .salary-wrap .form-input { padding-left: 54px; border-radius: 0 10px 10px 0; border-left: none; }

  /* Avatar upload */
  .avatar-upload {
    display: flex; align-items: center; gap: 20px;
    padding: 20px;
    background: var(--surface2);
    border: 1.5px dashed var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
  }
  .avatar-upload:hover { border-color: var(--accent); background: rgba(79,124,255,.04); }

  .avatar-preview {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: flex; align-items: center; justify-content: center;
    font-family: 'Syne', sans-serif;
    font-size: 22px; font-weight: 700;
    flex-shrink: 0;
    transition: all .2s;
    position: relative;
    overflow: hidden;
  }

  .avatar-preview img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: none; }
  .avatar-preview img.show { display: block; }
  .avatar-preview .initials { transition: opacity .2s; }

  .avatar-upload-text { flex: 1; }
  .avatar-upload-title { font-size: 13.5px; font-weight: 600; margin-bottom: 3px; }
  .avatar-upload-sub { font-size: 12px; color: var(--muted); }
  .avatar-upload-btn {
    padding: 7px 14px;
    background: rgba(79,124,255,.12);
    color: var(--accent);
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(79,124,255,.2);
    cursor: pointer;
    transition: all .2s;
  }
  .avatar-upload-btn:hover { background: rgba(79,124,255,.22); }

  /* Toggle / Checkbox */
  .toggle-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px;
    background: var(--surface2);
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: border-color .2s;
  }
  .toggle-row:hover { border-color: var(--accent); }
  .toggle-info { flex: 1; }
  .toggle-title { font-size: 13.5px; font-weight: 500; }
  .toggle-sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }

  .toggle {
    width: 40px; height: 22px;
    background: var(--border);
    border-radius: 99px;
    cursor: pointer;
    position: relative;
    transition: background .2s;
    flex-shrink: 0;
  }
  .toggle.on { background: var(--accent); }
  .toggle::after {
    content: '';
    position: absolute; top: 3px; left: 3px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.3);
  }
  .toggle.on::after { transform: translateX(18px); }

  /* Tags/chips selector */
  .chips-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
  .chip-option {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    color: var(--muted);
  }
  .chip-option:hover { border-color: var(--accent); color: var(--text); }
  .chip-option.selected { background: rgba(79,124,255,.12); border-color: var(--accent); color: var(--accent); }

  /* Review section */
  .review-block {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 14px;
  }
  .review-block-title {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .1em;
    color: var(--accent);
    margin-bottom: 14px;
    display: flex; align-items: center; gap: 6px;
  }
  .review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .review-field { }
  .review-key { font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
  .review-val { font-size: 13.5px; font-weight: 500; }

  /* Form nav buttons */
  .form-nav {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
  }

  /* Success state */
  .success-screen {
    display: none;
    text-align: center;
    padding: 60px 40px;
    animation: fadeIn .5s ease;
  }
  .success-screen.show { display: block; }
  .success-icon {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(0,229,192,.12);
    border: 2px solid var(--accent2);
    display: flex; align-items: center; justify-content: center;
    font-size: 36px;
    margin: 0 auto 24px;
    animation: popIn .5s cubic-bezier(.175,.885,.32,1.275);
  }
  @keyframes popIn { from { transform: scale(0); opacity:0; } to { transform: scale(1); opacity:1; } }

  .success-title {
    font-family: 'Syne', sans-serif;
    font-size: 24px; font-weight: 800;
    margin-bottom: 10px;
    color: var(--accent2);
  }

  .form-steps-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
  }

  .form-steps-header {
    padding: 20px 28px 16px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(79,124,255,.04), rgba(0,229,192,.02));
  }

  .form-steps-body { padding: 28px; }

  .section-divider {
    font-family: 'Syne', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--muted);
    margin: 22px 0 16px;
    display: flex; align-items: center; gap: 10px;
  }
  .section-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

  /* ── HIDDEN PANELS ── */
  .panel { display: none; animation: fadeIn .25s ease; }
  .panel.active { display: block; }

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

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

  /* ── RESPONSIVE ── */
  @media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .two-col { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
  }
  @media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .main { margin-left: 0; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .three-col { grid-template-columns: 1fr; }
  }

  /* ════════════════════════════════
     EMPLOYEE PROFILE PAGE
  ════════════════════════════════ */
  .profile-cover {
    height: 180px;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(135deg, #1a2340 0%, #0f1829 40%, #162036 100%);
    position: relative; overflow: hidden;
  }
  .profile-cover::before {
    content: ''; position: absolute; inset: 0;
    background:
      radial-gradient(ellipse 60% 80% at 80% 50%, rgba(79,124,255,.18) 0%, transparent 70%),
      radial-gradient(ellipse 40% 60% at 20% 30%, rgba(0,229,192,.10) 0%, transparent 60%);
  }
  .cover-pattern {
    position: absolute; inset: 0;
    background-image: repeating-linear-gradient(45deg, transparent, transparent 30px, rgba(255,255,255,.015) 30px, rgba(255,255,255,.015) 31px);
  }
  .cover-actions { position: absolute; top: 16px; right: 16px; display: flex; gap: 8px; }
  .cover-btn {
    padding: 7px 14px; border-radius: 8px; font-size: 12px; font-weight: 600;
    cursor: pointer; border: none; font-family: 'DM Sans', sans-serif;
    transition: all .2s; display: flex; align-items: center; gap: 6px;
  }
  .cover-btn.primary { background: var(--accent); color: #fff; }
  .cover-btn.primary:hover { background: #3d6aff; }
  .cover-btn.ghost {
    background: rgba(255,255,255,.1); color: #fff;
    backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.12);
  }
  .cover-btn.ghost:hover { background: rgba(255,255,255,.18); }
  .profile-header-card {
    background: var(--surface); border: 1px solid var(--border);
    border-top: none; border-radius: 0 0 16px 16px;
    padding: 0 28px 24px; position: relative; margin-bottom: 24px;
  }
  .profile-avatar-wrap { position: relative; display: inline-block; margin-top: -52px; margin-bottom: 12px; }
  .profile-avatar-lg {
    width: 100px; height: 100px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Syne', sans-serif; font-size: 32px; font-weight: 800;
    border: 4px solid var(--surface); box-shadow: 0 4px 20px rgba(0,0,0,.4);
  }
  .profile-avatar-status {
    position: absolute; bottom: 4px; right: 4px;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--accent2); border: 3px solid var(--surface);
  }
  .profile-meta-row { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
  .profile-name { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; line-height: 1.1; margin-bottom: 4px; }
  .profile-title-dept { font-size: 13.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
  .profile-title-dept span { color: var(--accent); font-weight: 500; }
  .profile-quick-stats { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 8px; }
  .pqs-item { text-align: center; }
  .pqs-val { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 700; line-height: 1; }
  .pqs-label { font-size: 11px; color: var(--muted); margin-top: 2px; }
  .profile-tabs {
    display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 24px;
  }
  .ptab {
    padding: 10px 20px; font-size: 13px; font-weight: 500; cursor: pointer;
    color: var(--muted); border-bottom: 2px solid transparent;
    margin-bottom: -1px; transition: all .2s; display: flex; align-items: center; gap: 7px;
  }
  .ptab:hover { color: var(--text); }
  .ptab.active { color: var(--accent); border-bottom-color: var(--accent); }
  .ptab .ptab-badge {
    background: rgba(79,124,255,.15); color: var(--accent); font-size: 10px;
    padding: 1px 6px; border-radius: 99px; font-weight: 600;
  }
  .ptab-panel { display: none; animation: fadeIn .25s ease; }
  .ptab-panel.active { display: block; }
  .info-section-title {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
    color: var(--muted); margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
  }
  .info-section-title::after { content:''; flex:1; height:1px; background:var(--border); }
  .info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
  .info-grid.three { grid-template-columns: repeat(3,1fr); }
  .info-key { font-size: 11.5px; color: var(--muted); margin-bottom: 3px; font-weight: 500; }
  .info-val { font-size: 13.5px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
  .timeline { position: relative; padding-left: 22px; }
  .timeline::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1px; background: var(--border); }
  .tl-item { position: relative; padding-bottom: 22px; }
  .tl-item:last-child { padding-bottom: 0; }
  .tl-dot {
    position: absolute; left: -22px; top: 4px; width: 12px; height: 12px;
    border-radius: 50%; background: var(--accent); border: 2px solid var(--surface);
    box-shadow: 0 0 0 3px rgba(79,124,255,.2);
  }
  .tl-dot.green { background: var(--accent2); box-shadow: 0 0 0 3px rgba(0,229,192,.2); }
  .tl-dot.amber { background: var(--accent4); box-shadow: 0 0 0 3px rgba(255,200,74,.2); }
  .tl-date { font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
  .tl-title { font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
  .tl-sub { font-size: 12.5px; color: var(--muted); }
  .payslip-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .payslip-row:last-child { border-bottom: none; }
  .payslip-icon { width: 38px; height: 38px; border-radius: 10px; background: rgba(79,124,255,.1); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
  .payslip-info { flex: 1; }
  .payslip-month { font-size: 13.5px; font-weight: 600; }
  .payslip-meta { font-size: 12px; color: var(--muted); margin-top: 1px; }
  .payslip-amount { font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700; color: var(--accent2); }
  .mini-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-bottom: 8px; }
  .mcal-head { text-align:center; font-size:10px; color:var(--muted); padding: 4px 0; font-weight:600; }
  .mcal-day { aspect-ratio:1; border-radius:6px; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:500; }
  .mcal-present { background: rgba(0,229,192,.15); color: var(--accent2); }
  .mcal-absent  { background: rgba(255,107,107,.12); color: var(--accent3); }
  .mcal-late    { background: rgba(255,200,74,.12); color: var(--accent4); }
  .mcal-weekend { color: var(--muted); }
  .mcal-today   { outline: 2px solid var(--accent); outline-offset: 1px; }
  .doc-row { display:flex; align-items:center; gap:12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
  .doc-row:last-child { border-bottom:none; }
  .doc-icon { width:36px; height:36px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:16px; flex-shrink:0; }
  .doc-info { flex:1; }
  .doc-name { font-size:13.5px; font-weight:500; }
  .doc-meta { font-size:11.5px; color:var(--muted); margin-top:1px; }
  .doc-dl { font-size:12px; color:var(--accent); cursor:pointer; font-weight:600; }
  .stat-pill {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
    border-radius: 99px; font-size: 12px; font-weight: 600;
    background: rgba(79,124,255,.1); color: var(--accent); border: 1px solid rgba(79,124,255,.2);
  }
  .stat-pill.green { background: rgba(0,229,192,.1); color: var(--accent2); border-color: rgba(0,229,192,.25); }
  .stat-pill.amber { background: rgba(255,200,74,.1); color: var(--accent4); border-color: rgba(255,200,74,.25); }
  .stat-pill.red   { background: rgba(255,107,107,.1); color: var(--accent3); border-color: rgba(255,107,107,.25); }

  /* ── UPDATE MODAL ── */
  .modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.65);
    backdrop-filter: blur(4px); z-index: 999;
    display: none; align-items: center; justify-content: center;
    padding: 24px;
  }
  .modal-overlay.open { display: flex; animation: fadeIn .2s ease; }
  .modal {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 18px; width: 100%; max-width: 780px;
    max-height: 90vh; overflow: hidden; display: flex; flex-direction: column;
    box-shadow: 0 24px 80px rgba(0,0,0,.6);
    animation: modalSlide .3s cubic-bezier(.175,.885,.32,1.275);
  }
  @keyframes modalSlide {
    from { transform: scale(.92) translateY(20px); opacity:0; }
    to   { transform: scale(1) translateY(0); opacity:1; }
  }
  .modal-header {
    padding: 22px 28px 18px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
    background: linear-gradient(135deg, rgba(79,124,255,.06), transparent);
  }
  .modal-title { font-family: 'Syne', sans-serif; font-size: 17px; font-weight: 800; }
  .modal-subtitle { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
  .modal-close {
    width: 34px; height: 34px; border-radius: 50%; background: var(--surface2);
    border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
    font-size: 16px; cursor: pointer; transition: all .2s; color: var(--muted);
  }
  .modal-close:hover { background: rgba(255,107,107,.15); color: var(--accent3); border-color: var(--accent3); }
  .modal-tabs {
    display: flex; padding: 0 28px; border-bottom: 1px solid var(--border);
    background: var(--surface2); flex-shrink: 0;
  }
  .modal-tab {
    padding: 11px 16px; font-size: 12.5px; font-weight: 500;
    cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent;
    margin-bottom: -1px; transition: all .2s; display: flex; align-items: center; gap: 6px;
  }
  .modal-tab:hover { color: var(--text); }
  .modal-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
  .modal-tab-panel { display:none; animation: fadeIn .2s ease; }
  .modal-tab-panel.active { display:block; }
  .modal-body { padding: 24px 28px; overflow-y: auto; flex: 1; }
  .modal-footer {
    padding: 16px 28px; border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
    background: var(--surface2);
  }
  .modal-footer-left { font-size: 12px; color: var(--muted); display:flex; align-items:center; gap:6px; }
  .toast {
    position: fixed; bottom: 28px; right: 28px;
    background: var(--surface); border: 1px solid var(--accent2); border-radius: 12px;
    padding: 14px 20px; display: flex; align-items: center; gap: 12px;
    font-size: 13.5px; font-weight: 500; box-shadow: 0 8px 32px rgba(0,0,0,.4);
    z-index: 9999; transform: translateY(80px); opacity: 0;
    transition: all .4s cubic-bezier(.175,.885,.32,1.275); pointer-events: none;
  }
  .toast.show { transform: translateY(0); opacity: 1; pointer-events: all; }


  /* ── STATUS MODAL ── */
  .status-modal-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    width: 100%;
    max-width: 440px;
    animation: modalSlide .3s cubic-bezier(.175,.885,.32,1.275);
    box-shadow: 0 24px 80px rgba(0,0,0,.6);
    overflow: hidden;
  }
  .status-option {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    cursor: pointer;
    margin-bottom: 10px;
    transition: all .2s;
  }
  .status-option:last-child { margin-bottom: 0; }
  .status-option:hover { border-color: var(--accent); background: rgba(79,124,255,.04); }
  .status-option.selected { border-color: var(--accent); background: rgba(79,124,255,.08); }
  .status-option.selected-green { border-color: var(--accent2); background: rgba(0,229,192,.07); }
  .status-option.selected-amber { border-color: var(--accent4); background: rgba(255,200,74,.07); }
  .status-option.selected-red   { border-color: var(--accent3); background: rgba(255,107,107,.07); }
  .status-dot-lg {
    width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; flex-shrink: 0;
  }
  .status-option-title { font-size: 14px; font-weight: 600; }
  .status-option-desc  { font-size: 12px; color: var(--muted); margin-top: 2px; }
  .status-check {
    margin-left: auto; width: 22px; height: 22px;
    border-radius: 50%; border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; color: transparent; flex-shrink: 0;
    transition: all .2s;
  }
  .status-option.selected   .status-check,
  .status-option.selected-green .status-check,
  .status-option.selected-amber .status-check,
  .status-option.selected-red   .status-check {
    background: var(--accent); border-color: var(--accent); color: #fff;
  }
  .status-option.selected-green .status-check { background: var(--accent2); border-color: var(--accent2); }
  .status-option.selected-amber .status-check { background: var(--accent4); border-color: var(--accent4); }
  .status-option.selected-red   .status-check { background: var(--accent3); border-color: var(--accent3); }

  /* ── DELETE MODAL ── */
  .delete-modal-card {
    background: var(--surface);
    border: 1px solid rgba(255,107,107,.3);
    border-radius: 18px;
    width: 100%;
    max-width: 440px;
    animation: modalSlide .3s cubic-bezier(.175,.885,.32,1.275);
    box-shadow: 0 24px 80px rgba(255,107,107,.15), 0 8px 40px rgba(0,0,0,.5);
    overflow: hidden;
  }
  .delete-avatar-row {
    display: flex; align-items: center; gap: 14px;
    background: var(--surface2); border: 1px solid var(--border);
    border-radius: 12px; padding: 14px 16px; margin-bottom: 18px;
  }
  .delete-checklist { margin-bottom: 18px; }
  .delete-check-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0; border-bottom: 1px solid var(--border);
    font-size: 13px; color: var(--muted);
  }
  .delete-check-item:last-child { border-bottom: none; }
  .delete-check-item span { font-size: 14px; }
  .confirm-input-wrap { margin-bottom: 20px; }
  .confirm-input-label { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
  .confirm-input-label strong { color: var(--accent3); }
  .confirm-input {
    width: 100%; background: var(--surface2); border: 1.5px solid var(--border);
    border-radius: 10px; color: var(--text); font-family: 'DM Sans', sans-serif;
    font-size: 13.5px; padding: 11px 14px; outline: none;
    transition: border .2s;
  }
  .confirm-input:focus { border-color: var(--accent3); box-shadow: 0 0 0 3px rgba(255,107,107,.1); }
  .confirm-input.ready { border-color: var(--accent3); }
  .delete-btn-confirm {
    width: 100%; padding: 12px; border-radius: 10px; border: none;
    background: rgba(255,107,107,.15); color: var(--accent3);
    font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 700;
    cursor: pointer; transition: all .2s; letter-spacing: .02em;
    opacity: .5; pointer-events: none;
  }
  .delete-btn-confirm.enabled {
    opacity: 1; pointer-events: all;
    background: var(--accent3); color: #fff;
    box-shadow: 0 4px 20px rgba(255,107,107,.35);
  }
  .delete-btn-confirm.enabled:hover { background: #ff4f4f; transform: translateY(-1px); }

  /* ── DROPDOWN MENU ── */
  .action-menu-wrap { position: relative; display: inline-block; }
  .action-menu {
    position: absolute; right: 0; top: calc(100% + 6px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    min-width: 170px;
    box-shadow: 0 8px 30px rgba(0,0,0,.4);
    z-index: 200;
    display: none;
    overflow: hidden;
    animation: fadeIn .15s ease;
  }
  .action-menu.open { display: block; }
  .action-menu-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; font-size: 13px; cursor: pointer;
    transition: background .15s; color: var(--text);
  }
  .action-menu-item:hover { background: var(--surface2); }
  .action-menu-item.danger { color: var(--accent3); }
  .action-menu-item.danger:hover { background: rgba(255,107,107,.1); }
  .action-menu-divider { height: 1px; background: var(--border); margin: 4px 0; }
  .action-menu-icon { font-size: 14px; width: 18px; text-align: center; }

/* ════════════════════════════════
   DEPARTMENTS PAGE
════════════════════════════════ */

/* Dept card grid */
.dept-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.dept-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .2s, transform .2s;
  cursor: pointer;
  position: relative;
}
.dept-card:hover {
  border-color: rgba(79,124,255,.35);
  transform: translateY(-2px);
}
.dept-card-accent {
  height: 4px;
  width: 100%;
}
.dept-card-body { padding: 18px 20px 16px; }
.dept-card-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
}
.dept-card-name {
  font-family: 'Syne', sans-serif;
  font-size: 15px; font-weight: 700;
  margin-bottom: 4px;
}
.dept-card-head {
  font-size: 12px; color: var(--muted);
  display: flex; align-items: center; gap: 5px;
  margin-bottom: 14px;
}
.dept-card-stats {
  display: flex; gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.dept-card-stat-item { flex: 1; }
.dept-card-stat-val {
  font-family: 'Syne', sans-serif;
  font-size: 18px; font-weight: 700;
  line-height: 1;
}
.dept-card-stat-label {
  font-size: 10.5px; color: var(--muted);
  margin-top: 2px; text-transform: uppercase;
  letter-spacing: .05em;
}
.dept-card-actions {
  position: absolute; top: 14px; right: 14px;
  display: flex; gap: 5px;
  opacity: 0;
  transition: opacity .2s;
}
.dept-card:hover .dept-card-actions { opacity: 1; }

/* Add dept form */
.dept-form-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

/* Color picker */
.color-picker-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.color-swatch {
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all .2s;
  flex-shrink: 0;
}
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.selected {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px currentColor;
}

/* Icon picker */
.icon-picker-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
}
.icon-option {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all .2s;
  background: var(--surface2);
}
.icon-option:hover { border-color: var(--accent); background: rgba(79,124,255,.1); }
.icon-option.selected { border-color: var(--accent); background: rgba(79,124,255,.15); }

/* Live preview card */
.dept-preview-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: all .3s;
}
.dept-preview-accent {
  height: 5px;
  transition: background .3s;
}
.dept-preview-body { padding: 18px 20px; }
.dept-preview-icon-wrap {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 10px;
  transition: background .3s;
}
.dept-preview-name {
  font-family: 'Syne', sans-serif;
  font-size: 16px; font-weight: 800;
  margin-bottom: 4px;
  transition: color .3s;
}
.dept-preview-desc { font-size: 12.5px; color: var(--muted); }
.dept-preview-stats {
  display: flex; gap: 18px;
  padding-top: 14px; margin-top: 14px;
  border-top: 1px solid var(--border);
}

/* Delete dept modal specifics */
.dept-delete-card {
  background: var(--surface);
  border: 1px solid rgba(255,107,107,.3);
  border-radius: 18px;
  width: 100%; max-width: 440px;
  animation: modalSlide .3s cubic-bezier(.175,.885,.32,1.275);
  box-shadow: 0 24px 80px rgba(255,107,107,.12), 0 8px 40px rgba(0,0,0,.5);
  overflow: hidden;
}

/* Update modal tab active */
.dept-field-changed {
  border-color: var(--accent4) !important;
  background: rgba(255,200,74,.04) !important;
}

/* Dept members mini list */
.dept-member-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.dept-member-row:last-child { border-bottom: none; }

@media (max-width: 1100px) {
  .dept-cards-grid { grid-template-columns: repeat(2, 1fr); }
  .dept-form-layout { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .dept-cards-grid { grid-template-columns: 1fr; }
}


/* ════════════════════════════════
   SHARED FORM PAGE STYLES
════════════════════════════════ */
.form-page-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}
.form-page-layout .sticky-side {
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

/* Employee picker cards */
.emp-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.emp-pick-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 7px; padding: 14px 10px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 12px; cursor: pointer;
  transition: all .2s; text-align: center;
  position: relative;
}
.emp-pick-card:hover { border-color: var(--accent); background: rgba(79,124,255,.05); }
.emp-pick-card.picked {
  border-color: var(--accent);
  background: rgba(79,124,255,.1);
  box-shadow: 0 0 0 3px rgba(79,124,255,.12);
}
.emp-pick-card.picked::after {
  content: '✓';
  position: absolute; top: 8px; right: 8px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.ep-av {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.ep-name { font-size: 12px; font-weight: 600; line-height: 1.3; }
.ep-role { font-size: 10.5px; color: var(--muted); }

/* Leave type picker */
.leave-type-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.lt-card {
  padding: 14px 12px; border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  cursor: pointer; transition: all .2s;
  position: relative; overflow: hidden;
  text-align: left;
}
.lt-card:hover { transform: translateY(-1px); }
.lt-card.lt-sel-Annual   { border-color: var(--accent);  background: rgba(79,124,255,.1);  }
.lt-card.lt-sel-Sick     { border-color: var(--accent3); background: rgba(255,107,107,.1); }
.lt-card.lt-sel-Casual   { border-color: var(--accent4); background: rgba(255,200,74,.1);  }
.lt-card.lt-sel-Unpaid   { border-color: var(--muted);   background: rgba(107,116,148,.1); }
.lt-card.lt-sel-Maternity{ border-color: var(--accent2); background: rgba(0,229,192,.1);   }
.lt-card.lt-sel-Emergency{ border-color: var(--accent3); background: rgba(255,107,107,.1); }
.lt-check-circle {
  position: absolute; top: 8px; right: 8px;
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; color: transparent; transition: all .2s;
}
.lt-card.lt-sel-Annual .lt-check-circle   { background: var(--accent);  border-color: var(--accent);  color: #fff; }
.lt-card.lt-sel-Sick .lt-check-circle     { background: var(--accent3); border-color: var(--accent3); color: #fff; }
.lt-card.lt-sel-Casual .lt-check-circle   { background: var(--accent4); border-color: var(--accent4); color: #000; }
.lt-card.lt-sel-Unpaid .lt-check-circle   { background: var(--muted);   border-color: var(--muted);   color: #fff; }
.lt-card.lt-sel-Maternity .lt-check-circle{ background: var(--accent2); border-color: var(--accent2); color: #000; }
.lt-card.lt-sel-Emergency .lt-check-circle{ background: var(--accent3); border-color: var(--accent3); color: #fff; }
.lt-icon { font-size: 22px; margin-bottom: 8px; display: block; }
.lt-name { font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.lt-bal  { font-size: 11px; color: var(--muted); }

/* Inline mini calendar */
.mini-cal-wrap { background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.mini-cal-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.mini-cal-nav {
  width: 30px; height: 30px; border-radius: 7px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 12px; transition: all .2s; color: var(--text);
}
.mini-cal-nav:hover { border-color: var(--accent); color: var(--accent); }
.mini-cal-title { font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 700; }
.mini-cal-body { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; padding: 10px; }
.mc-dow {
  text-align: center; font-size: 9.5px; font-weight: 700;
  color: var(--muted); padding: 3px 0 7px;
  text-transform: uppercase; letter-spacing: .05em;
}
.mc-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 12px; border-radius: 7px; cursor: pointer;
  transition: all .15s; font-weight: 500; position: relative;
}
.mc-day:hover:not(.mc-disabled):not(.mc-weekend):not(.mc-empty) {
  background: rgba(79,124,255,.15); color: var(--accent);
}
.mc-today { color: var(--accent); font-weight: 700; }
.mc-today::after {
  content: ''; position: absolute; bottom: 2px; left: 50%;
  transform: translateX(-50%); width: 3px; height: 3px;
  border-radius: 50%; background: var(--accent);
}
.mc-start { background: var(--accent) !important; color: #fff !important; border-radius: 7px 0 0 7px; }
.mc-end   { background: var(--accent) !important; color: #fff !important; border-radius: 0 7px 7px 0; }
.mc-start.mc-end { border-radius: 7px !important; }
.mc-range { background: rgba(79,124,255,.15); color: var(--accent); border-radius: 0; }
.mc-weekend { color: rgba(107,116,148,.5); }
.mc-disabled { color: rgba(107,116,148,.3); cursor: not-allowed; }
.mc-empty { cursor: default; }

/* Conflict / warning alert */
.inline-alert {
  display: none; gap: 10px; align-items: flex-start;
  border-radius: 10px; padding: 11px 14px; font-size: 12.5px;
  margin-top: 12px; line-height: 1.55;
}
.inline-alert.show { display: flex; }
.inline-alert.warn { background: rgba(255,200,74,.07); border:1px solid rgba(255,200,74,.25); color: var(--accent4); }
.inline-alert.error{ background: rgba(255,107,107,.07); border:1px solid rgba(255,107,107,.25); color: var(--accent3); }
.inline-alert.info { background: rgba(79,124,255,.07);  border:1px solid rgba(79,124,255,.2);  color: var(--accent);  }

/* Summary sidebar card */
.summary-side {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
}
.summary-side-hdr {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(79,124,255,.06), transparent);
}
.summary-side-title { font-family:'Syne',sans-serif; font-size:14px; font-weight:800; }
.summary-side-body { padding: 16px 20px; }
.sum-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.04);
  font-size: 13px; gap: 8px;
}
.sum-row:last-child { border-bottom: none; }
.sum-key { color: var(--muted); flex-shrink: 0; }
.sum-val { font-weight: 600; text-align: right; word-break: break-word; }

/* Balance bar */
.bal-bar-wrap { margin-bottom: 16px; }
.bal-bar-labels {
  display: flex; justify-content: space-between;
  font-size: 12px; margin-bottom: 6px;
}
.bal-bar-track {
  height: 7px; background: var(--surface2);
  border-radius: 99px; overflow: hidden; position: relative;
}
.bal-bar-fill {
  height: 100%; border-radius: 99px;
  transition: width .6s cubic-bezier(.34,1.56,.64,1);
}
.bal-bar-req {
  position: absolute; top: 0; height: 100%;
  background: rgba(255,107,107,.55); border-radius: 99px;
  transition: all .4s ease;
}

/* Step progress indicator (top of page) */
.step-dots {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 24px;
}
.step-dot-item {
  display: flex; align-items: center; gap: 8px;
}
.step-dot {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--muted);
  background: var(--surface); transition: all .3s;
  flex-shrink: 0;
}
.step-dot.active { border-color: var(--accent); color: var(--accent); background: rgba(79,124,255,.1); box-shadow: 0 0 0 4px rgba(79,124,255,.1); }
.step-dot.done   { border-color: var(--accent2); color: #000; background: var(--accent2); }
.step-dot-label  { font-size: 12px; color: var(--muted); font-weight:500; }
.step-dot-item.active .step-dot-label { color: var(--text); }
.step-dot-item.done   .step-dot-label { color: var(--accent2); }
.step-connector { flex:1; height:1px; background: var(--border); min-width:20px; }
.step-connector.done { background: var(--accent2); }

/* Success screen */
.form-success {
  display: none; text-align: center; padding: 64px 40px;
  animation: fadeIn .4s ease;
}
.form-success.show { display: block; }
.form-success-ring {
  width: 88px; height: 88px; border-radius: 50%;
  background: rgba(0,229,192,.1); border: 2px solid var(--accent2);
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; margin: 0 auto 22px;
  animation: popIn .5s cubic-bezier(.175,.885,.32,1.275);
}
.form-success-title {
  font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800;
  color: var(--accent2); margin-bottom: 8px;
}

/* Disabled card overlay */
.card-step-locked {
  opacity: .45; pointer-events: none;
  transition: opacity .35s ease;
}
.card-step-locked.unlocked { opacity: 1; pointer-events: all; }

/* File upload drop zone */
.drop-zone {
  border: 1.5px dashed var(--border); border-radius: 12px;
  padding: 22px; text-align: center; cursor: pointer;
  background: var(--surface2); transition: all .2s;
}
.drop-zone:hover { border-color: var(--accent); background: rgba(79,124,255,.04); }
.drop-zone-icon { font-size: 28px; margin-bottom: 8px; display: block; }
.drop-zone-title { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.drop-zone-sub   { font-size: 11.5px; color: var(--muted); }
.uploaded-file {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px; font-size: 12.5px;
  margin-top: 8px; animation: fadeIn .2s ease;
}
.uf-name { flex:1; font-weight:500; }
.uf-rm { color: var(--accent3); cursor: pointer; font-size:13px; }
.uf-rm:hover { opacity:.7; }

/* Time picker row */
.time-pick-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 16px;
}
.time-pick-row .tp-label { font-size: 13px; color: var(--muted); min-width: 60px; }
.time-input {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 8px; color: var(--text);
  font-family: 'DM Sans', sans-serif; font-size: 15px;
  font-weight: 600; padding: 8px 12px; outline: none;
  width: 110px; transition: border .2s; text-align: center;
}
.time-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,124,255,.1); }
.tp-sep { font-size: 12px; color: var(--muted); }

/* Payroll breakdown table */
.pr-breakdown {
  background: linear-gradient(135deg,rgba(79,124,255,.07),rgba(0,229,192,.03));
  border: 1px solid rgba(79,124,255,.18); border-radius: 12px; padding: 18px;
}
.pr-breakdown-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--accent); margin-bottom: 14px;
}
.pr-bd-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.04);
  font-size: 13px;
}
.pr-bd-row:last-child { border-bottom: none; padding-top: 12px; margin-top: 4px; border-top: 1px solid rgba(79,124,255,.2); }
.pr-bd-key { color: var(--muted); }
.pr-bd-val { font-weight: 600; }
.pr-bd-row:last-child .pr-bd-key { font-weight: 700; color: var(--text); font-size: 14px; }
.pr-bd-row:last-child .pr-bd-val { font-family:'Syne',sans-serif; font-size: 20px; color: var(--accent2); }
