/* Janta High School Naigaon, Nanded - Modern Executive Enterprise Design System */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #1E3A8A;         /* Deep Royal Navy */
    --primary-hover: #1E40AF;
    --primary-light: #2563EB;   /* Vibrant Accent Blue */
    --primary-subtle: #EFF6FF;  /* Soft Blue Background */
    --accent: #10B981;         /* Emerald Green Accent */
    --accent-hover: #059669;
    --amber: #F59E0B;          /* Amber Gold */
    --bg-main: #F8FAFC;         /* Crisp Slate Neutral */
    --card-bg: #FFFFFF;
    --text-main: #0F172A;       /* Slate 900 */
    --text-muted: #64748B;      /* Slate 500 */
    --border-color: #E2E8F0;    /* Slate 200 */
    --sidebar-bg: #0F172A;     /* Dark Slate Navy Sidebar */
    --sidebar-text: #94A3B8;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --radius: 12px;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --font-marathi: 'Noto Sans Devanagari', sans-serif;
    --font-latin: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-marathi);
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* Header & Navigation Bar */
.app-header {
    background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 100%);
    color: white;
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.school-branding {
    display: flex;
    align-items: center;
    gap: 16px;
}

.school-logo-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 50%;
    background: white;
    padding: 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.school-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.school-title h1 {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #FFFFFF;
}

.school-title p {
    font-size: 12px;
    color: #94A3B8;
    margin-top: 1px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 13px;
    color: #F1F5F9;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(8px);
}

.btn-logout {
    background: rgba(239, 68, 68, 0.9);
    color: white;
    padding: 7px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: #DC2626;
    transform: translateY(-1px);
}

/* Main Layout Wrapper */
.main-wrapper {
    display: flex;
    flex: 1;
}

/* Sidebar Navigation */
.sidebar {
    width: 270px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-right: 1px solid #1E293B;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #94A3B8;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #F8FAFC;
    transform: translateX(3px);
}

.nav-link.active {
    background: #1E293B;
    color: #60A5FA;
    font-weight: 600;
    border-left-color: #3B82F6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.nav-link .icon {
    font-size: 18px;
}

.content-area {
    flex: 1;
    padding: 32px;
    max-width: 1440px;
}

/* Stat Overview Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--card-bg);
    padding: 22px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 18px;
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--primary-light);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card.accent {
    border-left-color: #F59E0B;
}

.stat-card.success {
    border-left-color: #10B981;
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    background: #F1F5F9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
}

.stat-info p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Cards & Components */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    padding: 24px;
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1.5px solid #F1F5F9;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Action Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 4px rgba(30, 58, 138, 0.2);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(30, 58, 138, 0.3);
}

.btn-accent {
    background: #F59E0B;
    color: #78350F;
    font-weight: 700;
}

.btn-accent:hover {
    background: #D97706;
    color: white;
}

.btn-secondary {
    background: #F1F5F9;
    color: #334155;
    border-color: #CBD5E1;
}

.btn-secondary:hover {
    background: #E2E8F0;
    color: #0F172A;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12.5px;
    border-radius: 6px;
}

/* Forms & Inputs */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label, .form-label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.form-control {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #FFFFFF;
    color: var(--text-main);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Real-Time Uppercase CSS Rule */
input[name*="english"], input[id*="english"], .uppercase-input {
    text-transform: uppercase;
}

/* Table Design */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.data-table th, .data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: #F8FAFC;
    font-weight: 700;
    color: #475569;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-size: 12px;
}

.data-table tbody tr {
    transition: background 0.15s ease;
}

.data-table tbody tr:hover {
    background: #F1F5F9;
}

/* Status Badges */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    display: inline-block;
}

.badge-active {
    background: #DEF7EC;
    color: #03543F;
    border: 1px solid #84E1BC;
}

.badge-left {
    background: #FDE8E8;
    color: #9B1C1C;
    border: 1px solid #F8B4B4;
}

/* Image Preview Container */
.img-preview-container {
    width: 160px;
    height: 190px;
    border: 2px dashed #CBD5E1;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #F8FAFC;
    position: relative;
}

.img-preview-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

/* Print CSS Rules */
@media print {
    .app-header, .sidebar, .btn, .no-print {
        display: none !important;
    }
    body {
        background: white;
        color: black;
    }
    .content-area {
        padding: 0;
        margin: 0;
        max-width: 100%;
    }
    .print-certificate-page {
        border: 4px double #000;
        padding: 40px;
        margin: 0;
        min-height: 98vh;
        position: relative;
    }
}
