:root {
    --navy: #0d2133;
    --blue: #16697a;
    --cyan: #36a6a2;
    --cyan-light: #77cfcb;
    --bg: #f5f5f1;
    --text: #14202b;
    --muted: #63717d;
    --line: #d9dfdf;
    --green: #2b918e;
    --red: #cf4d5b;
    --white: #fff;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: var(--bg); }
button, input, select, textarea { font: inherit; }
button { border: 0; border-radius: 12px; background: var(--cyan); color: #fff; font-weight: 750; padding: 12px 18px; cursor: pointer; }
button:hover { background: #2b918e; }
.ghost { background: #eaf4f3; color: var(--blue); padding: 9px 13px; }
.view-switch { display: inline-flex; align-items: center; min-height: 40px; border: 1px solid #cbdedc; border-radius: 12px; text-decoration: none; font-size: 13px; font-weight: 750; }
.danger { background: var(--red); }
.eyebrow { margin: 0 0 4px; color: var(--blue); font-size: 12px; letter-spacing: .17em; font-weight: 850; }
.muted, .privacy, .page-head p { color: var(--muted); }

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 24px;
    background:
        linear-gradient(rgba(119, 207, 203, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(119, 207, 203, .035) 1px, transparent 1px),
        radial-gradient(circle at 14% 18%, rgba(54, 166, 162, .24), transparent 30%),
        radial-gradient(circle at 88% 84%, rgba(22, 105, 122, .3), transparent 34%),
        #0d2133;
    background-size: 64px 64px, 64px 64px, auto, auto, auto;
}
.login-card {
    position: relative;
    width: min(450px, 100%);
    overflow: hidden;
    border: 1px solid rgba(119, 207, 203, .28);
    border-radius: 22px;
    padding: 44px 46px 42px;
    background: #fff;
    box-shadow: 0 28px 76px rgba(5, 19, 31, .32);
}
.login-card::before { position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, #16697a, #36a6a2, #77cfcb); content: ''; }
.login-logo { display: block; width: 194px; max-width: 68%; height: auto; margin: 0 auto 34px; }
.topbar-logo { display: block; width: 176px; height: auto; }
.login-card h1 { margin: 0 0 26px; text-align: center; font-size: 28px; line-height: 1.08; letter-spacing: -.025em; }
.stack { display: grid; gap: 16px; }
.stack label, .grid-form label { display: grid; gap: 7px; font-weight: 700; font-size: 14px; }
.stack input, .grid-form input, .grid-form select, .grid-form textarea, .page-head input { width: 100%; min-height: 50px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; }
.stack input:focus, .grid-form input:focus, .grid-form select:focus, .grid-form textarea:focus, .page-head input:focus { outline: 3px solid #77cfcb55; border-color: var(--cyan); }
.stack button { width: 100%; min-height: 52px; margin-top: 4px; box-shadow: 0 12px 28px rgba(54, 166, 162, .22); }
.privacy { font-size: 12px; margin-top: 22px; }
.alert { padding: 12px; border-radius: 10px; margin: 14px 0; }
.alert.error { background: #fff0f2; color: #a93342; }

.topbar { height: 78px; background: var(--white); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; padding: 0 max(24px, calc((100% - 1180px)/2)); }
.userbox { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 14px; }
.userbox form { margin: 0; }
.app-shell { max-width: 1180px; margin: 0 auto; padding: 34px 24px 70px; }
.page-head, .panel-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: 38px; margin: 0; }
.page-head p { margin: 6px 0 0; }
.page-head form { display: flex; gap: 10px; }
.page-head form select { min-width: 190px; min-height: 50px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; color: var(--text); background: #fff; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 20px; }
.cards article, .panel { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 10px 30px #102a430a; }
.cards article { padding: 24px; min-height: 140px; }
.cards span { display: block; color: var(--muted); margin-bottom: 20px; }
.cards strong { font-size: 29px; color: var(--blue); }
.panel { padding: 26px; margin-bottom: 20px; }
.panel h2 { margin: 0 0 18px; }
.panel-head span { color: var(--muted); }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 15px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; color: var(--muted); letter-spacing: .08em; }
tr.is-current td { background: #eaf4f3; color: #102a43; font-weight: 720; }
.empty { text-align: center; color: var(--muted); padding: 28px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-form .wide { grid-column: 1/-1; }
.grid-form textarea { min-height: 78px; resize: vertical; }
.leave-list { display: grid; gap: 10px; }
.leave-item { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.leave-item span, .leave-item small { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; }
.decision { display: flex; gap: 7px; }
.decision button { padding: 8px 10px; font-size: 12px; }
.status { width: max-content; padding: 4px 7px; border-radius: 6px; background: #eaf4f3; }
.status.approved { background: #e4f7ef; color: var(--green); }
.status.rejected { background: #ffebee; color: var(--red); }

@media (max-width: 900px) {
    .cards { grid-template-columns: 1fr 1fr; }
    .split { grid-template-columns: 1fr; }
    .topbar { padding: 0 20px; }
}

@media (max-width: 620px) {
    .login-card { padding: 38px 26px 32px; }
    .login-logo { width: 164px; }
    .cards { grid-template-columns: 1fr; }
    .page-head, .topbar { align-items: flex-start; flex-direction: column; height: auto; }
    .topbar { padding: 18px 20px; }
    .page-head form { width: 100%; }
    .grid-form { grid-template-columns: 1fr; }
    .userbox { width: 100%; justify-content: space-between; }
    .app-shell { padding: 24px 16px; }
    .page-head h1 { font-size: 30px; }
}
