/* ============================================
   COMPLETE PREMIUM CSS - ALL PAGES
   NEXT-LEVEL: Animated Gradient | Glassmorphism | Floating | Green Theme
   Pages: Dashboard | Add Student | Student List | ID Card | Bulk ID Card | Edit Student
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700;800&family=Poppins:wght@300;400;500;600;700&display=swap');

/* ---------- ROOT VARIABLES – GREEN THEME ---------- */
:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #34d399;
    --primary-soft: #d1fae5;
    --secondary: #6366f1;
    --accent: #f59e0b;
    --dark: #064e3b;
    --dark-soft: #065f46;
    --gray-50: #f0fdf4;
    --gray-100: #ecfdf5;
    --gray-200: #d1fae5;
    --gray-300: #a7f3d0;
    --gray-400: #6ee7b7;
    --gray-500: #34d399;
    --gray-600: #10b981;
    --gray-700: #059669;
    --gray-800: #047857;
    --white: #ffffff;
    
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    --transition-fast: 150ms cubic-bezier(0.2, 0.9, 0.4, 1.1);
    --transition-base: 250ms cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

/* ---------- GLOBAL RESET – ANIMATED GREEN BACKGROUND ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    background: linear-gradient(120deg, #f4f9f4, #e8f5e9, #d1fae5, #e8f5e9, #f4f9f4);
    background-size: 400% 400%;
    animation: gradientWave 15s ease infinite;
    color: #064e3b;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

@keyframes gradientWave {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ---------- TYPOGRAPHY – PREMIUM ---------- */
h1, h2, h3, h4, .welcome-title, .section-title, .card-title-green, .premium-title,
.school-name-header, .school-name-complete, .student-name, .action-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ---------- CONTAINER (Responsive Auto) ---------- */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    animation: pageFadeSlide 0.5s cubic-bezier(0.2, 0.9, 0.4, 1.1) forwards;
}

@keyframes pageFadeSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 640px) {
    .container { padding: 0 1.5rem; }
}
@media (min-width: 1024px) {
    .container { padding: 0 2rem; }
}

/* ---------- PREMIUM HEADER – GREEN WITH AMBIENT GLOW ---------- */
.header {
    background: linear-gradient(135deg, #064e3b, #059669);
    color: white;
    padding: 0.8rem 1.5rem;
    box-shadow: 0 2px 20px rgba(6, 78, 59, 0.25), 0 4px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    position: relative;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 10px;
    background: radial-gradient(ellipse at center, rgba(6,78,59,0.3) 0%, transparent 70%);
    pointer-events: none;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    max-width: 1280px;
    margin: 0 auto;
}

.header-logo {
    flex-shrink: 0;
}

.school-logo-header {
    width: 50px;
    height: 50px;
    object-fit: contain;
    background: white;
    border-radius: 50%;
    padding: 5px;
    transition: transform 0.3s ease;
}

.school-logo-header:hover {
    transform: scale(1.05);
}

.header-text {
    text-align: left;
}

.school-name-header {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
}

.school-tagline-header {
    font-size: 0.7rem;
    opacity: 0.9;
    margin: 0;
}

/* ---------- FOOTER – GREEN ---------- */
.footer {
    text-align: center;
    padding: 1.5rem;
    background: #064e3b;
    color: #a7f3d0;
    margin-top: 3rem;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* ============================================
   GLASSMORPHISM BASE CLASSES (All Pages)
   ============================================ */
.dashboard-card, .premium-card, .stat-card, .action-card, .recent-section,
.container-form, .single-actions-card, .bulk-actions-card,
.id-card-green-bulk-logo, .id-card-single-complete {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.dashboard-card:hover, .premium-card:hover, .stat-card:hover, .action-card:hover,
.container-form:hover, .id-card-green-bulk-logo:hover, .id-card-single-complete:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 30px -12px rgba(16, 185, 129, 0.2);
    background: rgba(255, 255, 255, 0.85);
}

/* ============================================
   DASHBOARD CSS – PREMIUM
   ============================================ */

.dashboard-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Welcome Section */
.welcome-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.welcome-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #064e3b;
    margin-bottom: 0.25rem;
}

.welcome-text {
    color: #047857;
    font-size: 0.9rem;
}

.date-badge {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    color: #059669;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

/* Stats Cards Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 2.8rem;
    display: inline-block;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
}

.stat-card:hover .stat-icon {
    transform: rotate(5deg) scale(1.05);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: #064e3b;
    line-height: 1.2;
    font-family: 'Montserrat', sans-serif;
}

.stat-label {
    color: #047857;
    font-size: 0.85rem;
}

/* Quick Actions Row */
.actions-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.action-card {
    padding: 1.8rem 1rem;
    text-align: center;
    text-decoration: none;
}

.action-icon {
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
    display: inline-block;
    transition: all 0.3s ease;
}

.action-card:hover .action-icon {
    transform: translateY(-3px) scale(1.1);
}

.action-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #064e3b;
    margin-bottom: 0.25rem;
}

.action-desc {
    font-size: 0.8rem;
    color: #047857;
}

/* Recent Students Section */
.recent-section {
    border-radius: 1.5rem;
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(209, 250, 229, 0.5);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #064e3b;
}

.view-all-link {
    color: #10b981;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.view-all-link:hover {
    text-decoration: underline;
    color: #059669;
}

/* Recent Table */
.recent-table {
    width: 100%;
    border-collapse: collapse;
}

.recent-table th {
    text-align: left;
    padding: 0.75rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #047857;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(236, 253, 245, 0.8);
    border-bottom: 1px solid #d1fae5;
    font-family: 'Montserrat', sans-serif;
}

.recent-table td {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    color: #065f46;
    border-bottom: 1px solid rgba(209, 250, 229, 0.5);
}

.recent-table tr:hover {
    background: rgba(240, 253, 244, 0.5);
}

.student-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #d1fae5;
    transition: transform 0.2s ease;
}

.recent-table tr:hover .student-avatar {
    transform: scale(1.05);
}

.student-name {
    font-weight: 500;
    color: #064e3b;
}

.class-badge {
    background: #d1fae5;
    color: #059669;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.date-text {
    color: #047857;
    font-size: 0.85rem;
}

.empty-message {
    text-align: center;
    padding: 2rem;
    color: #6ee7b7;
}

/* ============================================
   FORM PAGE STYLES – PREMIUM
   ============================================ */
.container-form {
    max-width: 520px;
    margin: 2rem auto;
    padding: clamp(1.5rem, 5vw, 2.2rem);
    border-radius: var(--radius-2xl);
}

.container-form:hover {
    transform: translateY(-4px);
}

h2 {
    text-align: center;
    margin-bottom: 1.8rem;
    font-weight: 700;
    font-size: clamp(1.4rem, 5vw, 1.8rem);
    color: #064e3b;
    font-family: 'Montserrat', sans-serif;
}

.form-group {
    margin-bottom: 1.25rem;
}

label, .form-label-green {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #047857;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

input, textarea, select, .input-green {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1.5px solid rgba(209, 250, 229, 0.8);
    border-radius: var(--radius-lg);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    background-color: rgba(255, 255, 255, 0.9);
}

input:focus, textarea:focus, select:focus, .input-green:focus {
    border-color: #10b981;
    background: white;
    outline: none;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

button, .btn-submit, .submit-btn-green, .camera-btn-green, .print-single-btn-green, .print-bulk-btn-green {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: white;
    font-weight: 700;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

button:hover, .btn-submit:hover, .submit-btn-green:hover, .camera-btn-green:hover, .print-single-btn-green:hover, .print-bulk-btn-green:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669, #047857);
}

/* Photo Section */
.photo-section {
    border-left: 2px solid rgba(209, 250, 229, 0.5);
}

@media (max-width: 768px) {
    .photo-section {
        border-left: none;
        border-top: 2px solid rgba(209, 250, 229, 0.5);
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
}

.photo-heading-green {
    font-size: 1.1rem;
    font-weight: 600;
    color: #064e3b;
    font-family: 'Montserrat', sans-serif;
}

.option-label-green {
    color: #059669;
    font-weight: 500;
    font-size: 0.75rem;
}

.or-divider {
    color: #a7f3d0;
    font-size: 0.8rem;
}

/* Camera Container */
.camera-container-green {
    width: 100%;
    max-width: 320px;
    height: 240px;
    background: rgba(236, 253, 245, 0.8);
    border: 2px dashed #d1fae5;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.camera-container-green video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.9rem;
}

/* Preview Area */
.preview-area-green {
    background: rgba(236, 253, 245, 0.6);
    border: 1px solid #d1fae5;
    border-radius: 1rem;
    min-height: 150px;
    text-align: center;
}

.preview-img-green {
    max-width: 100%;
    max-height: 200px;
    border-radius: 0.75rem;
    border: 3px solid #10b981;
}

/* Divider */
.divider-green {
    margin: 1.5rem 0;
    border: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d1fae5, #10b981, #d1fae5, transparent);
}

/* ============================================
   STUDENT LIST PAGE – PREMIUM
   ============================================ */
.premium-card {
    border-radius: var(--radius-2xl) !important;
    overflow: hidden;
}

.premium-glass-header {
    background: linear-gradient(135deg, #064e3b, #059669, #10b981) !important;
    border-bottom: none;
    padding: 1rem 1.5rem;
}

.premium-title {
    font-weight: 700;
    letter-spacing: -0.3px;
    font-size: clamp(1.1rem, 4vw, 1.5rem);
    color: white;
}

.premium-add-btn, .add-btn-green {
    background: rgba(27, 223, 223, 0.2);
    border: 1px solid rgba(25, 221, 221, 0.781);
    color: rgb(21, 206, 175);
    border-radius: var(--radius-full);
    padding: 0.4rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all var(--transition-fast);
}

.premium-add-btn:hover, .add-btn-green:hover {
    background: rgb(19, 177, 169);
    color: #e5ecf0;
    transform: scale(1.02);
}

.premium-search-input, .search-input-green {
    border: 1.5px solid rgba(209, 250, 229, 0.8);
    border-radius: var(--radius-full);
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    background: rgba(255, 255, 255, 0.9);
}

.premium-search-input:focus, .search-input-green:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
    outline: none;
}

/* Table Styles */
.premium-table, .student-table-green {
    width: 100%;
    border-collapse: collapse;
}

.premium-table-header th, .table-header-green th {
    background: rgba(236, 253, 245, 0.8);
    color: #047857;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem 0.75rem;
    border-bottom: 2px solid #d1fae5;
    font-family: 'Montserrat', sans-serif;
}

.premium-table-row, .student-row-green {
    background: rgba(255, 255, 255, 0.6);
    transition: all var(--transition-fast);
    border-bottom: 1px solid rgba(209, 250, 229, 0.5);
}

.premium-table-row:hover, .student-row-green:hover {
    background: rgba(240, 253, 244, 0.8);
}

.premium-table-row td, .student-row-green td {
    padding: 0.9rem 0.75rem;
    vertical-align: middle;
}

.premium-student-photo, .student-photo-green {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border: 2px solid #d1fae5;
    border-radius: 50%;
    transition: transform var(--transition-fast);
}

.premium-table-row:hover .premium-student-photo,
.student-row-green:hover .student-photo-green {
    transform: scale(1.05);
}

.premium-badge, .class-badge-green {
    background: #d1fae5;
    color: #059669;
    padding: 0.25rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 500;
    display: inline-block;
}

/* Action Buttons */
.premium-id-card-btn, .idcard-btn-green {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: var(--radius-full);
    padding: 0.35rem 0.9rem;
    font-weight: 600;
    font-size: 0.7rem;
    color: white;
    transition: all var(--transition-fast);
    margin-right: 0.4rem;
}

.premium-id-card-btn:hover, .idcard-btn-green:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.premium-delete-btn, .delete-btn-green {
    border-radius: var(--radius-full);
    padding: 0.35rem 0.7rem;
    border: 1.5px solid #ef4444;
    background: transparent;
    color: #ef4444;
    font-size: 0.7rem;
    transition: all var(--transition-fast);
}

.premium-delete-btn:hover, .delete-btn-green:hover {
    background: #ef4444;
    color: white;
    transform: translateY(-2px);
}

.edit-btn-green {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    border-radius: 2rem;
    padding: 0.35rem 0.9rem;
    font-weight: 600;
    font-size: 0.7rem;
    color: white;
    transition: all 0.2s ease;
    margin-right: 0.4rem;
}

.edit-btn-green:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

/* ============================================
   SINGLE ID CARD – COMPLETE PREMIUM
   ============================================ */

/* Action Bar */
.single-actions-card, .bulk-actions-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
}

.single-actions-inner, .bulk-actions-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.back-btn-green {
    background: rgba(236, 253, 245, 0.8);
    border: 1px solid #d1fae5;
    color: #059669;
    border-radius: 2rem;
    padding: 0.4rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.back-btn-green:hover {
    background: #10b981;
    color: white;
}

.single-label, .bulk-label {
    color: #047857;
    font-weight: 500;
    font-size: 0.85rem;
}

/* Theme Selector */
.theme-selector-single {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-label-single {
    color: #047857;
    font-size: 0.75rem;
}

.theme-dot-single {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #d1fae5;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-dot-single:hover {
    transform: scale(1.1);
    border-color: #10b981;
}

.theme-default-single { background: linear-gradient(135deg, #064e3b, #059669); }
.theme-red-single { background: linear-gradient(135deg, #cb2d3e, #ef473a); }
.theme-green-single { background: linear-gradient(135deg, #11998e, #38ef7d); }
.theme-dark-single { background: linear-gradient(135deg, #1f2937, #374151); }

/* Main ID Card */
.id-card-single-complete {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    border-radius: 1rem;
    overflow: hidden;
}

/* School Header with Logo */
.idcard-school-header-single {
    background: linear-gradient(135deg, #064e3b, #059669);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.school-logo-single {
    flex-shrink: 0;
}

.logo-img-single {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: white;
    border-radius: 50%;
    padding: 5px;
}

.school-info-single {
    flex: 1;
}

.school-name-complete {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1.3;
}

.school-address-single {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0.1rem 0;
}

.school-contact-single {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

/* Student Photo */
.idcard-photo-container-single {
    text-align: center;
    margin-top: -35px;
    margin-bottom: 0.5rem;
}

.idcard-photo-single-complete {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid white;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    background: #ecfdf5;
}

/* Student Details */
.idcard-details-single-complete {
    padding: 0.5rem 1.5rem 1rem;
    text-align: center;
}

.student-name-single-complete {
    font-size: 1.2rem;
    font-weight: 700;
    color: #064e3b;
    margin-bottom: 0.2rem;
    font-family: 'Montserrat', sans-serif;
}

.student-class-single-complete {
    font-size: 0.85rem;
    color: #059669;
    font-weight: 600;
    margin-bottom: 0.8rem;
    letter-spacing: 0.5px;
}

/* Info Table */
.idcard-info-single-complete {
    width: 100%;
    font-size: 0.8rem;
    text-align: left;
    margin-top: 0.3rem;
}

.idcard-info-single-complete th {
    font-weight: 600;
    padding: 0.25rem 0;
    width: 30%;
    color: #047857;
}

.idcard-info-single-complete td {
    padding: 0.25rem 0;
    color: #065f46;
}

/* Footer with Principal Details */
.idcard-footer-single-complete {
    background: rgba(236, 253, 245, 0.8);
    padding: 0.8rem 1rem;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #d1fae5;
}

.principal-details {
    flex: 2;
}

.principal-sign-area {
    text-align: left;
}

.principal-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: #047857;
    text-transform: uppercase;
}

.principal-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: #064e3b;
}

.principal-phone {
    font-size: 0.6rem;
    color: #059669;
}

.principal-sign-line {
    margin-top: 0.2rem;
}

.sign-text {
    font-size: 0.55rem;
    color: #065f46;
    font-style: italic;
}

.valid-details {
    flex: 1;
    text-align: right;
}

.valid-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: #047857;
    text-transform: uppercase;
}

.valid-date {
    font-size: 0.7rem;
    font-weight: 700;
    color: #064e3b;
}

/* Theme Variations */
.id-card-single-complete.theme-red .idcard-school-header-single {
    background: linear-gradient(135deg, #cb2d3e, #ef473a);
}
.id-card-single-complete.theme-red .student-class-single-complete {
    color: #cb2d3e;
}
.id-card-single-complete.theme-green .idcard-school-header-single {
    background: linear-gradient(135deg, #11998e, #38ef7d);
}
.id-card-single-complete.theme-green .student-class-single-complete {
    color: #11998e;
}
.id-card-single-complete.theme-dark .idcard-school-header-single {
    background: linear-gradient(135deg, #1f2937, #374151);
}
.id-card-single-complete.theme-dark .student-class-single-complete {
    color: #374151;
}

/* ============================================
   BULK ID CARD – PREMIUM (3x3 Grid)
   ============================================ */

.bulk-info {
    display: flex;
    gap: 1rem;
}

.total-badge, .pages-badge {
    background: rgba(236, 253, 245, 0.8);
    color: #059669;
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.print-instruction {
    font-size: 0.7rem;
    color: #94a3b8;
}

/* ID Card Grid - 3x3 Layout */
.id-card-grid-bulk {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.id-card-bulk-item {
    break-inside: avoid;
    page-break-inside: avoid;
}

/* Individual ID Card */
.id-card-green-bulk-logo {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    border-radius: 0.75rem;
    overflow: hidden;
}

/* School Header with Logo */
.idcard-school-header {
    background: linear-gradient(135deg, #064e3b, #059669);
    padding: 0.8rem 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.school-logo-area {
    flex-shrink: 0;
}

.school-logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: rgba(42, 221, 6, 0.74);
    border-radius: 50%;
    padding: 4px;
}

.school-info-area {
    flex: 1;
}

.school-name-bulk-logo {
    font-size: 0.7rem;
    font-weight: 700;
    color: rgb(13, 212, 63);
    margin: 0;
    line-height: 1.2;
}

.school-tagline-bulk-logo {
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

/* Student Photo */
.idcard-student-photo-area {
    text-align: center;
    margin-top: -28px;
    margin-bottom: 0.5rem;
}

.student-photo-bulk-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid rgb(29, 185, 14);
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(21, 168, 53, 0.61);
    background: #087743;
}

/* Student Details */
.idcard-student-details {
    padding: 0.3rem 0.8rem 0.6rem;
    text-align: center;
}

.student-name-bulk-logo {
    font-size: 0.8rem;
    font-weight: 700;
    color: #064e3b;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-class-bulk-logo {
    font-size: 0.65rem;
    color: #059669;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.details-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.6rem;
    padding: 0.1rem 0;
    border-bottom: 0.5px solid rgba(236, 253, 245, 0.8);
}

.detail-label {
    font-weight: 600;
    color: #047857;
    width: 38%;
}

.detail-value {
    color: #065f46;
    width: 62%;
    text-align: left;
}

/* Footer */
.idcard-footer-bulk-logo {
    background: rgba(236, 253, 245, 0.8);
    padding: 0.4rem 0.6rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.55rem;
    font-weight: 600;
    color: #059669;
    border-top: 1px solid #d1fae5;
}

.principal-sign, .valid-till {
    font-size: 0.55rem;
}

/* ============================================
   PRINT STYLES – A4 PAPER (9 CARDS PER PAGE)
   Balanced Size – Na Chota Na Bada
   ============================================ */
@media print {
    
   @page {
        size: A4 portrait;
        margin: 0.5cm; /* Standard printer margin */
    }
    
    body {
        background: white;
        margin: 0;
        padding: 0;
        animation: none;
    }
    
    /* Hide all non-print elements */
    .no-print, .header, .footer, .bulk-actions-card, 
    .single-actions-card, .print-instruction, .back-btn-green,
    .class-filter, .bulk-info {
        display: none !important;
    }
    
    /* Container full width */
    .container {
        padding: 0 !important;
        margin: 0 auto !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* 3x3 Grid Layout */
    .id-card-grid-bulk {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        column-gap: 0.3cm !important;
        row-gap: 0.6cm !important; /* Cards ke beech ki khali jagah */
        margin: 0 auto !important;
        padding: 0 !important;
    }
    
    /* Each Card Item */
    .id-card-bulk-item {
        break-inside: avoid;
        page-break-inside: avoid;
        margin: 0;
        padding: 0;
    }
    
    /* Card Styling */
   .id-card-green-bulk-logo {
        width: 5.4cm !important;
        height: 8.6cm !important;
        overflow: hidden !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        border: 1px solid #ccc;
        background: white;
        border-radius: 0.6rem !important;
        
        /* Ye 2 lines nayi hain jo footer ko manage karengi */
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Card Header */
    .idcard-school-header {
        padding: 0.5rem 0.4rem !important;
        display: flex !important;
        gap: 0.4rem !important;
    }
    
    .school-logo-img {
        width: 38px !important;
        height: 38px !important;
    }
    
    .school-name-bulk-logo {
        font-size: 0.60rem !important;
        font-weight: 700 !important;
    }
    
    .school-address-bulk, .school-contact-bulk {
        font-size: 0.40rem !important;
    }
    
    /* Student Photo */
    .idcard-student-photo-area {
        margin-top: -22px !important;
        margin-bottom: 0.2rem !important;
    }
    
    .student-photo-bulk-logo {
        width: 48px !important;
        height: 48px !important;
        border: 3px solid white !important;
    }
    
    /* Student Details */
    .idcard-student-details {
        padding: 0.2rem 0.5rem 0.4rem !important;
    }
    
    .student-name-bulk-logo {
        font-size: 0.7rem !important;
        font-weight: 700 !important;
        margin-bottom: 0.15rem !important;
    }
    
    .student-class-bulk-logo {
        font-size: 0.55rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .details-row {
        font-size: 0.5rem !important;
        padding: 0.08rem 0 !important;
    }
    
    .detail-label, .detail-value {
        font-size: 0.5rem !important;
    }
    
    /* Footer */
   .idcard-footer-bulk-logo {
        margin-top: auto !important; /* Yahi wo line hai jo footer ko sabse niche bhejegi */
        padding: 0.4rem 0.5rem 0.3rem !important; 
        font-size: 0.45rem !important;
    }
    
    .principal-sign, .valid-till {
        font-size: 0.45rem !important;
    }
    
    /* Page break after every 9 cards */
    .id-card-bulk-item:nth-child(9n) {
        page-break-after: always;
    }
    
    .id-card-bulk-item:last-child {
        page-break-after: auto;
    }
    
    /* Single ID Card Print */
    .single-id-card-wrapper {
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
        margin: 0;
        padding: 0;
    }
    
    .id-card-single-complete {
        max-width: 380px !important;
        margin: 0 auto;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
@media (max-width: 992px) {
    .id-card-grid-bulk {
        grid-template-columns: repeat(2, 1fr);
    }
    .stat-icon {
        font-size: 2.2rem;
    }
    .action-icon {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        padding: 1rem;
    }
    .welcome-title {
        font-size: 1.4rem;
    }
    .stat-number {
        font-size: 1.5rem;
    }
    .stats-row, .actions-row {
        gap: 1rem;
    }
    .premium-table-header th, .table-header-green th {
        font-size: 0.65rem;
        padding: 0.6rem 0.4rem;
    }
    .premium-table-row td, .student-row-green td {
        padding: 0.6rem 0.4rem;
        font-size: 0.75rem;
    }
    .premium-id-card-btn, .idcard-btn-green, .premium-delete-btn, .delete-btn-green, .edit-btn-green {
        padding: 0.2rem 0.5rem;
        font-size: 0.6rem;
    }
    .premium-student-photo, .student-photo-green {
        width: 38px;
        height: 38px;
    }
    .recent-table th, .recent-table td {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 640px) {
    .stats-row, .actions-row, .id-card-grid-bulk {
        grid-template-columns: 1fr;
    }
    .section-header, .single-actions-inner, .bulk-actions-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .container-form {
        margin: 1rem;
        padding: 1.2rem;
    }
    .id-card-single-complete {
        max-width: 320px;
    }
    .logo-img-single {
        width: 45px;
        height: 45px;
    }
    .school-name-complete {
        font-size: 0.9rem;
    }
    .idcard-photo-single-complete {
        width: 80px;
        height: 80px;
    }
    .student-name-single-complete {
        font-size: 1rem;
    }
    .action-icon {
        font-size: 1.8rem;
    }
    .action-title {
        font-size: 0.9rem;
    }
    .header {
        padding: 0.5rem 1rem;
    }
    .school-name-header {
        font-size: 1rem;
    }
    .school-logo-header {
        width: 40px;
        height: 40px;
    }
}

/* ============================================
   SCROLLBAR & UTILITIES – GREEN PREMIUM
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #d1fae5;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #059669;
}

::selection {
    background: rgba(16, 185, 129, 0.2);
}

/* Card Loading Animation (Staggered) */
.stat-card, .action-card, .dashboard-card, .premium-card {
    animation: cardFadeIn 0.4s ease-out forwards;
    opacity: 0;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.action-card:nth-child(1) { animation-delay: 0.2s; }
.action-card:nth-child(2) { animation-delay: 0.25s; }
.action-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Class Filter Styles */
.class-filter {
    display: flex;
    align-items: center;
}

.filter-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #047857;
    margin-right: 0.5rem;
}

.class-select-green {
    padding: 0.4rem 1rem;
    border: 1.5px solid #d1fae5;
    border-radius: 2rem;
    background: white;
    color: #064e3b;
    font-size: 0.8rem;
    cursor: pointer;
    outline: none;
}

.class-select-green:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.clear-filter-btn {
    background: #ecfdf5;
    border: 1px solid #d1fae5;
    color: #059669;
    border-radius: 2rem;
    padding: 0.35rem 1rem;
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.clear-filter-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

/* School Header in Bulk Card */
.school-info-area {
    flex: 1;
}

.school-name-bulk-logo {
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1.2;
}

.school-address-bulk {
    font-size: 0.6rem;
    color: rgba(10, 0, 0, 0.918);
    margin: 0.1rem 0;
}

.school-contact-bulk {
    font-size: 0.5rem;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

/* Footer in Bulk Card */
.idcard-footer-bulk-logo {
    background: rgba(236, 253, 245, 0.8);
    padding: 0.4rem 0.6rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.55rem;
    font-weight: 600;
    color: #059669;
    border-top: 1px solid #d1fae5;
}

.principal-sign, .valid-till {
    font-size: 0.55rem;
}


/* ============================================
   LOGIN PAGE – PREMIUM ANIMATED DESIGN
   ============================================ */

.login-body {
    font-family: 'Poppins', system-ui, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(120deg, #f4f9f4, #e8f5e9, #d1fae5, #e8f5e9, #f4f9f4);
    background-size: 400% 400%;
    animation: loginGradientWave 12s ease infinite;
    margin: 0;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

@keyframes loginGradientWave {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating Animated Orbs */
.login-body::before,
.login-body::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16,185,129,0.1), transparent);
    animation: floatOrb 15s ease-in-out infinite;
    pointer-events: none;
}

.login-body::before {
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.login-body::after {
    bottom: -100px;
    right: -100px;
    animation-delay: 5s;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
    50% { transform: translate(30px, -30px) scale(1.1); opacity: 0.5; }
}

.login-container {
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-radius: 2rem;
    padding: 2rem 1.8rem;
    box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 50px -15px rgba(16, 185, 129, 0.25);
}

.login-header {
    text-align: center;
    margin-bottom: 1.8rem;
}

.login-logo {
    display: inline-block;
    margin-bottom: 1rem;
}

.login-logo img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #10b981;
    padding: 3px;
    background: white;
    transition: transform 0.3s ease;
}

.login-logo img:hover {
    transform: scale(1.05);
}

.login-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #064e3b;
    margin-bottom: 0.25rem;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: -0.3px;
}

.login-header p {
    font-size: 0.8rem;
    color: #047857;
}

.login-error {
    background: #fee2e2;
    color: #dc2626;
    padding: 0.7rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    margin-bottom: 1.2rem;
    text-align: center;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.login-form {
    text-align: left;
}

.login-input-group {
    margin-bottom: 1.2rem;
}

.login-input-group label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #047857;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.login-input-group input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1.5px solid #d1fae5;
    border-radius: 1rem;
    font-size: 0.9rem;
    background: white;
    transition: all 0.2s ease;
    font-family: inherit;
}

.login-input-group input:focus {
    border-color: #10b981;
    outline: none;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
    transform: scale(1.01);
}

.login-options {
    text-align: right;
    margin-bottom: 1.5rem;
}

.forgot-link {
    font-size: 0.7rem;
    color: #059669;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.forgot-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #059669;
    transition: width 0.2s ease;
}

.forgot-link:hover::after {
    width: 100%;
}

.forgot-link:hover {
    color: #064e3b;
}

.login-form button {
    width: 100%;
    padding: 0.85rem;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.login-form button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.login-form button:hover::before {
    left: 100%;
}

.login-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35);
}

.login-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.65rem;
    color: #6ee7b7;
}

/* Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
    }
    .login-logo img {
        width: 55px;
        height: 55px;
    }
    .login-header h2 {
        font-size: 1.1rem;
    }
}

.logout-area {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

/* ============================================
   LOGOUT BUTTON FIX
   ============================================ */

.welcome-section {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logout-area {
    position: static;
    margin-left: auto;
}

.logout-btn {
    display: inline-block;
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 0.5rem 1.2rem;
    border-radius: 2rem;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}   