/* ——— Página Alunos — visual premium ——— */

.page-alunos .navbar {
    position: relative;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(6, 6, 12, 0.75);
}

.page-alunos .app-page {
    position: relative;
    z-index: 1;
    padding-top: 0;
}

/* Hero */
.alunos-hero {
    margin: 0 -5% 32px;
    padding: 36px 5% 40px;
    background: linear-gradient(
        135deg,
        rgba(139, 92, 246, 0.2) 0%,
        rgba(109, 40, 217, 0.12) 45%,
        transparent 100%
    );
    border-bottom: 1px solid rgba(139, 92, 246, 0.15);
    position: relative;
    overflow: hidden;
}

.alunos-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%238b5cf6' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.8;
    pointer-events: none;
}

.alunos-hero-inner {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.alunos-hero-text .badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.35);
    color: #c4b5fd;
    margin-bottom: 14px;
}

.alunos-hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    background: linear-gradient(135deg, #fff 30%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.alunos-hero p {
    color: #9ca3af;
    margin-top: 10px;
    max-width: 480px;
    font-size: 0.95rem;
}

/* Perfil ativo */
.active-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    background: rgba(18, 18, 31, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    min-width: min(100%, 320px);
}

.active-profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: white;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
    flex-shrink: 0;
}

.active-profile-info strong {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
}

.active-profile-info span {
    font-size: 0.8rem;
    color: #9ca3af;
}

.active-profile-status {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #4ade80;
    background: rgba(74, 222, 128, 0.12);
    padding: 6px 12px;
    border-radius: 100px;
    border: 1px solid rgba(74, 222, 128, 0.25);
}

.active-profile-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 8px #4ade80;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Sidebar */
.page-alunos .student-sidebar {
    background: rgba(18, 18, 31, 0.6);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
    padding: 0;
    overflow: hidden;
}

.sidebar-head {
    padding: 20px 20px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-head h3 {
    margin-bottom: 4px;
}

.student-count {
    font-size: 0.75rem;
    color: #6b7280;
}

.sidebar-search {
    margin: 12px 16px;
    position: relative;
}

.sidebar-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 0.85rem;
}

.sidebar-search input {
    padding-left: 40px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
}

.page-alunos .student-list {
    padding: 8px 12px 16px;
    max-height: 420px;
    overflow-y: auto;
}

.page-alunos .student-list::-webkit-scrollbar {
    width: 4px;
}

.page-alunos .student-list::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.4);
    border-radius: 4px;
}

.page-alunos .student-item {
    background: transparent;
    border: 1px solid transparent;
    margin-bottom: 4px;
    position: relative;
    overflow: hidden;
}

.page-alunos .student-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, #8b5cf6, #a78bfa);
    border-radius: 0 4px 4px 0;
    transition: height 0.25s ease;
}

.page-alunos .student-item.active::before {
    height: 60%;
}

.page-alunos .student-item.active {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.18), transparent);
    border-color: rgba(139, 92, 246, 0.25);
    box-shadow: none;
}

.page-alunos .student-avatar {
    border-radius: 14px;
    width: 44px;
    height: 44px;
    font-size: 0.8rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Mini cards stats */
.page-alunos .mini-cards {
    gap: 16px;
    margin-bottom: 28px;
}

.page-alunos .mini-card {
    position: relative;
    padding: 20px 18px 18px 58px;
    text-align: left;
    background: rgba(18, 18, 31, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s, box-shadow 0.3s;
}

.page-alunos .mini-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--card-accent, linear-gradient(90deg, #8b5cf6, #c084fc));
    opacity: 0.8;
}

.page-alunos .mini-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.mini-card-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    background: var(--icon-bg, rgba(139, 92, 246, 0.2));
    color: var(--icon-color, #c4b5fd);
}

.mini-card.peso { --card-accent: linear-gradient(90deg, #7c3aed, #a78bfa); --icon-bg: rgba(124,58,237,0.25); --icon-color: #c4b5fd; }
.mini-card.imc { --card-accent: linear-gradient(90deg, #6d28d9, #8b5cf6); --icon-bg: rgba(109,40,217,0.25); --icon-color: #ddd6fe; }
.mini-card.gordura { --card-accent: linear-gradient(90deg, #8b5cf6, #c084fc); --icon-bg: rgba(139,92,246,0.25); --icon-color: #e9d5ff; }
.mini-card.cintura { --card-accent: linear-gradient(90deg, #5b21b6, #a78bfa); --icon-bg: rgba(91,33,182,0.25); --icon-color: #c4b5fd; }

.page-alunos .mini-card .value {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
}

.page-alunos .mini-card .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

/* Tabs */
.page-alunos .tabs {
    background: rgba(18, 18, 31, 0.5);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 8px;
    margin-bottom: 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.page-alunos .tab-btn {
    border-radius: 14px;
    padding: 14px 18px;
}

.page-alunos .tab-btn:not(.active):hover {
    background: rgba(255, 255, 255, 0.04);
}

.page-alunos .tab-btn.active {
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.45);
}

/* Info cards */
.page-alunos .info-card {
    background: rgba(18, 18, 31, 0.55);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 22px;
    padding: 28px;
    position: relative;
    overflow: hidden;
}

.page-alunos .info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 28px;
    right: 28px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.4), transparent);
}

.page-alunos .info-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.page-alunos .info-card h3 i {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.15);
    border-radius: 10px;
    color: #c4b5fd;
    font-size: 0.85rem;
}

.page-alunos .form-group input,
.page-alunos .form-group select,
.page-alunos .info-card textarea,
.page-alunos .pref-item select {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.page-alunos .form-group input:hover,
.page-alunos .form-group select:hover,
.page-alunos .info-card textarea:hover {
    border-color: rgba(139, 92, 246, 0.25);
}

.page-alunos .form-group input:focus,
.page-alunos .form-group select:focus,
.page-alunos .info-card textarea:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
    background: rgba(0, 0, 0, 0.5);
}

.page-alunos .form-group input[readonly] {
    opacity: 0.85;
    cursor: default;
    background: rgba(139, 92, 246, 0.08);
}

/* Preferências */
.page-alunos .pref-item {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 20px;
    transition: border-color 0.25s, transform 0.25s;
}

.page-alunos .pref-item:hover {
    border-color: rgba(139, 92, 246, 0.25);
    transform: translateY(-2px);
}

.page-alunos .pref-item h4 i {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.12);
    border-radius: 8px;
    font-size: 0.75rem;
}

.page-alunos .checkbox-group label {
    border-radius: 12px;
    padding: 10px 14px;
    transition: all 0.2s;
}

.page-alunos .checkbox-group label:hover {
    border-color: rgba(139, 92, 246, 0.3);
}

/* Tabela */
.page-alunos .results-table-wrap {
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.2);
}

.page-alunos .results-table thead {
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.12), transparent);
}

.page-alunos .results-table th {
    color: #a78bfa;
    padding: 16px 14px;
}

.page-alunos .results-table tbody tr {
    transition: background 0.2s;
}

.page-alunos .results-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

/* Anotações */
.page-alunos #tab-notas .info-card textarea {
    min-height: 220px;
    line-height: 1.7;
    font-size: 0.95rem;
}

.page-alunos #tab-notas .info-card {
    background: linear-gradient(160deg, rgba(18, 18, 31, 0.8), rgba(139, 92, 246, 0.06));
}

.page-alunos .info-card-spaced {
    margin-top: 20px;
}

/* Save bar */
.page-alunos .save-bar {
    background: rgba(6, 6, 12, 0.88);
    border-top: 1px solid rgba(139, 92, 246, 0.15);
    padding: 20px 5%;
}

.page-alunos .btn-save {
    max-width: 440px;
    padding: 18px 28px;
    font-size: 1.05rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.35);
    position: relative;
    overflow: hidden;
}

.page-alunos .btn-save::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.15) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.page-alunos .btn-save:hover::before {
    transform: translateX(100%);
}

.page-alunos .toast {
    border-radius: 16px;
    padding: 16px 22px;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 900px) {
    .alunos-hero {
        margin: 0 -4% 24px;
        padding: 28px 4%;
    }

    .active-profile {
        width: 100%;
    }

    .active-profile-status {
        display: none;
    }
}

@media (max-width: 600px) {
    .page-alunos .mini-card {
        padding: 16px 14px 14px 52px;
    }

    .mini-card-icon {
        width: 32px;
        height: 32px;
        left: 12px;
        font-size: 0.85rem;
    }

    .page-alunos .mini-card .value {
        font-size: 1.35rem;
    }
}
