:root {
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    line-height: 1.5;
    background: #f4f6f9;
    color: #172033;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding-bottom: 90px;
}

.topbar {
    min-height: 64px;
    padding: 14px 18px;

    background: #14213d;
    color: white;

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

.brand {
    font-size: 1.15rem;
    font-weight: 700;
}

.user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.container {
    width: min(960px, 94%);
    margin: 24px auto;
}

.welcome {
    margin-bottom: 28px;
}

.cards {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(270px, 1fr));
    gap: 16px;
}

.card,
.login-card,
.empty-state {
    background: white;
    border-radius: 16px;
    padding: 20px;

    box-shadow:
        0 4px 18px
        rgba(0, 0, 0, 0.07);
}

.card h3 {
    margin-top: 8px;
}

.card-category {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    color: #53627c;
}

.compact {
    padding: 16px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 14px 0;
}

.tags span {
    background: #eef3f8;
    border-radius: 99px;
    padding: 5px 9px;
    font-size: 0.82rem;
}

.deadline {
    font-weight: 600;
}

.login-card {
    max-width: 420px;
    margin: 60px auto;
}

.subtitle {
    color: #5b6678;
}

label {
    display: block;
    margin-top: 16px;
    margin-bottom: 6px;
    font-weight: 600;
}

input {
    width: 100%;
    padding: 12px;

    border: 1px solid #b7c0ce;
    border-radius: 9px;

    font-size: 1rem;
}

input:focus {
    outline: 3px solid #bfd7ff;
    border-color: #285fbd;
}

.primary-button,
.primary-link,
.secondary-link,
.logout-button {
    display: inline-block;

    border: 0;
    border-radius: 9px;

    text-decoration: none;
    cursor: pointer;
}

.primary-button {
    width: 100%;

    margin-top: 22px;
    padding: 13px;

    background: #185adb;
    color: white;

    font-size: 1rem;
    font-weight: 700;
}

.primary-link {
    margin-top: 12px;
    padding: 10px 14px;

    background: #185adb;
    color: white;
}

.secondary-link {
    margin-top: 8px;
    padding: 8px 12px;

    background: #eef3f8;
    color: #18375f;
}

.logout-button {
    padding: 6px 10px;
    background: transparent;
    color: white;
    border: 1px solid #8da0bf;
}

.inline-form {
    display: inline;
}

.alert {
    margin: 15px 0;
    padding: 12px;

    background: #fff2f2;
    border: 1px solid #e2a6a6;
    border-radius: 8px;
}

.small {
    font-size: 0.85rem;
    color: #68758b;
}

.bottom-nav {
    position: fixed;

    bottom: 0;
    left: 0;
    right: 0;

    min-height: 70px;

    display: flex;
    justify-content: space-around;

    background: white;

    border-top:
        1px solid #d8dde6;

    z-index: 10;
}

.bottom-nav a {
    padding: 10px 18px;

    text-decoration: none;
    color: #26354d;

    display: flex;
    flex-direction: column;
    align-items: center;

    font-size: 1.15rem;
}

.bottom-nav span {
    font-size: 0.72rem;
}

@media (max-width: 520px) {

    .container {
        width: 92%;
        margin-top: 18px;
    }

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

    .topbar {
        padding: 12px;
    }

}


/* ==========================================================
   STUDENT RADAR MOBILE 2026
   ========================================================== */

/*
 * Evita que padding/border aumentem inesperadamente
 * a largura dos elementos.
 */
*,
*::before,
*::after {
    box-sizing: border-box;
}


/*
 * Base responsiva.
 */
html {
    width: 100%;
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
}


/*
 * Imagens e elementos multimidia nunca ultrapassam
 * a largura da tela.
 */
img,
svg,
video {
    max-width: 100%;
    height: auto;
}


/*
 * Formularios adequados para telas sensiveis ao toque.
 *
 * 16px tambem evita zoom automatico do Safari/iPhone
 * quando o usuario toca no campo.
 */
input,
select,
textarea,
button {
    max-width: 100%;
    font: inherit;
}

input,
select,
textarea {
    font-size: 16px;
}


/*
 * Area minima de toque.
 */
button,
.primary-button,
a.button {
    min-height: 44px;
}


/*
 * Assinatura na pagina de login.
 */
.creator-signature {
    margin: -0.25rem 0 1.5rem;
    text-align: center;
    font-size: 0.82rem;
    opacity: 0.70;
}

.creator-signature strong {
    white-space: nowrap;
}


/*
 * Rodape institucional/autoral.
 */
.project-footer {
    width: 100%;
    margin-top: auto;
    padding:
        1.25rem
        max(1rem, env(safe-area-inset-right))
        max(1.25rem, env(safe-area-inset-bottom))
        max(1rem, env(safe-area-inset-left));

    text-align: center;
    font-size: 0.78rem;
    line-height: 1.5;
    opacity: 0.72;
}

.project-footer-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.project-footer-separator {
    opacity: 0.55;
}


/*
 * Tablets e celulares.
 */
@media (max-width: 768px) {

    body {
        min-width: 0;
    }

    main,
    .container,
    .content,
    .page-content {
        width: 100%;
        max-width: 100%;
    }

    /*
     * Cards ocupam quase toda a tela,
     * mantendo margem lateral.
     */
    .login-card,
    .card {
        width: calc(100% - 2rem);
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    /*
     * Campos e botoes confortaveis no celular.
     */
    .login-card input,
    .login-card button,
    form input,
    form select,
    form textarea,
    form button {
        width: 100%;
    }

    /*
     * Links longos nao estouram a tela.
     */
    a {
        overflow-wrap: anywhere;
    }

    /*
     * Tabelas podem ser roladas horizontalmente
     * em vez de quebrar o layout.
     */
    table {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}


/*
 * Celulares pequenos.
 */
@media (max-width: 480px) {

    .login-card {
        width: calc(100% - 1.25rem);
        padding: 1.25rem;
    }

    .login-card h1 {
        font-size: clamp(1.6rem, 8vw, 2.1rem);
        line-height: 1.15;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .project-footer {
        font-size: 0.72rem;
    }

    .project-footer-separator {
        display: none;
    }

    .project-footer-inner {
        flex-direction: column;
        gap: 0.1rem;
    }
}


/*
 * Suporte a celulares com notch / Dynamic Island.
 */
@supports (
    padding: max(0px)
) {

    body {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}


/*
 * Acessibilidade: respeita preferencia por menos animacoes.
 */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

