:root {
    --background: #f3f6f8;
    --surface: #ffffff;
    --text: #17212b;
    --muted: #6b7785;
    --dark: #111a22;
    --accent: #04869a;
    --accent-dark: #026b7b;
    --border: #e2e8ed;
    --danger: #bd2c2c;
    --danger-bg: #fde8e8;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at top right, #0d6d7b 0, transparent 35%),
        linear-gradient(135deg, #111a22, #1c2b35);
}

.login-card {
    width: 100%;
    max-width: 440px;
    padding: 38px;
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--accent);
    color: white;
    font-size: 22px;
    font-weight: 800;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 1.8px;
}

.login-card h1 {
    margin: 34px 0 8px;
    font-size: 32px;
}

.muted {
    color: var(--muted);
}

.login-form {
    display: grid;
    gap: 10px;
    margin-top: 28px;
}

.login-form label {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 700;
}

.login-form input {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 9px;
    font-size: 15px;
    outline: none;
}

.login-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(4, 134, 154, 0.12);
}

.login-form button {
    margin-top: 14px;
    padding: 14px;
    border: 0;
    border-radius: 9px;
    background: var(--accent);
    color: white;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.login-form button:hover {
    background: var(--accent-dark);
}

.alert {
    margin-top: 20px;
    padding: 12px;
    border-radius: 8px;
    background: var(--danger-bg);
    color: var(--danger);
}

.demo-box {
    margin-top: 24px;
    padding: 14px;
    display: grid;
    gap: 5px;
    border-radius: 9px;
    background: #f5f8fa;
    color: var(--muted);
    font-size: 13px;
}

.demo-box strong {
    color: var(--text);
}

.topbar {
    min-height: 76px;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--dark);
    color: white;
}

.brand-light small {
    color: #aab8c2;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 14px;
}

.topbar-user a {
    color: #a9dce3;
    text-decoration: none;
}

.container {
    width: min(1160px, calc(100% - 40px));
    margin: 0 auto;
    padding: 44px 0;
}

.page-heading {
    margin-bottom: 28px;
}

.page-heading h1 {
    margin: 4px 0 8px;
    font-size: 32px;
}

.eyebrow {
    margin: 0;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 28px;
}

.stat-card,
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 7px 24px rgba(24, 39, 50, 0.05);
}

.stat-card {
    padding: 24px;
}

.stat-card span {
    display: block;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 14px;
}

.stat-card strong {
    font-size: 28px;
}

.danger-text {
    color: var(--danger);
}

.panel {
    padding: 26px;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.panel-heading h2 {
    margin: 5px 0 0;
}

.secondary-button,
.document-button {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    cursor: pointer;
}

.secondary-button {
    padding: 10px 14px;
}

.document-button {
    padding: 7px 12px;
    color: var(--accent);
    font-weight: 800;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 15px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.status {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.overdue {
    background: var(--danger-bg);
    color: var(--danger);
}

@media (max-width: 760px) {
    .topbar {
        padding: 14px 20px;
        align-items: flex-start;
        gap: 18px;
    }

    .topbar-user {
        align-items: flex-end;
        flex-direction: column;
        gap: 6px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .panel-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }
}