:root {
    --sas-red: #e50914;
    --sas-red-dark: #b0060f;
    --sas-red-light: #ff2b34;
    --sas-bg: #050507;
    --sas-bg-2: #0a0a0c;
    --sas-text: #ffffff;
    --sas-text-soft: rgba(255, 255, 255, 0.66);
    --sas-text-dim: rgba(255, 255, 255, 0.34);
    --sas-stroke: rgba(255, 255, 255, 0.10);
    --sas-card: rgba(255, 255, 255, 0.045);
    --sas-ease: cubic-bezier(0.22, 1, 0.36, 1);

    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
}

html {
    -webkit-text-size-adjust: 100%;
    background: var(--sas-bg);
}

body {
    background:
        radial-gradient(120% 80% at 50% -10%, rgba(229, 9, 20, 0.22) 0%, rgba(229, 9, 20, 0.06) 40%, transparent 70%),
        radial-gradient(100% 60% at 50% 110%, rgba(255, 43, 52, 0.12) 0%, transparent 60%),
        linear-gradient(180deg, var(--sas-bg-2) 0%, var(--sas-bg) 100%);
    background-attachment: fixed;

    color: var(--sas-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, Helvetica, sans-serif;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

/* ---------------- container ---------------- */
.pwa-screen {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding:
        calc(28px + var(--safe-top))
        calc(22px + var(--safe-right))
        calc(28px + var(--safe-bottom))
        calc(22px + var(--safe-left));

    text-align: center;
}

/* ---------------- máquina de estados ---------------- */
.screen {
    display: none;
    width: 100%;
    max-width: 420px;
    flex-direction: column;
    align-items: center;
}

.screen.is-active {
    display: flex;
    animation: sas-rise 420ms var(--sas-ease) both;
}

.screen--form {
    align-items: stretch;
    text-align: left;
    max-width: 440px;
    justify-content: flex-start;
    padding-top: calc(18px + var(--safe-top));
    padding-bottom: calc(28px + var(--safe-bottom));
}

/* leve cartão de vidro atrás de cada estado */
.screen.is-active::before {
    content: "";
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(94vw, 470px);
    height: min(92dvh, 780px);
    border-radius: 26px;
    border: 1px solid var(--sas-stroke);
    background: var(--sas-card);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    backdrop-filter: blur(20px) saturate(140%);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    z-index: -1;
    pointer-events: none;
}

/* ---------------- splash ---------------- */
[data-screen="splash"] {
    min-height: 60dvh;
    justify-content: center;
}

.splash-mark {
    width: 74px;
    height: 74px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--sas-red-light), var(--sas-red-dark));
    box-shadow: 0 14px 40px rgba(229, 9, 20, 0.45);
    animation: sas-pulse 1400ms ease-in-out infinite;
}

.splash-text {
    margin-top: 20px;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--sas-text-soft);
}

/* ---------------- identidade ---------------- */
.pwa-logo {
    width: min(64vw, 240px);
    height: auto;
    display: block;
    margin: 0 auto 22px;
    filter: drop-shadow(0 10px 30px rgba(229, 9, 20, 0.30));
}

.pwa-logo--sm { width: min(40vw, 150px); }
.pwa-logo.is-broken { display: none; }

.pwa-title {
    margin: 0;
    font-size: clamp(1.7rem, 8vw, 2.1rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.72) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.pwa-title--sm { font-size: clamp(1.4rem, 6.5vw, 1.7rem); }

.pwa-subtitle {
    margin: 10px auto 26px;
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--sas-text-soft);
    max-width: 34ch;
}

.screen--form .pwa-subtitle { margin-left: 0; }

/* ---------------- botões ---------------- */
.pwa-button {
    width: 100%;
    max-width: 340px;
    min-height: 54px;
    margin: 0 auto;

    border: 0;
    border-radius: 14px;

    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.3px;

    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    touch-action: manipulation;

    transition: transform 180ms var(--sas-ease), box-shadow 180ms var(--sas-ease),
                background-color 180ms var(--sas-ease), border-color 180ms var(--sas-ease);
}

.pwa-button:disabled { opacity: 0.55; cursor: not-allowed; }

.pwa-button:focus-visible {
    outline: 2px solid rgba(255, 43, 52, 0.85);
    outline-offset: 3px;
}

.pwa-install {
    background: linear-gradient(180deg, var(--sas-red-light) 0%, var(--sas-red) 45%, var(--sas-red-dark) 100%);
    color: #fff;
    margin-bottom: 12px;
    box-shadow: 0 12px 30px rgba(229, 9, 20, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.pwa-install:active {
    transform: scale(0.977);
    box-shadow: 0 6px 16px rgba(229, 9, 20, 0.30), inset 0 2px 6px rgba(0, 0, 0, 0.28);
}

.pwa-enter {
    background: rgba(255, 255, 255, 0.035);
    color: var(--sas-text);
    border: 1px solid var(--sas-stroke);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.pwa-enter:active { transform: scale(0.977); background: rgba(255, 255, 255, 0.12); }

.pwa-hint {
    margin-top: 14px;
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--sas-text-soft);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--sas-stroke);
    border-radius: 12px;
    padding: 12px 14px;
    text-align: left;
    max-width: 340px;
}

.pwa-version {
    margin-top: 26px;
    font-size: 0.72rem;
    letter-spacing: 0.6px;
    color: var(--sas-text-dim);
}

/* ---------------- formulário ---------------- */
.form-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.form-back {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 12px;
    border: 1px solid var(--sas-stroke);
    background: rgba(255, 255, 255, 0.045);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
}

.form-title {
    margin: 0;
    flex: 1;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.4px;
}

.form-step {
    font-size: 0.72rem;
    color: var(--sas-text-dim);
    border: 1px solid var(--sas-stroke);
    border-radius: 999px;
    padding: 4px 10px;
}

.form-lead {
    margin: 6px 0 20px;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--sas-text-soft);
}

.field { margin-bottom: 14px; }
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1 1 0; min-width: 0; }

.field label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: var(--sas-text-soft);
}

.field input,
.field select {
    width: 100%;
    min-height: 50px;
    padding: 0 14px;

    border-radius: 12px;
    border: 1px solid var(--sas-stroke);
    background: rgba(255, 255, 255, 0.045);
    color: #fff;

    font-size: 1rem;
    font-family: inherit;

    -webkit-appearance: none;
    appearance: none;
    transition: border-color 160ms var(--sas-ease), background-color 160ms var(--sas-ease);
}

.field select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff99' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 38px;
}

.field select option { background: #14141a; color: #fff; }

.field input::placeholder { color: rgba(255, 255, 255, 0.28); }

.field input:focus,
.field select:focus {
    outline: none;
    border-color: rgba(255, 43, 52, 0.75);
    background: rgba(255, 255, 255, 0.07);
}

.field.has-error input,
.field.has-error select { border-color: var(--sas-red-light); }

.field-error {
    display: block;
    min-height: 0;
    margin-top: 5px;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #ff8a90;
}

.field-error:empty { display: none; }

.check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 16px 0 6px;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--sas-text-soft);
    cursor: pointer;
}

.check input {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    margin: 0;
    accent-color: var(--sas-red);
}

/* honeypot: fora do ecrã, invisível para humanos */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* ---------------- verificação anti-robô ---------------- */
.verify-box {
    margin: 18px 0;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--sas-stroke);
    background: rgba(255, 255, 255, 0.035);
}

.verify-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--sas-text-soft);
}

.verify-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #666;
    flex: 0 0 9px;
    transition: background-color 200ms var(--sas-ease);
}

.verify-dot.is-ok { background: #2ecc71; box-shadow: 0 0 10px rgba(46, 204, 113, 0.7); }
.verify-dot.is-loading { background: #f1c40f; animation: sas-pulse 1200ms ease-in-out infinite; }
.verify-dot.is-error { background: var(--sas-red-light); }

.turnstile-container:empty { display: none; }
.turnstile-container { margin-top: 10px; }

/* ---------------- status / mensagens ---------------- */
.form-status {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.84rem;
    line-height: 1.5;
    text-align: left;
}

.form-status.is-error {
    background: rgba(229, 9, 20, 0.12);
    border: 1px solid rgba(255, 43, 52, 0.4);
    color: #ffb3b7;
}

.form-status.is-ok {
    background: rgba(46, 204, 113, 0.12);
    border: 1px solid rgba(46, 204, 113, 0.4);
    color: #a8f0c6;
}

.status-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin-bottom: 18px;
    display: block;
}

.status-icon--wait {
    border: 3px solid rgba(255, 255, 255, 0.18);
    border-top-color: var(--sas-red-light);
    animation: sas-spin 1100ms linear infinite;
    margin-left: auto;
    margin-right: auto;
}

.status-icon--ok {
    background: radial-gradient(circle at 50% 50%, rgba(46, 204, 113, 0.25), transparent 70%);
    border: 2px solid rgba(46, 204, 113, 0.65);
    margin-left: auto;
    margin-right: auto;
}

.pending-card {
    width: 100%;
    max-width: 340px;
    margin: 0 auto 18px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--sas-stroke);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.82rem;
    line-height: 1.7;
    text-align: left;
    color: var(--sas-text-soft);
}

.pending-card strong { color: #fff; }

.link-btn {
    display: inline;
    background: none;
    border: 0;
    padding: 4px 2px;
    margin-top: 14px;
    color: var(--sas-red-light);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.form-foot {
    margin: 16px 0 0;
    font-size: 0.85rem;
    color: var(--sas-text-soft);
    text-align: center;
}

/* ---------------- animações ---------------- */
@keyframes sas-rise {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes sas-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.62; transform: scale(0.93); }
}

@keyframes sas-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}

@media (max-height: 700px) {
    .pwa-logo { width: min(48vw, 170px); margin-bottom: 16px; }
    .pwa-subtitle { margin-bottom: 20px; }
}

@media (max-width: 360px) {
    .field-row { flex-direction: column; gap: 0; }
}

/* ============================================================
   SAS TEAM — MENU MOBILE
   ============================================================ */

   .sas-mobile-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.sas-mobile-brand {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #fff;
}

.sas-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: #1c1c20;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.sas-mobile-menu {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    background: #17171b;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

.sas-mobile-menu[hidden],
.sas-menu-item[hidden] {
    display: none !important;
}

.sas-menu-profile {
    padding: 12px;
    margin-bottom: 8px;
    color: #bbb;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sas-menu-item {
    display: block;
    width: 100%;
    padding: 14px 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #fff;
    font-size: 15px;
    text-align: left;
    cursor: pointer;
}

.sas-menu-item:hover,
.sas-menu-item:focus-visible {
    background: rgba(255, 255, 255, 0.1);
}

/* ============================================================
   SAS TEAM — PAINEL ADMINISTRATIVO
   ============================================================ */

   
/* ============================================================
   SAS TEAM — PAINEL ADMINISTRATIVO
   Visual original adaptado ao PWA
   ============================================================ */

.admin-screen {
    --admin-bg: #0b090c;
    --admin-panel: #151317;
    --admin-card: #201c20;
    --admin-border: #373137;
    --admin-text: #f5f3f4;
    --admin-muted: #aaa6aa;
    --admin-red: #c91527;
    --admin-red-bg: #42151d;

    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 100%;
    background: var(--admin-bg);
    color: var(--admin-text);
    font-family: Arial, Helvetica, sans-serif;
}

.admin-screen *,
.admin-screen *::before,
.admin-screen *::after {
    box-sizing: border-box;
}

.admin-header {
    border-bottom: 1px solid #29252a;
}

.admin-header__inner,
.admin-main {
    width: min(1380px, calc(100% - 48px));
    margin-inline: auto;
}

.admin-header__inner {
    padding: 24px 0 18px;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 32px;
}

.admin-brand__dot {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #e31b2b;
    box-shadow: 0 0 18px #e31b2b66;
}

.admin-brand__name {
    letter-spacing: 5px;
    font-size: 16px;
}

.admin-brand__divider {
    height: 22px;
    border-left: 1px solid #3b363c;
    margin-inline: 4px 2px;
}

.admin-brand__section {
    color: var(--admin-muted);
}

.admin-brand__badge,
.admin-role {
    border: 1px solid var(--admin-red);
    border-radius: 999px;
    color: #f1c3c8;
    font-weight: 700;
}

.admin-brand__badge {
    margin-left: 6px;
    padding: 7px 16px;
}

.admin-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.admin-nav__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 56px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 16px;
    background: transparent;
    color: var(--admin-muted);
    font-family: inherit;
    font-size: 18px;
    text-decoration: none;
    cursor: pointer;
}

.admin-nav__link.is-active {
    border-color: var(--admin-red);
    background: #351016;
    color: var(--admin-text);
    font-weight: 700;
}

.admin-nav__icon {
    font-size: 23px;
    line-height: 1;
}

.admin-nav__link--logout {
    margin-left: auto;
    border-color: #302b31;
    color: var(--admin-text);
    font-weight: 700;
}

.admin-main {
    padding-top: 28px;
}

.admin-panel {
    padding: 36px 28px;
    border: 1px solid var(--admin-border);
    border-radius: 22px;
    background: var(--admin-panel);
    box-shadow: 0 10px 30px #0003;
}

.admin-panel__title {
    margin: 0 0 12px;
    color: var(--admin-text);
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.15;
}

.admin-panel__description {
    margin: 0 0 28px;
    color: #b9b4b9;
    font-size: 17px;
    line-height: 1.6;
}

.admin-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.admin-metric {
    display: flex;
    min-width: 0;
    min-height: 96px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid var(--admin-border);
    border-radius: 17px;
    background: var(--admin-card);
    text-align: center;
}

.admin-metric strong {
    color: var(--admin-text);
    font-size: 30px;
}

.admin-metric span {
    color: #aaa6aa;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.admin-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin-bottom: 20px;
    padding: 6px;
    border: 1px solid var(--admin-border);
    border-radius: 17px;
    background: #1b191d;
}

.admin-tab {
    min-width: 0;
    padding: 16px 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #b9b4b9;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
}

.admin-tab.is-active {
    background: var(--admin-red-bg);
    color: var(--admin-text);
}

.admin-list {
    display: grid;
    gap: 12px;
    min-width: 0;
    color: var(--admin-text);
}

.admin-list-item {
    display: flex;
    min-width: 0;
    min-height: 68px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    border: 1px solid var(--admin-border);
    border-radius: 20px;
    background: #1d1b20;
    color: var(--admin-text);
    font-size: 17px;
}

.admin-list-item__name {
    min-width: 0;
    overflow-wrap: anywhere;
}

.admin-list-item__name strong {
    color: var(--admin-text);
    font-weight: 700;
}

.admin-role {
    flex: 0 0 auto;
    padding: 7px 14px;
    background: #30252a;
}

.admin-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 48px 4px 24px;
    color: #aaa6aa;
    font-size: 14px;
}

/* ============================================================
   RESPONSIVIDADE
   ============================================================ */

@media (max-width: 700px) {
    .admin-header__inner,
    .admin-main {
        width: calc(100% - 28px);
    }

    .admin-brand {
        flex-wrap: wrap;
        gap: 10px;
    }

    .admin-nav {
        gap: 4px;
    }

    .admin-nav__link {
        gap: 8px;
        min-height: 46px;
        padding-inline: 10px;
        font-size: 13px;
    }

    .admin-nav__icon {
        font-size: 19px;
    }

    .admin-nav__link--logout {
        margin-left: auto;
    }

    .admin-panel {
        padding: 24px 16px;
    }

    .admin-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-metric span {
        font-size: 11px;
    }

    .admin-tab {
        padding: 13px 5px;
        font-size: 13px;
    }

    .admin-list-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-footer {
        flex-direction: column;
        padding-top: 28px;
    }
}


.sas-admin-item:last-child {
    margin-bottom: 0;
}

.sas-admin-campo {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
    padding: 8px 0;
    border-bottom: 1px solid #303035;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.sas-admin-campo:last-child {
    border-bottom: none;
}

.sas-admin-campo span {
    color: #a9a9af;
}

.sas-admin-campo strong {
    color: #ffffff;
    font-weight: 600;
    -webkit-text-fill-color: #ffffff;
}

/* Aba selecionada — vermelho SAS TEAM */

.sas-admin-tab.is-active {
    background: #49131b;
    color: #ffffff;
    font-weight: 700;
}

/* Ajustes para celular */

@media (max-width: 599px) {
    .screen[data-screen="admin"] {
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
    }

    .sas-admin-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .sas-admin-metric {
        min-width: 0;
        padding: 14px 6px;
    }

    .sas-admin-metric strong {
        font-size: 25px;
    }

    .sas-admin-metric span {
        font-size: 11px;
    }

    .sas-admin-tabs {
        gap: 3px;
        padding: 4px;
    }

    .sas-admin-tab {
        min-width: 0;
        padding: 11px 3px;
        font-size: 12px;
    }

    .sas-admin-lista {
        padding: 8px;
    }

    .sas-admin-item {
        padding: 12px;
    }

    .sas-admin-campo {
        font-size: 13px;
    }
}

/* SAS TEAM — Correção de contraste dos cards administrativos */

.sas-admin-lista .sas-admin-item,
.sas-admin-item {
    background-color: #ffffff !important;
    color: #202832 !important;
}

.sas-admin-item .sas-admin-campo {
    color: #202832 !important;
}

.sas-admin-item .sas-admin-campo span {
    color: #606975 !important;
}

.sas-admin-item .sas-admin-campo strong {
    color: #202832 !important;
    -webkit-text-fill-color: #202832;
}

/* SAS TEAM — Listagem administrativa responsiva */

.admin-screen .admin-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.admin-screen .admin-list-item__name {
    min-width: 0;
    overflow-wrap: anywhere;
}

.admin-screen .admin-role {
    flex-shrink: 0;
}

/* Celulares */
@media (max-width: 700px) {

    .admin-screen .admin-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px;
    }

    .admin-screen .admin-list-item__name {
        display: block;
        width: 100%;
        font-size: 12px;
        line-height: 1.5;
    }

    .admin-screen .admin-list-item__name strong {
        font-size: 11px;
        font-weight: 600;
    }

    .admin-screen .admin-role {
        align-self: flex-start;
        font-size: 11px;
    }
}

/* ============================================================
   SAS TEAM — Detalhes expansíveis do Painel Administrativo
   ============================================================ */

   .admin-screen .admin-list-item {
    overflow: hidden;
}

.admin-screen .admin-list-item__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
}

.admin-screen .admin-list-item__summary::-webkit-details-marker {
    display: none;
}

.admin-screen .admin-list-item__summary::marker {
    content: "";
}

.admin-screen .admin-list-item[open] {
    border-color: #c91527;
}

.admin-screen .admin-list-item__details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #373137;
}

.admin-screen .admin-list-item__field {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 5px 0;
    color: #aaa6aa;
    font-size: 12px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.admin-screen .admin-list-item__field strong {
    color: #f5f3f4;
    font-weight: 600;
}

@media (max-width: 700px) {
    .admin-screen .admin-list-item__summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .admin-screen .admin-list-item__details {
        margin-top: 10px;
        padding-top: 10px;
    }

    .admin-screen .admin-list-item__field {
        font-size: 11px;
    }
}

/* ============================================================
   SAS TEAM — Layout administrativo para computador
   ============================================================ */

   @media (min-width: 701px) {

    /* Aproveitar a largura disponível */
    .admin-screen .admin-main {
        width: 100%;
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Solicitação em linha horizontal */
    .admin-screen .admin-list-item {
        display: block;
        width: 100%;
    }

    .admin-screen .admin-list-item__summary {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 24px;
    }

    .admin-screen .admin-list-item__name {
        flex: 1;
        min-width: 0;
        font-size: 14px;
    }

    .admin-screen .admin-list-item__name strong {
        font-size: 13px;
    }

    .admin-screen .admin-role {
        flex-shrink: 0;
        align-self: center;
        font-size: 12px;
    }

    /* Detalhes em duas colunas */
    .admin-screen .admin-list-item__details {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 24px;
        row-gap: 6px;
    }
}

/* ============================================================
   SAS TEAM — Painel Administrativo em largura completa
   ============================================================ */

   .screen.admin-screen {
    width: 100%;
    max-width: none;
    align-items: stretch;
    text-align: left;
}

/* Remove o cartão estreito usado nas demais telas do PWA */
.screen.admin-screen.is-active::before {
    display: none;
}

/* Centraliza o conteúdo em telas grandes */
.admin-screen .admin-main {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Computador */
@media (min-width: 701px) {
    .admin-screen .admin-metrics {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
    }
}

/* Celular */
@media (max-width: 700px) {
    .admin-screen .admin-main {
        width: 100%;
        max-width: 100%;
    }

    .admin-screen .admin-metrics {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}

/* ============================================================
   SAS TEAM — Botões de aprovação e recusa
   ============================================================ */

   .admin-screen .admin-list-item__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #373137;
    grid-column: 1 / -1;
}

.admin-screen .admin-action {
    min-width: 120px;
    padding: 11px 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
}

.admin-screen .admin-action--approve {
    background: #166534;
    color: #ffffff;
}

.admin-screen .admin-action--approve:hover {
    background: #15803d;
}

.admin-screen .admin-action--reject {
    background: #991b1b;
    color: #ffffff;
}

.admin-screen .admin-action--reject:hover {
    background: #b91c1c;
}

.admin-screen .admin-action:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

.admin-screen .admin-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 700px) {
    .admin-screen .admin-list-item__actions {
        flex-direction: column;
        gap: 10px;
    }

    .admin-screen .admin-action {
        width: 100%;
    }
}

/* Seletor de idiomas — SAS TEAM Mobile */
.pwa-language {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 24px;
    margin-bottom: 16px;
}

.pwa-language select {
    width: 220px;
    max-width: 90%;
    padding: 12px 16px;

    background-color: #1a1a1d;
    color: #ffffff;

    border: 1px solid #555;
    border-radius: 10px;

    font-size: 14px;
    text-align: center;
    cursor: pointer;
}

.pwa-language select:focus {
    outline: none;
    border-color: #d4af37;
}

/* SAS TEAM — textos secundários no tema escuro */
.text-muted {
    color: #cbd5e1 !important;
    opacity: 1;
}

/* SAS TEAM — graduação visual do professor */

.sas-pro__graduacao {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.sas-pro__faixa-visual {
    --faixa-cor: #111111;
    --faixa-ponteira: #b71920;
    --faixa-grau: #ffffff;

    position: relative;
    width: 155px;
    height: 25px;
    border-radius: 14px;
    background: var(--faixa-cor);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Faixas bicolores */
.sas-pro__faixa-visual--bicolor {
    background:
        linear-gradient(
            to bottom,
            var(--faixa-cor-secundaria) 0%,
            var(--faixa-cor-secundaria) 25%,
            var(--faixa-cor) 25%,
            var(--faixa-cor) 75%,
            var(--faixa-cor-secundaria) 75%,
            var(--faixa-cor-secundaria) 100%
        );
}

/* Ponteira vermelha da faixa preta */
.sas-pro__faixa-visual::before {
    content: "";
    position: absolute;
    right: 8px;
    top: 0;
    width: 48px;
    height: 100%;
    background: var(--faixa-ponteira);
    border-left: 2px solid rgba(0, 0, 0, 0.35);
}

/* Permite ocultar a ponteira quando necessário */
.sas-pro__faixa-visual--sem-ponteira::before {
    display: none;
}

/* Graus reais da faixa */
.sas-pro__graus {
    position: absolute;
    z-index: 1;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
}

.sas-pro__grau {
    width: 5px;
    height: 15px;
    background: var(--faixa-grau);
    border-radius: 1px;
}

/* Marcações de graduação infantil */
.sas-pro__grau--infantil {
    width: 5px;
    height: 17px;
    background: var(--faixa-grau, #ffffff);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 1px;
    flex-shrink: 0;
}

/* Identificação dos graus de mestre: 7º, 8º, 9º e 10º */
.sas-pro__grau-mestre {
    position: absolute;
    z-index: 2;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);

    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 26px;
    height: 19px;
    padding: 0 3px;

    color: #ffffff;
    background: #111111;
    border-radius: 4px;

    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

/* Identificador do grau do professor */
.sas-chip--grau {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 5px 12px;
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.20);

    color: #e2e8f0;
    font-size: 12px;
    font-weight: 600;
}

/* Respeitar o atributo hidden */
.sas-chip--grau[hidden] {
    display: none;
}

/* Ponteira ampliada para graduação infantil mensal */
.sas-pro__faixa-visual--mensal::before {
    width: 90px;
}

/* Posicionamento das marcações mensais */
.sas-pro__faixa-visual--mensal .sas-pro__graus {
    right: 13px;
    gap: 2px;
}

/* Até 11 marcações dentro da ponteira */
.sas-pro__faixa-visual--mensal .sas-pro__grau--infantil {
    width: 4px;
    height: 17px;
    flex-shrink: 0;
}

/* Distribuição das 11 marcações */
.sas-pro__faixa-visual--mensal .sas-pro__graus {
    gap: 2px;
}

.sas-pro__faixa-visual--mensal .sas-pro__grau--infantil {
    width: 4px;
    flex-shrink: 0;
}

/* ---------------- chamada para login (topo do pré-cadastro) ----------------
   Cartão clicável, não um link sublinhado: o alvo de toque tem 60px de altura,
   o rótulo diz o benefício ("já tem acesso aprovado") e a seta indica a ação.
   Usa os mesmos tokens do tema, então acompanha dark/light sem regra extra. */
   .login-callout {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid var(--sas-stroke);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--sas-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 180ms var(--sas-ease),
                background-color 180ms var(--sas-ease),
                transform 180ms var(--sas-ease);
}

.login-callout:hover {
    border-color: rgba(229, 9, 20, 0.45);
    background: rgba(229, 9, 20, 0.10);
}

.login-callout:active { transform: scale(0.99); }

.login-callout:focus-visible {
    outline: 2px solid rgba(255, 43, 52, 0.85);
    outline-offset: 3px;
}

.login-callout__icone {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    border: 1px solid rgba(229, 9, 20, 0.32);
    background: linear-gradient(160deg, rgba(229, 9, 20, 0.22), rgba(229, 9, 20, 0.06));
    color: var(--sas-red-light);
}

.login-callout__icone svg { width: 18px; height: 18px; }

.login-callout__texto {
    flex: 1 1 auto;
    min-width: 0;
}

.login-callout__titulo {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
}

.login-callout__sub {
    display: block;
    margin-top: 2px;
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--sas-text-soft);
}

.login-callout__seta {
    flex: 0 0 auto;
    color: var(--sas-text-dim);
    transition: transform 180ms var(--sas-ease), color 180ms var(--sas-ease);
}

.login-callout:hover .login-callout__seta {
    transform: translateX(3px);
    color: var(--sas-red-light);
}

.login-callout__seta svg { width: 16px; height: 16px; display: block; }

/* telas estreitas: encolhe o ícone para o texto não quebrar */
@media (max-width: 380px) {
    .login-callout { gap: 10px; padding: 11px 12px; }
    .login-callout__icone { width: 32px; height: 32px; border-radius: 9px; }
    .login-callout__icone svg { width: 16px; height: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .login-callout,
    .login-callout__seta { transition: none; }
}
