@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    /* =======================================================
       PDX DIGITAL - PALETA OFICIAL
       ======================================================= */

    --pdx-ink: #08151a;
    --pdx-ink-2: #0d252b;
    --pdx-surface: #10262c;

    --pdx-green: #5be1a5;
    --pdx-green-hover: #83efbd;
    --pdx-green-soft: rgba(91, 225, 165, .12);

    --pdx-cream: #f4f5f0;

    --pdx-text: #ffffff;
    --pdx-text-muted: #b4c0bd;
    --pdx-line: rgba(255, 255, 255, .16);

    /* =======================================================
       CORES SEMANTICAS DO SISTEMA
       ======================================================= */

    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #38bdf8;

    /* =======================================================
       COMPONENTES
       ======================================================= */

    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 18px;

    --content-width: 1180px;

    --shadow:
        0 22px 60px rgba(0, 0, 0, .28);
}

/* ===========================================================
   BASE
   =========================================================== */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;

    font-family:
        'DM Sans',
        Arial,
        sans-serif;

    background:
        linear-gradient(
            180deg,
            var(--pdx-ink) 0%,
            #0a1b20 100%
        );

    color: var(--pdx-text);
}

h1,
h2,
h3 {
    font-family:
        'Space Grotesk',
        Arial,
        sans-serif;

    letter-spacing: -.035em;
}

button,
input {
    font: inherit;
}

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

:focus-visible {
    outline: 3px solid var(--pdx-green);
    outline-offset: 3px;
}

/* ===========================================================
   HEADER
   =========================================================== */

.app-header {
    background: rgba(8, 21, 26, .97);
    border-bottom: 1px solid var(--pdx-line);
    backdrop-filter: blur(16px);
}

.app-header__inner {
    width: min(
        calc(100% - 32px),
        var(--content-width)
    );

    min-height: 76px;
    margin: 0 auto;

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;

    font-family:
        'Space Grotesk',
        Arial,
        sans-serif;
}

.brand__mark {
    min-width: 42px;
    height: 42px;

    padding: 0 9px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 2px solid var(--pdx-green);
    border-radius: 10px;

    color: var(--pdx-green);

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

    transform: rotate(-6deg);
}

.brand__mark--large {
    min-width: 54px;
    height: 54px;

    border-radius: 13px;

    font-size: 20px;
}

.brand__text {
    display: flex;
    flex-direction: column;
}

.brand__text strong {
    color: var(--pdx-green);
    font-size: 15px;
}

.brand__text small {
    margin-top: 2px;

    color: var(--pdx-text-muted);
}

.app-header__account {
    display: flex;
    align-items: center;
    gap: 18px;
}

.account-summary {
    display: flex;
    flex-direction: column;

    text-align: right;
}

.account-summary strong {
    font-size: 14px;
}

.account-summary span {
    margin-top: 2px;

    color: var(--pdx-text-muted);
    font-size: 12px;
}

/* ===========================================================
   CONTEUDO
   =========================================================== */

.app-main {
    width: min(
        calc(100% - 32px),
        var(--content-width)
    );

    margin: 0 auto;
    padding: 36px 0 64px;
}

/* ===========================================================
   AUTENTICACAO
   =========================================================== */

.auth-shell {
    min-height: calc(100vh - 150px);

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

    padding: 36px 0;
}

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

    padding: 36px;

    background: var(--pdx-ink-2);

    border: 1px solid var(--pdx-line);
    border-radius: var(--radius-lg);

    box-shadow: var(--shadow);
}

.auth-card__brand {
    margin-bottom: 32px;

    display: flex;
    align-items: center;
    gap: 16px;
}

.auth-card__brand h1 {
    margin: 0;

    color: var(--pdx-text);

    font-size: 24px;
}

.auth-card__brand p {
    margin: 6px 0 0;

    color: var(--pdx-text-muted);

    font-size: 14px;
}

.auth-card__footer {
    margin: 24px 0 0;

    color: var(--pdx-text-muted);

    text-align: center;
    font-size: 12px;
}

/* ===========================================================
   FORMULARIOS
   =========================================================== */

.form-stack {
    display: grid;
    gap: 20px;
}

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

.field label {
    color: var(--pdx-text);

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

.field input {
    width: 100%;
    min-height: 48px;

    padding: 11px 14px;

    border: 1px solid #38625b;
    border-radius: var(--radius-sm);

    background: #071216;
    color: var(--pdx-text);

    outline: none;

    transition:
        border-color .15s ease,
        box-shadow .15s ease,
        background .15s ease;
}

.field input:focus {
    border-color: var(--pdx-green);

    background: #0a1b20;

    box-shadow:
        0 0 0 4px rgba(91, 225, 165, .12);
}

.field-error {
    margin: 0;

    color: #ff8d86;

    font-size: 13px;
}

.field-help {
    margin: 0;

    color: var(--pdx-text-muted);

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

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 9px;

    color: var(--pdx-text-muted);

    font-size: 14px;
}

.checkbox-row input {
    width: 16px;
    height: 16px;

    accent-color: var(--pdx-green);
}

/* ===========================================================
   LINKS
   =========================================================== */

.auth-links {
    margin-top: 4px;

    display: flex;
    justify-content: center;

    font-size: 14px;
}

.auth-links a {
    color: var(--pdx-green);

    font-weight: 700;
}

.auth-links a:hover {
    color: var(--pdx-green-hover);
    text-decoration: underline;
}

/* ===========================================================
   BOTOES
   =========================================================== */

.button {
    min-height: 44px;

    padding: 10px 17px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: var(--radius-sm);

    cursor: pointer;

    font-weight: 700;

    transition:
        background .15s ease,
        color .15s ease,
        transform .15s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button--primary {
    background: var(--pdx-green);
    color: var(--pdx-ink);
}

.button--primary:hover {
    background: var(--pdx-green-hover);
}

.button--secondary {
    border: 1px solid var(--pdx-line);

    background: transparent;
    color: var(--pdx-text);
}

.button--secondary:hover {
    border-color: var(--pdx-green);

    color: var(--pdx-green);
}

.button--full {
    width: 100%;
}

/* ===========================================================
   ALERTAS
   =========================================================== */

.alert {
    margin-bottom: 24px;

    padding: 13px 16px;

    border-radius: var(--radius-sm);

    font-size: 14px;
}

.alert--success {
    border: 1px solid rgba(91, 225, 165, .32);

    background: rgba(91, 225, 165, .10);

    color: #c7ffdf;
}

/* ===========================================================
   DASHBOARD
   =========================================================== */

.page-heading {
    margin-bottom: 28px;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.page-heading h1 {
    margin: 4px 0 7px;

    font-size: clamp(
        28px,
        4vw,
        38px
    );
}

.page-heading p {
    margin: 0;

    color: var(--pdx-text-muted);
}

.eyebrow {
    color: var(--pdx-green) !important;

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

    letter-spacing: .17em;
    text-transform: uppercase;
}

.environment-badge {
    padding: 8px 12px;

    border: 1px solid rgba(91, 225, 165, .35);
    border-radius: 999px;

    background: rgba(91, 225, 165, .09);

    color: var(--pdx-green);

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

    letter-spacing: .08em;
}

.dashboard-grid {
    margin-bottom: 26px;

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 18px;
}

.dashboard-card {
    min-height: 150px;

    padding: 22px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    background: var(--pdx-ink-2);

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

    box-shadow:
        0 10px 28px rgba(0, 0, 0, .18);
}

.dashboard-card__label {
    margin-bottom: 14px;

    color: var(--pdx-green);

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

    text-transform: uppercase;
    letter-spacing: .08em;
}

.dashboard-card strong {
    font-family:
        'Space Grotesk',
        Arial,
        sans-serif;

    font-size: 20px;
}

.dashboard-card small {
    margin-top: 7px;

    color: var(--pdx-text-muted);
}

.panel {
    overflow: hidden;

    background: var(--pdx-ink-2);

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

.panel__header {
    padding: 22px 24px;

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

.panel__header h2 {
    margin: 5px 0 0;

    font-size: 20px;
}

.module-list {
    display: grid;
}

.module-item {
    min-height: 78px;

    padding: 18px 24px;

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

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

.module-item:last-child {
    border-bottom: 0;
}

.module-item div {
    display: flex;
    flex-direction: column;
}

.module-item strong {
    font-size: 15px;
}

.module-item span {
    margin-top: 4px;

    color: var(--pdx-text-muted);

    font-size: 13px;
}

.status {
    flex: 0 0 auto;

    padding: 6px 10px;

    border: 1px solid var(--pdx-line);
    border-radius: 999px;

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

    color: var(--pdx-text-muted) !important;

    font-size: 11px !important;
    font-weight: 700;
}

.status--active {
    border-color: rgba(91, 225, 165, .35);

    background: rgba(91, 225, 165, .10);

    color: var(--pdx-green) !important;
}

/* ===========================================================
   RESPONSIVO
   =========================================================== */

@media (max-width: 800px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .account-summary {
        display: none;
    }
}

@media (max-width: 560px) {
    .app-header__inner {
        width: min(
            calc(100% - 22px),
            var(--content-width)
        );
    }

    .app-main {
        width: min(
            calc(100% - 22px),
            var(--content-width)
        );

        padding-top: 24px;
    }

    .brand__text {
        display: none;
    }

    .auth-card {
        padding: 25px 20px;

        border-radius: 14px;
    }

    .page-heading {
        flex-direction: column;
    }

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

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}
