/* ============================================
   MARKAZUL ULUM - COMPLETE STYLESHEET
   ============================================ */

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

body {
    font-family: 'Noto Sans Bengali', 'Segoe UI', sans-serif;
    color: #333;
    line-height: 1.8;
    background: #f8f9fa;
    overflow-x: hidden;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

.loading {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 16px;
}

/* === TOP BAR === */
.top-bar {
    background: #0d2818;
    color: #ccc;
    padding: 8px 0;
    font-size: 13px;
}
.top-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.top-left { display: flex; gap: 20px; flex-wrap: wrap; }
.top-left i { margin-right: 5px; color: gold; }
.admin-link {
    background: rgba(255,255,255,0.15);
    padding: 4px 14px;
    border-radius: 4px;
    font-size: 12px;
    transition: 0.3s;
}
.admin-link:hover { background: rgba(255,255,255,0.3); }

/* === HEADER === */
.header {
    background: linear-gradient(135deg, #1a5632 0%, #2d8a4e 50%, #1a5632 100%);
    color: white;
    padding: 20px 0;
    text-align: center;
}
.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}
.logo {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    border: 3px solid gold;
    object-fit: cover;
    background: white;
}
.header-text h1 {
    font-size: 1.9em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
    line-height: 1.3;
}
.header-text h2 {
    font-size: 1.1em;
    font-weight: 400;
    color: #c8e6c9;
}
.header-text p {
    color: gold;
    font-size: 1.05em;
    font-weight: 500;
}

/* === NAVBAR === */
.navbar {
    background: #14432a;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 3px 15px rgba(0,0,0,0.3);
}
.nav-toggle {
    display: none;
    background: #2d8a4e;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    font-family: inherit;
    font-weight: 600;
}
.nav-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}
.nav-menu li a {
    display: block;
    padding: 13px 16px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}
.nav-menu li a:hover {
    background: #2d8a4e;
    border-bottom-color: gold;
}

/* === HERO === */
.hero {
    background: linear-gradient(rgba(13,40,24,0.88), rgba(26,86,50,0.9)),
                url('school-bg.jpg') center/cover no-repeat;
    min-height: 420px;
    display: flex;
    align-items: center;
}
.hero-center {
    text-align: center;
    color: white;
    padding: 50px 20px;
}
.hero h1 {
    font-size: 2.8em;
    margin-bottom: 15px;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.5);
}
.hero-sub { font-size: 1.3em; margin-bottom: 8px; }
.hero-slogan { font-size: 1.1em; color: #c8e6c9; margin-bottom: 5px; }
.hero-slogan-en { font-size: 0.95em; color: #a5d6a7; font-style: italic; }
.btn {
    display: inline-block;
    background: gold;
    color: #1a5632;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}
.btn:hover {
    background: #ffdd00;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}
.btn-hero { margin-top: 20px; font-size: 16px; padding: 14px 40px; }
.btn-full { width: 100%; }
.btn i { margin-right: 5px; }

/* === MARQUEE === */
.marquee-bar {
    background: #fff8e1;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    border-bottom: 2px solid #ffc107;
    border-top: 2px solid #ffc107;
}
.marquee-label {
    font-weight: 700;
    color: #e65100;
    margin-right: 15px;
    white-space: nowrap;
    font-size: 15px;
}
.marquee-label i { margin-right: 5px; }
marquee { color: #bf360c; font-weight: 500; font-size: 15px; }

/* === SECTIONS === */
.section { padding: 60px 0; }
.bg-light { background: #e8f5e9; }
.section-title {
    text-align: center;
    font-size: 2em;
    color: #1a5632;
    margin-bottom: 10px;
    position: relative;
    padding-bottom: 15px;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, gold, #2d8a4e);
    border-radius: 2px;
}
.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 15px;
}

/* === ABOUT === */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}
.about-card {
    background: white;
    padding: 30px 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 4px solid #2d8a4e;
}
.about-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
.about-card i {
    font-size: 2.8em;
    color: #2d8a4e;
    margin-bottom: 15px;
    display: block;
}
.about-card h3 {
    color: #1a5632;
    margin-bottom: 12px;
    font-size: 1.2em;
}
.about-card p { color: #555; font-size: 15px; }

/* === STATS === */
.stats-section {
    background: linear-gradient(135deg, #1a5632, #2d8a4e, #1a5632);
    padding: 45px 0;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    text-align: center;
}
.stat-card {
    color: white;
    padding: 20px;
    transition: transform 0.3s;
}
.stat-card:hover { transform: scale(1.05); }
.stat-card i { font-size: 2.5em; color: gold; margin-bottom: 10px; display: block; }
.stat-card h3 { font-size: 2.5em; margin-bottom: 5px; text-shadow: 1px 1px 3px rgba(0,0,0,0.3); }
.stat-card p { font-size: 14px; color: #c8e6c9; }

/* === SEARCH BOX === */
.search-box {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}
.search-box h3 {
    color: #1a5632;
    margin-bottom: 15px;
    font-size: 1.1em;
}
.search-box h3 i { margin-right: 8px; }
.search-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.search-form select,
.search-form input[type="text"],
.search-form input[type="number"] {
    padding: 11px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    flex: 1;
    min-width: 140px;
    transition: border 0.3s;
}
.search-form select:focus,
.search-form input:focus {
    border-color: #2d8a4e;
    outline: none;
}

/* === NOTICES === */
.notice-list { max-width: 800px; margin: 0 auto; }
.notice-item {
    background: white;
    padding: 20px 25px;
    margin-bottom: 12px;
    border-radius: 8px;
    border-left: 5px solid #2d8a4e;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}
.notice-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.notice-date {
    color: #2d8a4e;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
    background: #e8f5e9;
    padding: 2px 10px;
    border-radius: 3px;
}
.notice-item h3 { color: #1a5632; margin: 6px 0 4px; font-size: 1.1em; }
.notice-item p { color: #555; font-size: 14px; }

/* === STUDENTS === */
.student-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.student-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s;
    border-top: 4px solid #2d8a4e;
}
.student-card:hover { transform: translateY(-5px); }
.student-card-header {
    text-align: center;
    padding: 20px 20px 10px;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
}
.student-card-header img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #2d8a4e;
    background: white;
}
.student-card-header h3 { color: #1a5632; margin-top: 8px; font-size: 1.1em; }
.student-card-header .en-name { color: #666; font-size: 13px; font-style: italic; }
.student-card-body { padding: 15px 20px; }
.student-card-body .info-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}
.student-card-body .info-row:last-child { border-bottom: none; }
.info-label { font-weight: 600; color: #1a5632; }

/* === RESULTS === */
.result-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}
.result-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e8f5e9;
}
.result-header h3 { color: #1a5632; font-size: 1.4em; }
.result-header p { color: #666; }
.result-table {
    width: 100%;
    border-collapse: collapse;
}
.result-table th,
.result-table td {
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    text-align: center;
    font-size: 14px;
}
.result-table th {
    background: #1a5632;
    color: white;
    font-weight: 600;
}
.result-table tr:nth-child(even) { background: #f5f5f5; }
.result-table tr:hover { background: #e8f5e9; }
.result-summary {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: #e8f5e9;
    border-radius: 8px;
}
.result-summary span {
    font-weight: 700;
    color: #1a5632;
    font-size: 1.2em;
}
.grade-a-plus { color: #2e7d32; font-weight: 700; }
.grade-a { color: #388e3c; font-weight: 600; }
.grade-b { color: #1565c0; font-weight: 600; }
.grade-c { color: #e65100; font-weight: 600; }
.grade-f { color: #c62828; font-weight: 700; }

/* === TOPPERS === */
.topper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    max-width: 900px;
    margin: 0 auto;
}
.topper-card {
    background: white;
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    position: relative;
    transition: transform 0.3s;
}
.topper-card:hover { transform: translateY(-8px); }
.topper-card.gold { border-top: 5px solid #ffd700; }
.topper-card.silver { border-top: 5px solid #c0c0c0; }
.topper-card.bronze { border-top: 5px solid #cd7f32; }
.topper-badge {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: 800;
    color: white;
    margin: 0 auto 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.gold .topper-badge { background: linear-gradient(135deg, #ffd700, #ffaa00); }
.silver .topper-badge { background: linear-gradient(135deg, #e0e0e0, #9e9e9e); }
.bronze .topper-badge { background: linear-gradient(135deg, #cd7f32, #8d5524); }
.topper-card img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #2d8a4e;
    margin-bottom: 10px;
    background: #f5f5f5;
}
.topper-card h3 { color: #1a5632; font-size: 1.15em; }
.topper-card .topper-roll { color: #888; font-size: 13px; }
.topper-card .topper-marks {
    font-size: 1.4em;
    font-weight: 800;
    color: #2d8a4e;
    margin-top: 5px;
}
.topper-card .topper-pos { color: #888; font-size: 13px; margin-top: 3px; }

/* === TEACHERS === */
.teacher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
}
.teacher-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    border-bottom: 4px solid #2d8a4e;
}
.teacher-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
.teacher-card img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #2d8a4e;
    margin-bottom: 12px;
    background: #f5f5f5;
}
.teacher-card h3 { color: #1a5632; margin-bottom: 3px; }
.teacher-card .en-name { color: #888; font-size: 13px; font-style: italic; }
.teacher-card .designation { color: #2d8a4e; font-weight: 600; margin-top: 5px; }
.teacher-card .subject { color: #666; font-size: 14px; }
.teacher-card .phone { color: #999; font-size: 13px; margin-top: 5px; }

/* === GALLERY === */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}
.gallery-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    background: white;
}
.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
}
.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.gallery-item p {
    padding: 10px 12px;
    text-align: center;
    font-size: 13px;
    color: #1a5632;
    font-weight: 500;
}

/* === MODAL === */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    cursor: pointer;
}
.modal img {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
}
.modal p {
    color: white;
    margin-top: 15px;
    font-size: 16px;
}

/* === CONTACT === */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}
.contact-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.contact-card h3 {
    color: #1a5632;
    margin-bottom: 10px;
    font-size: 1.05em;
}
.contact-card h3 i { color: #2d8a4e; margin-right: 8px; }
.contact-card p { color: #555; }
.contact-card input,
.contact-card textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 10px;
    font-family: inherit;
    font-size: 14px;
    transition: border 0.3s;
}
.contact-card input:focus,
.contact-card textarea:focus {
    border-color: #2d8a4e;
    outline: none;
}
#msgStatus { font-weight: 600; margin-top: 8px; font-size: 14px; }

/* === FOOTER === */
.footer {
    background: #0d2818;
    color: #bbb;
    padding: 40px 0 15px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 25px;
}
.footer-col h3 {
    color: gold;
    margin-bottom: 12px;
    font-size: 1.05em;
}
.footer-col a {
    display: block;
    color: #999;
    padding: 4px 0;
    font-size: 14px;
    transition: 0.3s;
}
.footer-col a:hover { color: gold; padding-left: 5px; }
.footer-bottom {
    border-top: 1px solid #1a3a25;
    padding-top: 15px;
    text-align: center;
    font-size: 13px;
    color: #777;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .header-text h1 { font-size: 1.3em; }
    .header-text h2 { font-size: 0.9em; }
    .hero h1 { font-size: 1.8em; }
    .hero-sub { font-size: 1em; }
    .nav-toggle { display: block; }
    .nav-menu { display: none; flex-direction: column; }
    .nav-menu.show { display: flex; }
    .nav-menu li a {
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .search-form { flex-direction: column; }
    .search-form select,
    .search-form input { width: 100%; min-width: auto; }
    .section-title { font-size: 1.5em; }
    .logo { width: 60px; height: 60px; }
    .logo-right { display: none; }
    .top-flex { flex-direction: column; text-align: center; }
    .result-table th, .result-table td { padding: 8px 6px; font-size: 12px; }
    .stat-card h3 { font-size: 2em; }
}

@media (max-width: 480px) {
    .header-text h1 { font-size: 1.1em; }
    .hero h1 { font-size: 1.5em; }
    .section { padding: 40px 0; }
    .about-card, .search-box, .contact-card { padding: 20px 15px; }
}


/* ============================================
   ADMIN PAGE STYLES
   ============================================ */

.admin-body { background: #f0f2f5; min-height: 100vh; }

/* Login */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a5632, #2d8a4e);
}
.login-box {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
    margin: 20px;
}
.login-box img {
    width: 80px;
    margin-bottom: 15px;
}
.login-box h2 { color: #1a5632; margin-bottom: 5px; }
.login-box p { color: #888; margin-bottom: 20px; }
.login-box input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    font-family: inherit;
    transition: border 0.3s;
}
.login-box input:focus { border-color: #2d8a4e; outline: none; }

/* Admin Layout */
.admin-top {
    background: #1a5632;
    color: white;
    padding: 12px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.admin-top h2 { font-size: 1.2em; }
.admin-top-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-sm {
    padding: 8px 18px;
    font-size: 13px;
    border-radius: 5px;
}
.btn-logout { background: #dc3545; color: white; }
.btn-logout:hover { background: #c82333; }
.btn-home { background: gold; color: #1a5632; }

/* Admin Tabs */
.admin-tabs {
    background: #14432a;
    padding: 8px 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    overflow-x: auto;
}
.admin-tabs button {
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: #a5d6a7;
    cursor: pointer;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
}
.admin-tabs button:hover { background: rgba(255,255,255,0.1); color: white; }
.admin-tabs button.active { background: #2d8a4e; color: white; }

/* Admin Content */
.admin-content {
    max-width: 1100px;
    margin: 20px auto;
    padding: 0 15px;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.admin-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}
.admin-card h3 {
    color: #1a5632;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8f5e9;
    font-size: 1.15em;
}
.admin-card h3 i { margin-right: 8px; color: #2d8a4e; }

/* Forms */
.form-group { margin-bottom: 12px; }
.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: #1a5632;
    font-size: 13px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    transition: border 0.3s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #2d8a4e;
    outline: none;
}
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}
.form-row-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

/* Status Messages */
.msg-success { color: #2e7d32; font-weight: 600; margin-top: 10px; font-size: 14px; }
.msg-error { color: #c62828; font-weight: 600; margin-top: 10px; font-size: 14px; }

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 13px;
}
.data-table th,
.data-table td {
    padding: 10px 8px;
    border: 1px solid #e0e0e0;
    text-align: left;
}
.data-table th { background: #1a5632; color: white; font-weight: 600; font-size: 12px; }
.data-table tr:nth-child(even) { background: #fafafa; }
.data-table tr:hover { background: #e8f5e9; }

/* Action Buttons */
.btn-delete {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    transition: 0.3s;
}
.btn-delete:hover { background: #c82333; }
.btn-edit {
    background: #1976d2;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    transition: 0.3s;
}
.btn-edit:hover { background: #1565c0; }

/* Color Picker & Special */
.color-preview {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 5px;
    vertical-align: middle;
    margin-left: 10px;
    border: 2px solid #ddd;
}

/* Admin Gallery */
.admin-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 15px;
}
.admin-gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.admin-gallery-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}
.admin-gallery-item p {
    padding: 5px 8px;
    font-size: 11px;
    background: white;
}
.admin-gallery-item .del-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220,53,69,0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 14px;
}

/* Message Card */
.message-card {
    background: #f9f9f9;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid #2d8a4e;
}
.message-card .msg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 5px;
}
.message-card strong { color: #1a5632; }
.message-card .msg-date { color: #999; font-size: 12px; }

/* Responsive Admin */
@media (max-width: 768px) {
    .admin-top { flex-direction: column; text-align: center; }
    .admin-tabs { justify-content: flex-start; padding: 5px 10px; }
    .admin-tabs button { padding: 8px 12px; font-size: 12px; }
    .admin-card { padding: 18px; }
    .form-row { grid-template-columns: 1fr; }
    .data-table { font-size: 11px; }
    .data-table th, .data-table td { padding: 6px 4px; }
}

/* ============================================
   TOPPERS SHOWCASE - PREMIUM GRAPHIC DESIGN
   ============================================ */
.toppers-showcase-section {
    background: linear-gradient(135deg, #f0f9f4 0%, #e8f5e9 50%, #fff8e1 100%);
    padding: 70px 0;
}

.toppers-showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

/* === Class Card === */
.showcase-class-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(45, 138, 78, 0.1);
}

.showcase-class-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(45, 138, 78, 0.2);
}

/* === Class Header === */
.showcase-class-header {
    background: linear-gradient(135deg, #1a5632, #2d8a4e, #1a5632);
    color: white;
    padding: 14px 20px;
    text-align: center;
    font-weight: 700;
    font-size: 1.15em;
    letter-spacing: 0.5px;
    position: relative;
}

.showcase-class-header::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 8px solid #1a5632;
}

/* === Student Row === */
.showcase-student {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    gap: 14px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s;
    position: relative;
}

.showcase-student:last-child { border-bottom: none; }

.showcase-student:hover {
    background: #fafafa;
}

/* === Rank Badge (Left) === */
.showcase-rank-badge {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 3px solid white;
    position: relative;
    z-index: 2;
}

/* === Profile Image === */
.showcase-img-wrap {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    padding: 3px;
    position: relative;
}

.showcase-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #f5f5f5;
    display: block;
}

/* === Details (Middle) === */
.showcase-details {
    flex: 1;
    min-width: 0;
}

.showcase-details h4 {
    color: #1a5632;
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 3px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.showcase-details p {
    font-size: 12px;
    color: #888;
    margin: 0;
}

/* === Score (Right) === */
.showcase-score {
    text-align: right;
    flex-shrink: 0;
    padding-left: 8px;
}

.showcase-score .total-marks {
    display: block;
    font-weight: 800;
    color: #1a5632;
    font-size: 22px;
    line-height: 1;
}

.showcase-score .label {
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-top: 2px;
    display: block;
}

/* === 1st Place (Gold) === */
.showcase-student.first {
    background: linear-gradient(90deg, #fffbea 0%, #fff 100%);
}
.showcase-student.first .showcase-rank-badge {
    background: linear-gradient(135deg, #ffd700, #ffa500);
}
.showcase-student.first .showcase-img-wrap {
    background: linear-gradient(135deg, #ffd700, #ffa500);
}
.showcase-student.first .showcase-score .total-marks {
    color: #b8860b;
}

/* === 2nd Place (Silver) === */
.showcase-student.second {
    background: linear-gradient(90deg, #f8f8f8 0%, #fff 100%);
}
.showcase-student.second .showcase-rank-badge {
    background: linear-gradient(135deg, #c0c0c0, #808080);
}
.showcase-student.second .showcase-img-wrap {
    background: linear-gradient(135deg, #c0c0c0, #808080);
}
.showcase-student.second .showcase-score .total-marks {
    color: #666;
}

/* === 3rd Place (Bronze) === */
.showcase-student.third {
    background: linear-gradient(90deg, #fff5eb 0%, #fff 100%);
}
.showcase-student.third .showcase-rank-badge {
    background: linear-gradient(135deg, #cd7f32, #8b4513);
}
.showcase-student.third .showcase-img-wrap {
    background: linear-gradient(135deg, #cd7f32, #8b4513);
}
.showcase-student.third .showcase-score .total-marks {
    color: #8b4513;
}

/* === Responsive === */
@media (max-width: 480px) {
    .showcase-student { padding: 12px 14px; gap: 10px; }
    .showcase-rank-badge { width: 32px; height: 32px; font-size: 13px; }
    .showcase-img-wrap { width: 48px; height: 48px; }
    .showcase-details h4 { font-size: 13px; }
    .showcase-details p { font-size: 11px; }
    .showcase-score .total-marks { font-size: 18px; }
    .showcase-score .label { font-size: 9px; }
}
/* Edit Modal */
.edit-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    justify-content: center;
    align-items: flex-start;
    padding: 30px 15px;
    overflow-y: auto;
}

.edit-modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    position: relative;
    margin: auto;
}

.edit-modal-content h3 {
    color: #1a5632;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8f5e9;
}

.edit-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #888;
    background: none;
    border: none;
}

.edit-close:hover { color: #c62828; }

/* Quick Result Add */
.quick-result-box {
    background: #f0f7f0;
    border: 2px solid #c8e6c9;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.quick-result-box h4 {
    color: #1a5632;
    margin-bottom: 8px;
}

.quick-result-box select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    margin-right: 5px;
}

@media (max-width: 768px) {
    .showcase-student { flex-wrap: wrap; }
    .showcase-marks { margin-left: auto; }
}


/* ============================================
   MOBILE HEADER FIX
   ============================================ */
@media (max-width: 768px) {
    .header {
        padding: 15px 10px;
    }
    
    .header-content {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 10px;
        flex-wrap: nowrap;
    }
    
    .logo {
        width: 55px;
        height: 55px;
        border-width: 2px;
        flex-shrink: 0;
    }
    
    .logo-right {
        display: none !important;
    }
    
    .header-text {
        flex: 1;
        min-width: 0;
        text-align: center;
    }
    
    .header-text h1 {
        font-size: 1.1em;
        line-height: 1.3;
        margin-bottom: 3px;
    }
    
    .header-text h2 {
        font-size: 0.85em;
        line-height: 1.3;
        margin-bottom: 3px;
    }
    
    .header-text p {
        font-size: 0.8em;
        line-height: 1.3;
        margin: 0;
    }
}

@media (max-width: 480px) {
    .logo {
        width: 45px;
        height: 45px;
    }
    
    .header-text h1 {
        font-size: 0.95em;
    }
    
    .header-text h2 {
        font-size: 0.75em;
    }
    
    .header-text p {
        font-size: 0.7em;
    }
}
