* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    font-family: poppins, sans-serif;
    background-image: url('/images/ifsu.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    overflow-x: hidden;
}

.page-overlay {
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    background: rgba(0, 0, 0, 0.18);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: clamp(12px, 3vw, 24px);
}

.role-card {
    width: min(100%, 420px);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.24);
    background: #ffffff;
}

.role-card-top {
    background: linear-gradient(135deg, #007a1c, #00b82a 60%, #00cf30);
    text-align: center;
    padding: 30px 28px 26px;
    color: white;
}

.logo {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 14px;
    background: white;
    padding: 4px;
}

.role-card-top h1 {
    font-size: clamp(1.45rem, 5vw, 1.8rem);
    line-height: 1.18;
    font-weight: 700;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 0.9rem;
    line-height: 1.45;
    opacity: 0.95;
}

.role-card-bottom {
    background: #ffffff;
    text-align: center;
    padding: 24px 28px 28px;
}

.role-card-bottom h2 {
    font-size: 1.12rem;
    color: #1c1c1c;
    margin-bottom: 4px;
    font-weight: 700;
}

.role-description {
    font-size: 0.88rem;
    color: #6a6a6a;
    margin-bottom: 18px;
}

.role-buttons {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.role-btn {
    text-decoration: none;
    color: white;
    min-height: 50px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 8px 20px rgba(0, 110, 30, 0.18);
    -webkit-tap-highlight-color: transparent;
}

.role-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 110, 30, 0.24);
}

.role-btn:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.95);
    outline-offset: -5px;
    box-shadow: 0 0 0 3px #0b6f23, 0 10px 24px rgba(0, 110, 30, 0.22);
}

.role-btn:active {
    transform: translateY(0);
}

.admin-role {
    background: #006d18;
}

.faculty-role {
    background: #00a126;
}

.student-role {
    background: #00c92d;
}

.role-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
}

@media (max-width: 576px) {
    .page-overlay {
        align-items: center;
        padding: 16px 12px;
    }

    .role-card {
        width: min(100%, 360px);
        border-radius: 20px;
    }

    .role-card-top {
        padding: 27px 20px 23px;
    }

    .logo {
        width: 64px;
        height: 64px;
        margin-bottom: 12px;
    }

    .role-card-top h1 {
        font-size: 1.35rem;
        margin-bottom: 6px;
    }

    .subtitle {
        font-size: 0.82rem;
    }

    .role-card-bottom {
        padding: 23px 20px 26px;
    }

    .role-card-bottom h2 {
        font-size: 1.05rem;
    }

    .role-description {
        font-size: 0.82rem;
        margin-bottom: 14px;
    }

    .role-buttons {
        gap: 9px;
    }

    .role-btn {
        min-height: 48px;
        font-size: 0.9rem;
        padding-block: 8px;
    }
}

@media (max-width: 340px), (max-height: 620px) {
    .page-overlay {
        align-items: flex-start;
        padding: 8px;
    }

    .role-card-top {
        padding: 16px 14px 14px;
    }

    .logo {
        width: 52px;
        height: 52px;
        margin-bottom: 7px;
    }

    .role-card-top h1 {
        font-size: 1.18rem;
    }

    .subtitle {
        font-size: 0.76rem;
    }

    .role-card-bottom {
        padding: 14px 14px 16px;
    }

    .role-description {
        margin-bottom: 10px;
    }

    .role-buttons {
        gap: 7px;
    }

    .role-btn {
        min-height: 46px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .role-btn {
        transition: none;
    }
}

/* ROLE SELECTION — EXPLICIT POST ACTIONS */
.role-form { margin: 0; width: 100%; }
.role-form .role-btn { width: 100%; border: 0; font: inherit; cursor: pointer; }
