:root {
    --navy: #14233c;
    --blue: #2374e1;
    --light-blue: #eef5ff;
    --background: #f4f7fb;
    --surface: #ffffff;
    --text: #172033;
    --muted: #67748a;
    --border: #dfe5ee;
    --danger: #b42318;
    --shadow: 0 18px 45px rgba(20, 35, 60, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--background);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
}

.login-brand {
    padding: 64px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: white;
    background:
        radial-gradient(circle at 20% 20%, #347ed9 0, transparent 34%),
        linear-gradient(145deg, #101d32, #1b3559);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-size: 22px;
    font-weight: 750;
}

.brand-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
}

.brand-copy h1 {
    max-width: 620px;
    margin: 0 0 20px;
    font-size: clamp(40px, 5vw, 68px);
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.brand-copy p {
    max-width: 560px;
    margin: 0;
    color: rgba(255, 255, 255, 0.74);
    font-size: 18px;
    line-height: 1.7;
}

.login-panel {
    padding: 40px;
    display: grid;
    place-items: center;
}

.login-card {
    width: min(430px, 100%);
    padding: 42px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.login-card h2 {
    margin: 0 0 8px;
    font-size: 30px;
    letter-spacing: -0.03em;
}

.login-card > p {
    margin: 0 0 30px;
    color: var(--muted);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
}

input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: white;
    color: var(--text);
    font: inherit;
    outline: none;
}

input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(35, 116, 225, 0.12);
}

.button {
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 12px;
    background: var(--blue);
    color: white;
    cursor: pointer;
    font: inherit;
    font-weight: 750;
}

.button:hover {
    background: #1966ca;
}

.alert {
    margin-bottom: 20px;
    padding: 13px 15px;
    border-radius: 11px;
    background: #fff0ee;
    color: var(--danger);
    font-size: 14px;
}

.login-footer {
    margin-top: 24px;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

@media (max-width: 850px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .login-brand {
        min-height: 300px;
        padding: 36px;
    }

    .login-panel {
        padding: 24px;
    }

    .login-card {
        padding: 30px;
    }
}
.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 255px 1fr;
}

.sidebar {
    padding: 24px 18px;
    color: white;
    background: var(--navy);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 10px 28px;
    font-size: 18px;
    font-weight: 800;
}

.sidebar-brand span:first-child {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--blue);
    font-size: 13px;
}

.sidebar nav {
    display: grid;
    gap: 6px;
}

.nav-link {
    padding: 12px 14px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-weight: 650;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.app-main {
    min-width: 0;
}

.topbar {
    min-height: 76px;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: white;
}

.user-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--light-blue);
    color: var(--blue);
    font-weight: 800;
}

.logout-button {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: white;
    cursor: pointer;
}

.page-content {
    padding: 32px;
}

.page-header {
    margin-bottom: 28px;
}

.page-header h1 {
    margin: 0 0 7px;
    font-size: 30px;
    letter-spacing: -0.03em;
}

.page-header p {
    margin: 0;
    color: var(--muted);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 26px;
}

.metric-card,
.panel {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: white;
    box-shadow: 0 8px 25px rgba(20, 35, 60, 0.05);
}

.metric-card {
    padding: 22px;
}

.metric-label {
    color: var(--muted);
    font-size: 14px;
    font-weight: 650;
}

.metric-value {
    margin-top: 10px;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 22px;
}

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

.panel-header h2 {
    margin: 0;
    font-size: 18px;
}

.panel-link {
    color: var(--blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
    font-size: 14px;
}

th {
    color: var(--muted);
    background: #fafbfd;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

tr:last-child td {
    border-bottom: 0;
}

.badge {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--light-blue);
    color: var(--blue);
    font-size: 12px;
    font-weight: 750;
}

.badge.red {
    color: #b42318;
    background: #fff0ee;
}

.empty-state {
    padding: 38px 22px;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 1050px) {
    .metric-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .sidebar {
        display: none;
    }

    .topbar,
    .page-content {
        padding: 20px;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }
}
.page-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.primary-button,
.secondary-button {
    min-height: 42px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    font: inherit;
    font-weight: 750;
}

.primary-button {
    border: 0;
    color: white;
    background: var(--blue);
}

.secondary-button {
    border: 1px solid var(--border);
    color: var(--text);
    background: white;
}

.form-panel {
    margin-bottom: 24px;
    padding: 24px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.form-grid .full-width {
    grid-column: 1 / -1;
}

textarea,
select {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: white;
    color: var(--text);
    font: inherit;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.form-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.badge.green {
    color: #067647;
    background: #ecfdf3;
}

.badge.gray {
    color: #475467;
    background: #f2f4f7;
}

@media (max-width: 850px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}
.row-checkbox {
    width: 18px;
    height: 18px;
}

.table-actions {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    border-top: 1px solid var(--border);
}
