:root {
    --bg: #f4f6fb;
    --card: #ffffff;
    --ink: #16213e;
    --muted: #6b7280;
    --line: #e5e9f2;
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --ok: #059669;
    --warn: #d97706;
    --bad: #dc2626;
    --sidebar: #101935;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(16, 25, 53, .06), 0 8px 24px rgba(16, 25, 53, .06);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--ink);
    font-size: 14px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .6rem; line-height: 1.25; }
.muted { color: var(--muted); }
.accent { color: #8b9dff; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* ---------- layout ---------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 248px;
    flex: 0 0 248px;
    background: var(--sidebar);
    color: #c7cfe6;
    padding: 14px 10px 24px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.side-brand { display: flex; gap: 14px; align-items: center; padding: 14px 14px 22px; }
.brand-logo-box {
    width: 58px; height: 58px; flex: 0 0 58px; border-radius: 14px;
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
    display: grid; place-items: center; overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}
.brand-logo-box img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.brand-fallback { color: #fff; font-weight: 800; font-size: 20px; }
.brand-text { display: flex; flex-direction: column; gap: 4px; }
.brand-app-name {
    font-size: 22px; font-weight: 800; letter-spacing: .03em; line-height: 1;
    display: inline-flex; align-items: baseline;
}
.brand-payro {
    color: #22d3ee;
    text-shadow: 0 2px 10px rgba(34,211,238,0.35);
    padding-right: 1px;
}
.brand-one {
    color: #f472b6;
    text-shadow: 0 2px 10px rgba(244,114,182,0.35);
}
.brand-company-name {
    color: #8895b8; font-size: 11.5px; font-weight: 500; letter-spacing: .03em;
    display: inline-flex; align-items: center; gap: 6px;
}
.brand-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #22d3ee; box-shadow: 0 0 6px rgba(34,211,238,0.7);
    display: inline-block;
}
.side-brand small { color: #8895b8; font-size: 11px; }
.logo {
    width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center;
    background: linear-gradient(135deg, #6366f1, #22d3ee); color: #fff; font-weight: 700;
    overflow: hidden; flex: 0 0 52px;
}
.logo-img img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.nav-group {
    font-size: 10px; text-transform: uppercase; letter-spacing: .09em;
    color: #6d7ba3; padding: 14px 12px 6px;
}
.nav-item {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px;
    color: #c7cfe6; font-weight: 500;
}
.nav-item:hover { background: rgba(255, 255, 255, .07); text-decoration: none; color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-item span { flex: 1; }
.nav-item.nav-logout {
    color: #f87171;
    margin-top: 8px;
    padding: 10px 14px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.22);
    border-radius: 9px;
    font-weight: 600;
    transition: all .18s ease;
}
.nav-item.nav-logout:hover {
    background: rgba(239, 68, 68, 0.22);
    border-color: rgba(239, 68, 68, 0.45);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
}
.nav-item.nav-logout svg {
    flex-shrink: 0;
    transition: transform .18s ease;
}
.nav-item.nav-logout:hover svg {
    transform: translateX(2px);
}
.side-footer {
    margin-top: 24px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, .1);
}
.top-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    background: #fff;
    border: 1.5px solid #fca5a5;
    color: #dc2626;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(220, 38, 38, 0.08);
    transition: all .18s ease;
}
.top-logout-btn:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.28);
    transform: translateY(-1px);
}
.top-logout-btn svg {
    flex-shrink: 0;
    transition: transform .18s ease;
}
.top-logout-btn:hover svg {
    transform: translateX(2px);
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    background: #fff; border-bottom: 1px solid var(--line); padding: 12px 22px;
    display: flex; align-items: center; gap: 14px; position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 18px; margin: 0; flex: 1; }
.top-right { display: flex; align-items: center; gap: 12px; }
.chip { background: var(--bg); border: 1px solid var(--line); padding: 6px 10px; border-radius: 20px; color: var(--muted); font-size: 12px; }
.icon-btn { display: none; background: none; border: 0; font-size: 20px; cursor: pointer; }

.user-menu { position: relative; }
.user-btn { display: flex; gap: 9px; align-items: center; background: none; border: 0; cursor: pointer; font: inherit; color: inherit; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; }
.uinfo { text-align: left; line-height: 1.15; }
.uinfo small { display: block; color: var(--muted); font-size: 11px; }
.dropdown {
    display: none; position: absolute; right: 0; top: 46px; background: #fff; min-width: 170px;
    border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden;
}
.dropdown.open { display: block; }
.dropdown a { display: block; padding: 10px 14px; color: var(--ink); }
.dropdown a:hover { background: var(--bg); text-decoration: none; }

/* ---------- notification bell ---------- */
.notif-menu { position: relative; }
.notif-btn {
    position: relative; background: none; border: 0; cursor: pointer; color: var(--ink);
    padding: 6px; border-radius: 50%; display: grid; place-items: center;
    transition: background .15s;
}
.notif-btn:hover { background: var(--bg); }
.notif-btn.has-unread { color: var(--primary); }
.notif-badge {
    position: absolute; top: 0; right: 0; background: #ef4444; color: #fff;
    font-size: 10px; font-weight: 700; min-width: 17px; height: 17px;
    border-radius: 9px; display: grid; place-items: center; padding: 0 4px;
    line-height: 1; border: 2px solid #fff;
}
.notif-dropdown {
    display: none; position: absolute; right: 0; top: 44px; width: 340px; max-width: 90vw;
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    box-shadow: var(--shadow); overflow: hidden; z-index: 50;
}
.notif-dropdown.open { display: block; }
.notif-drop-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.notif-count { font-size: 11px; color: #ef4444; font-weight: 700; }
.notif-drop-body { max-height: 360px; overflow-y: auto; }
.notif-item {
    display: block; padding: 12px 16px; border-bottom: 1px solid var(--line);
    color: var(--ink); transition: background .12s;
}
.notif-item:hover { background: var(--bg); text-decoration: none; }
.notif-item.unread { background: #f0f9ff; }
.notif-item.unread .notif-title { font-weight: 700; }
.notif-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.notif-msg { font-size: 12px; color: var(--muted); line-height: 1.4; }
.notif-msg { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notif-time { font-size: 11px; color: var(--muted); margin-top: 4px; }
.notif-empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.notif-drop-foot {
    display: block; padding: 11px 16px; text-align: center;
    background: var(--bg); font-size: 13px; font-weight: 600; color: var(--primary);
    border-top: 1px solid var(--line);
}
.notif-drop-foot:hover { background: #eef6ff; text-decoration: none; }

.content { padding: 20px 22px 40px; flex: 1; }
.foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }

/* ---------- cards / grid ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h3 { margin: 0; font-size: 15px; }
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.c2-1 { grid-template-columns: 2fr 1fr; }
.center-card { max-width: 520px; margin: 40px auto; text-align: center; }

.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stat .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.stat .value { font-size: 26px; font-weight: 700; margin-top: 6px; }
.stat .sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.stat.p { border-left: 3px solid var(--primary); }
.stat.g { border-left: 3px solid var(--ok); }
.stat.w { border-left: 3px solid var(--warn); }
.stat.r { border-left: 3px solid var(--bad); }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}
.stat-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: transform .1s ease, box-shadow .1s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(16, 25, 53, .08); }
.stat-icon {
    width: 44px; height: 44px; border-radius: 10px;
    display: grid; place-items: center;
    background: rgba(79, 70, 229, .08); color: var(--primary);
    flex-shrink: 0;
}
.stat-icon i { width: 20px; height: 20px; opacity: 1; border-radius: 4px; }
.stat-icon svg { width: 22px; height: 22px; }
.stat-card.ok .stat-icon { background: rgba(5, 150, 105, .1); color: var(--ok); }
.stat-card.warn .stat-icon { background: rgba(217, 119, 6, .1); color: var(--warn); }
.stat-card.bad .stat-icon { background: rgba(220, 38, 38, .1); color: var(--bad); }
.stat-info { flex: 1; min-width: 0; }
.stat-value { font-size: 24px; font-weight: 700; color: var(--ink); line-height: 1.1; }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 3px; }
.stat-card.ok { border-left: 3px solid var(--ok); }
.stat-card.warn { border-left: 3px solid var(--warn); }
.stat-card.bad { border-left: 3px solid var(--bad); }

@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
    .stat-grid { grid-template-columns: 1fr; }
    .stat-card { padding: 14px; }
    .stat-value { font-size: 22px; }
    .sidebar { display: none; }
    .shell { flex-direction: column; }
    .icon-btn { display: block; }
    .sidebar.open { display: block; position: fixed; left: 0; top: 0; height: 100vh; z-index: 30; }
}

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
table.table th, table.table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.table th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #fafbfe; white-space: nowrap; }
table.table tbody tr:hover { background: #fafbff; }
.empty { padding: 28px; text-align: center; color: var(--muted); }

/* ---------- forms ---------- */
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.full { grid-column: 1 / -1; }
label { font-size: 12px; font-weight: 600; color: #374151; }
input, select, textarea {
    font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px;
    background: #fff; color: var(--ink); width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(79, 70, 229, .25); border-color: var(--primary); }
textarea { min-height: 90px; resize: vertical; }
.hint { font-size: 11px; color: var(--muted); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 0 0 16px; }
legend { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 0 6px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filters .field { min-width: 150px; }

/* ---------- offer form (enhanced) ---------- */
.ofm-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); margin-bottom: 18px; overflow: hidden; }
.ofm-card .ofm-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 16px 22px; margin-bottom: 0;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 60%, #818cf8 100%);
    color: #fff; border: none;
}
.ofm-card .ofm-head h3 { margin: 0; font-size: 17px; font-weight: 700; color: #fff; letter-spacing: .2px; display: flex; align-items: center; gap: 10px; }
.ofm-card .ofm-head h3::before { content: "\1F4E8"; font-size: 18px; }
.ofm-card .ofm-head .ofm-sub { font-size: 12px; opacity: .85; margin-top: 2px; }
.ofm-card .ofm-head .btn { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.25); color: #fff; backdrop-filter: blur(4px); }
.ofm-card .ofm-head .btn:hover { background: rgba(255,255,255,.24); }
.ofm-body { padding: 22px; }

.ofm-fs { border: 1px solid var(--line); border-radius: 12px; padding: 18px 18px 14px; margin: 0 0 18px; background: #fff; position: relative; transition: box-shadow .15s, border-color .15s; }
.ofm-fs:hover { border-color: #c7cbff; box-shadow: 0 2px 10px rgba(79, 70, 229, .06); }
.ofm-fs legend {
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
    color: var(--primary); padding: 4px 12px; background: #eef2ff; border-radius: 999px;
    border: 1px solid #e0e7ff; display: inline-flex; align-items: center; gap: 6px;
}
.ofm-fs legend::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); display: inline-block; }
.ofm-fs .hint { font-weight: 500; color: var(--muted); margin-left: 6px; text-transform: none; letter-spacing: 0; }

.ofm-grid { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ofm-grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ofm-field { display: flex; flex-direction: column; gap: 6px; }
.ofm-field.full { grid-column: 1 / -1; }
.ofm-field label { font-size: 12px; font-weight: 600; color: #374151; display: flex; align-items: center; gap: 4px; }
.ofm-field label .req { color: #dc2626; font-weight: 700; }
.ofm-field input, .ofm-field select, .ofm-field textarea {
    font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
    background: #fff; color: var(--ink); width: 100%; transition: border-color .15s, box-shadow .15s, background .15s;
}
.ofm-field input:focus, .ofm-field select:focus, .ofm-field textarea:focus {
    outline: none; border-color: var(--primary); background: #fff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .15);
}
.ofm-field textarea { min-height: 70px; resize: vertical; }
.ofm-field .hint { font-size: 11px; color: var(--muted); margin-top: 2px; }
.ofm-name-row { display: flex; gap: 10px; }
.ofm-name-row select { width: 130px; flex: 0 0 130px; }
.ofm-name-row input { flex: 1; }

.ofm-sal { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.ofm-sal table { width: 100%; border-collapse: collapse; }
.ofm-sal thead th {
    background: linear-gradient(135deg, #4f46e5, #6366f1); color: #fff;
    padding: 10px 12px; text-align: left; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em;
}
.ofm-sal tbody td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ofm-sal tbody tr:nth-child(even) { background: #fafbff; }
.ofm-sal tbody tr:hover { background: #eef2ff; }
.ofm-sal input, .ofm-sal select { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; width: 100%; font: inherit; background: #fff; }
.ofm-sal input:focus, .ofm-sal select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(79,70,229,.15); }
.ofm-sal tfoot td { padding: 9px 12px; background: #f5f7ff; font-weight: 700; border-top: 1px solid var(--line); }
.ofm-sal tfoot td.right { text-align: right; }
.ofm-sal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.ofm-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--line); }
.ofm-actions .btn.primary { padding: 11px 22px; font-size: 14px; }
@media (max-width: 900px) { .ofm-grid, .ofm-grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ofm-grid, .ofm-grid.c2 { grid-template-columns: 1fr; } }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 9px;
    border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
    font: inherit; font-weight: 600; text-decoration: none;
}
.btn:hover { text-decoration: none; background: #f7f8fc; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.sm { padding: 6px 10px; font-size: 12px; }
.btn.block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- misc ---------- */
.badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge.ok { background: #d1fae5; color: #065f46; }
.badge.warn { background: #fef3c7; color: #92400e; }
.badge.bad { background: #fee2e2; color: #991b1b; }
.badge.muted { background: #e5e7eb; color: #374151; }
.alert { padding: 11px 14px; border-radius: 10px; margin-bottom: 14px; border: 1px solid transparent; }
.alert.success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.alert.error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert.info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 9px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); text-decoration: none; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 8px 14px; }
.kv dt { color: var(--muted); font-size: 12px; }
.kv dd { margin: 0; font-weight: 600; }
.progress { height: 8px; background: var(--line); border-radius: 20px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--primary); }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* calendar */
.cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal th { padding: 8px; font-size: 11px; text-transform: uppercase; color: var(--muted); }
.cal td { border: 1px solid var(--line); height: 84px; vertical-align: top; padding: 6px; }
.cal td.off { background: #fafbfe; }
.cal .d { font-weight: 700; font-size: 12px; }
.cal .tag { display: block; font-size: 10px; margin-top: 3px; padding: 2px 5px; border-radius: 5px; }
.cal .tag.h { background: #fee2e2; color: #991b1b; }
.cal .tag.l { background: #fef3c7; color: #92400e; }
.cal .tag.a { background: #d1fae5; color: #065f46; }
.cal .tag.e { background: #e0e7ff; color: #3730a3; }

/* attendance monthly grid */
.att-grid { width: 100%; border-collapse: collapse; font-size: 12px; }
.att-grid th, .att-grid td { border: 1px solid var(--line); padding: 4px 5px; text-align: center; white-space: nowrap; }
.att-grid thead th { background: #fafbfe; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .03em; }
.att-grid thead th.sticky-col { position: sticky; left: 0; z-index: 2; background: #fafbfe; }
.att-grid tbody td.sticky-col { position: sticky; left: 0; z-index: 1; background: #fff; text-align: left; min-width: 140px; }
.att-grid tbody tr:hover td.sticky-col { background: #fafbff; }
.att-grid .dc { width: 28px; font-weight: 600; }
.att-grid .dc.we { color: var(--muted); background: #fafbfe; }
.att-grid .s-P { background: #d1fae5; color: #065f46; }
.att-grid .s-H { background: #fef3c7; color: #92400e; }
.att-grid .s-A { background: #fee2e2; color: #991b1b; }
.att-grid .s-L { background: #dbeafe; color: #1e40af; }
.att-grid .s-W { background: #f3f4f6; color: #6b7280; }
.att-grid .s-X { background: #fef2f2; color: #dc2626; font-weight: 700; }
.att-grid .s-N { color: #d1d5db; }
.att-grid .sum { font-weight: 700; font-size: 11px; }
.att-grid tbody tr:hover { background: #fafbff; }
.att-grid .att-cell { position: relative; }
.att-grid .att-cell[data-title]:hover::after { content: attr(data-title); position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); background: #111827; color: #fff; padding: 5px 9px; border-radius: 6px; font-size: 10px; font-weight: 500; white-space: nowrap; z-index: 100; box-shadow: 0 4px 12px rgba(0,0,0,0.25); pointer-events: none; }
.att-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; font-size: 12px; }
.att-legend span { display: inline-flex; align-items: center; gap: 4px; }
.att-legend i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.att-legend .lg-P { background: #d1fae5; }
.att-legend .lg-H { background: #fef3c7; }
.att-legend .lg-A { background: #fee2e2; }
.att-legend .lg-L { background: #dbeafe; }
.att-legend .lg-W { background: #f3f4f6; }

/* auth + public pages */
.auth-body {
    min-height: 100vh; display: grid; place-items: center; padding: 24px;
    background: linear-gradient(135deg, #0f172e 0%, #312e81 55%, #0e7490 100%);
}
.auth-card { background: #fff; border-radius: 18px; padding: 30px; width: 100%; max-width: 430px; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }
.auth-card.wide { max-width: 860px; }

/* full-width candidate portal (offer / onboarding pages) */
.portal-body {
    min-height: 100vh;
    background: #f8fafc;
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.portal-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 50;
}
.portal-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.portal-company-logo {
    max-height: 48px;
    max-width: 160px;
    object-fit: contain;
    border-radius: 6px;
}
.portal-title-box h1 {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}
.portal-title-box h1 span {
    color: var(--primary);
}
.portal-subtitle {
    font-size: 13px;
    color: #64748b;
    margin-top: 2px;
    font-weight: 500;
}
.portal-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.portal-ref-badge {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.portal-status-badge {
    padding: 5px 14px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.portal-status-badge.pending {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}
.portal-status-badge.accepted {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.portal-status-badge.rejected {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.portal-status-badge.expired {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.portal-wrap {
    max-width: 1040px;
    margin: 0 auto;
    padding: 32px 20px 80px;
    width: 100%;
}
.portal-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
}

/* ---- candidate portal: modern stepper ---- */
.stepper-wrap {
    margin-bottom: 32px;
}
.stepper {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    padding: 0;
    margin: 0;
}
.stepper-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    text-align: center;
}
/* Connecting horizontal line between steps */
.stepper-item:not(:first-child)::before {
    content: '';
    position: absolute;
    top: 18px;
    right: 50%;
    width: 100%;
    height: 3px;
    background: #e2e8f0;
    z-index: 1;
    transition: background 0.3s ease;
}
.stepper-item.done:not(:first-child)::before,
.stepper-item.active:not(:first-child)::before {
    background: #10b981;
}
.stepper-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #cbd5e1;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.25s ease;
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}
.stepper-label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    transition: color 0.2s ease;
    white-space: nowrap;
}
.stepper-item.active .stepper-circle {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}
.stepper-item.active .stepper-label {
    color: var(--primary);
    font-weight: 700;
}
.stepper-item.done .stepper-circle {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
}
.stepper-item.done .stepper-label {
    color: #065f46;
}

/* ---- candidate portal: summary grid ---- */
.summary-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.summary-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}
.summary-card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}
.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 24px;
}
.summary-item {
    display: flex;
    flex-direction: column;
}
.summary-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}
.summary-val {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    word-break: break-word;
}
.summary-val.highlight {
    color: var(--primary);
    font-size: 15px;
    font-weight: 700;
}

/* ---- candidate portal: offer letter document viewer ---- */
.doc-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}
.doc-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}
.doc-section-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}
.doc-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.doc-toolbar .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 13px;
    border-radius: 8px;
    transition: all 0.15s ease;
}
.doc-preview-frame {
    background: #eef2f7;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 14px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
    position: relative;
}
.doc-preview-iframe {
    width: 100%;
    height: 640px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    display: block;
}
@media (max-width: 640px) {
    .doc-preview-iframe { height: 420px; }
}

/* ---- candidate portal: decision card (Review & Respond) ---- */
.decision-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 28px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}
.decision-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}
.decision-card p {
    margin: 0 0 22px;
    font-size: 14px;
    color: #64748b;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}
.decision-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}
.decision-actions .btn {
    min-width: 160px;
    padding: 11px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ---- candidate portal: modals ---- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    max-width: 540px;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-height: 90vh;
    overflow-y: auto;
    animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalPop {
    0% { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.modal-box h4 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}
.modal-box p.modal-desc {
    font-size: 13.5px;
    color: #64748b;
    margin: 0 0 20px;
    line-height: 1.5;
}
.terms-agreement-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
}
.terms-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
    color: #334155;
    font-weight: 500;
}
.terms-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* ---- candidate portal: document upload page (Step 3) ---- */
.doc-summary-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border: 1px solid #c7d2fe;
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 24px;
}
.doc-summary-banner h3 {
    margin: 0 0 4px;
    font-size: 18px;
    color: #312e81;
    font-weight: 700;
}
.doc-summary-banner p {
    margin: 0;
    font-size: 13px;
    color: #4338ca;
}
.doc-progress-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.doc-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.doc-progress-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}
.doc-progress-counts {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
}
.progress-bar {
    height: 10px;
    background: #f1f5f9;
    border-radius: 9999px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5 0%, #10b981 100%);
    border-radius: 9999px;
    transition: width 0.4s ease;
}
.doc-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.doc-item-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 22px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
.doc-item-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
.doc-item-card.is-uploaded {
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.doc-item-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}
.doc-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.doc-item-name {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}
.badge-required {
    background: #fee2e2;
    color: #991b1b;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.badge-optional {
    background: #f1f5f9;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.doc-item-status {
    font-size: 12.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 9999px;
}
.doc-item-status.uploaded {
    background: #dcfce7;
    color: #166534;
}
.doc-item-status.missing {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}
.doc-item-meta {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.doc-file-info {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #bbf7d0;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12.5px;
    color: #166534;
    display: flex;
    align-items: center;
    gap: 8px;
}
.doc-upload-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: #f8fafc;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
}
.doc-upload-form input[type="file"] {
    font-size: 12.5px;
    color: #334155;
    flex: 1;
    min-width: 220px;
}
.doc-upload-form .btn {
    padding: 6px 16px;
    font-size: 12.5px;
    font-weight: 600;
    border-radius: 6px;
}

/* ---- candidate portal: completed state ---- */
.completion-container {
    text-align: center;
    padding: 40px 20px;
}
.completion-icon-box {
    width: 72px;
    height: 72px;
    background: #dcfce7;
    color: #16a34a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 20px;
    box-shadow: 0 10px 25px -5px rgba(22, 163, 74, 0.2);
}
.completion-container h2 {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
}
.completion-container p.completion-sub {
    font-size: 15px;
    color: #64748b;
    margin: 0 0 32px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* ---- responsive media queries ---- */
@media (max-width: 768px) {
    .portal-header {
        padding: 14px 18px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .portal-header-right {
        width: 100%;
        justify-content: space-between;
    }
    .portal-wrap {
        padding: 20px 14px 60px;
    }
    .portal-card {
        padding: 20px;
        border-radius: 12px;
    }
    .summary-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .stepper {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 0;
    }
    .stepper-item {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        width: 100%;
        text-align: left;
    }
    .stepper-circle {
        margin-bottom: 0;
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    .stepper-line {
        display: none;
    }
    .doc-section-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .doc-toolbar {
        width: 100%;
    }
    .doc-toolbar .btn {
        flex: 1;
        justify-content: center;
    }
    .decision-actions {
        flex-direction: column;
    }
    .decision-actions .btn {
        width: 100%;
    }
    .doc-summary-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

.brand { font-size: 26px; margin-bottom: 4px; }
.brand span { color: var(--primary); }
.install-log { font-size: 13px; color: var(--muted); }
.demo-logins { font-size: 12px; background: var(--bg); border-radius: 10px; padding: 10px 14px; margin-top: 16px; }
.payslip { max-width: 820px; margin: 0 auto; }
.payslip-head { display: flex; justify-content: space-between; border-bottom: 2px solid var(--ink); padding-bottom: 12px; margin-bottom: 16px; }

@media print {
    .sidebar, .topbar, .foot, .no-print { display: none !important; }
    .content { padding: 0; }
    .card { box-shadow: none; border: 0; }
}

@media (max-width: 1000px) {
    .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid.c3, .grid.c2-1 { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- attendance calendar ---------- */
.att-cal-shell { display: grid; grid-template-columns: 35% 1fr; gap: 16px; align-items: start; overflow: visible; }
.att-mark-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; order: 1; }
.att-mark-card .emp { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.att-mark-card .emp .avatar { width: 48px; height: 48px; border-radius: 50%; background: #e5e7eb; display: grid; place-items: center; font-weight: 600; color: #6b7280; }
.att-mark-card .field { margin-bottom: 12px; }
.att-mark-card .field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.att-mark-card .field input, .att-mark-card .field select { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; }
.att-mark-card .field .status { display: inline-block; padding: 4px 12px; border-radius: 4px; font-weight: 600; background: #e5e7eb; color: #374151; }
.att-mark-card .field .status.present { background: #d1fae5; color: #065f46; }
.att-mark-card .field .status.late { background: #ffedd5; color: #9a3412; }
.att-mark-card .field .status.absent { background: #fee2e2; color: #991b1b; }
.att-mark-card .field .status.half_day { background: #fef3c7; color: #92400e; }
.att-mark-card .field .status.leave { background: #dbeafe; color: #1e40af; }
.att-mark-card .field .status.holiday { background: #f3e8ff; color: #6b21a8; }
.att-mark-card .field .status.week_off { background: #f3f4f6; color: #6b7280; }
.att-mark-card .actions { display: flex; flex-direction: column; gap: 10px; }
.att-mark-card .btn { width: 100%; justify-content: center; }
.att-mark-card .btn-outline { background: #fff; border: 1px solid currentColor; }

.att-cal-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; order: 2; overflow: visible; }
.att-cal-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.att-cal-head h3 { margin: 0; font-size: 16px; }
.att-cal-head .pill-row { display: flex; gap: 8px; align-items: center; }
.att-cal-head select, .att-cal-head input { padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; }
.att-cal-legend { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; font-size: 11px; justify-content: center; }
.att-cal-legend span { display: inline-flex; align-items: center; gap: 8px; }
.att-cal-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.att-cal-legend .lg-present { background: #10b981; }
.att-cal-legend .lg-late { background: #f59e0b; }
.att-cal-legend .lg-absent { background: #ef4444; }
.att-cal-legend .lg-leave { background: #3b82f6; }
.att-cal-legend .lg-holiday { background: #8b5cf6; }
.att-cal-legend .lg-half_day { background: #f59e0b; }
.att-cal-legend .lg-week_off { background: #9ca3af; }
.att-calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 6px 0; overflow: visible; }
.att-cal-header { text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; padding-bottom: 4px; }
.att-cal-day { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; max-width: 50px; aspect-ratio: 1; margin: 0 auto; border-radius: 50%; border: 2px solid var(--line); background: #fff; font-weight: 600; font-size: 12px; transition: .15s; position: relative; overflow: visible; }
.att-cal-day:hover { transform: scale(1.06); z-index: 30; }
.att-cal-day[data-title]::after { content: attr(data-title); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: #111827; color: #fff; padding: 6px 10px; border-radius: 6px; font-size: 11px; font-weight: 500; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 100; box-shadow: 0 4px 12px rgba(0,0,0,0.25); }
.att-cal-day[data-title]:hover::after { opacity: 1; }
.att-cal-day .dnum { font-size: 14px; line-height: 1; }
.att-cal-day .day-status { display: none; }
.att-cal-day.empty { background: transparent; border-color: transparent; }
.att-cal-day.future { background: #f3f4f6; border-color: #e5e7eb; color: #9ca3af; }
.att-cal-day.present { background: #d1fae5; border-color: #10b981; color: #065f46; }
.att-cal-day.late { background: #ffedd5; border-color: #f97316; color: #9a3412; }
.att-cal-day.absent { background: #fee2e2; border-color: #ef4444; color: #991b1b; }
.att-cal-day.leave { background: #dbeafe; border-color: #3b82f6; color: #1e40af; }
.att-cal-day.half_day { background: #fef3c7; border-color: #f59e0b; color: #92400e; }
.att-cal-day.holiday { background: #f3e8ff; border-color: #8b5cf6; color: #6b21a8; }
.att-cal-day.week_off { background: #f3f4f6; border-color: #d1d5db; color: #6b7280; }
.att-summary { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 12px; text-align: center; }
.att-summary .item { background: #f9fafb; border: 1px solid var(--line); border-radius: 8px; padding: 8px 4px; }
.att-summary .item .value { font-size: 17px; font-weight: 700; color: #111827; }
.att-summary .item .label { font-size: 10px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1024px) {
    .att-cal-shell { grid-template-columns: 1fr; }
    .att-summary { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
    .sidebar { position: fixed; left: -260px; z-index: 60; transition: left .2s; }
    .sidebar.open { left: 0; }
    .icon-btn { display: block; }
    .grid.c2, .grid.c4, .form-grid, .form-grid.c2 { grid-template-columns: 1fr; }
    .kv { grid-template-columns: 1fr; }
}

/* ================================================================
   PayOne-style candidate portal (auth + offer + journey)
   Matches PayOne's visual design exactly
   ================================================================ */

/* --- Auth layout (purple gradient, centered card) --- */
.p1-auth-body {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    margin: 0;
}
.p1-auth-wrapper {
    width: 100%;
    max-width: 440px;
}
.p1-auth-card {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.p1-auth-brand {
    text-align: center;
    margin-bottom: 1.5rem;
}
.p1-auth-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto .75rem;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.75rem;
}
.p1-auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
}
.p1-auth-subtitle {
    color: #6b7280;
    font-size: .85rem;
    margin: .25rem 0 0;
}
.p1-auth-footer {
    text-align: center;
    color: rgba(255,255,255,.8);
    font-size: .8rem;
    margin-top: 1rem;
}
.p1-auth-form .p1-field { margin-bottom: 1rem; }
.p1-auth-form .p1-field label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: .35rem;
}
.p1-auth-form .p1-field input {
    width: 100%;
    padding: .85rem .75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
}
.p1-auth-form .p1-field input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}
.p1-auth-form .p1-readonly {
    background: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
}
.p1-icon { font-style: normal; margin-right: 4px; }

/* --- Alerts --- */
.p1-alert {
    padding: .5rem .85rem;
    font-size: .85rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}
.p1-alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.p1-alert-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.p1-alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.p1-alert-secondary { background: #f3f4f6; color: #374151; border: 1px solid #d1d5db; }
.p1-alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

/* --- Buttons --- */
.p1-btn-primary {
    display: inline-block;
    background: #1d4ed8;
    color: #fff;
    padding: .65rem 1.25rem;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background .15s;
}
.p1-btn-primary:hover { background: #1e40af; }
.p1-btn-outline {
    display: inline-block;
    background: #fff;
    color: #1d4ed8;
    padding: .65rem 1.25rem;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #1d4ed8;
    cursor: pointer;
    transition: background .15s;
}
.p1-btn-outline:hover { background: #eff6ff; }
.p1-btn-success {
    display: inline-block;
    background: #16a34a;
    color: #fff;
    padding: .65rem 1.25rem;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background .15s;
}
.p1-btn-success:hover { background: #15803d; }
.p1-btn-danger {
    display: inline-block;
    background: #dc2626;
    color: #fff;
    padding: .65rem 1.25rem;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
}
.p1-btn-danger:hover { background: #b91c1c; }
.p1-btn-outline-danger {
    display: inline-block;
    background: #fff;
    color: #dc2626;
    padding: .65rem 1.25rem;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #dc2626;
    cursor: pointer;
}
.p1-btn-outline-danger:hover { background: #fef2f2; }
.p1-btn-lg { padding: .85rem 1.5rem; font-size: 1rem; }
.p1-btn-w-100 { width: 100%; text-align: center; }
.p1-btn-sm-primary {
    display: inline-block;
    background: #1d4ed8;
    color: #fff;
    padding: .35rem .85rem;
    border-radius: 6px;
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
}
.p1-btn-sm-outline {
    display: inline-block;
    background: #fff;
    color: #1d4ed8;
    padding: .35rem .85rem;
    border-radius: 6px;
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #1d4ed8;
    cursor: pointer;
}

/* --- Portal layout (topbar + main + footer) --- */
.p1-portal-body {
    background: #f3f4f6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}
.p1-portal-topbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: .75rem 1.5rem;
    box-shadow: 0 1px 8px rgba(0,0,0,.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.p1-portal-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.p1-portal-brand-logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 8px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.p1-portal-brand-text {
    font-weight: 700;
    color: #0f172a;
    font-size: 1.1rem;
}
.p1-portal-topbar-label {
    font-size: .85rem;
    color: #6b7280;
}
.p1-portal-main {
    flex: 1;
    padding: 1.5rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}
.p1-portal-footer {
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: .75rem 1.5rem;
    text-align: center;
    color: #6b7280;
    font-size: .8rem;
}
.p1-text-primary { color: #1d4ed8; }
.p1-small-muted { font-size: .8rem; color: #6b7280; }

/* --- Offer page --- */
.p1-portal-offer { width: 100%; }
.p1-company-head {
    text-align: center;
    margin-bottom: 1.5rem;
}
.p1-company-head h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1d4ed8;
    margin: 0;
}
.p1-company-head p {
    color: #6b7280;
    font-size: .85rem;
    margin: 2px 0 0;
}
.p1-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: 0 4px 24px rgba(0,0,0,.06);
    margin-bottom: 1rem;
}
.p1-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.p1-card-head h3 {
    font-size: 1.15rem;
    margin: 0;
    color: #0f172a;
}
.p1-card-title {
    font-size: 1.1rem;
    margin: 0 0 1rem;
    color: #0f172a;
}
.p1-badge {
    padding: .35rem .85rem;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
}
.p1-badge-sent, .p1-badge-pending_approval { background: #dbeafe; color: #1d4ed8; }
.p1-badge-viewed, .p1-badge-approved { background: #e0e7ff; color: #4338ca; }
.p1-badge-accepted { background: #dcfce7; color: #16a34a; }
.p1-badge-rejected { background: #fee2e2; color: #dc2626; }
.p1-badge-expired, .p1-badge-withdrawn { background: #f3f4f6; color: #6b7280; }
.p1-badge-draft { background: #f3f4f6; color: #6b7280; }

.p1-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .75rem;
}
.p1-info-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: .6rem .85rem;
}
.p1-info-item .lbl {
    font-size: .72rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.p1-info-item .val {
    font-weight: 600;
    color: #111827;
    font-size: .9rem;
    margin-top: 2px;
}
.p1-section-title {
    margin-top: 1.5rem;
    margin-bottom: .75rem;
    font-size: 1rem;
    color: #1d4ed8;
    font-weight: 700;
}
.p1-salary-tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}
.p1-salary-tbl th {
    background: #1d4ed8;
    color: #fff;
    padding: .5rem .65rem;
    text-align: left;
}
.p1-salary-tbl td {
    padding: .5rem .65rem;
    border-bottom: 1px solid #e5e7eb;
}
.p1-salary-tbl tfoot td {
    background: #f3f4f6;
    font-weight: 700;
}
.p1-terms-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-left: 3px solid #1d4ed8;
    padding: .75rem 1rem;
    border-radius: 6px;
    white-space: pre-wrap;
    font-size: .9rem;
}
.p1-offer-letter-links {
    margin-top: 1rem;
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}
.p1-portal-actions {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}
.p1-portal-actions form, .p1-portal-actions button { flex: 1; min-width: 180px; }
.p1-reject-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}
.p1-logout-link {
    margin-top: 1rem;
    text-align: right;
}
.p1-logout-link a {
    font-size: .8rem;
    color: #6b7280;
    text-decoration: none;
}
.p1-logout-link a:hover { text-decoration: underline; }

/* --- Journey page --- */
.p1-portal-wrap { width: 100%; }
.p1-portal-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
    color: #fff;
    border-radius: 14px;
    padding: 1.75rem;
    margin-bottom: 1.25rem;
}
.p1-portal-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: .5rem;
}
.p1-portal-header h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
}
.p1-portal-header-sub {
    opacity: .85;
    font-size: .85rem;
    margin-top: 3px;
}
.p1-portal-header-right { text-align: right; }
.p1-badge-stage {
    background: rgba(255,255,255,.2);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    display: inline-block;
}
.p1-progress-bar-wrap {
    background: rgba(255,255,255,.2);
    border-radius: 20px;
    height: 8px;
    margin-top: 12px;
    overflow: hidden;
}
.p1-progress-bar-fill {
    background: #fff;
    height: 100%;
    border-radius: 20px;
    transition: width .4s ease;
}
.p1-portal-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    background: #fff;
    border-radius: 10px;
    padding: 4px;
    box-shadow: 0 1px 6px rgba(0,0,0,.05);
}
.p1-portal-tabs a {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    transition: all .2s;
}
.p1-portal-tabs a.active,
.p1-portal-tabs a:hover {
    background: #1d4ed8;
    color: #fff;
}
.p1-sec-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1d4ed8;
    margin-bottom: .75rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid #e5e7eb;
}
.p1-sub-title {
    font-size: .85rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin: 1rem 0 .5rem;
}

/* Timeline */
.p1-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
}
.p1-timeline li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    position: relative;
}
.p1-timeline li::before {
    content: '';
    position: absolute;
    left: 13px;
    top: 32px;
    bottom: -8px;
    width: 2px;
    background: #e5e7eb;
}
.p1-timeline li:last-child::before { display: none; }
.p1-timeline-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.p1-timeline-dot.done { background: #16a34a; color: #fff; }
.p1-timeline-dot.current {
    background: #1d4ed8;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(29,78,216,.2);
}
.p1-timeline-dot.pending {
    background: #f3f4f6;
    color: #9ca3af;
    border: 2px solid #e5e7eb;
}
.p1-timeline-label {
    font-weight: 600;
    font-size: .9rem;
    color: #111827;
}
.p1-timeline-sub {
    font-size: .75rem;
    color: #6b7280;
}

/* Stats */
.p1-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}
.p1-stat-card {
    text-align: center;
    padding: 1.5rem 1rem;
}
.p1-stat-icon {
    font-size: 1.75rem;
    margin-bottom: .5rem;
}
.p1-stat-num {
    font-size: .95rem;
    color: #0f172a;
}
.p1-stat-num strong {
    font-size: 1.25rem;
    color: #1d4ed8;
}
.p1-stat-label {
    font-size: .8rem;
    color: #6b7280;
    margin-top: .25rem;
}
.p1-stat-card .p1-btn-sm-outline {
    margin-top: .5rem;
}

/* Document cards */
.p1-doc-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: .75rem;
}
.p1-doc-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
    gap: 10px;
}
.p1-doc-name {
    font-weight: 600;
    font-size: .9rem;
    color: #111827;
}
.p1-req { color: #dc2626; }
.p1-doc-status {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .7rem;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
}
.p1-st-pending { background: #f3f4f6; color: #6b7280; }
.p1-st-uploaded, .p1-st-submitted { background: #dbeafe; color: #1d4ed8; }
.p1-st-verified { background: #dcfce7; color: #16a34a; }
.p1-st-rejected { background: #fee2e2; color: #dc2626; }
.p1-st-not_required { background: #f3f4f6; color: #9ca3af; }
.p1-doc-file {
    font-size: .8rem;
    color: #6b7280;
    margin: 6px 0;
}
.p1-doc-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}
.p1-doc-reject {
    background: #fee2e2;
    color: #991b1b;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: .8rem;
    margin-top: 8px;
}
.p1-doc-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.p1-doc-form input[type="file"] {
    font-size: .8rem;
    flex: 1;
    min-width: 200px;
}

/* Agreement cards */
.p1-ag-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: .75rem;
}
.p1-ag-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}
.p1-ag-title {
    font-weight: 600;
    font-size: .95rem;
    color: #111827;
    margin-bottom: 4px;
}
.p1-ag-desc {
    font-size: .8rem;
    color: #6b7280;
}

/* Modal */
.p1-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    padding: 1rem;
}
.p1-modal-box {
    background: #fff;
    border-radius: 12px;
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 1.75rem;
}
.p1-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.p1-modal-head h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #0f172a;
}
.p1-modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #6b7280;
    cursor: pointer;
    padding: 4px 8px;
}
.p1-modal-close:hover { color: #dc2626; }
.p1-ag-body {
    max-height: 50vh;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    font-size: .85rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}
.p1-ag-body h4 { margin: 12px 0 6px; font-size: .9rem; color: #0f172a; }
.p1-ag-body p { margin: 0 0 10px; }
.p1-ag-warning {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
    border-radius: 8px;
    padding: .65rem 1rem;
    font-size: .85rem;
    margin-bottom: 1rem;
}
.p1-modal-actions {
    display: flex;
    gap: .5rem;
    justify-content: flex-end;
}

/* Form fields in journey */
.p1-field { margin-bottom: .5rem; }
.p1-field label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: .25rem;
}
.p1-field input {
    width: 100%;
    padding: .4rem .65rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: .85rem;
    box-sizing: border-box;
}
.p1-field input:focus {
    outline: none;
    border-color: #1d4ed8;
    box-shadow: 0 0 0 2px rgba(29,78,216,.12);
}
.p1-info-grid .p1-field { margin: 0; }

/* Table */
.p1-table-sm {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
    margin-bottom: 1rem;
}
.p1-table-sm th {
    background: #f9fafb;
    padding: .5rem .65rem;
    text-align: left;
    border-bottom: 2px solid #e5e7eb;
    font-size: .8rem;
    color: #374151;
}
.p1-table-sm td {
    padding: .5rem .65rem;
    border-bottom: 1px solid #e5e7eb;
}

/* Footer card */
.p1-portal-footer-card {
    text-align: center;
    padding: .75rem;
}
.p1-portal-footer-card a {
    color: #6b7280;
    text-decoration: none;
}
.p1-portal-footer-card a:hover { text-decoration: underline; }

/* --- Responsive --- */
@media (max-width: 1200px) {
    .p1-info-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1000px) {
    .p1-stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .p1-auth-card { padding: 1.75rem 1.25rem; }
}
@media (max-width: 640px) {
    .p1-info-grid { grid-template-columns: 1fr; }
    .p1-stats-row { grid-template-columns: 1fr; }
    .p1-portal-tabs a { font-size: .78rem; padding: 6px 10px; }
    .p1-portal-header { padding: 1rem; }
    .p1-portal-header-top { flex-direction: column; }
    .p1-portal-header-right { text-align: left; }
    .p1-card { padding: 1rem; }
    .p1-doc-form { flex-direction: column; align-items: stretch; }
    .p1-doc-form .p1-btn-sm-primary { width: 100%; text-align: center; }
    .p1-portal-actions { flex-direction: column; }
    .p1-portal-actions form, .p1-portal-actions button { min-width: 100%; }
    .p1-portal-main { padding: 1rem; }
}

/* ---------- Offer Letter Templates: rich-text editor ---------- */
.rte-toolbar {
    display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
    padding: 6px 8px; border: 1px solid var(--border, #d1d5db);
    border-bottom: none; background: #f9fafb; border-radius: 6px 6px 0 0;
}
.rte-toolbar button {
    min-width: 28px; height: 28px; padding: 0 6px; background: #fff;
    border: 1px solid #d1d5db; border-radius: 4px; cursor: pointer; font-size: 13px;
}
.rte-toolbar button:hover { background: #eef2ff; border-color: #6366f1; }
.rte-sep { width: 1px; height: 22px; background: #d1d5db; margin: 0 4px; }
.rte-var-select { height: 28px; font-size: 12px; border: 1px solid #d1d5db; border-radius: 4px; background: #fff; }
.rte-editor {
    min-height: 90px; padding: 10px 12px; border: 1px solid var(--border, #d1d5db);
    border-radius: 0 0 6px 6px; background: #fff; line-height: 1.6; font-size: 14px;
    outline: none; overflow-y: auto;
}
.rte-editor:focus { border-color: #6366f1; box-shadow: 0 0 0 2px rgba(99,102,241,.15); }
.rte-editor h3 { font-size: 16px; margin: 8px 0 4px; }
.rte-editor ul, .rte-editor ol { margin: 6px 0 6px 22px; }
.rte-editor a { color: #2563eb; text-decoration: underline; }
.rte-editor hr { border: none; border-top: 1px solid #d1d5db; margin: 10px 0; }

.pill-row { display: flex; align-items: center; gap: 8px; }
.table-wrap { overflow-x: auto; }
.badge-draft   { background: #e0e7ff; color: #3730a3; }
.badge-active  { background: #dcfce7; color: #166534; }
.badge-inactive{ background: #f1f5f9; color: #475569; }
.badge-archived{ background: #fee2e2; color: #991b1b; }
.empty { text-align: center; padding: 24px; color: #6b7280; font-style: italic; }

/* ============================================================
   Employee Separation Module — modern SaaS dashboard styling
   ============================================================ */

/* ---- Icon fallbacks (in case Lucide doesn't load) ---- */
[data-lucide] { display: inline-block; width: 18px; height: 18px; min-width: 18px; min-height: 18px; vertical-align: middle; }
.sep-stat-icon [data-lucide] { width: 20px; height: 20px; }
.sep-step-icon [data-lucide] { width: 16px; height: 16px; }
.sep-btn [data-lucide] { width: 17px; height: 17px; }
.nav-item [data-lucide] { width: 17px; height: 17px; flex-shrink: 0; opacity: .85; }
.nav-item.active [data-lucide] { opacity: 1; }

/* ---- Page background ---- */
.sep-page { padding: 0; }

/* ---- Dashboard header ---- */
.sep-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 18px; flex-wrap: wrap; margin-bottom: 22px;
}
.sep-header-text h2 {
    font-size: 24px; font-weight: 700; margin: 0 0 6px; color: var(--ink);
    letter-spacing: -.2px;
}
.sep-header-text p {
    margin: 0; color: var(--muted); font-size: 13.5px; max-width: 560px; line-height: 1.5;
}
.sep-header-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.sep-btn {
    display: inline-flex; align-items: center; gap: 8px;
    height: 42px; padding: 0 18px; border-radius: 10px;
    font-weight: 600; font-size: 13.5px; cursor: pointer; text-decoration: none;
    border: 1px solid transparent; transition: all .18s ease;
}
.sep-btn svg { width: 17px; height: 17px; }
.sep-btn-primary { background: var(--primary); color: #fff; }
.sep-btn-primary:hover { background: var(--primary-dark); text-decoration: none; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79,70,229,.25); }
.sep-btn-danger { background: #fff; color: var(--bad); border-color: #fecaca; }
.sep-btn-danger:hover { background: var(--bad); color: #fff; text-decoration: none; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(220,38,38,.22); }
.sep-btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.sep-btn-ghost:hover { background: var(--bg); text-decoration: none; }
.sep-btn:disabled, .sep-btn[disabled] { opacity: .55; cursor: not-allowed; pointer-events: none; transform: none !important; box-shadow: none !important; }

/* ---- Stat cards grid ---- */
.sep-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}
.sep-stat {
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
    padding: 18px; box-shadow: 0 1px 2px rgba(16,25,53,.04);
    display: flex; flex-direction: column; gap: 12px;
    min-height: 132px; position: relative;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.sep-stat:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(16,25,53,.08); border-color: #d6dce8; }
.sep-stat-top { display: flex; align-items: flex-start; justify-content: space-between; }
.sep-stat-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: grid; place-items: center; flex-shrink: 0;
}
.sep-stat-icon svg { width: 20px; height: 20px; }
.sep-stat-icon.i-warn   { background: rgba(217,119,6,.10);  color: #b45309; }
.sep-stat-icon.i-blue   { background: rgba(59,130,246,.10);  color: #1d4ed8; }
.sep-stat-icon.i-purple { background: rgba(124,58,237,.10);  color: #6d28d9; }
.sep-stat-icon.i-orange { background: rgba(234,88,12,.10);   color: #c2410c; }
.sep-stat-icon.i-teal   { background: rgba(13,148,136,.10);  color: #0f766e; }
.sep-stat-icon.i-red    { background: rgba(220,38,38,.10);   color: #b91c1c; }
.sep-stat-icon.i-green  { background: rgba(5,150,105,.10);   color: #047857; }
.sep-stat-icon.i-gray   { background: rgba(107,114,128,.10);  color: #4b5563; }
.sep-stat-menu { color: #cbd5e1; font-size: 18px; line-height: 1; cursor: pointer; }
.sep-stat-menu:hover { color: #94a3b8; }
.sep-stat-value { font-size: 28px; font-weight: 700; color: var(--ink); line-height: 1; letter-spacing: -.5px; }
.sep-stat-label { font-size: 12.5px; color: var(--muted); font-weight: 500; margin-top: 4px; }
.sep-stat-meta { font-size: 11.5px; color: var(--muted); margin-top: auto; display: flex; align-items: center; gap: 5px; }
.sep-stat-meta a { color: var(--primary); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 3px; }
.sep-stat-meta a:hover { text-decoration: underline; }
.sep-stat-accent { position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; }
.sep-stat.s-warn   .sep-stat-accent { background: var(--warn); }
.sep-stat.s-blue   .sep-stat-accent { background: #3b82f6; }
.sep-stat.s-purple .sep-stat-accent { background: #7c3aed; }
.sep-stat.s-orange .sep-stat-accent { background: #ea580c; }
.sep-stat.s-teal   .sep-stat-accent { background: #0d9488; }
.sep-stat.s-red    .sep-stat-accent { background: var(--bad); }
.sep-stat.s-green  .sep-stat-accent { background: var(--ok); }
.sep-stat.s-gray   .sep-stat-accent { background: #9ca3af; }

/* ---- Process workflow strip ---- */
.sep-process {
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
    padding: 16px 18px; margin-bottom: 22px; box-shadow: 0 1px 2px rgba(16,25,53,.04);
}
.sep-process-title { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 12px; display: flex; align-items: center; gap: 7px; }
.sep-process-title svg { width: 15px; height: 15px; color: var(--primary); }
.sep-process-flow {
    display: flex; align-items: center; gap: 4px;
    overflow-x: auto; padding-bottom: 4px;
}
.sep-step {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    min-width: 92px; flex-shrink: 0; padding: 6px 4px;
}
.sep-step-icon {
    width: 34px; height: 34px; border-radius: 50%;
    display: grid; place-items: center; background: #f1f5f9; color: #64748b;
    border: 1.5px solid #e2e8f0; transition: all .18s ease;
}
.sep-step-icon svg { width: 16px; height: 16px; }
.sep-step.done .sep-step-icon { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.sep-step.active .sep-step-icon { background: #eef2ff; color: var(--primary); border-color: #c7d2fe; }
.sep-step-label { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.2; font-weight: 500; }
.sep-step.done .sep-step-label { color: #047857; font-weight: 600; }
.sep-step.active .sep-step-label { color: var(--primary); font-weight: 600; }
.sep-arrow { color: #cbd5e1; font-size: 16px; flex-shrink: 0; }

/* ---- Needs attention ---- */
.sep-attention {
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
    padding: 18px; margin-bottom: 22px; box-shadow: 0 1px 2px rgba(16,25,53,.04);
}
.sep-attention-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sep-attention-head h3 { margin: 0; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.sep-attention-head h3 svg { width: 16px; height: 16px; color: var(--warn); }
.sep-attention-list { display: flex; flex-direction: column; gap: 8px; }
.sep-attn-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    background: #fafbfe; border: 1px solid #eef0f6; border-radius: 10px;
    transition: all .15s ease;
}
.sep-attn-item:hover { background: #f5f7fc; border-color: #e0e4f0; }
.sep-attn-icon {
    width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0;
    display: grid; place-items: center;
}
.sep-attn-icon svg { width: 17px; height: 17px; }
.sep-attn-icon.a-warn  { background: #fef3c7; color: #b45309; }
.sep-attn-icon.a-blue  { background: #dbeafe; color: #1d4ed8; }
.sep-attn-icon.a-orange { background: #ffedd5; color: #c2410c; }
.sep-attn-icon.a-green { background: #d1fae5; color: #047857; }
.sep-attn-body { flex: 1; min-width: 0; }
.sep-attn-title { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.sep-attn-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sep-attn-meta { font-size: 12px; color: var(--muted); white-space: nowrap; }
.sep-attn-go { color: var(--primary); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; }
.sep-attn-go:hover { text-decoration: underline; }

/* ---- Section card (recent separations) ---- */
.sep-section {
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
    padding: 18px; box-shadow: 0 1px 2px rgba(16,25,53,.04);
}
.sep-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.sep-section-head h3 { margin: 0 0 3px; font-size: 16px; font-weight: 700; }
.sep-section-head p { margin: 0; font-size: 12.5px; color: var(--muted); }
.sep-search {
    position: relative; display: flex; align-items: center;
}
.sep-search svg { position: absolute; left: 11px; width: 15px; height: 15px; color: var(--muted); pointer-events: none; }
.sep-search input {
    padding: 9px 12px 9px 34px; border: 1px solid var(--line); border-radius: 9px;
    font: inherit; font-size: 13px; background: #fafbfe; color: var(--ink);
    width: 240px; max-width: 100%; transition: all .15s ease;
}
.sep-search input:focus { outline: none; background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }

/* ---- Filter chips ---- */
.sep-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.sep-filter {
    padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
    background: #f1f5f9; color: #475569; border: 1px solid transparent;
    cursor: pointer; transition: all .15s ease; text-decoration: none;
}
.sep-filter:hover { background: #e2e8f0; color: #1e293b; text-decoration: none; }
.sep-filter.active { background: var(--primary); color: #fff; }

/* ---- Modern data table ---- */
.sep-table { width: 100%; border-collapse: collapse; }
.sep-table th {
    font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
    color: #64748b; font-weight: 700; text-align: left;
    padding: 10px 14px; background: #f8fafc; border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.sep-table td { padding: 13px 14px; border-bottom: 1px solid #f1f5f9; font-size: 13.5px; vertical-align: middle; }
.sep-table tbody tr { transition: background .12s ease; }
.sep-table tbody tr:hover { background: #fafbff; }
.sep-table tbody tr:last-child td { border-bottom: none; }

/* ---- Employee cell with avatar ---- */
.sep-emp { display: flex; align-items: center; gap: 11px; }
.sep-avatar {
    width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
    display: grid; place-items: center; font-weight: 700; font-size: 13px;
    color: #fff;
}
.sep-avatar.a1 { background: linear-gradient(135deg, #6366f1, #818cf8); }
.sep-avatar.a2 { background: linear-gradient(135deg, #0ea5e9, #38bdf8); }
.sep-avatar.a3 { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.sep-avatar.a4 { background: linear-gradient(135deg, #10b981, #34d399); }
.sep-avatar.a5 { background: linear-gradient(135deg, #ef4444, #f87171); }
.sep-avatar.a6 { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
.sep-emp-info { min-width: 0; }
.sep-emp-name { font-weight: 600; color: var(--ink); font-size: 13.5px; }
.sep-emp-meta { font-size: 11.5px; color: var(--muted); margin-top: 1px; }

/* ---- Pill badges ---- */
.sep-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
    white-space: nowrap;
}
.sep-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.sep-badge.no-dot::before { display: none; }
.sep-badge.b-submitted    { background: #f1f5f9; color: #475569; }
.sep-badge.b-under_review { background: #dbeafe; color: #1d4ed8; }
.sep-badge.b-notice_period{ background: #ede9fe; color: #6d28d9; }
.sep-badge.b-asset_clearance   { background: #ffedd5; color: #c2410c; }
.sep-badge.b-finance_clearance { background: #fef9c3; color: #a16207; }
.sep-badge.b-hr_review    { background: #dbeafe; color: #1d4ed8; }
.sep-badge.b-approved     { background: #dcfce7; color: #047857; }
.sep-badge.b-completed    { background: #dcfce7; color: #047857; }
.sep-badge.b-rejected     { background: #fee2e2; color: #b91c1c; }
.sep-badge.b-withdrawn   { background: #f1f5f9; color: #64748b; }
.sep-badge.b-terminated  { background: #fee2e2; color: #b91c1c; }
.sep-badge.b-resignation  { background: #fef3c7; color: #b45309; }
.sep-badge.b-termination  { background: #fee2e2; color: #b91c1c; }
.sep-badge.b-not_started  { background: #f1f5f9; color: #64748b; }
.sep-badge.b-in_progress  { background: #dbeafe; color: #1d4ed8; }
.sep-badge.b-partially_returned { background: #ffedd5; color: #c2410c; }
.sep-badge.b-exception    { background: #fef3c7; color: #b45309; }
.sep-badge.b-good         { background: #dcfce7; color: #047857; }
.sep-badge.b-damaged      { background: #fef3c7; color: #b45309; }
.sep-badge.b-lost         { background: #fee2e2; color: #b91c1c; }
.sep-badge.b-waived       { background: #f1f5f9; color: #64748b; }
.sep-badge.b-assigned    { background: #dbeafe; color: #1d4ed8; }
.sep-badge.b-returned    { background: #dcfce7; color: #047857; }
.sep-badge.b-available   { background: #f1f5f9; color: #64748b; }

/* ---- View button ---- */
.sep-view-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600;
    background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none;
    transition: all .15s ease;
}
.sep-view-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); text-decoration: none; }
.sep-view-btn svg { width: 13px; height: 13px; }

/* ---- Empty state ---- */
.sep-empty {
    text-align: center; padding: 48px 20px; color: var(--muted);
}
.sep-empty-icon {
    width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px;
    background: #f1f5f9; display: grid; place-items: center; color: #94a3b8;
}
.sep-empty-icon svg { width: 28px; height: 28px; }
.sep-empty-title { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.sep-empty-sub { font-size: 13px; color: var(--muted); }

/* ---- Mobile card layout for table ---- */
.sep-mobile-cards { display: none; flex-direction: column; gap: 12px; }
.sep-mcard {
    background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px;
}
.sep-mcard-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sep-mcard-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; font-size: 12.5px; }
.sep-mcard-rows .lbl { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.sep-mcard-rows .val { color: var(--ink); font-weight: 500; }

/* ============================================================
   Detail page redesign
   ============================================================ */

/* ---- Employee header banner ---- */
.sep-detail-hero {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 60%, #818cf8 100%);
    border-radius: 16px; padding: 22px 24px; color: #fff; margin-bottom: 22px;
    display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
    box-shadow: 0 6px 20px rgba(79,70,229,.18);
}
.sep-hero-left { display: flex; align-items: center; gap: 16px; }
.sep-hero-avatar {
    width: 60px; height: 60px; border-radius: 50%;
    background: rgba(255,255,255,.2); border: 2px solid rgba(255,255,255,.4);
    display: grid; place-items: center; font-size: 22px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.sep-hero-name { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.sep-hero-meta { font-size: 13px; opacity: .9; }
.sep-hero-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sep-hero-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
    background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.25);
}

/* ---- Info grid ---- */
.sep-info-grid {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
    margin-bottom: 22px;
}
.sep-info-item {
    background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
}
.sep-info-item .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.sep-info-item .val { font-size: 14px; font-weight: 600; color: var(--ink); }
.sep-info-item .val.muted { color: var(--muted); font-weight: 500; }

/* ---- Clearance progress cards ---- */
.sep-clearance-grid {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px;
}
.sep-clr-card {
    background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px;
    display: flex; flex-direction: column; gap: 10px;
}
.sep-clr-head { display: flex; align-items: center; justify-content: space-between; }
.sep-clr-title { font-size: 13px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.sep-clr-title svg { width: 15px; height: 15px; color: var(--muted); }
.sep-clr-progress { font-size: 11px; color: var(--muted); }
.sep-clr-bar { height: 6px; background: #f1f5f9; border-radius: 999px; overflow: hidden; }
.sep-clr-fill { height: 100%; border-radius: 999px; transition: width .3s ease; }
.sep-clr-fill.f-done { background: linear-gradient(90deg, #10b981, #34d399); }
.sep-clr-fill.f-partial { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.sep-clr-fill.f-zero { background: #e2e8f0; width: 4% !important; }
.sep-clr-foot { font-size: 11.5px; color: var(--muted); display: flex; justify-content: space-between; }

/* ---- Timeline ---- */
.sep-timeline {
    background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 22px;
}
.sep-timeline-title { font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.sep-tl { position: relative; padding-left: 28px; }
.sep-tl::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: #e2e8f0; }
.sep-tl-step { position: relative; padding-bottom: 16px; }
.sep-tl-step:last-child { padding-bottom: 0; }
.sep-tl-dot {
    position: absolute; left: -22px; top: 2px; width: 18px; height: 18px; border-radius: 50%;
    background: #fff; border: 2px solid #e2e8f0; display: grid; place-items: center;
}
.sep-tl-step.done .sep-tl-dot { background: #10b981; border-color: #10b981; }
.sep-tl-step.done .sep-tl-dot::after { content: ""; width: 6px; height: 6px; background: #fff; border-radius: 50%; }
.sep-tl-step.active .sep-tl-dot { background: #fff; border-color: var(--primary); }
.sep-tl-step.active .sep-tl-dot::after { content: ""; width: 8px; height: 8px; background: var(--primary); border-radius: 50%; }
.sep-tl-label { font-size: 13px; font-weight: 600; color: var(--ink); }
.sep-tl-step.done .sep-tl-label { color: #047857; }
.sep-tl-step.active .sep-tl-label { color: var(--primary); }
.sep-tl-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ---- Finance mini cards ---- */
.sep-finance-grid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px;
}
.sep-fin-card {
    background: #fafbfe; border: 1px solid #eef0f6; border-radius: 10px; padding: 14px;
}
.sep-fin-card .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.sep-fin-card .val { font-size: 18px; font-weight: 700; color: var(--ink); margin-top: 6px; }
.sep-fin-card .val.pos { color: var(--ok); }
.sep-fin-card .val.neg { color: var(--bad); }
.sep-fin-card .sub { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* ---- Asset cards ---- */
.sep-asset-list { display: flex; flex-direction: column; gap: 10px; }
.sep-asset-card {
    background: #fafbfe; border: 1px solid #eef0f6; border-radius: 12px; padding: 14px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.sep-asset-main { display: flex; align-items: center; gap: 12px; }
.sep-asset-icon {
    width: 40px; height: 40px; border-radius: 10px; background: #eef2ff; color: var(--primary);
    display: grid; place-items: center; flex-shrink: 0;
}
.sep-asset-icon svg { width: 19px; height: 19px; }
.sep-asset-name { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.sep-asset-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.sep-asset-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---- Modal drawer for asset return ---- */
.sep-modal-overlay {
    display: none; position: fixed; inset: 0; background: rgba(15,23,42,.45);
    z-index: 50; align-items: center; justify-content: center; padding: 16px;
}
.sep-modal-overlay.open { display: flex; }
.sep-modal {
    background: #fff; border-radius: 14px; max-width: 460px; width: 100%;
    box-shadow: 0 20px 60px rgba(15,23,42,.3); max-height: 90vh; overflow-y: auto;
}
.sep-modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.sep-modal-head h4 { margin: 0; font-size: 15px; font-weight: 700; }
.sep-modal-close { background: none; border: 0; font-size: 22px; color: var(--muted); cursor: pointer; line-height: 1; padding: 0 4px; }
.sep-modal-close:hover { color: var(--ink); }
.sep-modal-body { padding: 18px 20px; }
.sep-modal-body .field { margin-bottom: 12px; }

/* ---- Responsive ---- */
@media (max-width: 1100px) {
    .sep-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sep-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sep-clearance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sep-finance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .sep-header { flex-direction: column; align-items: stretch; }
    .sep-header-actions { width: 100%; }
    .sep-btn { flex: 1; justify-content: center; }
    .sep-stats { grid-template-columns: 1fr; }
    .sep-info-grid { grid-template-columns: 1fr; }
    .sep-clearance-grid { grid-template-columns: 1fr; }
    .sep-finance-grid { grid-template-columns: 1fr; }
    .sep-search input { width: 100%; }
    .sep-section-head { flex-direction: column; }
    /* hide table, show mobile cards */
    .sep-table-wrap { display: none; }
    .sep-mobile-cards { display: flex; }
    .sep-detail-hero { padding: 18px; }
    .sep-hero-name { font-size: 18px; }
}

/* ============================================================
   Resignation form styling
   ============================================================ */
.sep-form-section-title {
    font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px; padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}
.sep-form-section-title svg { width: 16px; height: 16px; color: var(--primary); }

.sep-form-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
}
.sep-field { display: flex; flex-direction: column; gap: 6px; }
.sep-field-full { grid-column: 1 / -1; }
.sep-field label {
    font-size: 13px; font-weight: 600; color: var(--ink);
    display: flex; align-items: center; gap: 4px;
}
.sep-field .req { color: var(--bad); font-size: 14px; font-weight: 700; }
.sep-field input,
.sep-field select,
.sep-field textarea {
    padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px;
    font: inherit; font-size: 13.5px; color: var(--ink); background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
    width: 100%; box-sizing: border-box;
}
.sep-field input:focus,
.sep-field select:focus,
.sep-field textarea:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}
.sep-field textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.sep-field input[readonly] { background: #fafbfe; color: var(--muted); cursor: not-allowed; }

.sep-hint {
    font-size: 11.5px; color: var(--muted); line-height: 1.4;
    display: flex; align-items: center; gap: 4px;
}
.sep-hint svg { width: 12px; height: 12px; flex-shrink: 0; }
.sep-char-count { font-weight: 600; margin-left: 4px; }

/* ---- Checkbox row ---- */
.sep-checkbox-row {
    display: flex; align-items: flex-start; gap: 12px; cursor: pointer;
    padding: 14px 16px; background: #fafbfe; border: 1px solid #eef0f6;
    border-radius: 10px; transition: all .15s ease;
}
.sep-checkbox-row:hover { background: #f5f7fc; border-color: #e0e4f0; }
.sep-checkbox-row input[type="checkbox"] {
    width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0;
    accent-color: var(--primary); cursor: pointer;
}
.sep-checkbox-text { font-size: 13px; color: var(--ink); line-height: 1.5; }

.sep-inline-error {
    margin-top: 10px; padding: 8px 12px; background: #fee2e2;
    border: 1px solid #fecaca; border-radius: 8px; color: #991b1b;
    font-size: 12.5px; font-weight: 500;
}

/* ---- Form actions ---- */
.sep-form-actions {
    display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}

/* ---- HR detail: reason blocks ---- */
.sep-reason-block {
    padding: 14px 0; border-bottom: 1px solid #f1f5f9;
}
.sep-reason-block:last-child { border-bottom: none; }
.sep-reason-label {
    font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
    color: var(--muted); font-weight: 600; margin-bottom: 6px;
    display: flex; align-items: center; gap: 5px;
}
.sep-reason-label svg { width: 13px; height: 13px; }
.sep-reason-value { font-size: 14px; }
.sep-reason-text {
    font-size: 13.5px; color: var(--ink); line-height: 1.6;
    padding: 10px 14px; background: #fafbfe; border-radius: 8px;
    border: 1px solid #eef0f6;
}

/* ---- Responsive form ---- */
@media (max-width: 760px) {
    .sep-form-grid { grid-template-columns: 1fr; }
    .sep-field-full { grid-column: 1; }
    .sep-form-actions { flex-direction: column-reverse; }
    .sep-form-actions .sep-btn { width: 100%; justify-content: center; }
}

