body {
    margin: 0;
    font-family: "Segoe UI Variable Text", "Segoe UI", Tahoma, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(205, 164, 90, 0.18), transparent 22%),
        linear-gradient(180deg, #eef3f7 0%, #f6f8fb 52%, #edf2f7 100%);
    color: #183247;
}

a {
    color: inherit;
    text-decoration: none;
}

:root {
    --ink: #183247;
    --ink-soft: #4b667b;
    --navy: #0f2436;
    --navy-2: #183953;
    --gold: #d4a54d;
    --teal: #0d8b83;
    --sky: #327fdc;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-strong: #ffffff;
    --surface-muted: #f5f8fb;
    --border: rgba(18, 50, 72, 0.12);
    --shadow: 0 18px 45px rgba(16, 42, 63, 0.09);
    --shadow-strong: 0 24px 60px rgba(16, 42, 63, 0.14);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

.layout-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px 18px 24px 22px;
    background:
        linear-gradient(180deg, rgba(17, 38, 57, 0.98), rgba(13, 30, 45, 0.96)),
        radial-gradient(circle at top right, rgba(212, 165, 77, 0.18), transparent 24%);
    color: #f3f7fb;
    box-sizing: border-box;
    overflow-y: auto;
}

.sidebar-top {
    margin-bottom: 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    margin-bottom: 12px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.brand h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.brand span {
    color: #a4bfce;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.brand-mark {
    width: 58px;
    height: 58px;
    border-radius: 19px;
    background: linear-gradient(145deg, #f0c56d, #d49f3f);
    color: #10283c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 21px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.sidebar-status {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-label {
    display: block;
    color: #8da7b9;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.status-value {
    display: block;
    color: #f6f9fc;
    font-size: 18px;
    font-weight: 700;
}

.nav-grouped {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-group-label {
    margin: 14px 8px 4px;
    color: #88a3b6;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
}

.nav-link {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid transparent;
    color: #d7e6f0;
    transition: 0.2s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateX(2px);
}

.nav-link.is-active {
    background: linear-gradient(135deg, rgba(212, 165, 77, 0.16), rgba(50, 127, 220, 0.18));
    border-color: rgba(212, 165, 77, 0.32);
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nav-icon {
    min-width: 38px;
    height: 38px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #f4f8fb;
}

.nav-link.is-active .nav-icon {
    background: rgba(255, 255, 255, 0.14);
}

.nav-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.nav-copy strong {
    font-size: 14px;
    font-weight: 700;
}

.nav-copy small {
    color: #8ea8ba;
    font-size: 12px;
    line-height: 1.35;
}

.nav-link.is-active .nav-copy small {
    color: #d3e2ec;
}

.sidebar-card {
    margin-top: 16px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #d8e5ef;
}

.sidebar-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

.sidebar-card p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #a7bfce;
}

.sidebar-card-highlight {
    background: linear-gradient(140deg, rgba(212, 165, 77, 0.12), rgba(255, 255, 255, 0.06));
}

.main-panel {
    padding: 26px 30px 36px;
    box-sizing: border-box;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 24px;
}

.topbar-copy {
    min-width: 0;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: #7e93a5;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
}

.page-title {
    display: block;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.page-subtitle {
    margin: 8px 0 0;
    max-width: 700px;
    color: #62788b;
    font-size: 15px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.pill,
.user-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid rgba(22, 54, 77, 0.1);
    backdrop-filter: blur(18px);
}

.pill {
    background: rgba(50, 127, 220, 0.09);
    color: #184a86;
}

.user-chip {
    background: rgba(255, 255, 255, 0.88);
    color: #16364d;
    box-shadow: 0 10px 20px rgba(20, 50, 75, 0.08);
}

.logout-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 10px 16px;
    background: #16364d;
    color: #ffffff;
    font-weight: 700;
    border: 0;
    cursor: pointer;
    box-shadow: 0 12px 20px rgba(22, 54, 77, 0.18);
}

.page-shell {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-banner {
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.14), transparent 28%),
        linear-gradient(135deg, #10283c 0%, #183953 58%, #c99642 124%);
    color: #ffffff;
    border-radius: 30px;
    padding: 28px 30px;
    box-shadow: var(--shadow-strong);
}

.hero-banner h2 {
    margin: 0 0 8px;
    font-size: 30px;
    letter-spacing: -0.04em;
}

.hero-banner p {
    margin: 0;
    max-width: 840px;
    color: #deebf4;
    line-height: 1.65;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #f4f8fb;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.workspace-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.workspace-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid var(--border);
    color: var(--ink-soft);
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 10px 18px rgba(20, 50, 75, 0.05);
}

.workspace-nav a:hover {
    color: var(--ink);
    border-color: rgba(50, 127, 220, 0.28);
}

.workspace-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    align-items: start;
}

.workspace-main,
.workspace-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.workspace-side {
    position: sticky;
    top: 24px;
}

.workspace-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.metric-grid,
.content-grid,
.analytics-grid,
.detail-summary,
.tile-grid {
    display: grid;
    gap: 18px;
    align-items: start;
}

.metric-grid,
.content-grid,
.analytics-grid,
.detail-summary {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.tile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card,
.panel,
.info-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.metric-card {
    grid-column: span 3;
    padding: 22px 22px 20px;
    position: relative;
    overflow: hidden;
}

.metric-card:after {
    content: "";
    position: absolute;
    inset: auto -24px -24px auto;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: rgba(50, 127, 220, 0.06);
}

.metric-title {
    color: #6f8395;
    font-size: 13px;
    font-weight: 600;
}

.metric-value {
    display: block;
    margin-top: 12px;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.metric-trend {
    display: block;
    margin-top: 9px;
    color: #5d7689;
    font-size: 13px;
}

.accent-blue { border-top: 4px solid #327fdc; }
.accent-green { border-top: 4px solid #0d8b83; }
.accent-gold { border-top: 4px solid #d4a54d; }
.accent-red { border-top: 4px solid #d9534f; }

.panel {
    grid-column: span 8;
    padding: 22px;
    min-width: 0;
    overflow: hidden;
}

.panel-narrow {
    grid-column: span 4;
}

.panel-soft {
    background: var(--surface-muted);
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 16px;
}

.panel-head h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.panel-head span {
    color: #6c8092;
    font-size: 13px;
    line-height: 1.5;
}

.panel-subhead {
    margin: -4px 0 12px;
    color: #6c8092;
    font-size: 14px;
}

.data-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    border: 1px solid rgba(20, 50, 75, 0.08);
    border-radius: 18px;
    background: #ffffff;
}

.data-grid th,
.data-grid td {
    padding: 13px 14px;
    border-bottom: 1px solid #e8eef4;
    text-align: left;
    vertical-align: top;
    font-size: 13px;
}

.data-grid th {
    position: sticky;
    top: 0;
    background: #f7fafc;
    color: #52697c;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.data-grid tr:last-child td {
    border-bottom: none;
}

.data-grid a {
    color: #1a5bb8;
    font-weight: 700;
}

.data-grid a:hover {
    text-decoration: underline;
}

.detail-summary {
    margin-bottom: 4px;
}

.detail-card {
    grid-column: span 4;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, #fbfdff, #f4f8fb);
    border: 1px solid #e4ebf2;
    min-width: 0;
}

.detail-card span,
.detail-card strong {
    display: block;
}

.detail-card span {
    color: #6f8395;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 7px;
}

.detail-card strong {
    font-size: 18px;
    color: var(--ink);
    line-height: 1.4;
    margin-bottom: 10px;
}

.info-tile {
    padding: 22px;
    display: block;
    transition: 0.2s ease;
}

.info-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 26px 50px rgba(20, 50, 75, 0.13);
}

.info-tile h3 {
    margin: 0 0 8px;
    font-size: 20px;
    letter-spacing: -0.03em;
}

.info-tile p {
    margin: 0;
    color: #617688;
    line-height: 1.65;
}

.analytics-grid .chart-card {
    grid-column: span 4;
}

.chart-wide {
    grid-column: span 12;
}

.chart-card {
    background: linear-gradient(180deg, #fbfdff, #f5f8fb);
    border: 1px solid #e4ebf2;
    border-radius: 22px;
    padding: 18px;
}

.chart-card h3 {
    margin: 0 0 12px;
    font-size: 16px;
}

.chart-svg {
    width: 100%;
    height: auto;
}

.chart-axis,
.chart-legend,
.chart-center-label,
.chart-center-value {
    font-family: "Segoe UI Variable Text", "Segoe UI", Tahoma, sans-serif;
    fill: #476075;
    font-size: 11px;
}

.chart-center-value {
    font-size: 13px;
    font-weight: 700;
    fill: #14324b;
}

.chart-empty,
.detail-text,
.subtle-note,
.muted-note {
    color: #5d7588;
    line-height: 1.65;
}

.inline-form {
    display: flex;
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
}

.text-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #ccd7e2;
    background: #fbfdff;
    color: var(--ink);
    font: inherit;
    transition: 0.18s ease;
}

.text-input:focus {
    outline: none;
    border-color: rgba(50, 127, 220, 0.55);
    box-shadow: 0 0 0 4px rgba(50, 127, 220, 0.12);
    background: #ffffff;
}

label {
    display: block;
    margin-top: 14px;
    margin-bottom: 8px;
    color: #587084;
    font-size: 13px;
    font-weight: 700;
}

.small-input {
    width: auto;
    min-width: 180px;
    flex: 1 1 180px;
}

.inline-button {
    width: auto;
    min-width: 170px;
    flex: 0 0 auto;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 18px;
    padding: 13px 16px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #16364d, #245075);
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 14px 24px rgba(22, 54, 77, 0.18);
}

.secondary-button {
    background: linear-gradient(135deg, #2d7ad7, #1f64bf);
}

.form-message,
.login-message {
    display: block;
    min-height: 20px;
    color: #17855f;
    margin-bottom: 8px;
    font-weight: 700;
}

hr {
    border: 0;
    border-top: 1px solid #e6edf3;
    margin: 18px 0;
}

.workflow-list {
    margin: 0;
    padding-left: 18px;
    color: #43586b;
    line-height: 1.9;
}

.login-body {
    background:
        radial-gradient(circle at top left, rgba(224, 182, 96, 0.26), transparent 24%),
        linear-gradient(135deg, #0f2436 0%, #16364d 48%, #224e72 100%);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    align-items: stretch;
    padding: 32px;
    gap: 26px;
}

.login-hero,
.login-card {
    border-radius: 30px;
    box-shadow: var(--shadow-strong);
}

.login-hero {
    color: #ffffff;
    padding: 42px;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.14), transparent 24%),
        linear-gradient(145deg, rgba(10, 24, 36, 0.4), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.login-hero h1 {
    font-size: 56px;
    line-height: 1.02;
    letter-spacing: -0.05em;
    margin: 18px 0 14px;
}

.login-hero p {
    font-size: 18px;
    max-width: 560px;
    color: #deebf3;
    line-height: 1.7;
}

.login-card {
    background: rgba(255, 255, 255, 0.96);
    padding: 34px;
    border: 1px solid rgba(20, 50, 75, 0.08);
}

.login-card h2 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 30px;
    letter-spacing: -0.04em;
}

.login-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.login-segment {
    padding: 14px 16px;
    border-radius: 18px;
    background: #f1f6fb;
    border: 1px solid #e0e9f2;
    color: #395266;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
}

.login-segment-accent {
    background: #fff6e5;
    border-color: #f2deae;
    color: #725316;
}

.secondary-link {
    display: inline-block;
    margin-top: 12px;
    margin-right: 16px;
    color: #19477e;
    font-weight: 700;
}

.login-hint {
    margin: 14px 0 0;
    color: #6b7f91;
    font-size: 13px;
}

.login-help {
    margin-top: 22px;
    max-height: 320px;
    overflow: auto;
}

.login-help h3 {
    margin-bottom: 12px;
    font-size: 16px;
}

.role-card {
    padding: 14px;
    border: 1px solid #e3ebf2;
    border-radius: 16px;
    margin-bottom: 10px;
    background: #fbfdff;
}

.role-card strong,
.role-card span,
.role-card p {
    display: block;
}

.role-card span {
    margin-top: 4px;
    font-size: 12px;
    color: #2b7de9;
}

.role-card p {
    margin: 6px 0 0;
    color: #5b6f81;
    font-size: 13px;
}

.attendance-calendar {
    white-space: normal;
}

.attendance-calendar td {
    min-width: 110px;
}

.calendar-day strong,
.calendar-day span,
.calendar-day small {
    display: block;
}

.calendar-day strong {
    font-size: 18px;
    margin-bottom: 6px;
}

.calendar-day span {
    font-weight: 700;
    color: var(--ink);
}

.calendar-day small {
    margin-top: 4px;
    color: #6e8395;
    line-height: 1.4;
}

.status-present { background: rgba(13, 139, 131, 0.08); }
.status-leave { background: rgba(212, 165, 77, 0.12); }
.status-absent { background: rgba(217, 83, 79, 0.08); }
.calendar-empty { background: #f9fbfd; }

.compact-grid th,
.compact-grid td {
    padding: 8px 6px;
    font-size: 12px;
}

@media (max-width: 1380px) {
    .workspace-layout {
        grid-template-columns: 1fr;
    }

    .workspace-side {
        position: static;
    }
}

@media (max-width: 1180px) {
    .layout-shell {
        grid-template-columns: 280px minmax(0, 1fr);
    }

    .metric-card {
        grid-column: span 6;
    }

    .panel,
    .panel-narrow,
    .chart-card,
    .chart-wide,
    .detail-card {
        grid-column: span 12;
    }

    .tile-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .login-shell {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .login-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .layout-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        height: auto;
    }

    .main-panel {
        padding: 18px;
    }

    .topbar {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .metric-card {
        grid-column: span 12;
    }

    .hero-banner,
    .login-card,
    .login-hero,
    .panel,
    .metric-card,
    .info-tile {
        border-radius: 22px;
    }

    .page-title {
        font-size: 28px;
    }

    .login-hero h1 {
        font-size: 42px;
    }
}
