@import './tokens.css';

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    color: var(--text);
    background: radial-gradient(circle at 10% -20%, #1a2d4d 0%, transparent 45%),
                radial-gradient(circle at 100% 0%, #2f2856 0%, transparent 35%),
                linear-gradient(150deg, var(--bg-1) 0%, var(--bg-2) 60%, #15233b 100%);
}

.page {
    width: min(1120px, 92vw);
    margin: 0 auto;
    padding: 0 0 72px;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: 80px;
    margin-bottom: 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    height: 80px;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand img {
    width: auto;
    height: 100%;
    object-fit: contain;
    display: block;
}

.logo-fallback {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-family: 'Sora', sans-serif;
    font-size: 20px;
    color: #fff;
    background: linear-gradient(140deg, var(--brand-a), var(--brand-b));
    box-shadow: 0 12px 26px rgba(79, 125, 255, 0.35);
}

.nav-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-form {
    margin: 0;
}

.nav-form .btn {
    width: 100%;
}

.nav-actions .btn {
    padding: 10px 14px;
}

.nav-actions .nav-login {
    padding-inline: 22px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid transparent;
    text-decoration: none;
    padding: 11px 16px;
    font-weight: 700;
    font-size: 14px;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-main {
    color: #fff;
    background: var(--primary-gradient);
    box-shadow: 0 14px 30px rgba(79, 125, 255, 0.32);
}

[data-unit="custom"] .btn-main {
    background: var(--primary);
}

.btn-soft {
    color: #fff;
    border-color: var(--brand-secondary);
    background: var(--brand-secondary-gradient);
}

[data-theme="ensino"] .btn-soft {
    color: #6a4f00;
}

.hero {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.06));
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 28px;
    padding: 34px;
    color: #f3f7ff;
    box-shadow: 0 26px 60px rgba(1, 8, 20, 0.45);
}

.kicker {
    display: inline-block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #c8d7ff;
    margin-bottom: 14px;
    font-weight: 700;
}

.hero h1 {
    margin: 0;
    font-family: 'Sora', sans-serif;
    font-size: clamp(26px, 4.1vw, 43px);
    line-height: 1.08;
    letter-spacing: -0.9px;
    max-width: 24ch;
}

.hero p {
    margin: 30px 0 0;
    color: #e7eefb;
    max-width: 62ch;
    line-height: 1.5;
    font-size: 19px;
    font-weight: 550;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.hero-grid {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.hero-chip {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    padding: 32px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 13px;
    color: #dbe6ff;
}

.section {
    margin-top: 22px;
    background: var(--surface);
    border-radius: 24px;
    border: 1px solid var(--line);
    padding: 26px;
}

.section--alt {
    background: var(--surface-alt);
}

.section h2 {
    margin: 0;
    font-family: 'Sora', sans-serif;
    font-size: clamp(26px, 4vw, 38px);
    letter-spacing: -0.02em;
}

.section p.lead {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.66;
    max-width: 72ch;
}

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

.card {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    background: var(--surface-soft);
    overflow: hidden;
}

.card h3 {
    margin: 0 0 8px;
    font-family: 'Sora', sans-serif;
    font-size: 18px;
}

.card-link {
    color: var(--text);
    text-decoration: none;
}

.card-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.ensino-card {
    position: relative;
    border-color: #f0d068;
    background: linear-gradient(170deg, #fffdf3 0%, var(--ensino-yellow-soft) 100%);
    box-shadow: 0 14px 24px rgba(244, 196, 48, 0.18);
}

.ensino-card::before {
    content: "";
    position: absolute;
    inset: 1px auto 1px 1px;
    width: 4px;
    border-radius: 15px 0 0 15px;
    background: linear-gradient(180deg, #ffd95a, #d8a400);
}

.ensino-badge {
    display: inline-flex;
    margin-bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(244, 196, 48, 0.24);
    border: 1px solid rgba(216, 164, 0, 0.5);
    color: #6a4f00;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ensino-card .card-link {
    color: #7a5b00;
}

.esportes-card {
    position: relative;
    border-color: rgba(42, 168, 107, 0.42);
    background: linear-gradient(170deg, #f7fff9 0%, var(--esportes-green-soft) 100%);
    box-shadow: 0 14px 24px rgba(42, 168, 107, 0.14);
}

.esportes-card::before {
    content: "";
    position: absolute;
    inset: 1px auto 1px 1px;
    width: 4px;
    border-radius: 15px 0 0 15px;
    background: linear-gradient(180deg, #49c987, #1f8c59);
}

.esportes-badge {
    display: inline-flex;
    margin-bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(42, 168, 107, 0.16);
    border: 1px solid rgba(31, 140, 89, 0.35);
    color: #196b45;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.esportes-card .card-link {
    color: #196b45;
}

.projetos-card {
    position: relative;
    border-color: rgba(216, 74, 74, 0.34);
    background: linear-gradient(170deg, #fff8f8 0%, var(--projetos-red-soft) 100%);
    box-shadow: 0 14px 24px rgba(216, 74, 74, 0.14);
}

.projetos-card::before {
    content: "";
    position: absolute;
    inset: 1px auto 1px 1px;
    width: 4px;
    border-radius: 15px 0 0 15px;
    background: linear-gradient(180deg, #f06d6d, #ba3434);
}

.projetos-badge {
    display: inline-flex;
    margin-bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(216, 74, 74, 0.14);
    border: 1px solid rgba(186, 52, 52, 0.28);
    color: #983232;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.projetos-card .card-link {
    color: #983232;
}

.stack {
    margin-top: 18px;
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 12px;
}

.base {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px;
    background: linear-gradient(170deg, #f8faff, #f2f6ff);
}

.base h3 {
    margin: 0;
    font-family: 'Sora', sans-serif;
    font-size: 24px;
}

.base p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.66;
}

.points {
    margin-top: 14px;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.points li {
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    padding: 10px 12px;
    color: #2a3f5f;
    font-size: 14px;
}

.cta {
    display: grid;
    gap: 14px;
    border: 1px solid #cad7eb;
    border-radius: 16px;
    padding: 18px;
    background: #fff;
}

.cta h3 {
    margin: 0;
    font-family: 'Sora', sans-serif;
    font-size: 22px;
}

.cta p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.btn-final {
    color: #fff;
    background: linear-gradient(130deg, var(--brand-c), var(--brand-b));
    box-shadow: 0 14px 30px rgba(79, 125, 255, 0.24);
}

.note {
    text-align: center;
    color: #9fb1cc;
    font-size: 13px;
    margin-top: 18px;
}

.auth-page {
    min-height: 100vh;
}

.auth-main {
    padding-top: 0;
}

.auth-panel {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(360px, 2fr);
    gap: 24px;
    align-items: stretch;
}

.auth-panel-single {
    grid-template-columns: minmax(0, 420px);
    justify-content: center;
}

.auth-copy,
.auth-card {
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 26px 60px rgba(1, 8, 20, 0.32);
}

.auth-copy {
    padding: 32px;
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.06));
    color: #f3f7ff;
}

.auth-copy h1 {
    margin: 0;
    font-family: 'Sora', sans-serif;
    font-size: clamp(30px, 4.6vw, 48px);
    line-height: 1.06;
    letter-spacing: -0.03em;
    max-width: 14ch;
}

.auth-copy p {
    margin: 18px 0 0;
    color: #d8e5fb;
    font-size: 17px;
    line-height: 1.68;
    max-width: 36ch;
}

.auth-card {
    padding: 28px;
    background: rgba(255, 255, 255, 0.98);
}

.auth-card h2 {
    margin: 0;
    font-family: 'Sora', sans-serif;
    font-size: 28px;
    color: var(--text);
    letter-spacing: -0.02em;
}

.auth-form {
    margin-top: 20px;
    display: grid;
    gap: 14px;
}

.auth-submit {
    margin-top: 8px;
    width: 100%;
}

.auth-links {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.auth-links a {
    color: var(--brand-c);
    font-weight: 600;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-alert {
    margin-top: 16px;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 600;
}

.auth-alert-success {
    background: rgba(42, 168, 107, 0.12);
    border: 1px solid rgba(42, 168, 107, 0.26);
    color: #175f3f;
}

.auth-alert-error {
    background: rgba(216, 74, 74, 0.1);
    border: 1px solid rgba(216, 74, 74, 0.22);
    color: #8d2c2c;
}

.auth-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.5;
}

.auth-checkbox input {
    margin-top: 3px;
}

.account-main {
    display: grid;
    gap: 22px;
}

.account-identity {
    padding: 24px 28px;
}

.account-identity h1 {
    max-width: none;
    font-size: clamp(24px, 2.8vw, 32px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.account-identity p {
    margin-top: 14px;
    font-size: 16px;
    line-height: 1.45;
}

.account-hero p strong,
.account-identity p strong {
    color: #fff;
}

.account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.account-actions-grid,
.account-system-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.account-link-card,
.account-system-card {
    color: inherit;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.account-link-card:hover,
.account-system-card.is-active:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(11, 19, 36, 0.08);
    border-color: rgba(28, 106, 255, 0.2);
}

.account-link-card h3,
.account-system-card h3 {
    margin: 0;
    font-family: 'Sora', sans-serif;
    font-size: 21px;
    letter-spacing: -0.02em;
}

.account-link-card p,
.account-system-card p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.account-system-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 22px;
}

.account-system-card .btn {
    align-self: flex-start;
}

.account-system-card.is-disabled {
    cursor: default;
}

.management-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.management-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 22px;
    background: #fff;
}

.management-card h3 {
    margin: 0;
    font-family: 'Sora', sans-serif;
    font-size: 21px;
    letter-spacing: -0.02em;
}

.management-card p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.management-card-full {
    grid-column: 1 / -1;
}

.admin-stats-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.admin-stat-card {
    padding: 20px 22px;
}

.admin-stat-label {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.admin-stat-card strong {
    display: block;
    margin-top: 10px;
    font-family: 'Sora', sans-serif;
    font-size: 32px;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--text);
}

.admin-primary-card {
    display: grid;
    gap: 10px;
}

.admin-card-kicker {
    display: inline-block;
    color: var(--brand-blue-deep);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.management-inline {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.management-inline-form {
    margin-top: 12px;
}

.management-filters {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.management-list {
    margin-top: 18px;
    display: grid;
    gap: 12px;
}

.management-row {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) auto auto;
    gap: 14px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px;
    background: #fff;
}

.management-row h3 {
    margin: 0;
    font-family: 'Sora', sans-serif;
    font-size: 18px;
}

.management-row p {
    margin: 6px 0 0;
    color: var(--muted);
}

.management-meta {
    display: grid;
    gap: 6px;
    text-align: right;
    font-size: 13px;
    color: var(--muted);
    font-weight: 700;
}

.management-tools {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.pagination-wrap {
    margin-top: 18px;
}

.pagination-wrap nav {
    display: flex;
    justify-content: center;
}

.pagination-wrap nav > div:first-child {
    display: none;
}

.pagination-wrap nav > div:last-child {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-wrap nav span[aria-current="page"] span,
.pagination-wrap nav a,
.pagination-wrap nav span[aria-disabled="true"] span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    box-sizing: border-box;
}

.pagination-wrap nav span[aria-current="page"] span {
    background: rgba(28, 106, 255, 0.08);
    border-color: rgba(28, 106, 255, 0.22);
    color: var(--brand-blue-deep);
}

.pagination-wrap nav span[aria-disabled="true"] span {
    opacity: 0.44;
}

.pagination-wrap nav svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.management-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    text-decoration: none;
    padding: 0;
    cursor: pointer;
}

.management-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.management-icon-view {
    color: #1c6aff;
}

.management-icon-edit,
.management-icon-email,
.management-icon-password {
    color: #a86b00;
}

.management-icon-level,
.management-icon-access {
    color: #175f3f;
}

.management-icon-status,
.management-icon-restore {
    color: #196b45;
}

.management-icon-delete {
    color: #983232;
}

.management-facts {
    margin-top: 14px;
    display: grid;
    gap: 10px;
}

.management-facts div {
    display: grid;
    gap: 4px;
}

.management-facts strong {
    font-size: 13px;
}

.management-facts span {
    color: var(--muted);
}

.management-actions-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.system-access-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.system-access-grid .auth-checkbox {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
    background: var(--surface-soft);
}

.system-access-grid .auth-checkbox span {
    display: grid;
    gap: 4px;
}

.system-access-grid .auth-checkbox small {
    color: var(--muted);
    font-size: 12px;
}

.auth-checkbox.is-disabled {
    opacity: 0.78;
}

.danger-card {
    border-color: rgba(216, 74, 74, 0.28);
    background: rgba(255, 248, 248, 0.96);
}

@media (max-width: 980px) {
    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .auth-panel-single {
        grid-template-columns: minmax(0, 420px);
    }

    .management-grid,
    .management-inline,
    .management-filters,
    .system-access-grid,
    .management-actions-grid,
    .account-actions-grid,
    .account-system-grid,
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }

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

    .management-meta {
        text-align: left;
    }

    .management-tools {
        justify-content: flex-start;
    }
}

@media (max-width: 680px) {
    .page {
        padding-top: 16px;
    }

    .auth-main {
        padding-top: 0;
    }

    .nav {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start;
        column-gap: 12px;
        margin-bottom: 16px;
    }

    .brand {
        height: 72px;
    }

    .hero,
    .section {
        padding: 20px;
        border-radius: 18px;
    }

    .cards,
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .nav-actions,
    .hero-cta {
        width: 100%;
    }

    .nav-actions {
        min-width: 0;
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    .hero-cta {
        flex-direction: column;
    }

    .nav-actions .btn {
        padding: 8px 12px;
        font-size: 12px;
        width: 100%;
    }

    .nav-form {
        width: 100%;
    }

    .nav-actions .nav-login {
        padding-inline: 18px;
    }

    .hero-cta .btn {
        width: 100%;
    }
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.input-field {
    border-radius: 10px;
    border: 1px solid var(--line);
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.input-field:focus {
    border-color: var(--brand-a);
    box-shadow: 0 0 0 2px rgba(79, 125, 255, 0.15);
}
