:root {
    --unitau-blue: #243B77;
    --unitau-blue-dark: #1B2D5A;
    --unitau-blue-light: #36589A;

    --background: #eef2f7;
    --card: rgba(255, 255, 255, 0.97);
    --text: #17233a;
    --muted: #667085;
    --border: rgba(36, 59, 119, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

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

    display: flex;
    flex-direction: column;

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

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

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* =========================================================
   CABEÇALHO
   ========================================================= */

.portal-header {
    position: relative;
    z-index: 10;

    background: var(--unitau-blue);
    color: white;

    box-shadow: 0 4px 20px rgba(0, 0, 0, .12);
}

.header-container {
    width: 100%;
    max-width: none;

    padding-left: 60px;
    padding-right: 60px;
}

.header-content {
    min-height: 72px;

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

.brand {
    display: flex;
    align-items: center;

    text-decoration: none;
}

.brand-logo {
    display: block;

    width: auto;
    height: 52px;

    max-width: min(360px, 70vw);

    object-fit: contain;
}

.theme-button {
    width: 42px;
    height: 42px;

    border: 1px solid rgba(255,255,255,.28);
    border-radius: 50%;

    background: rgba(255,255,255,.10);
    color: white;

    font-size: 20px;

    cursor: pointer;

    transition:
        background .2s ease,
        transform .2s ease;
}

.theme-button:hover {
    background: rgba(255,255,255,.18);
    transform: scale(1.04);
}

/* =========================================================
   ÁREA PRINCIPAL
   ========================================================= */

.portal-background {
    flex: 1;

    display: flex;
    align-items: center;

    padding: 12px 20px;

    background:
        radial-gradient(
            circle at 10% 10%,
            rgba(54, 88, 154, .22),
            transparent 40%
        ),
        radial-gradient(
            circle at 90% 90%,
            rgba(36, 59, 119, .16),
            transparent 40%
        ),
        #eef2f7;
}

/* =========================================================
   CARTÃO
   ========================================================= */

.portal-card {
    width: 100%;
    max-width: 620px;

    margin: auto;
    padding:22px 32px;

    background: var(--card);

    border: 1px solid var(--border);
    border-radius: 20px;

    box-shadow:
        0 20px 55px rgba(27, 45, 90, .14);

    text-align: center;
}

/* =========================================================
   LOGO CENTRAL
   ========================================================= */

.portal-card-logo {
    display: flex;
    justify-content: center;
    align-items: center;

    margin-bottom: 8px;
}

.portal-card-logo img {
    display: block;

    width: auto;
    height: 52px;
    max-width: 80%;

    object-fit: contain;
}

/* =========================================================
   TÍTULOS
   ========================================================= */

.portal-card h1 {
    margin: 0;

    color: var(--unitau-blue);

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

.portal-description {
    max-width: 480px;

    margin: 6px auto 16px;

    color: var(--muted);

    font-size: 15px;
}

/* =========================================================
   AÇÕES DA PÁGINA INICIAL
   ========================================================= */

.action-grid {
    display: grid;
    gap: 16px;
}

.action-card {
    display: flex;
    align-items: center;

    padding: 20px;

    color: inherit;
    text-decoration: none;

    text-align: left;

    border: 1px solid var(--border);
    border-radius: 16px;

    background: white;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

.action-card:hover {
    transform: translateY(-2px);

    border-color: rgba(36, 59, 119, .32);

    box-shadow:
        0 12px 30px rgba(36, 59, 119, .12);
}

.action-icon {
    width: 52px;
    height: 52px;

    flex: 0 0 52px;

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

    margin-right: 16px;

    border-radius: 14px;

    background: rgba(36, 59, 119, .08);

    color: var(--unitau-blue);

    font-size: 24px;
}

.action-content {
    flex: 1;
}

.action-content h2 {
    margin: 0 0 5px;

    color: var(--unitau-blue);

    font-size: 17px;
    font-weight: 750;
}

.action-content p {
    margin: 0;

    color: var(--muted);

    font-size: 14px;
}

.action-arrow {
    margin-left: 15px;

    color: var(--unitau-blue);

    font-size: 25px;
    font-weight: 300;
}

/* =========================================================
   MENSAGEM DE SEGURANÇA
   ========================================================= */

.security-message {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    margin-top: 28px;

    color: var(--muted);

    font-size: 12px;
}

/* =========================================================
   FOOTER
   ========================================================= */

.portal-footer {
    height: 50px;
    min-height: 50px;
    flex: 0 0 50px;

    display: flex;
    align-items: center;

    background: var(--unitau-blue-dark);

    color: rgba(255,255,255,.78);

    font-size: 12px;
}

.portal-footer .container {
    display: flex;
    justify-content: center;

    gap: 8px;
}

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

@media (max-width: 600px) {

    .header-container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .header-content {
        min-height: 76px;
    }

    .brand-logo {
        height: 42px;
        max-width: 250px;
    }

    .theme-button {
        width: 38px;
        height: 38px;

        font-size: 18px;
    }

    .portal-background {
        padding: 35px 15px;
    }

    .portal-card {
        padding: 32px 20px;
        border-radius: 18px;
    }

    .portal-card-logo {
        margin-bottom: 18px;
    }

    .portal-card-logo img {
        height: 58px;
        max-width: 90%;
    }

    .portal-card h1 {
        font-size: 26px;
    }

    .portal-description {
        font-size: 15px;
        margin-bottom: 28px;
    }

    .portal-card .alert {
        padding: 10px 14px;
        margin-bottom: 14px;

        font-size: 14px;
        line-height: 1.35;
    }

    .portal-card .alert ul {
        margin-top: 5px;
        margin-bottom: 0;
    }

    .portal-card .alert li {
        margin-bottom: 1px;
    }
    .action-card {
        padding: 16px;
    }

    .action-icon {
        width: 44px;
        height: 44px;
        flex-basis: 44px;

        margin-right: 12px;
    }

    .action-content h2 {
        font-size: 15px;
    }

    .action-content p {
        font-size: 13px;
    }

    .action-arrow {
        font-size: 22px;
    }

    .security-message {
        font-size: 11px;
    }


    .password-rules {
    padding: 16px;
    margin-top: 18px;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: rgba(36, 59, 119, .035);

    color: var(--text);
    font-size: 14px;
    }

    .password-rules strong {
       color: var(--unitau-blue);
    }

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

    .password-rules li {
        margin-bottom: 4px;
}




}

/* =========================================================
   TEMA ESCURO
   ========================================================= */

body.dark-mode {
    background: #121826;
    color: #e8ecf3;
}

body.dark-mode .portal-background {
    background: #121826;
}

body.dark-mode .portal-card {
    background: #1b2435;
    border-color: #303b52;
    color: #e8ecf3;
}

body.dark-mode .portal-card h1,
body.dark-mode .portal-card h2,
body.dark-mode .portal-card h3,
body.dark-mode .portal-card h4 {
    color: #ffffff;
}

body.dark-mode .portal-description {
    color: #c4ccda;
}

body.dark-mode .portal-card p,
body.dark-mode .portal-card label {
    color: #d5dbe6;
}

body.dark-mode .portal-card input,
body.dark-mode .portal-card select,
body.dark-mode .portal-card textarea {
    background: #111827;
    color: #ffffff;
    border-color: #46536b;
}

body.dark-mode .portal-card input::placeholder,
body.dark-mode .portal-card textarea::placeholder {
    color: #8d98ab;
}

body.dark-mode .portal-card input:focus,
body.dark-mode .portal-card select:focus,
body.dark-mode .portal-card textarea:focus {
    background: #111827;
    color: #ffffff;
    border-color: #36589A;
    box-shadow: 0 0 0 0.2rem rgba(54, 88, 154, 0.25);
}

body.dark-mode .portal-footer {
    background: #0d1320;
    color: #aeb8c8;
}

body.dark-mode .theme-button {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.20);
}

body.dark-mode .theme-button:hover {
    background: rgba(255, 255, 255, 0.20);
}

body.dark-mode a {
    color: #8fb3ff;
}

body.dark-mode .text-muted {
    color: #aeb8c8 !important;
}

/* Botões principais */
body.dark-mode .btn-primary {
    background-color: #36589A;
    border-color: #36589A;
}

body.dark-mode .btn-primary:hover,
body.dark-mode .btn-primary:focus {
    background-color: #456cac;
    border-color: #456cac;
}

/* Alertas */
body.dark-mode .alert {
    border-color: #46536b;
}

body.dark-mode .alert-info {
    background: #17263d;
    color: #d9e8ff;
}

body.dark-mode .alert-success {
    background: #173326;
    color: #d5f5df;
}

body.dark-mode .alert-danger {
    background: #3a2025;
    color: #ffd9dd;
}

body.dark-mode .alert-warning {
    background: #3a3019;
    color: #ffeec0;
}

/* Regras de senha */
body.dark-mode .password-rules {
    color: #c4ccda;
}


/* =========================================================
   CARDS DE AÇÃO - TEMA ESCURO
   ========================================================= */

body.dark-mode .action-card {
    color: #243B77;
}

body.dark-mode .action-card .action-content h2 {
    color: #243B77;
}

body.dark-mode .action-card .action-content p {
    color: #243B77;
}

body.dark-mode .action-card .action-arrow {
    color: #243B77;
}

