:root {
    --bg-color: #0f172a; /* Slate 900 */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #3b82f6; /* Blue 500 */
    --accent-hover: #2563eb;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Background animated blobs */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 10s infinite alternate ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 40vw;
    height: 40vw;
    background: #3b82f6;
    animation-delay: 0s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: #8b5cf6;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Glassmorphism Classes */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
}

/* Upload Section */
#upload-section {
    max-width: 600px;
    margin: 0 auto;
    padding: 3rem 2rem;
    text-align: center;
    transition: transform 0.3s ease;
}

#upload-section:hover {
    transform: translateY(-5px);
}

.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.excel-icon {
    font-size: 4rem;
    color: #10b981;
}

.upload-area h2 {
    font-weight: 600;
}

.btn-primary {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

input[type="file"] {
    display: none;
}

#loading {
    margin-top: 2rem;
    font-size: 1.2rem;
    color: var(--accent);
}

/* Student View Section */
#student-view {
    animation: fadeIn 0.5s ease;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.controls {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 1.5rem;
    flex: 1;
    min-height: 0;
}

.btn-nav {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: white;
    width: 60px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.btn-nav:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.05);
}

.btn-nav:active {
    transform: scale(0.95);
}

.student-info {
    flex: 1;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.student-header {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.student-badge {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

#student-name {
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    line-height: 1.2;
    margin: 0;
}

.status-badge {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fre-badge {
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Grades List */
.grades-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem 1rem;
    font-size: 1rem;
    transition: font-size 0.2s ease;
}

.grade-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 0.8rem 1.2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grade-card:hover {
    transform: translateX(5px) scale(1.02);
    border-color: rgba(59, 130, 246, 0.6);
    background: rgba(30, 41, 59, 0.9);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
}

.subject-name {
    font-size: 0.95em;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex: 1;
    text-align: left;
}

.metrics {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-end;
}

.metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    min-width: 50px;
}

.metric-label {
    font-size: 0.65em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.metric-value {
    font-size: 1.2em;
    font-weight: 800;
}

.metric.nota .metric-value {
    color: #60a5fa; /* Blue */
}

/* Danger color for missing points or low grades (will be added via JS if needed, but keeping neutral blue is safer for now) */
.metric.falta .metric-value {
    color: #f87171; /* Red */
}

.metric.ac .metric-value {
    color: #34d399; /* Green */
}

/* Utilities */
.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Application Navbar */
.app-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 0.8rem 1.5rem;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1010; /* Garante que o menu drop down fique por cima dos cards de conteúdo */
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.nav-user-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-user-email {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}

.btn-logout-small {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 0.4rem 1rem;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
}

.btn-logout-small:hover {
    background: rgba(239, 68, 68, 0.4);
    color: white;
}

/* Account Details Page */
.account-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    animation: fadeIn 0.4s ease;
}

.account-card {
    padding: 2.5rem;
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
    background: rgba(30, 41, 59, 0.8);
}

.account-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.1);
}

.account-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.account-info h3 {
    font-size: 1.8rem;
    font-weight: 800;
}

.account-info .email {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.account-status-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
}

.account-status-badge.active {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.account-status-badge.inactive {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.validity-card {
    padding: 2rem;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.validity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.validity-title {
    font-size: 1rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.validity-date {
    font-size: 1.3rem;
    font-weight: 700;
    color: #60a5fa;
}

.validity-days {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

.validity-bar-bg {
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    overflow: hidden;
}

.validity-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #10b981);
    border-radius: 5px;
    width: 0%;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.plans-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
}

.plans-section-desc {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.plans-container-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.plan-card-inner {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.plan-card-inner:hover {
    transform: translateY(-5px);
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.1);
}

.plan-card-inner.popular {
    border-color: rgba(168, 85, 247, 0.4);
    background: rgba(139, 92, 246, 0.05);
}

.plan-card-inner.popular:hover {
    border-color: rgba(168, 85, 247, 0.7);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.15);
}

.plan-badge-popular {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #a855f7, #6366f1);
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-title-inner {
    font-size: 1.2rem;
    font-weight: 700;
}

.plan-price-inner {
    display: flex;
    align-items: baseline;
    gap: 0.2rem;
}

.plan-price-val {
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
}

.plan-price-period {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.plan-desc-inner {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.plan-features-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    list-style: none;
    font-size: 0.85rem;
}

.plan-feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #cbd5e1;
}

.plan-feature-item i {
    color: #10b981;
}

/* About Page (Replicating Landing Info) */
.about-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    animation: fadeIn 0.4s ease;
}

.about-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.about-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.about-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.about-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.about-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-card.analysis .about-icon-wrapper {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
}

.about-card.print .about-icon-wrapper {
    background: rgba(167, 139, 250, 0.15);
    color: #a78bfa;
}

.about-card.speed .about-icon-wrapper {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.about-icon-wrapper i {
    font-size: 1.5rem;
}

.about-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

.about-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.about-faq {
    padding: 2.5rem;
    background: rgba(30, 41, 59, 0.3);
}

.about-faq h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.faq-question {
    font-weight: 600;
    color: white;
    font-size: 1rem;
}

.faq-answer {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
    .controls {
        flex-direction: column;
    }
    
    .btn-nav {
        width: 100%;
        padding: 1rem;
    }

    #student-name {
        font-size: 2rem;
    }
    
    .student-info {
        padding: 1.5rem;
    }

    .app-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-links {
        justify-content: space-between;
    }

    .nav-user-area {
        justify-content: space-between;
    }

    .plans-container-inner {
        grid-template-columns: 1fr;
    }

    .account-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .account-status-badge {
        align-self: center;
    }
}

/* Histórico de Compras */
.history-card {
    padding: 2.5rem;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.history-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.history-header i {
    font-size: 1.8rem;
    color: #3b82f6;
}

.history-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

#history-loading, #history-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 2.5rem 0;
    font-size: 1.05rem;
}

#history-loading i {
    margin-right: 8px;
}

#history-empty i {
    display: block;
    font-size: 2rem;
    margin-bottom: 10px;
    color: #3b82f6;
}

#history-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.history-table th {
    padding: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.history-table td {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.85);
}

.history-table tbody tr:last-child td {
    border-bottom: none;
}

.history-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.payment-method-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-transform: capitalize;
}

.payment-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
}

.payment-status-badge.approved {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    border: 2px solid rgba(15, 23, 42, 0.5);
    transition: background 0.3s;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ==========================================
   Header controls layout and responsive adjustments
   ========================================== */
.student-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    width: 100%;
    margin-bottom: 0.6rem;
}

.header-left {
    flex: 0 0 auto;
}

.header-center {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    min-width: 0;
}

.header-badges {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 100%;
}

.header-right {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    min-width: 155px;
}

#class-name-badge {
    background: rgba(255,255,255,0.1);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    word-break: break-word;
    white-space: normal;
    line-height: 1.4;
    max-width: 100%;
}

/* Button stylings */
.btn-top-reset {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
}
.btn-top-reset:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
}

.btn-top-print {
    background: rgba(59, 130, 246, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.8);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
}
.btn-top-print:hover {
    background: rgba(59, 130, 246, 0.8);
}

.btn-top-teachers {
    background: rgba(16, 185, 129, 0.5);
    border: 1px solid rgba(16, 185, 129, 0.8);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
}
.btn-top-teachers:hover {
    background: rgba(16, 185, 129, 0.8);
}

.zoom-btn-container {
    display: flex;
    gap: 8px;
    width: 100%;
}

.btn-zoom {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 0.4rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.btn-zoom:hover {
    background: rgba(255,255,255,0.18);
}

.zoom-label {
    font-size: 0.75rem;
    font-weight: 600;
}

/* Mobile responsive fixes */
@media (max-width: 768px) {
    .student-header-top {
        flex-direction: column;
        align-items: center;
        gap: 1.2rem;
    }
    
    .header-left, .header-right {
        width: 100%;
    }
    
    .header-left .btn-top-reset, 
    .header-right .btn-top-print, 
    .header-right .btn-top-teachers {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    .header-right {
        min-width: 0;
    }
}

/* Navigation Dropdown (JS-controlled via .open class) */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 8px;
    min-width: 185px;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.55);
    animation: dropdown-fade-in 0.15s ease;
}

@keyframes dropdown-fade-in {
    from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.nav-dropdown.open .nav-dropdown-menu {
    display: block;
}

.nav-dropdown.open .dropdown-toggle {
    color: var(--text-main);
}

.nav-dropdown-item {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.nav-dropdown-item:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.nav-dropdown-item i {
    width: 16px;
    text-align: center;
}

/* Tooltip Premium CSS-Only */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before,
[data-tooltip]::after {
    position: absolute;
    left: 50%;
    transform: translate(-50%, 8px);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    z-index: 99999;
}

[data-tooltip]::before {
    content: "";
    border-width: 6px 6px 0 6px;
    border-style: solid;
    border-color: #0f172a transparent transparent transparent;
    bottom: calc(100% + 4px);
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    bottom: calc(100% + 10px);
    background-color: #0f172a;
    color: #f8fafc;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.45;
    padding: 8px 12px;
    border-radius: 8px;
    white-space: normal;
    width: 250px;
    text-align: center;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* =============================================================
   Social Media Cards Grid (Glassmorphism & Brand Glow Effects)
   ============================================================= */
.social-cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 24px auto 30px auto;
    width: 100%;
    max-width: 100%;
}

@media (max-width: 640px) {
    .social-cards-container {
        grid-template-columns: 1fr;
        gap: 12px;
        margin: 20px auto 24px auto;
    }
}

.social-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.social-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    background: rgba(255, 255, 255, 0.05);
}

.social-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.social-card:hover .social-icon-wrapper {
    transform: scale(1.1);
}

/* Instagram specific styles */
.instagram-card .social-icon-wrapper {
    background: rgba(236, 72, 153, 0.1);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.2);
}
.instagram-card:hover {
    box-shadow: 0 10px 25px rgba(236, 72, 153, 0.15);
    background: rgba(236, 72, 153, 0.05);
    border-color: rgba(236, 72, 153, 0.3);
}
.instagram-card:hover h4 {
    color: #f472b6;
}

/* Facebook specific styles */
.facebook-card .social-icon-wrapper {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}
.facebook-card:hover {
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.15);
    background: rgba(59, 130, 246, 0.05);
    border-color: rgba(59, 130, 246, 0.3);
}
.facebook-card:hover h4 {
    color: #60a5fa;
}

/* WhatsApp specific styles */
.whatsapp-card .social-icon-wrapper {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.whatsapp-card:hover {
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.15);
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.3);
}
.whatsapp-card:hover h4 {
    color: #34d399;
}

.social-card-text {
    text-align: left;
}

.social-card-text h4 {
    font-size: 13.5px;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0;
    transition: color 0.2s ease;
}

.social-card-text p {
    font-size: 11.5px;
    color: #94a3b8;
    margin: 2px 0 0 0;
}

/* =============================================================
   Navigation Social Icons (Compact Circle Buttons - Dark Theme Match)
   ============================================================= */
.nav-social-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-social-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-social-icon:hover {
    transform: translateY(-2px);
}

.nav-instagram {
    color: var(--text-muted);
}
.nav-instagram:hover {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
    border-color: rgba(236, 72, 153, 0.3);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.15);
}

.nav-facebook {
    color: var(--text-muted);
}
.nav-facebook:hover {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.nav-whatsapp {
    color: var(--text-muted);
}
.nav-whatsapp:hover {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

/* Tooltip offset specifically for nav bar items to avoid clipping */
.nav-social-links [data-tooltip]::after {
    width: 180px;
}

/* =============================================================
   App Header (Universal - Dark Slate Glassmorphism Theme)
   ============================================================= */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 1.5rem;
    padding: 0.5rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-left {
    text-align: left;
}

.header-left h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    background: linear-gradient(135deg, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.header-left .subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
}

#header-user-panel.header-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.header-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 14px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
}

.user-avatar {
    font-size: 18px;
    color: #60a5fa;
}

.user-details {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.user-email {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-main);
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-status-badge {
    font-size: 8.5px;
    font-weight: 800;
    color: #34d399; /* Emerald 400 */
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 1px;
}

/* Header logout button */
.btn-logout-header {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-logout-header:hover {
    background: rgba(239, 68, 68, 0.35);
    color: white;
    transform: scale(1.05);
}


