/* /portal/portal.css - HIGH PERFORMANCE SOLID DESIGN */

/* Native Collapsible Notes Styling */
details > summary { list-style: none; cursor: pointer; user-select: none; }
details > summary::-webkit-details-marker { display: none; }

.subject-summary { font-size: 14px; font-weight: 700; color: white; background: var(--primary); padding: 12px 16px; border-radius: 12px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 4px 6px var(--primary-light); }
.subject-content { 
    padding-left: 0px; 
    margin-bottom: 16px; 
    margin-top: 8px; 
    border-left: none; /* Removed blue line here */
}

.chapter-summary { font-size: 13px; font-weight: 600; color: var(--text-dark); background: var(--item-bg); padding: 10px 14px; border-radius: 10px; margin-bottom: 6px; border: 1px solid var(--card-border); display: flex; justify-content: space-between; align-items: center; transition: background 0.2s; }
.chapter-content { 
    padding-left: 12px; 
    margin-bottom: 12px; 
    margin-top: 6px; 
    border-left: 2px solid var(--primary-light); /* Added blue line here */
}

/* Arrow Animations */
details[open] > summary .material-icons-round { transform: rotate(180deg); }
details > summary .material-icons-round { transition: transform 0.2s ease; }

:root {
    --primary: #4A90E2; 
    --primary-light: rgba(74, 144, 226, 0.2);
    --bg-color: #f1f5f9; /* Clean, light grayish-blue background */
    --text-dark: #1e293b; 
    --text-light: #64748b;
    --success: #10b981; 
    --taught: #10b981; 
    --teacher-missed: #f43f5e; 
    --student-missed: #f59e0b; 
    --holiday: #8b5cf6;
    
    /* NEW SOLID VARIABLES (Replacing Glass) */
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
    --item-bg: #f8fafc;
    --input-border: #cbd5e1;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; -webkit-tap-highlight-color: transparent; }
body { background-color: var(--bg-color); color: var(--text-dark); min-height: 100vh; position: relative; overflow-x: hidden; }

/* KILL THE CPU-HEAVY BLOBS: Hidden via CSS so no HTML edits are needed */
.bg-shape { display: none !important; }

/* RETAIN CLASS NAME, BUT MAKE IT A SOLID, MODERN CARD */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    padding: 20px;
}

/* SOLID INPUTS */
.glass-input { 
    width: 100%; 
    padding: 12px; 
    background: var(--item-bg); 
    border: 1px solid var(--input-border); 
    border-radius: 12px; 
    color: var(--text-dark); 
    font-size: 14px; 
    outline: none; 
    transition: all 0.2s ease; 
}
.glass-input:focus { 
    background: var(--card-bg); 
    border-color: var(--primary); 
    box-shadow: 0 0 0 3px var(--primary-light); 
}

.primary-btn { width: 100%; padding: 14px; background: var(--primary); color: white; border: none; border-radius: 12px; font-size: 16px; font-weight: 600; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 8px; box-shadow: 0 4px 6px var(--primary-light); transition: transform 0.1s, box-shadow 0.1s;}
.primary-btn:active { transform: scale(0.98); box-shadow: 0 2px 4px var(--primary-light); }

.input-group { margin-bottom: 16px; }
.input-group label { display: block; font-size: 12px; color: var(--text-dark); margin-bottom: 6px; font-weight: 600; }

/* --- FLOATING PILL TOP BAR --- */
.top-app-bar { 
    height: 60px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0 16px; 
    background: var(--card-bg); 
    border: 1px solid var(--card-border); 
    box-shadow: var(--card-shadow); 
    position: fixed; 
    top: 16px; 
    left: 16px;
    width: calc(100% - 32px);
    border-radius: 24px;
    z-index: 100; 
}

.app-title-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.app-title { font-size: 20px; font-weight: 700; line-height: 1.1; color: var(--text-dark); }

.app-subtitle {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--primary);
    line-height: 1;
}

/* --- FLOATING PILL BOTTOM NAV --- */
.bottom-nav {
    position: fixed;
    bottom: 16px;
    left: 16px;
    width: calc(100% - 32px);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    display: flex;
    justify-content: space-around;
    padding: 8px 10px;
    border-radius: 24px;
    z-index: 100;
    box-shadow: var(--card-shadow);
}

/* --- PUSH CONTENT TO CLEAR THE PILLS --- */
.app-content {
    padding-top: 115px !important; /* Increased to give the profile picture plenty of breathing room */
    padding-bottom: 120px !important;
}

.icon-btn { background: none; border: none; color: var(--text-dark); font-size: 24px; cursor: pointer; display: flex; transition: color 0.2s; }

/* SOLID LIST ITEMS (For fees, notes, etc.) */
.list-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 12px; 
    background: var(--item-bg); 
    border: 1px solid var(--card-border); 
    border-radius: 12px; 
    margin-bottom: 8px; 
}

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; margin-top: 12px; }

/* SOLID CALENDAR DAYS */
.cal-day { 
    padding: 8px 0; 
    border-radius: 8px; 
    background: var(--item-bg); 
    font-weight: 600; 
    font-size: 13px; 
    color: var(--text-dark); 
    border: 1px solid transparent;
}
.cal-day.taught { background: var(--taught); color: white; box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3); }
.cal-day.teacher-missed { background: var(--teacher-missed); color: white; box-shadow: 0 2px 4px rgba(244, 63, 94, 0.3); }
.cal-day.student-missed { background: var(--student-missed); color: white; box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3); }
.cal-day.holiday { background: var(--holiday); color: white; box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3); }

.legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* SOLID MODAL (No blur!) */
.modal-overlay { 
    position: fixed; 
    top: 0; left: 0; right: 0; bottom: 0; 
    background: rgba(15, 23, 42, 0.65); /* Darker, solid transparency instead of blur */
    display: none; 
    justify-content: center; 
    align-items: center; 
    z-index: 200; 
    padding: 20px; 
}
.modal-overlay.active { display: flex; }

.subject-header { font-size: 13px; font-weight: 600; color: var(--primary); margin: 16px 0 8px 0; border-bottom: 1px solid var(--card-border); padding-bottom: 4px;}


/* --- TAB SYSTEM STYLES --- */
.tab-content {
    display: none;
    animation: fadeUp 0.3s ease-out forwards;
}

.tab-content.active {
    display: block;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}


.nav-tab {
    background: none;
    border: none;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    width: 100%;
    padding: 6px 0;
    cursor: pointer;
    transition: color 0.2s;
}

.nav-tab .material-icons-round {
    font-size: 24px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-tab.active {
    color: var(--primary);
}

.nav-tab.active .material-icons-round {
    transform: translateY(-2px) scale(1.1);
}

/* --- DARK THEME OVERRIDES --- */
body.dark-theme {
    --bg-color: #0f172a;         
    --text-dark: #f8fafc;        
    --text-light: #94a3b8;       
    --card-bg: #1e293b;          
    --card-border: #334155;      
    --item-bg: #0f172a;          
    --input-border: #475569;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
}

/* Added .bottom-nav to the transition list for smooth theme switching */
body, .glass-card, .glass-input, .top-app-bar, .bottom-nav, .list-item, .cal-day, .chapter-summary {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* --- NEW: NOTES TAB RICH UI ELEMENTS --- */
.file-counter {
    background: rgba(255, 255, 255, 0.25);
    color: inherit;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 700;
    margin-left: auto;
    margin-right: 8px;
}

.chapter-summary .file-counter {
    background: var(--card-border);
    color: var(--text-light);
}

.new-badge {
    background: var(--success);
    color: white;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
    animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}