:root {
    --ink: #17202a;
    --muted: #667085;
    --line: #d8dee8;
    --panel: #ffffff;
    --surface: #f5f7fb;
    --brand: #0b6b5f;
    --brand-strong: #084f48;
    --accent: #b7791f;
    --danger: #b42318;
    --focus: #2563eb;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    background: var(--surface);
    color: var(--ink);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    letter-spacing: 0;
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
    background:
        linear-gradient(135deg, rgba(11, 107, 95, 0.12), rgba(183, 121, 31, 0.08)),
        var(--surface);
}

.login-shell {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 28px;
    align-items: stretch;
}

.brand-panel,
.form-panel,
.app-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 50px rgba(20, 31, 51, 0.08);
}

.brand-panel {
    padding: 36px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.brand-mark {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    font-size: 21px;
}

.brand-panel h1,
.form-panel h1,
.app-header h1 {
    margin: 18px 0 8px;
    font-size: 28px;
    line-height: 1.2;
}

.brand-panel p,
.form-panel p,
.app-header p {
    color: var(--muted);
    margin: 0;
    line-height: 1.55;
}

.form-panel {
    padding: 28px;
}

.form-stack {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.field {
    display: grid;
    gap: 7px;
}

.field label,
.field legend {
    color: #334155;
    font-weight: 600;
}

.field input,
.field select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    padding: 9px 11px;
    font: inherit;
}

.field input:focus,
.field select:focus,
.button:focus,
.tab-link:focus {
    outline: 3px solid rgba(37, 99, 235, 0.2);
    border-color: var(--focus);
}

.radio-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.radio-row label {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
}

.button-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 9px 15px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.button-primary {
    background: var(--brand);
    color: #fff;
}

.button-primary:hover {
    background: var(--brand-strong);
}

.button-secondary {
    background: #fff;
    border-color: #cbd5e1;
    color: #334155;
}

.button-link {
    color: var(--brand);
    background: transparent;
    padding-inline: 0;
}

.alert {
    padding: 11px 13px;
    border-radius: 6px;
    line-height: 1.45;
}

.alert-error {
    color: var(--danger);
    background: #fff1f0;
    border: 1px solid #fecdca;
}

.alert-success {
    color: #087443;
    background: #ecfdf3;
    border: 1px solid #abefc6;
}

.app-page {
    min-height: 100vh;
    padding: 22px;
}

.app-shell {
    width: min(1440px, 100%);
    margin: 0 auto;
    display: grid;
    gap: 16px;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px 20px;
}

.app-header h1 {
    margin: 0 0 4px;
    font-size: 22px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(130px, 0.8fr)) auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
}

.tab-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #1f2937;
    padding: 8px 12px;
    font-weight: 650;
}

.tab-link:hover,
.tab-link.is-active {
    border-color: var(--brand);
    background: #edf7f5;
    color: var(--brand-strong);
    text-decoration: none;
}

.report-frame {
    width: 100%;
    min-height: calc(100vh - 290px);
    border: 0;
    background: #fff;
}

.frame-wrap {
    overflow: hidden;
}

.password-page {
    min-height: 100vh;
    display: grid;
    place-items: start center;
    padding: 32px;
}

.password-card {
    width: min(520px, 100%);
    padding: 26px;
}

.report-body {
    background: #fff;
    padding: 12px;
}

.report-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

table {
    border-collapse: collapse;
}

th,
td {
    padding: 6px 8px;
}

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

    .filter-bar {
        grid-template-columns: 1fr;
    }

    .app-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-page {
        padding: 12px;
    }
}
