/* login.css — Colors inherited from variables.css via layout.css */

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family:
        system-ui,
        -apple-system,
        Segoe UI,
        Roboto,
        Arial,
        sans-serif;
    color: var(--ink);
}

/* Links */
a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    opacity: 0.9;
}

/* Topbar fixed */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    z-index: 50;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(
        135deg,
        var(--brand-green),
        rgba(36, 116, 68, 0.65)
    );
    box-shadow: var(--shadow2);
    border: 1px solid rgba(180, 140, 100, 0.35);
}

.brand span {
    color: var(--brand-green);
}

.nav-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn {
    border: 0;
    cursor: pointer;
    padding: 10px 14px;
    border-radius: 14px;
    font-weight: 700;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-green), #1e9b5b);
    color: #fff;
    box-shadow: var(--shadow2);
}

.btn-ghost {
    background: rgba(180, 140, 100, 0.1);
    color: var(--ink);
    border: 1px solid rgba(180, 140, 100, 0.35);
}

/* Footer fixed */
.footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    color: var(--muted);
    z-index: 40;
}

/* page spacing because fixed top/footer */
.page {
    padding: 86px 18px 74px;
    min-height: 100%;
}

/* Card */
.card {
    background: var(--card);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card-pad {
    padding: 18px;
}

/* Admin layout */
.admin-wrap {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 16px;
}

.sidebar {
    position: sticky;
    top: 86px;
    height: calc(100vh - 86px - 74px);
    padding: 14px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(10px);
}

.side-title {
    font-weight: 900;
    margin: 6px 8px 12px;
    color: var(--brand-green);
}

.side-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px;
    border-radius: 14px;
    margin: 6px 0;
    background: rgba(36, 116, 68, 0.06);
    border: 1px solid rgba(36, 116, 68, 0.12);
}

.side-link:hover {
    background: rgba(180, 140, 100, 0.12);
    border-color: rgba(180, 140, 100, 0.25);
}

.side-link.active {
    background: linear-gradient(
        135deg,
        rgba(36, 116, 68, 0.18),
        rgba(180, 140, 100, 0.12)
    );
    border-color: rgba(36, 116, 68, 0.22);
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.kpi {
    padding: 14px;
    border-radius: var(--radius);
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: rgba(255, 255, 255, 0.9);
}

.kpi .label {
    color: var(--muted);
    font-weight: 700;
    font-size: 13px;
}

.kpi .value {
    font-size: 26px;
    font-weight: 900;
    margin-top: 6px;
}

.kpi .hint {
    color: rgba(180, 140, 100, 0.95);
    font-weight: 800;
    font-size: 12px;
    margin-top: 8px;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    text-align: left;
}

.table th {
    color: var(--muted);
    font-size: 13px;
}

/* Login page */
.auth-shell {
    max-width: 420px;
    margin: 0 auto;
}

.input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    outline: none;
    background: #fff;
}

.input:focus {
    border-color: rgba(36, 116, 68, 0.45);
    box-shadow: 0 0 0 4px rgba(36, 116, 68, 0.12);
}

.help {
    color: var(--muted);
    font-size: 13px;
}

.alert {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(180, 140, 100, 0.14);
    border: 1px solid rgba(180, 140, 100, 0.28);
    color: var(--ink);
    font-weight: 700;
}

/* responsive */
@media (max-width: 980px) {
    .admin-wrap {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        top: auto;
        height: auto;
    }

    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .grid {
        grid-template-columns: 1fr;
    }
}
