/* ==========================================================================
   DEEPAWALI HOLIDAY HOMEWORK PORTAL - MAIN STYLESHEET
   Festive Gold & Maroon Theme - Modern, Responsive & Clean
   ========================================================================== */

:root {
    --primary-maroon: #7c131a;
    --primary-dark: #580a0f;
    --primary-light: #9c1b24;
    --festive-gold: #c98b1b;
    --gold-light: #fef3c7;
    --gold-accent: #d97706;
    --diwali-glow: rgba(201, 139, 27, 0.25);
    --bg-cream: #fdfaf6;
    --card-bg: #ffffff;
    --text-dark: #1f2937;
    --text-muted: #4b5563;
    --border-gold: #e2c079;
    --border-light: #e5e7eb;
    --success: #15803d;
    --danger: #b91c1c;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-soft: 0 4px 15px rgba(124, 19, 26, 0.08);
    --shadow-hover: 0 8px 25px rgba(124, 19, 26, 0.15);
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --------------------------------------------------------------------------
   Festive Header & Navigation
   -------------------------------------------------------------------------- */
.top-festive-bar {
    background: linear-gradient(90deg, #580a0f 0%, #7c131a 50%, #580a0f 100%);
    color: #ffffff;
    padding: 8px 0;
    border-bottom: 3px solid var(--festive-gold);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.festive-ticker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.diwali-badge {
    background: linear-gradient(135deg, var(--festive-gold), #b45309);
    color: #ffffff;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.main-navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-gold);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-maroon) !important;
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand .sub-title {
    font-size: 0.75rem;
    color: var(--festive-gold);
    font-weight: 600;
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    padding: 8px 16px !important;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-maroon) !important;
    background-color: #fff7ed;
}

.btn-festive {
    background: linear-gradient(135deg, var(--primary-maroon), var(--primary-light));
    color: #ffffff !important;
    border: 1px solid var(--festive-gold);
    font-weight: 600;
    padding: 9px 20px;
    border-radius: 30px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(124, 19, 26, 0.2);
}

.btn-festive:hover {
    background: linear-gradient(135deg, var(--festive-gold), #b45309);
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(201, 139, 27, 0.35);
    transform: translateY(-1px);
}

.btn-gold {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff !important;
    border: none;
    font-weight: 600;
    border-radius: 8px;
    padding: 8px 18px;
    transition: all 0.2s;
}

.btn-gold:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.btn-outline-festive {
    color: var(--primary-maroon);
    border: 1.5px solid var(--primary-maroon);
    background: transparent;
    font-weight: 600;
    border-radius: 30px;
    padding: 8px 18px;
    transition: all 0.2s ease;
}

.btn-outline-festive:hover {
    background: var(--primary-maroon);
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   Diwali Hero Banner
   -------------------------------------------------------------------------- */
.diwali-hero {
    background: linear-gradient(135deg, #580a0f 0%, #7c131a 50%, #45080c 100%);
    color: #ffffff;
    padding: 30px 20px;
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid var(--festive-gold);
    margin-bottom: 25px;
}

.diwali-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(201, 139, 27, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.diwali-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fffae0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.diwali-subtitle {
    color: #fde68a;
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 12px;
}

.session-pill {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    border: 1px solid var(--festive-gold);
    color: #ffffff;
    padding: 4px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Card & Form Styles
   -------------------------------------------------------------------------- */
.festive-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-gold);
    box-shadow: var(--shadow-soft);
    padding: 30px;
    margin-bottom: 30px;
    position: relative;
}

.festive-card-header {
    border-bottom: 2px solid #fef3c7;
    padding-bottom: 15px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title-festive {
    color: var(--primary-maroon);
    font-weight: 700;
    font-size: 1.4rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.form-control, .form-select {
    border: 1.5px solid #d1d5db;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-maroon);
    box-shadow: 0 0 0 3px rgba(124, 19, 26, 0.15);
    outline: none;
}

/* --------------------------------------------------------------------------
   Math & Science Symbols Toolbar (Microsoft Word Companion)
   -------------------------------------------------------------------------- */
.math-science-toolbar {
    background: #fffdf5;
    border: 1px solid var(--border-gold);
    border-radius: 8px 8px 0 0;
    padding: 12px 15px;
    border-bottom: none;
}

.math-toolbar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.math-toolbar-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary-maroon);
    display: flex;
    align-items: center;
    gap: 6px;
}

.math-sym-group {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    margin-bottom: 6px;
}

.math-sym-btn {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    line-height: 1.2;
}

.math-sym-btn:hover {
    background: #fef3c7;
    border-color: var(--festive-gold);
    color: var(--primary-maroon);
    transform: translateY(-1px);
}

.math-sym-btn:active {
    transform: translateY(1px);
}

.math-cat-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
    margin-right: 4px;
    min-width: 65px;
}

/* Rich Text Editor Container Adjustments */
.note-editor.note-frame {
    border: 1.5px solid var(--border-gold) !important;
    border-radius: 0 0 8px 8px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.note-toolbar {
    background-color: #f9fafb !important;
    border-bottom: 1px solid #e5e7eb !important;
    padding: 8px !important;
}

.note-editable {
    min-height: 380px !important;
    font-size: 1.05rem !important;
    padding: 20px !important;
    background: #ffffff;
    color: #111827;
    line-height: 1.7;
}

/* Homework Content Render Styles */
.hw-rendered-content {
    font-size: 1.02rem;
    line-height: 1.7;
    color: #1f2937;
}

.hw-rendered-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.hw-rendered-content table, 
.hw-rendered-content th, 
.hw-rendered-content td {
    border: 1.5px solid #374151;
    padding: 8px 12px;
}

.hw-rendered-content th {
    background-color: #f3f4f6;
    font-weight: 700;
}

.hw-rendered-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
    border: 1px solid #e5e7eb;
}

.hw-rendered-content ol, 
.hw-rendered-content ul {
    padding-left: 28px;
    margin: 10px 0;
}

.hw-rendered-content li {
    margin-bottom: 6px;
}

/* --------------------------------------------------------------------------
   Admin Dashboard & Single File View
   -------------------------------------------------------------------------- */
.stat-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.maroon {
    background: #fee2e2;
    color: var(--primary-maroon);
}

.stat-icon.gold {
    background: #fef3c7;
    color: #b45309;
}

.stat-icon.green {
    background: #dcfce7;
    color: var(--success);
}

.stat-number {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--primary-maroon);
    line-height: 1.1;
}

.stat-label {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
}

/* Subject Sequence Badge */
.seq-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--festive-gold), #b45309);
    color: #ffffff;
    font-weight: 800;
    border-radius: 50%;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.subject-item-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--border-gold);
    margin-bottom: 22px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.03);
    transition: border-color 0.2s;
}

.subject-item-card:hover {
    border-color: var(--festive-gold);
}

.subject-card-header {
    background: linear-gradient(90deg, #fff7ed 0%, #ffffff 100%);
    border-bottom: 1.5px solid #fde68a;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.subject-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.subject-name-heading {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-maroon);
    margin: 0;
}

.teacher-meta-pill {
    background: #ffffff;
    border: 1px solid #d1d5db;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #374151;
}

.subject-card-body {
    padding: 22px;
}

.empty-subject-card {
    background: #fafafa;
    border: 1.5px dashed #d1d5db;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Footer */
.main-footer {
    margin-top: auto;
    background: #1e293b;
    color: #94a3b8;
    padding: 20px 0;
    font-size: 0.88rem;
    border-top: 3px solid var(--festive-gold);
}

.main-footer a {
    color: #fde68a;
    text-decoration: none;
}

/* Alert Boxes */
.alert-festive {
    background: #fffbeb;
    border: 1px solid var(--festive-gold);
    border-left: 5px solid var(--festive-gold);
    color: #92400e;
    border-radius: 8px;
    padding: 12px 16px;
}
