/* ============================================
   Portal Wali Santri - Premium Design System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg-primary: #020617;
    --bg-card: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.03);
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --radius-lg: 1.25rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --shadow-glass: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
}

/* ===== AMBIENT BACKGROUND ===== */
.ambient-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
    animation: orbFloat 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(59,130,246,0.3), transparent 70%);
    top: -10%; left: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(139,92,246,0.25), transparent 70%);
    bottom: -5%; right: -5%;
    animation-delay: -7s;
}

.orb-3 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(16,185,129,0.2), transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -20px) scale(1.05); }
    50% { transform: translate(-20px, 30px) scale(0.95); }
    75% { transform: translate(20px, 20px) scale(1.02); }
}

/* ===== APP SHELL ===== */
.app-shell {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: 0 auto;
    padding: 1rem;
    min-height: 100vh;
}

/* ===== LANDING SECTION ===== */
.landing-section {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: auto;
    padding: 3rem 0 2rem;
}

.landing-content {
    text-align: center;
    width: 100%;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Brand Mark */
.brand-mark {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.brand-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-blue), #6366f1, var(--accent-purple));
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 40px -10px rgba(59, 130, 246, 0.5);
    position: relative;
    z-index: 2;
    animation: brandPulse 3s ease-in-out infinite;
}

.brand-glow {
    position: absolute;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3), transparent 70%);
    border-radius: 50%;
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes brandPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes glowPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.3); opacity: 0.8; }
}

.landing-title {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
}

.landing-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto 2.5rem;
}

/* ===== SEARCH BOX ===== */
.search-container {
    position: relative;
    margin-bottom: 2.5rem;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.3), 0 10px 30px -10px rgba(139, 92, 246, 0.3); }
    50% { box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.4), 0 15px 40px -10px rgba(59, 130, 246, 0.5); }
    100% { box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.3), 0 10px 30px -10px rgba(139, 92, 246, 0.3); }
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 0 1.25rem;
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
    z-index: 20;
}

.search-box:focus-within {
    border-color: transparent;
    background: rgba(15, 23, 42, 0.95);
    transform: translateY(-3px);
    animation: pulseGlow 3s infinite ease-in-out;
}

.search-icon {
    width: 22px;
    height: 22px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.search-box:focus-within .search-icon {
    color: var(--accent-purple);
    transform: scale(1.1) rotate(5deg);
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    padding: 1rem 0.75rem;
    font-family: inherit;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-clear {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.search-clear:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    max-height: 320px;
    overflow-y: auto;
    z-index: 50;
    box-shadow: var(--shadow-glass);
    animation: dropdownSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownSlide {
    from { opacity: 0; transform: translateY(-8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.25rem;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(59, 130, 246, 0.08);
}

.sr-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(139,92,246,0.2));
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 800;
    font-size: 0.875rem;
    color: var(--accent-blue);
}

.sr-info {
    flex: 1;
    min-width: 0;
}

.sr-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sr-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

.sr-arrow {
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-no-result {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ===== WELCOME GUIDE ===== */
@keyframes borderPulse {
    0% { border-color: rgba(59, 130, 246, 0.2); box-shadow: 0 0 10px rgba(59, 130, 246, 0.05); }
    100% { border-color: rgba(139, 92, 246, 0.4); box-shadow: 0 0 20px rgba(139, 92, 246, 0.15); }
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.welcome-guide {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-top: 2.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(139, 92, 246, 0.05), rgba(15, 23, 42, 0.4));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    animation: borderPulse 4s infinite alternate;
}

.guide-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    padding: 0.75rem;
    border-radius: 1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
    animation: iconBounce 3s ease-in-out infinite;
}

.guide-text h3 {
    color: white;
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
}

.guide-text p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* ===== REPORT SECTION ===== */
.report-section {
    padding: 1rem 0 3rem;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Back Button & Student Header */
.report-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.back-btn {
    width: 44px;
    height: 44px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.back-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: white;
    transform: translateX(-3px);
}

.student-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.student-avatar {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 8px 20px -5px rgba(99, 102, 241, 0.4);
}

.student-name {
    font-size: 1.375rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.student-meta {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.375rem;
    flex-wrap: wrap;
}

.meta-badge {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.25rem 0.625rem;
    border-radius: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.meta-badge-purple {
    background: rgba(139, 92, 246, 0.12);
    color: #a78bfa;
}

/* ===== PERIOD FILTER ===== */
.period-filter-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    backdrop-filter: blur(12px);
}

.period-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    flex-shrink: 0;
}

.period-select {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 0.625rem 1rem;
    color: white;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 0;
    flex: 1;
    max-width: 250px;
}

.period-select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.period-select option {
    background: #1e293b;
    color: white;
}

/* ===== STATS ROW ===== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.12);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
}

.stat-card.blue::before { background: linear-gradient(90deg, var(--accent-blue), transparent); }
.stat-card.purple::before { background: linear-gradient(90deg, var(--accent-purple), transparent); }
.stat-card.emerald::before { background: linear-gradient(90deg, var(--accent-emerald), transparent); }
.stat-card.amber::before { background: linear-gradient(90deg, var(--accent-amber), transparent); }
.stat-card.rose::before { background: linear-gradient(90deg, var(--accent-rose), transparent); }

.stat-card-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-card.blue .stat-card-value { color: #60a5fa; }
.stat-card.purple .stat-card-value { color: #a78bfa; }
.stat-card.emerald .stat-card-value { color: #34d399; }
.stat-card.amber .stat-card-value { color: #fbbf24; }
.stat-card.rose .stat-card-value { color: #fb7185; }

.stat-card-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* ===== TAB STRIP ===== */
.tab-strip {
    display: flex;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 0.375rem;
    gap: 0.25rem;
    margin-bottom: 1.25rem;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.tab-strip::-webkit-scrollbar { display: none; }

.tab-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.75rem 0.5rem;
    background: transparent;
    border: none;
    border-radius: 0.75rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    font-family: inherit;
}

.tab-item:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
}

.tab-item.active {
    background: var(--accent-blue);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

/* ===== TAB CONTENT ===== */
.tab-content {
    animation: tabFade 0.4s ease;
}

@keyframes tabFade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Data Cards */
.data-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 0.75rem;
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.data-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.data-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.data-card-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.data-card-badge {
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.25rem 0.625rem;
    border-radius: 0.5rem;
    text-transform: capitalize;
}

.badge-bagus { background: rgba(16,185,129,0.15); color: #34d399; }
.badge-bagus_sekali { background: rgba(59,130,246,0.15); color: #60a5fa; }
.badge-sempurna { background: rgba(168,85,247,0.15); color: #c084fc; }
.badge-kurang { background: rgba(245,158,11,0.15); color: #fbbf24; }
.badge-sangat_kurang { background: rgba(244,63,94,0.15); color: #fb7185; }

.data-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.data-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.data-field.full-width {
    grid-column: 1 / -1;
}

.data-field-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.data-field-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

.data-field-value.highlight-blue { color: #60a5fa; }
.data-field-value.highlight-emerald { color: #34d399; }
.data-field-value.highlight-amber { color: #fbbf24; }
.data-field-value.highlight-rose { color: #fb7185; }

/* Absensi History */
.absensi-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.absensi-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    background: rgba(30, 41, 59, 0.4);
    border-radius: 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.absensi-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.absensi-dot.alpha { background: var(--accent-rose); box-shadow: 0 0 10px rgba(244,63,94,0.5); }
.absensi-dot.sakit { background: var(--accent-amber); box-shadow: 0 0 10px rgba(245,158,11,0.5); }
.absensi-dot.izin { background: var(--accent-blue); box-shadow: 0 0 10px rgba(59,130,246,0.5); }

.absensi-info {
    flex: 1;
}

.absensi-status {
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: capitalize;
}

.absensi-detail {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

/* ===== LOADER & EMPTY STATES ===== */
.report-loader {
    text-align: center;
    padding: 4rem 1rem;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(59, 130, 246, 0.1);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.report-loader p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.report-empty {
    text-align: center;
    padding: 4rem 1rem;
}

.empty-icon {
    width: 80px;
    height: 80px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--text-muted);
}

.report-empty h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.report-empty p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ===== UTILITY ===== */
.hidden { display: none !important; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* ===== BROWSE DROPDOWNS ===== */
.browse-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.browse-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem 1.25rem;
    backdrop-filter: blur(12px);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.browse-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(139, 92, 246, 0.08));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.browse-card:hover {
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(139, 92, 246, 0.2), 0 0 20px rgba(59, 130, 246, 0.1);
}

.browse-card:hover::before {
    opacity: 1;
}

.browse-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.browse-card:hover .browse-card-icon {
    transform: scale(1.15) rotate(8deg);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

.browse-card-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    transition: color 0.3s;
}

.browse-card:hover .browse-card-title {
    color: #c084fc;
}

.browse-select {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 0.75rem;
    color: white;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.browse-select:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
    background: rgba(15, 23, 42, 0.9);
}

.browse-select option {
    background: #1e293b;
    color: white;
}

/* ===== GROUP STUDENT LIST ===== */
.group-student-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.student-summary-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    backdrop-filter: blur(12px);
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.student-summary-card:hover {
    border-color: rgba(59, 130, 246, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -8px rgba(0, 0, 0, 0.3);
}

.student-summary-card:active {
    transform: translateY(0);
}

.student-summary-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent-blue), var(--accent-purple));
    opacity: 0;
    transition: opacity 0.3s;
}

.student-summary-card:hover::before {
    opacity: 1;
}

.student-summary-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.student-summary-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.student-summary-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(139,92,246,0.2));
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 800;
    font-size: 0.8125rem;
    color: var(--accent-blue);
}

.student-summary-name {
    font-weight: 700;
    font-size: 0.9375rem;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-summary-class {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-top: 0.125rem;
}

.student-summary-arrow {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.3s, color 0.3s;
}

.student-summary-card:hover .student-summary-arrow {
    color: var(--accent-blue);
    transform: translateX(3px);
}

.student-summary-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.summary-stat {
    text-align: center;
    padding: 0.5rem 0.25rem;
    background: rgba(30, 41, 59, 0.4);
    border-radius: 0.625rem;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.summary-stat-value {
    font-size: 0.875rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.summary-stat-value.blue { color: #60a5fa; }
.summary-stat-value.emerald { color: #34d399; }
.summary-stat-value.amber { color: #fbbf24; }
.summary-stat-value.rose { color: #fb7185; }
.summary-stat-value.purple { color: #a78bfa; }

.summary-stat-label {
    font-size: 0.5625rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.2;
}

/* Loading shimmer for group cards */
.student-summary-card.loading {
    pointer-events: none;
}

.student-summary-card.loading .student-summary-stats .summary-stat-value {
    background: rgba(71, 85, 105, 0.3);
    border-radius: 0.25rem;
    animation: shimmer 1.5s ease-in-out infinite;
    color: transparent;
}

@keyframes shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ===== INSTALL PROMPT (PWA) ===== */
.install-prompt {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    padding: 1rem;
    z-index: 100;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.install-prompt-content {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 -10px 40px -10px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    margin: 0 auto;
}

.install-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(139,92,246,0.2));
    color: var(--accent-blue);
    border-radius: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.install-info {
    flex: 1;
    min-width: 0;
}

.install-info h3 {
    font-size: 0.9375rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.125rem;
}

.install-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.install-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.install-btn {
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 0.75rem;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.install-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

.install-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.install-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .app-shell { padding: 0.75rem; }
    .landing-title { font-size: 1.875rem; }
    .landing-subtitle { font-size: 0.875rem; }
    .student-name { font-size: 1.125rem; }
    .stats-row { gap: 0.5rem; }
    .stat-card { padding: 1rem; }
    .stat-card-value { font-size: 1.375rem; }
    .data-card-grid { grid-template-columns: 1fr; }
    .browse-grid { grid-template-columns: 1fr; }
    .welcome-guide { flex-direction: column; align-items: center; text-align: center; gap: 1rem; }
    .guide-icon { padding: 0.625rem; }
}
