* {
    box-sizing: border-box;
}

:root {
    --bg: #f4f6f8;
    --card: #ffffff;
    --text: #17191d;
    --muted: #747b86;
    --line: #e6e8ec;
    --dark: #121418;
    --soft: #f7f8fa;
    --success-bg: #ecfdf3;
    --success-text: #067647;
    --danger-bg: #fff1f0;
    --danger-text: #b42318;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: var(--bg);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.app-shell {
    min-height: 100vh;
}

.topbar {
    height: 72px;
    padding: 0 28px;

    background: #fff;

    border-bottom:
        1px solid var(--line);

    display: flex;
    align-items: center;
    justify-content: space-between;

    position: sticky;
    top: 0;
    z-index: 50;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
}

.brand-mark {
    width: 40px;
    height: 40px;

    display: grid;
    place-items: center;

    border-radius: 11px;

    background: var(--dark);
    color: #fff;

    font-weight: 900;
}

.brand strong {
    display: block;
    font-size: 16px;
}

.brand small {
    display: block;
    margin-top: 2px;

    color: var(--muted);
    font-size: 11px;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 18px;

    font-size: 13px;
    font-weight: 600;
}

.page-container {
    width: min(
        1180px,
        calc(100% - 36px)
    );

    margin: 0 auto;
    padding: 32px 0 60px;
}

.hero {
    padding: 30px;

    border-radius: 20px;

    background:
        linear-gradient(
            135deg,
            #111318,
            #252932
        );

    color: #fff;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;

    margin-bottom: 22px;
}

.hero-label {
    color: #b7bdc8;

    font-size: 12px;
    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: .08em;
}

.hero h1 {
    margin: 8px 0 8px;
    font-size: 30px;
}

.hero p {
    margin: 0;
    color: #c6cad2;
    line-height: 1.6;
}

.tenant-pill {
    white-space: nowrap;

    padding: 10px 14px;

    background:
        rgba(
            255,
            255,
            255,
            .08
        );

    border:
        1px solid
        rgba(
            255,
            255,
            255,
            .12
        );

    border-radius: 999px;

    font-size: 12px;
}

.grid {
    display: grid;
    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );

    gap: 16px;
}

.card {
    background: var(--card);

    border:
        1px solid var(--line);

    border-radius: 16px;

    padding: 20px;
}

.metric-label {
    color: var(--muted);

    font-size: 12px;
    font-weight: 600;
}

.metric-value {
    margin-top: 10px;

    font-size: 24px;
    font-weight: 800;

    word-break: break-word;
}

.metric-note {
    margin-top: 7px;

    color: var(--muted);
    font-size: 11px;
}

.section {
    margin-top: 20px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 12px;
}

.section-head h2 {
    margin: 0;
    font-size: 17px;
}

.panel {
    background: var(--card);

    border:
        1px solid var(--line);

    border-radius: 16px;

    overflow: hidden;
}

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

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

th,
td {
    padding: 14px 16px;

    border-bottom:
        1px solid #eff0f2;

    text-align: left;

    font-size: 12px;
    white-space: nowrap;
}

th {
    color: var(--muted);

    font-size: 11px;

    text-transform: uppercase;

    letter-spacing: .04em;
}

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

.badge {
    display: inline-flex;

    padding: 5px 9px;

    border-radius: 999px;

    background: #f0f1f3;

    font-size: 10px;
    font-weight: 800;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success-text);
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger-text);
}

.empty {
    padding: 34px;

    text-align: center;

    color: var(--muted);

    font-size: 13px;
}

.auth-page {
    min-height:
        calc(
            100vh - 170px
        );

    display: grid;
    place-items: center;
}

.auth-card {
    width: min(
        440px,
        100%
    );

    padding: 30px;

    background: #fff;

    border:
        1px solid var(--line);

    border-radius: 20px;

    box-shadow:
        0 18px 50px
        rgba(
            20,
            24,
            32,
            .06
        );
}

.auth-card h1 {
    margin: 0 0 7px;
    font-size: 25px;
}

.auth-card > p {
    margin: 0 0 24px;

    color: var(--muted);

    font-size: 13px;
    line-height: 1.6;
}

.field {
    margin-bottom: 15px;
}

.field label {
    display: block;

    margin-bottom: 7px;

    font-size: 12px;
    font-weight: 700;
}

.input {
    width: 100%;

    padding: 12px 13px;

    border:
        1px solid #d8dbe0;

    border-radius: 10px;

    outline: none;

    background: #fff;
}

.input:focus {
    border-color: #777f8b;

    box-shadow:
        0 0 0 3px
        rgba(
            0,
            0,
            0,
            .04
        );
}

.button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    border: 0;

    border-radius: 10px;

    padding: 12px 16px;

    cursor: pointer;

    font-weight: 700;
}

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

.button-full {
    width: 100%;
}

.button-small {
    padding: 9px 13px;
}

.alert {
    padding: 12px 14px;

    border-radius: 10px;

    margin-bottom: 17px;

    font-size: 12px;
    line-height: 1.5;
}

.alert-danger {
    background: var(--danger-bg);
    color: var(--danger-text);
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
}

.auth-footer {
    margin-top: 18px;

    text-align: center;

    color: var(--muted);

    font-size: 12px;
}

.auth-footer a {
    color: var(--text);
    font-weight: 700;
}

.info-list {
    margin: 0;
}

.info-row {
    padding: 15px 18px;

    display: flex;
    justify-content: space-between;
    gap: 20px;

    border-bottom:
        1px solid var(--line);
}

.info-row:last-child {
    border-bottom: 0;
}

.info-row dt {
    color: var(--muted);
    font-size: 12px;
}

.info-row dd {
    margin: 0;

    text-align: right;

    font-size: 12px;
    font-weight: 700;
}

.footer {
    width: min(
        1180px,
        calc(100% - 36px)
    );

    margin: 0 auto;

    padding: 22px 0 35px;

    border-top:
        1px solid var(--line);

    display: flex;
    justify-content: space-between;
    gap: 20px;

    color: var(--muted);

    font-size: 11px;
}

@media (
    max-width: 900px
) {

    .grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

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

@media (
    max-width: 600px
) {

    .topbar {
        height: 64px;
        padding: 0 15px;
    }

    .brand small {
        display: none;
    }

    .top-actions {
        gap: 10px;
    }

    .top-actions > a:not(.button) {
        display: none;
    }

    .page-container {
        width:
            calc(
                100% - 24px
            );

        padding-top: 18px;
    }

    .hero {
        padding: 22px;
        border-radius: 16px;
    }

    .hero h1 {
        font-size: 24px;
    }

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

    .auth-card {
        padding: 22px;
    }

    .footer {
        width:
            calc(
                100% - 24px
            );

        flex-direction: column;
    }
}