@font-face {
    font-family: "Bricolage Grotesque";
    src: url("../fonts/bricolage-grotesque-latin.woff2") format("woff2");
    font-display: swap;
    font-style: normal;
    font-weight: 200 800;
}

@font-face {
    font-family: "Nunito Sans";
    src: url("../fonts/nunito-sans-latin.woff2") format("woff2");
    font-display: swap;
    font-style: normal;
    font-weight: 200 1000;
}

:root {
    color-scheme: light;
    --dapari-navy: #230d4d;
    --dapari-turquoise: #5ce1e6;
    --dapari-yellow: #ffd500;
    --dapari-coral: #ff5757;
    --dapari-white: #ffffff;
    --dapari-muted: rgba(35, 13, 77, 0.68);
    --dapari-border: rgba(35, 13, 77, 0.14);
    font-family: "Nunito Sans", ui-sans-serif, system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--dapari-navy);
    background: var(--dapari-white);
}

a {
    color: inherit;
}

.foundation,
.system-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: clamp(20px, 4vw, 48px);
}

.foundation__panel,
.system-card {
    position: relative;
    width: min(840px, 100%);
    padding: clamp(28px, 6vw, 68px);
    overflow: hidden;
    border: 2px solid var(--dapari-navy);
    border-radius: 24px;
    background: var(--dapari-white);
    box-shadow: 12px 12px 0 rgba(92, 225, 230, 0.42);
}

.foundation__panel::before,
.system-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 8px;
    background: linear-gradient(
        90deg,
        var(--dapari-turquoise) 0 35%,
        var(--dapari-yellow) 35% 58%,
        var(--dapari-coral) 58% 80%,
        var(--dapari-navy) 80% 100%
    );
    content: "";
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-family: "Bricolage Grotesque", "Nunito Sans", sans-serif;
    font-size: 1.12rem;
    letter-spacing: 0.06em;
}

.brand strong {
    font-weight: 800;
}

.brand__logo {
    display: block;
    width: 58px;
    height: 56px;
    border-radius: 15px;
    object-fit: cover;
}

.brand-chip {
    display: inline-block;
    padding: 7px 11px;
    border: 2px solid var(--dapari-navy);
    border-radius: 10px;
    color: var(--dapari-navy);
    background: var(--dapari-yellow);
    font-family: "Bricolage Grotesque", "Nunito Sans", sans-serif;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.eyebrow {
    margin: 44px 0 14px;
    color: var(--dapari-coral);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

h1 {
    max-width: 650px;
    margin: 0;
    font-family: "Bricolage Grotesque", "Nunito Sans", sans-serif;
    font-size: clamp(2.5rem, 7vw, 4.8rem);
    font-weight: 750;
    line-height: 1;
    letter-spacing: -0.035em;
}

.lead {
    max-width: 630px;
    margin: 24px 0 0;
    color: var(--dapari-muted);
    font-size: clamp(1rem, 2.5vw, 1.18rem);
    font-weight: 520;
    line-height: 1.65;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 38px 0;
}

.status-grid article {
    display: grid;
    gap: 6px;
    min-height: 128px;
    padding: 20px;
    border: 1px solid var(--dapari-border);
    border-top: 5px solid var(--dapari-turquoise);
    border-radius: 14px;
    background: var(--dapari-white);
}

.status-grid article:nth-child(2) {
    border-top-color: var(--dapari-yellow);
}

.status-grid article:nth-child(3) {
    border-top-color: var(--dapari-coral);
}

.status-grid strong {
    font-family: "Bricolage Grotesque", "Nunito Sans", sans-serif;
    font-size: 1.02rem;
    font-weight: 750;
}

.status-grid small,
.actions span,
.reference,
.system-card small {
    color: var(--dapari-muted);
}

.status-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--dapari-turquoise);
    box-shadow: 0 0 0 5px rgba(92, 225, 230, 0.2);
}

.status-dot--yellow {
    background: var(--dapari-yellow);
    box-shadow: 0 0 0 5px rgba(255, 213, 0, 0.2);
}

.status-dot--coral {
    background: var(--dapari-coral);
    box-shadow: 0 0 0 5px rgba(255, 87, 87, 0.16);
}

.actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: 2px solid var(--dapari-navy);
    border-radius: 12px;
    color: var(--dapari-navy);
    background: var(--dapari-coral);
    box-shadow: 4px 4px 0 var(--dapari-navy);
    font-family: "Bricolage Grotesque", "Nunito Sans", sans-serif;
    font-weight: 750;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.button:hover {
    box-shadow: 2px 2px 0 var(--dapari-navy);
    transform: translate(2px, 2px);
}

.button:focus-visible {
    outline: 4px solid rgba(92, 225, 230, 0.55);
    outline-offset: 3px;
}

.reference {
    margin: 28px 0 0;
    font-size: 0.75rem;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.system-card {
    display: grid;
    gap: 20px;
}

.system-card h1 {
    font-size: clamp(2rem, 6vw, 3.6rem);
}

.system-card p {
    color: var(--dapari-muted);
    line-height: 1.7;
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: clamp(20px, 5vw, 64px);
    background:
        linear-gradient(135deg, rgba(92, 225, 230, 0.12), transparent 38%),
        var(--dapari-white);
}

.auth-card {
    position: relative;
    width: min(520px, 100%);
    padding: clamp(28px, 5vw, 48px);
    overflow: hidden;
    border: 2px solid var(--dapari-navy);
    border-radius: 22px;
    background: var(--dapari-white);
    box-shadow: 10px 10px 0 rgba(35, 13, 77, 0.09);
}

.auth-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 7px;
    background: linear-gradient(
        90deg,
        var(--dapari-turquoise) 0 38%,
        var(--dapari-yellow) 38% 62%,
        var(--dapari-coral) 62% 82%,
        var(--dapari-navy) 82% 100%
    );
    content: "";
}

.auth-card--wide {
    width: min(650px, 100%);
}

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

.auth-brand img {
    display: block;
    border-radius: 15px;
    object-fit: cover;
}

.auth-brand div {
    display: grid;
    gap: 2px;
}

.auth-brand strong {
    font-family: "Bricolage Grotesque", "Nunito Sans", sans-serif;
    font-size: 1.12rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.auth-brand span {
    color: var(--dapari-muted);
    font-size: 0.82rem;
    font-weight: 650;
}

.auth-heading {
    margin: 34px 0 28px;
}

.auth-heading .eyebrow {
    margin: 0 0 10px;
}

.auth-heading h1 {
    font-size: clamp(2.15rem, 7vw, 3.55rem);
}

.auth-heading > p:last-child {
    margin: 16px 0 0;
    color: var(--dapari-muted);
    line-height: 1.6;
}

.auth-form {
    display: grid;
    gap: 18px;
}

.auth-form label {
    display: grid;
    gap: 7px;
}

.auth-form label > span {
    font-family: "Bricolage Grotesque", "Nunito Sans", sans-serif;
    font-size: 0.88rem;
    font-weight: 750;
}

.auth-form input {
    width: 100%;
    min-height: 50px;
    padding: 11px 13px;
    border: 2px solid rgba(35, 13, 77, 0.22);
    border-radius: 11px;
    color: var(--dapari-navy);
    background: var(--dapari-white);
    font: inherit;
    font-weight: 650;
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.auth-form input:focus {
    border-color: var(--dapari-navy);
    box-shadow: 0 0 0 4px rgba(92, 225, 230, 0.34);
}

.button--wide {
    width: 100%;
    margin-top: 4px;
}

.alert {
    margin: 0 0 22px;
    padding: 13px 15px;
    border: 2px solid var(--dapari-navy);
    border-radius: 11px;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.45;
}

.alert--error {
    background: rgba(255, 87, 87, 0.14);
}

.alert ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.auth-note,
.password-rules {
    color: var(--dapari-muted);
    font-size: 0.79rem;
    font-weight: 650;
    line-height: 1.5;
}

.auth-note {
    margin: 22px 0 0;
    text-align: center;
}

.tenant-options {
    display: grid;
    gap: 12px;
    margin-bottom: 24px;
}

.tenant-option {
    display: grid;
    width: 100%;
    gap: 4px;
    padding: 17px 18px;
    border: 2px solid rgba(35, 13, 77, 0.2);
    border-radius: 13px;
    color: var(--dapari-navy);
    background: var(--dapari-white);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 150ms ease, transform 150ms ease;
}

.tenant-option:hover,
.tenant-option:focus-visible {
    border-color: var(--dapari-turquoise);
    outline: none;
    transform: translateY(-2px);
}

.tenant-option span {
    font-family: "Bricolage Grotesque", "Nunito Sans", sans-serif;
    font-size: 1.02rem;
    font-weight: 780;
}

.tenant-option small {
    color: var(--dapari-muted);
    font-weight: 650;
}

.text-button {
    padding: 6px 0;
    border: 0;
    border-bottom: 2px solid var(--dapari-turquoise);
    color: var(--dapari-navy);
    background: transparent;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.text-button:hover,
.text-button:focus-visible {
    border-bottom-color: var(--dapari-coral);
    outline: none;
}

.dashboard-shell {
    width: min(1160px, calc(100% - 40px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 28px 0 60px;
}

.dashboard-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 22px;
    border-bottom: 2px solid var(--dapari-navy);
}

.dashboard-welcome {
    margin-top: clamp(46px, 8vw, 96px);
    padding: clamp(26px, 5vw, 52px);
    border: 2px solid var(--dapari-navy);
    border-radius: 22px;
    background:
        linear-gradient(120deg, rgba(255, 213, 0, 0.18), transparent 46%),
        var(--dapari-white);
    box-shadow: 9px 9px 0 rgba(92, 225, 230, 0.36);
}

.dashboard-welcome .eyebrow {
    margin: 0 0 14px;
}

.dashboard-welcome h1 {
    font-size: clamp(2.5rem, 7vw, 5rem);
}

.dashboard-welcome > p:last-child {
    max-width: 700px;
    margin: 22px 0 0;
    color: var(--dapari-muted);
    font-size: 1.05rem;
    line-height: 1.65;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 34px;
}

.dashboard-grid article {
    display: grid;
    min-height: 120px;
    align-content: space-between;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--dapari-border);
    border-top: 5px solid var(--dapari-turquoise);
    border-radius: 14px;
}

.dashboard-grid article:nth-child(2) {
    border-top-color: var(--dapari-yellow);
}

.dashboard-grid article:nth-child(3) {
    border-top-color: var(--dapari-coral);
}

.dashboard-grid strong {
    font-family: "Bricolage Grotesque", "Nunito Sans", sans-serif;
    font-size: 1.05rem;
}

.dashboard-grid span {
    color: var(--dapari-muted);
    font-size: 0.9rem;
    font-weight: 650;
}

@media (max-width: 680px) {
    .foundation,
    .system-shell {
        padding: 18px 14px 24px;
    }

    .foundation__panel,
    .system-card {
        border-radius: 18px;
        box-shadow: 7px 7px 0 rgba(92, 225, 230, 0.42);
    }

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

    .status-grid article {
        min-height: auto;
    }

    .actions {
        align-items: stretch;
        flex-direction: column;
    }

    .auth-shell {
        padding: 14px;
    }

    .auth-card {
        padding: 30px 19px 24px;
        border-radius: 17px;
        box-shadow: 6px 6px 0 rgba(35, 13, 77, 0.09);
    }

    .auth-heading {
        margin-top: 28px;
    }

    .dashboard-shell {
        width: min(100% - 28px, 1160px);
        padding-top: 18px;
    }

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

    .dashboard-welcome {
        margin-top: 34px;
        padding: 28px 20px;
        border-radius: 17px;
        box-shadow: 6px 6px 0 rgba(92, 225, 230, 0.36);
    }

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

    .dashboard-grid article {
        min-height: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
