/* =========================
   RESET & BASE STYLES
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

/* =========================
   NAVIGATION
========================= */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
}

.logo i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(255,255,255,0.1);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        background: #667eea;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        z-index: 1000;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
}

/* =========================
   DASHBOARD & LAYOUT
========================= */
.dashboard {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.dashboard-header {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    border-left: 4px solid #667eea;
}

.dashboard-header h1 {
    color: #2d3748;
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin: 20px 0;
}
/* changed */
/* .stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 15px;
    align-items: center;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card i {
    grid-row: 1 / -1;
    font-size: 2.5rem;
    color: #667eea;
}

.stat-number {
    font-size: 1.6rem;
    font-weight: 700;
    color: #2d3748;
    align-self: end;
}

.stat-label {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
    align-self: start;
} */
 /* =========================
   STAT CARD FIX (Text Stacked)
========================= */

.stat-card {
    display: flex !important; /* Flexbox use karein taaki Icon aur Text side-by-side rahein */
    align-items: center;      /* Vertically center */
    gap: 10px;                /* Icon aur Text ke beech gap */
    background: white;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    border: 1px solid #f0f2f5;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Icon Box Styling */
.stat-card .icon-box {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0; /* Icon shrink na ho */
}

/* Text Container (Right Side) */
.stat-card > div:last-child {
    display: flex;
    flex-direction: column; /* ✅ Yahi line Text ko Number ke neeche layegi */
    justify-content: center;
}

/* Number Styling */
.stat-number {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d3748;
    line-height: 1.2;     /* Height adjust karein */
    display: block;       /* Block element banayein */
}

/* Label Styling */
.stat-label {
    font-size: 0.95rem;
    color: #718096;
    font-weight: 500;
    margin-top: 2px;      /* Thoda gap number se */
    display: block;
}

/* =========================
   MODERN CLASS CARD (NEW UI)
========================= */

.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

.class-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f2f5;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Top colored bar */
.class-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.class-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.15);
}

/* HEADER: Name + Badge */
.class-header {
    padding: 20px 20px 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.class-header div h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 5px;
}

.class-code {
    background: #ebf4ff;
    color: #5a67d8;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

/* Status Badge */
.status-badge {
    font-size: 0.75rem;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.status-active { background: #c6f6d5; color: #22543d; }
.status-inactive { background: #fed7d7; color: #822727; }

/* INFO SECTION */
.class-info {
    padding: 10px 20px;
    flex: 1;
}

/* Teacher Section */
.teacher-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
}

.teacher-row i {
    font-size: 1.2rem;
    color: #a0aec0;
}

.teacher-row span {
    font-weight: 500;
    color: #4a5568;
    font-size: 0.95rem;
}
.teacher-row span.unassigned {
    color: #e53e3e;
    font-style: italic;
}

/* Stats Grid */
.class-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-item small {
    color: #718096;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

.detail-item strong {
    color: #2d3748;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-item i {
    color: #667eea;
    font-size: 0.9rem;
}

/* FOOTER ACTIONS */
.class-footer {
    padding: 15px 20px;
    background: #fcfcfc;
    border-top: 1px solid #f0f2f5;
    display: flex;
    gap: 10px;
}

.class-footer .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    border-radius: 8px;
    transition: transform 0.2s;
}

.class-footer .btn:hover {
    transform: translateY(-2px);
}

/* Loading Skeleton */
.class-card.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}
@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =========================
   TABLES & LISTS
========================= */
.table-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-top: 20px;
    border: 1px solid #f0f2f5;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.data-table thead th {
    background: #f8f9fa;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 15px;
    border: none;
    letter-spacing: 0.5px;
}

.data-table tbody tr {
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    transition: all 0.2s ease;
}

.data-table tbody tr:hover {
    transform: scale(1.005);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.data-table td {
    padding: 15px;
    vertical-align: middle;
    border-top: 1px solid #f0f2f5;
    border-bottom: 1px solid #f0f2f5;
    color: #444;
    font-size: 0.95rem;
}

/* Rounded corners for rows */
.data-table td:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    border-left: 1px solid #f0f2f5;
}
.data-table td:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    border-right: 1px solid #f0f2f5;
}

/* Table Avatar Fix */
.table-avatar {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Action Buttons */
.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0 2px;
    transition: transform 0.2s;
}
.action-btn:hover { transform: scale(1.1); }
.btn-edit { background: #fff3cd; color: #856404; }
.btn-doc { background: #d1ecf1; color: #0c5460; }
.btn-del { background: #f8d7da; color: #721c24; }

/* =========================
   FORMS & INPUTS
========================= */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.5rem;
    display: block;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 768px) {
    .form-row { grid-template-columns: 1fr; }
}

/* Search Bar */
.search-wrapper {
    position: relative;
    max-width: 400px;
    width: 100%;
}
.search-input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 2px solid #eef0f7;
    border-radius: 50px;
    font-size: 15px;
    outline: none;
}
.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
}

/* =========================
   MODAL STYLES
========================= */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    overflow-y: auto;
}

.modal-content {
    background: white;
    margin: 3rem auto;
    padding: 2rem;
    border-radius: 16px;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    width: 90%;
}

.modal-content.wide-modal {
    max-width: 750px;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    margin: -2rem -2rem 2rem -2rem;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 { margin: 0; font-size: 1.25rem; }

.close-modal {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.close-modal:hover { background: rgba(255,255,255,0.4); }

/* =========================
   BUTTONS
========================= */
.btn {
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-success { background: #28a745; color: white; }
.btn-primary { background: #007bff; color: white; }
.btn-danger { background: #dc3545; color: white; }
.btn-warning { background: #ffc107; color: #212529; }
.btn-info { background: #17a2b8; color: white; }

.btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* Block Button */
.btn-block {
    display: block;
    width: 100%;
}

/* =========================
   UTILITIES
========================= */
.text-center { text-align: center; }
.text-success { color: #28a745; }
.text-danger { color: #dc3545; }
.text-muted { color: #6c757d; }

.hidden { display: none; }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}
.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #dee2e6;
}

/* Student List in Modal */
.student-list-group {
    list-style: none;
    padding: 0;
}
.student-list-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}
.student-list-item:hover { background: #f8f9fa; }
.student-avatar-small { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; margin-right: 10px; }

/* =========================
   DASHBOARD HEADER MODERN
========================= */
.dashboard-header-modern {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-left: 5px solid #667eea;
    flex-wrap: wrap;
    gap: 15px;
}

.header-text h1 {
    font-size: 1.6rem;
    color: #1a202c;
    font-weight: 700;
    margin-bottom: 2px;
}

.header-text p {
    color: #718096;
    font-size: 0.9rem;
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Modern Search Bar */
.modern-search-wrapper {
    position: relative;
    width: 320px;
}

.modern-search-input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 0.95rem;
    color: #4a5568;
    outline: none;
    transition: all 0.3s ease;
}

.modern-search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
}

/* Add New Button */
.btn-add-new {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s;
    box-shadow: 0 4px 6px rgba(40, 167, 69, 0.2);
}

.btn-add-new:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

/* =========================
   MODERN CLASS CARD
========================= */
.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    padding: 10px 0;
}

.class-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f2f5;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.class-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.class-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.15);
}

/* Header Section */
.class-header {
    padding: 20px 20px 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.class-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 5px 0;
}

.class-code {
    background: #ebf4ff;
    color: #5a67d8;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge {
    font-size: 0.75rem;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
}
.status-active { background: #c6f6d5; color: #22543d; }
.status-inactive { background: #fed7d7; color: #822727; }

/* Info Section */
.class-info {
    padding: 10px 20px;
    flex: 1;
}

.teacher-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
}

.teacher-row i {
    font-size: 1.2rem;
    color: #a0aec0;
}
.teacher-row span { font-weight: 500; color: #4a5568; }
.teacher-row span.unassigned { color: #e53e3e; font-style: italic; }

/* Stats Grid */
.class-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-item small {
    color: #718096;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

.detail-item strong {
    color: #2d3748;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-item i { color: #667eea; font-size: 0.9rem; }

/* Footer Buttons */
.class-footer {
    padding: 15px 20px;
    background: #fcfcfc;
    border-top: 1px solid #f0f2f5;
    display: flex;
    gap: 10px;
}

.class-footer .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    border-radius: 8px;
    transition: transform 0.2s;
}
.class-footer .btn:hover { transform: translateY(-2px); }

/* Mobile Responsive */
@media (max-width: 768px) {
    .dashboard-header-modern { flex-direction: column; align-items: stretch; }
    .header-actions { flex-direction: column; width: 100%; }
    .modern-search-wrapper { width: 100%; }
    .btn-add-new { width: 100%; justify-content: center; }
}
/* =========================
   TEACHER CARD DESIGN FIX
========================= */

/* 1. Grid Layout for Teachers */
#teachersGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

/* 2. Main Card Styling */
.teacher-card {
    background: white;
    border-radius: 16px;
    padding: 25px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f2f5;
    text-align: center;
    transition: all 0.3s ease;
    position: relative; /* Badge positioning ke liye zaroori */
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

.teacher-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.15);
}

/* 3. Header Area (Avatar + Badge) */
.teacher-header {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    position: relative;
}

/* ✅ IMAGE FIX: Photo ko control karna */
.teacher-avatar {
    width: 100px;             /* Fixed width */
    height: 100px;            /* Fixed height */
    object-fit: cover;        /* Photo stretch nahi hogi */
    object-position: top;     /* Chehra focus mein rahega */
    border-radius: 50%;       /* Gol (Circle) */
    border: 4px solid #fff;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
    background-color: #f7fafc;
}

/* 4. Status Badge (Active/Inactive) - Top Right Corner */
.teacher-card .status-badge {
    position: absolute;
    top: -15px;
    right: -10px;
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* 5. Teacher Info Text */
.teacher-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d3748;
    margin: 5px 0;
}

.teacher-subject {
    background: #ebf4ff;
    color: #5a67d8;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
}

.teacher-info p {
    color: #718096;
    font-size: 0.9rem;
    margin: 5px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.teacher-info hr {
    border: 0;
    border-top: 1px solid #f0f2f5;
    margin: 15px 0;
    width: 100%;
}

/* 6. Action Buttons */
.teacher-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: 15px;
}

.teacher-actions .btn {
    flex: 1;
    padding: 8px 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================
   DASHBOARD SPECIFIC FIXES
========================= */

/* 1. Welcome Banner (Gradient Box) */
.welcome-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 30px 40px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
}

.banner-content h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.banner-content p {
    font-size: 1rem;
    opacity: 0.9;
}

.date-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 15px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
    margin-top: 15px;
    backdrop-filter: blur(5px);
}

.banner-icon {
    font-size: 5rem;
    opacity: 0.15;
    /* transform: rotate(-15deg); */
    position: absolute;
    right: 30px;
    /* bottom: -10px; */
}

/* 2. Stat Cards Icon Colors */
/* Dashboard HTML me humne .icon-box use kiya hai, uska CSS yahan hai */

.icon-box {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.icon-box i {
    font-size: 1.8rem !important; /* Force size */
    color: inherit; /* Box ke color se text color lega */
    margin: 0 !important;
}

/* Colors for Icons */
.icon-box.blue { background: #e3f2fd; color: #2196f3; }
.icon-box.green { background: #e8f5e9; color: #4caf50; }
.icon-box.red { background: #ffebee; color: #ef5350; }
.icon-box.purple { background: #f3e5f5; color: #9c27b0; }

/* Stat Card Layout Update */
.stat-card {
    display: flex !important; /* Override grid */
    align-items: center;
    padding: 20px !important;
}

/* 3. Recent Activities Section */
.dashboard-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-top: 25px;
    border: 1px solid #f0f2f5;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.section-header h2 {
    font-size: 1.25rem;
    color: #2d3748;
    margin: 0;
}

/* Activity Items */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-radius: 8px;
    transition: background 0.2s;
    border-bottom: 1px solid #f9f9f9;
}
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: #f8f9fa; }

/* 4. Layout Columns Helper */
.left-column { flex: 2; }
.right-column { flex: 1; }

/* 5. Quick Actions Button Text Fix */
.action-btn {
    text-decoration: none; /* Link underline hatana */
}

/* new code */
/* =========================
   TEXT OVERFLOW FIXES
========================= */

/* 1. Global Fix: Lamba text agli line mein toat jaye */
p, h1, h2, h3, h4, h5, span, div, td {
    overflow-wrap: break-word; /* Text ko box ke andar rakhega */
    word-wrap: break-word;     /* Purane browsers ke liye support */
}

/* 2. Teacher & Class Card Fixes */
/* Agar naam bohot lamba ho to '...' dikhaye */
.teacher-info h3, 
.class-header h3,
.action-info h4 {
    white-space: nowrap;       /* Ek hi line mein rakho */
    overflow: hidden;          /* Jo bahar nikle use chupao */
    text-overflow: ellipsis;   /* '...' dikhao */
    max-width: 100%;           /* Box se zyada chouda na ho */
    display: block;
}

/* 3. Table Fixes (Finance/Students) */
.data-table td {
    max-width: 200px;          /* Column ki choudai limit karein */
    white-space: normal;       /* Text ko wrap hone dein */
}

/* 4. Recent Activities Fix */
.activity-item {
    align-items: flex-start;   /* Icon aur text ko top par align karein */
}

.activity-item div {
    min-width: 0;              /* Flexbox ke andar text wrap hone ke liye zaroori */
}

/* 5. Teacher Card Subject Badge */
.teacher-subject {
    max-width: 90%;            /* Badge ko card se bahar jane se roke */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}
.uname
        {

            display: flex;
            margin: auto;
            padding: 10px;
            border: #2d3748;
            border: 1px solid white;
            /* border-radius: 10px; */
            border-top-left-radius: 8px;
            border-bottom-left-radius: 8px;


        }
        .uname a
        {
            color: white;
            margin-right: 10PX;

            /* padding: 8px; */

        }
        .btn-logout
        {
            /* background: #413232; */
            border: none;
            color: rgb(11, 11, 11);
            padding: 15px 15px;
            border-top-right-radius: 8px;
            border-bottom-right-radius: 8px;
            cursor: pointer;
            font-size: 1rem;

        }

        /* to hide data in .dashbord */
        