:root {
    --uis-green: #0f766e;
    --uis-green-dark: #115e59;
    --uis-gold: #d8a300;
    --uis-bg: #eef2f7;
    --uis-text: #0f172a;
    --uis-muted: #334155;
    --uis-white: #ffffff;
    --uis-danger: #8f1d1d;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(circle at top, #fafcff 0%, var(--uis-bg) 62%, #dce4ed 100%);
    color: var(--uis-text);
}

.container {
    width: min(1100px, 92%);
    margin: 0 auto;
}

.topbar {
    background: linear-gradient(120deg, #0b1c32 0%, #123256 100%);
    color: #f8fafc;
    border-bottom: 3px solid #29b6af;
    box-shadow: 0 4px 14px rgba(11, 28, 50, 0.2);
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-link {
    text-decoration: none;
}

.brand-logo {
    width: 88px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

.brand-kicker {
    margin: 0;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9ec4dd;
}

.brand-title {
    color: #f8fafc;
}

.brand-title {
    margin: 0.2rem 0 0;
    font-size: 1.25rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.nav-actions a,
.btn-link {
    color: #dbeafe;
    font-weight: 600;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
}

.nav-actions a:hover,
.btn-link:hover {
    color: #5eead4;
}

.page-content {
    padding: 1.5rem 0 2.2rem;
}

.home-dashboard-shell {
    position: relative;
    left: 50%;
    width: min(1240px, 96vw);
    transform: translateX(-50%);
}

.hero {
    background: linear-gradient(135deg, var(--uis-green) 0%, var(--uis-green-dark) 100%);
    color: var(--uis-white);
    padding: 1.3rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.hero h2 {
    margin: 0 0 0.5rem;
}

.stats-grid,
.grid-two {
    display: grid;
    gap: 1rem;
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    margin-bottom: 1rem;
}

.grid-two {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.stat-card,
.card {
    background: var(--uis-white);
    border: 1px solid #b7cabd;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 8px 22px rgba(12, 37, 23, 0.09);
}

.stat-card h3 {
    margin: 0;
    color: var(--uis-muted);
    font-size: 0.95rem;
}

.stat-card p {
    margin: 0.35rem 0 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--uis-green-dark);
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.section-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.section-title .home-brand-copy {
    display: grid;
    row-gap: 0.12rem;
}

.section-title .home-brand-copy > * {
    margin: 0;
}

.section-title .brand-kicker {
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0.02em;
    color: #0f3d5e;
}

.section-title .home-brand-title {
    font-size: 0.88rem !important;
    font-weight: 600;
    line-height: 1.18;
    color: #4f647d;
}

.section-title .home-brand-subtitle {
    font-size: 0.76rem !important;
    font-weight: 500;
    line-height: 1.18;
    color: #4f647d;
}

.btn-primary,
.btn-secondary {
    display: inline-block;
    border-radius: 7px;
    border: none;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: #0f766e;
    color: var(--uis-white);
    padding: 0.6rem 0.9rem;
}

.btn-primary:hover {
    background: #115e59;
}

.btn-secondary {
    background: #e2e8f0;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    padding: 0.45rem 0.8rem;
}

.muted {
    color: #4d6458;
}

.auth-card {
    width: min(520px, 92vw);
    max-width: 520px;
    margin: 0;
    position: relative;
    border: 1px solid #cbd5e1;
    border-top: 5px solid #29b6af;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.1);
    padding: 1.6rem;
}

.auth-shell {
    width: fit-content;
    max-width: 100%;
    margin: 1rem auto 0;
    padding: 0.35rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

.auth-card h3 {
    margin: 0 0 0.55rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: #0b2a45;
}

.auth-card .muted {
    color: #475569;
    margin: 0 0 0.95rem;
}

.auth-card .form-grid label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e3a5f;
}

.auth-card .form-grid p {
    gap: 0.45rem;
    margin: 0 0 1rem;
}

.auth-card input {
    border: 1px solid #b8cbe0;
    background: #f9fcff;
    padding: 0.68rem 0.7rem;
}

.auth-card input:focus {
    outline: 2px solid #89d7d2;
    border-color: #1aa79e;
}

.auth-card .helptext {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #64748b;
}

.auth-card .auth-switch {
    margin-top: 1.2rem;
}

.auth-card .auth-switch a {
    color: #123256;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 700;
}

.auth-card .auth-switch a:hover {
    color: #0b1c32;
}

.auth-card .errorlist {
    margin: 0;
    padding-left: 1rem;
    color: #b91c1c;
    font-size: 0.8rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.7rem;
}

th,
td {
    border-bottom: 1px solid #d7e3d9;
    padding: 0.65rem;
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--uis-green-dark);
    font-size: 0.85rem;
}

.form-grid p {
    display: grid;
    gap: 0.35rem;
    margin: 0 0 0.8rem;
}

input,
select,
textarea {
    padding: 0.6rem;
    border-radius: 7px;
    border: 1px solid #afc7b4;
    background: #fbfdfb;
    font-size: 1rem;
    font-family: inherit;
}

.messages {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

.msg {
    padding: 0.65rem 0.8rem;
    border-radius: 7px;
    margin-bottom: 0.5rem;
}

.msg.success {
    background: #dbefde;
    border: 1px solid #9ac8a2;
}

.msg.error {
    background: #f8dede;
    border: 1px solid #d49b9b;
}

.msg.warning {
    background: #fff0ce;
    border: 1px solid #f1cf78;
}

.msg.info {
    background: #e2eef9;
    border: 1px solid #a6c3df;
}

.danger {
    color: var(--uis-danger);
}

@media (max-width: 720px) {
    .home-dashboard-shell {
        left: auto;
        width: 100%;
        transform: none;
    }

    .topbar-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-title {
        flex-direction: column;
        align-items: flex-start;
    }
}
