/* ============== IMPORT GOOGLE FONT ============== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ============== FORCE ALL MODALS TO HIDE BY DEFAULT ============== */
#student-modal,
#edit-student-modal,
#view-bill-modal,
#add-deposit-modal,
#deposit-settings-modal,
#add-ds-modal,
#edit-ds-modal,
#deduct-meal-modal,       
#recharge-ds-modal,
#bulk-leave-modal { 
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.7) !important;
    z-index: 9999999 !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
}

/* Update the "Show" logic to allow them to open */
/* We use the .show class (added by JS) OR the inline style check */
#student-modal.show,
#bulk-leave-modal.show,
#edit-student-modal.show,
#view-bill-modal.show,
#add-deposit-modal.show,
#deposit-settings-modal.show,
#add-ds-modal.show,
#edit-ds-modal.show,
#recharge-ds-modal.show,
#deduct-meal-modal.show,
#student-modal[style*="display: flex"],
#edit-student-modal[style*="display: flex"],
#view-bill-modal[style*="display: flex"],
#add-deposit-modal[style*="display: flex"],
#deposit-settings-modal[style*="display: flex"],
#add-ds-modal[style*="display: flex"],
#edit-ds-modal[style*="display: flex"],
#recharge-ds-modal[style*="display: flex"],
#deduct-meal-modal[style*="display: flex"] {   
    display: flex !important;
}


.modal-content-new {
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
    max-width: 900px !important;
    width: 100% !important;
    max-height: 90vh !important;
    overflow: hidden !important;
    position: relative !important;
    z-index: 10000000 !important;
    display: flex !important;
    flex-direction: column !important;
}

.modal-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: transparent !important;
    z-index: 1 !important;
}

.modal-content-new {
    z-index: 2 !important;
}


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

/* ============== FORCE EVERYTHING ============== */
.pgcrmi-admin-wrapper,
.pgcrmi-admin-wrapper *,
.pgcrmi-student-wrapper,
.pgcrmi-student-wrapper *,
.pgcrmi-admin-wrapper input,
.pgcrmi-admin-wrapper select,
.pgcrmi-admin-wrapper textarea,
.pgcrmi-admin-wrapper button,
.pgcrmi-admin-wrapper label,
.pgcrmi-admin-wrapper h1,
.pgcrmi-admin-wrapper h2,
.pgcrmi-admin-wrapper h3,
.pgcrmi-admin-wrapper h4,
.pgcrmi-admin-wrapper p,
.pgcrmi-admin-wrapper span,
.pgcrmi-admin-wrapper div,
.pgcrmi-admin-wrapper td,
.pgcrmi-admin-wrapper th {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* ============== CSS VARIABLES ============== */
:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
}

/* ============== MAIN WRAPPER ============== */
.pgcrmi-admin-wrapper,
.pgcrmi-student-wrapper {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    min-height: 100vh;
    padding: 0 !important;
    margin: 0 !important;
}

/* ============== MODERN HEADER DESIGN ============== */
.glass-header-new {
    background: white !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
}

.header-brand {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 20px 40px !important;
    border-bottom: 1px solid #f3f4f6 !important;
}

.brand-logo {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
}

.logo-icon {
    font-size: 42px !important;
    background: linear-gradient(135deg, #667eea, #764ba2);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand-text h1 {
    margin: 0 !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
}

.admin-badge-new {
    background: #f3f4f6 !important;
    color: #667eea !important;
    padding: 4px 12px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    display: inline-block;
    width: fit-content;
}

.btn-logout {
    padding: 10px 20px !important;
    background: white !important;
    border: 2px solid #e5e7eb !important;
    color: #6b7280 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.btn-logout:hover {
    background: #ef4444 !important;
    color: white !important;
    border-color: #ef4444 !important;
    transform: translateY(-2px);
}

.btn-logout span {
    font-size: 16px;
}

/* ============== MODERN STATS CARDS ============== */
.stats-cards {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: 0 !important;
    padding: 0 !important;
    background: #f9fafb !important;
}

.stat-card-new {
    background: white !important;
    padding: 24px 32px !important;
    display: flex !important;
    align-items: center !important;
    gap: 20px !important;
    border-right: 1px solid #f3f4f6 !important;
    transition: all 0.3s !important;
    position: relative;
}

.stat-card-new:last-child {
    border-right: none !important;
}

.stat-card-new:hover {
    background: #fafbfc !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

.stat-card-new::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.stat-card-new:hover::after {
    transform: scaleX(1);
}

.stat-icon-new {
    width: 56px !important;
    height: 56px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.stat-content {
    flex: 1;
}

.stat-label-new {
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    color: #9ca3af !important;
    margin-bottom: 6px !important;
}

.stat-value-new {
    font-size: 28px !important;
    font-weight: 800 !important;
    color: #1f2937 !important;
    line-height: 1.2 !important;
    margin-bottom: 6px !important;
}

.stat-trend {
    font-size: 11px !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    width: fit-content;
}

.stat-trend.positive {
    background: #d1fae5 !important;
    color: #065f46 !important;
}

.stat-trend.negative {
    background: #fee2e2 !important;
    color: #991b1b !important;
}

.stat-trend.neutral {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
}

.stat-trend svg {
    width: 12px;
    height: 12px;
}

/* ============== RESPONSIVE HEADER ============== */
@media (max-width: 1024px) {
    .stats-cards {
        grid-template-columns: 1fr !important;
    }
    
    .stat-card-new {
        border-right: none !important;
        border-bottom: 1px solid #f3f4f6 !important;
    }
    
    .stat-card-new:last-child {
        border-bottom: none !important;
    }
}

@media (max-width: 768px) {
    .header-brand {
        flex-direction: column !important;
        gap: 16px !important;
        padding: 20px !important;
    }
    
    .brand-logo {
        width: 100%;
        justify-content: center;
    }
    
    .btn-logout {
        width: 100%;
        justify-content: center;
    }
    
    .stat-card-new {
        padding: 20px !important;
    }
}


/* ============== CONTENT PADDING ============== */
.pgcrmi-admin-wrapper > *:not(.glass-header):not(.pgcrmi-tabs) {
    padding: 30px 40px !important;
}

/* ============== TABS ============== */
.pgcrmi-tabs {
    display: flex !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 20px 40px 0 40px !important;
    background: transparent !important;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    border-radius: 10px !important;
    transition: all 0.3s !important;
    opacity: 0.8;
}

.tab-btn:hover {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-2px);
}

.tab-btn.active {
    opacity: 1 !important;
    background: white !important;
    color: #667eea !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block !important;
}

/* ============== GLASS PANELS ============== */
.glass-panel {
    background: white !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 16px !important;
    padding: 30px !important;
    margin-bottom: 24px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

.glass-panel h3,
.glass-panel h4 {
    color: #fff !important;
    margin: 0 0 20px 0 !important;
    font-weight: 700 !important;
}

.glass-panel p {
    color: #4b5563 !important;
}

/* ============== FORMS ============== */
.glass-form,
.glass-form * {
    color: #1f2937 !important;
}

.glass-form label,
.form-group label {
    display: block !important;
    margin-bottom: 8px !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    font-size: 13px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px !important;
    margin-bottom: 20px !important;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px !important;
    margin-bottom: 20px !important;
}

.form-group {
    margin-bottom: 20px !important;
}

/* ============== INPUT FIELDS - FORCED STYLING ============== */
.pgcrmi-admin-wrapper input[type="text"],
.pgcrmi-admin-wrapper input[type="email"],
.pgcrmi-admin-wrapper input[type="password"],
.pgcrmi-admin-wrapper input[type="date"],
.pgcrmi-admin-wrapper input[type="month"],
.pgcrmi-admin-wrapper input[type="number"],
.pgcrmi-admin-wrapper input[type="tel"],
.pgcrmi-admin-wrapper select,
.pgcrmi-admin-wrapper textarea,
.pgcrmi-student-wrapper input[type="text"],
.pgcrmi-student-wrapper input[type="email"],
.pgcrmi-student-wrapper input[type="password"],
.pgcrmi-student-wrapper input[type="date"],
.pgcrmi-student-wrapper select,
.pgcrmi-student-wrapper textarea {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 10px !important;
    background: white !important;
    color: #1f2937 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: all 0.3s !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* Dropdown Arrow */
.pgcrmi-admin-wrapper select,
.pgcrmi-student-wrapper select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231f2937' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 12px !important;
    padding-right: 40px !important;
}

.pgcrmi-admin-wrapper input:focus,
.pgcrmi-admin-wrapper select:focus,
.pgcrmi-admin-wrapper textarea:focus,
.pgcrmi-student-wrapper input:focus,
.pgcrmi-student-wrapper select:focus,
.pgcrmi-student-wrapper textarea:focus {
    outline: none !important;
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

.pgcrmi-admin-wrapper input::placeholder,
.pgcrmi-admin-wrapper textarea::placeholder,
.pgcrmi-student-wrapper input::placeholder,
.pgcrmi-student-wrapper textarea::placeholder {
    color: #9ca3af !important;
}

.pgcrmi-admin-wrapper input:disabled,
.pgcrmi-admin-wrapper input[readonly] {
    background: #f3f4f6 !important;
    cursor: not-allowed !important;
    color: #6b7280 !important;
}

/* ============== BUTTONS ============== */
.btn-primary,
.btn-secondary,
.btn-icon,
.btn-small {
    padding: 12px 24px !important;
    border: none !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    font-size: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
}

.btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
}

.btn-secondary {
    background: white !important;
    color: #667eea !important;
    border: 2px solid #667eea !important;
}

.btn-secondary:hover {
    background: #667eea !important;
    color: white !important;
}

.btn-icon {
    padding: 8px 12px !important;
    background: #f3f4f6 !important;
    border: 1px solid #e5e7eb !important;
    font-size: 18px !important;
    cursor: pointer !important;
    margin: 0 4px !important;
    border-radius: 8px !important;
    color: #1f2937 !important;
}

.btn-icon:hover {
    background: #667eea !important;
    color: white !important;
    border-color: #667eea !important;
}

.full-width {
    width: 100% !important;
}

/* ============== TABLES ============== */
.table-wrapper {
    overflow-x: auto;
    border-radius: 12px !important;
    background: white !important;
    border: 1px solid #e5e7eb !important;
}

.pgcrmi-admin-wrapper table,
.pgcrmi-student-wrapper table {
    width: 100% !important;
    border-collapse: collapse !important;
    color: #1f2937 !important;
}

.pgcrmi-admin-wrapper thead,
.pgcrmi-student-wrapper thead {
    background: #f9fafb !important;
    border-bottom: 2px solid #e5e7eb !important;
}

.pgcrmi-admin-wrapper th,
.pgcrmi-admin-wrapper td,
.pgcrmi-student-wrapper th,
.pgcrmi-student-wrapper td {
    padding: 16px !important;
    text-align: left !important;
    border-bottom: 1px solid #f3f4f6 !important;
    color: #1f2937 !important;
}

.pgcrmi-admin-wrapper th,
.pgcrmi-student-wrapper th {
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 11px !important;
    letter-spacing: 0.5px !important;
    color: #6b7280 !important;
}

.pgcrmi-admin-wrapper tbody tr:hover,
.pgcrmi-student-wrapper tbody tr:hover {
    background: #f9fafb !important;
}

.pgcrmi-admin-wrapper tbody td,
.pgcrmi-student-wrapper tbody td {
    color: #1f2937 !important;
    font-weight: 500 !important;
}

.pgcrmi-student-wrapper tbody td:hover {
    color: black !important;
    font-weight: 500 !important;
}

/* ============== BADGES ============== */
.badge {
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    display: inline-block !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.badge-pg { background: #dbeafe !important; color: #1e40af !important; }
.badge-crmi { background: #fce7f3 !important; color: #be185d !important; }
.badge-faculty { background: #f3e8ff !important; color: #7c3aed !important; }
.badge-success { background: #d1fae5 !important; color: #065f46 !important; }
.badge-warning { background: #fef3c7 !important; color: #92400e !important; }
.badge-danger { background: #fee2e2 !important; color: #991b1b !important; }
.badge-info { background: #dbeafe !important; color: #1e40af !important; }

/* ============== STATS CARDS ============== */
.glass-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px !important;
    margin-bottom: 30px !important;
}

.glass-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px !important;
}

.glass-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px !important;
    margin-bottom: 30px !important;
}

.stat-card {
    text-align: center !important;
    padding: 30px 20px !important;
}

.stat-icon {
    font-size: 48px !important;
    margin-bottom: 15px !important;
}

.stat-card h3 {
    color: #6b7280 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    margin-bottom: 10px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.big-number {
    font-size: 36px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin: 10px 0 !important;
}

.trend {
    font-size: 12px !important;
    padding: 4px 12px !important;
    border-radius: 12px !important;
    display: inline-block !important;
    font-weight: 600 !important;
}

.trend.positive { background: #d1fae5 !important; color: #065f46 !important; }
.trend.negative { background: #fee2e2 !important; color: #991b1b !important; }

/* ============== PANEL HEADER ============== */
.panel-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 24px !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
}

.panel-header h3 {
    margin: 0 !important;
    color: #fff !important;
}

.search-bar input {
    padding: 10px 16px !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 8px !important;
    background: white !important;
    color: #1f2937 !important;
    width: 300px !important;
    font-weight: 500 !important;
}

/* ============== QUICK ACTIONS - FIX TEXT VISIBILITY ============== */
.quick-actions {
    display: grid !important;
    gap: 12px !important;
}

.action-btn {
    background: #f9fafb !important;
    border: 2px solid #e5e7eb !important;
    color: #1f2937 !important;
    padding: 16px 20px !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    text-align: left !important;
    transition: all 0.3s !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.action-btn:hover {
    background: #667eea !important;
    color: white !important;
    border-color: #667eea !important;
    transform: translateX(5px) !important;
}

.action-btn span {
    font-size: 24px !important;
}

/* ============== ACTIVITY LIST ============== */
.activity-list {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    padding: 12px !important;
    border-bottom: 1px solid #f3f4f6 !important;
    color: #1f2937 !important;
}

.activity-time {
    font-size: 11px !important;
    color: #9ca3af !important;
    display: block !important;
    margin-bottom: 5px !important;
    font-weight: 600 !important;
}

.activity-text {
    color: #4b5563 !important;
    font-weight: 500 !important;
}

/* ============== LOGIN PAGE ============== */
.login-view {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 100vh !important;
    padding: 20px !important;
}

.login-box {
    max-width: 450px !important;
    width: 100% !important;
    background: white !important;
}

.login-header {
    text-align: center !important;
    margin-bottom: 30px !important;
}

.login-header h1 {
    color: #1f2937 !important;
    margin-bottom: 10px !important;
    font-size: 32px !important;
}

.login-header h2 {
    color: #6b7280 !important;
    font-weight: 500 !important;
    font-size: 18px !important;
}

/* ============== ALERTS ============== */
.alert {
    padding: 16px 20px !important;
    border-radius: 10px !important;
    margin-bottom: 20px !important;
    font-weight: 500 !important;
}

.alert-success { background: #d1fae5 !important; border: 2px solid #10b981 !important; color: #065f46 !important; }
.alert-error { background: #fee2e2 !important; border: 2px solid #ef4444 !important; color: #991b1b !important; }
.alert-warning { background: #fef3c7 !important; border: 2px solid #f59e0b !important; color: #92400e !important; }

/* ============== MISC ============== */
.empty-state {
    text-align: center !important;
    padding: 40px !important;
    color: #9ca3af !important;
    font-style: italic !important;
}

.help-text {
    font-size: 12px !important;
    color: #6b7280 !important;
    margin-top: 5px !important;
    margin-bottom: 10px !important;
    font-weight: 500 !important;
}

.text-danger { color: #ef4444 !important; }
.text-success { color: #10b981 !important; }

/* ============== RESPONSIVE ============== */
@media (max-width: 768px) {
    .glass-header {
        flex-direction: column !important;
        padding: 20px !important;
    }
    
    .header-stats {
        flex-direction: column !important;
        width: 100% !important;
    }
    
    .pgcrmi-tabs {
        padding: 15px 20px 0 20px !important;
    }
    
    .pgcrmi-admin-wrapper > *:not(.glass-header):not(.pgcrmi-tabs) {
        padding: 20px !important;
    }
    
    .search-bar input {
        width: 100% !important;
    }
}

/* ============== STUDENT PANEL SPECIFIC ============== */
.student-header {
    background: white !important;
}

.profile-info {
    color: #1f2937 !important;
}

.info-row {
    display: flex !important;
    justify-content: space-between !important;
    padding: 12px 0 !important;
    border-bottom: 1px solid #f3f4f6 !important;
}

.info-row .label {
    font-weight: 500 !important;
    color: #6b7280 !important;
}

.info-row .value {
    font-weight: 600 !important;
    color: #1f2937 !important;
}

.qr-code {
    width: 150px;
    height: 150px;
    background: white !important;
    padding: 10px;
    border-radius: 12px;
}

.certificate-section {
    text-align: center;
}
/* ============== TABLES - OPTIMIZED FONT SIZES ============== */
.table-wrapper {
    overflow-x: auto;
    border-radius: 12px !important;
    background: white !important;
    border: 1px solid #e5e7eb !important;
}

.pgcrmi-admin-wrapper table,
.pgcrmi-student-wrapper table {
    width: 100% !important;
    border-collapse: collapse !important;
    color: #1f2937 !important;
}

.pgcrmi-admin-wrapper thead,
.pgcrmi-student-wrapper thead {
    background: #f9fafb !important;
    border-bottom: 2px solid #e5e7eb !important;
}

.pgcrmi-admin-wrapper th,
.pgcrmi-student-wrapper th {
    padding: 12px 16px !important;
    text-align: left !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 10px !important; /* Reduced from 11px */
    letter-spacing: 0.8px !important;
    color: #9ca3af !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.pgcrmi-admin-wrapper td,
.pgcrmi-student-wrapper td {
    padding: 14px 16px !important;
    text-align: left !important;
    border-bottom: 1px solid #f3f4f6 !important;
    color: #1f2937 !important;
    font-weight: 500 !important;
    font-size: 13px !important; /* Reduced from 14px */
    line-height: 1.4 !important;
}

/* Mess ID column - slightly bolder but not too big */
.pgcrmi-admin-wrapper td strong,
.pgcrmi-student-wrapper td strong {
    font-weight: 700 !important;
    font-size: 13px !important;
    color: #667eea !important;
}

/* Name column */
.pgcrmi-admin-wrapper tbody td:nth-child(2),
.pgcrmi-student-wrapper tbody td:nth-child(2) {
    font-size: 13px !important;
    font-weight: 600 !important;
}

/* Make badges smaller */
.badge {
    padding: 4px 10px !important;
    border-radius: 12px !important;
    font-size: 10px !important; /* Reduced from 11px */
    font-weight: 700 !important;
    display: inline-block !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.pgcrmi-admin-wrapper tbody tr:hover,
.pgcrmi-student-wrapper tbody tr:hover {
    background: #f9fafb !important;
}

/* ============== PANEL HEADERS - SMALLER TEXT ============== */
.glass-panel h3 {
    color: #fff !important;
    margin: 0 0 20px 0 !important;
    font-weight: 700 !important;
    font-size: 18px !important; /* Reduced from 20px */
}

.panel-header h3 {
    margin: 0 !important;
    color: #fff !important;
    font-size: 18px !important; /* Reduced from 20px */
}

/* Search bar text size */
.search-bar input {
    padding: 10px 16px !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 8px !important;
    background: white !important;
    color: #1f2937 !important;
    width: 300px !important;
    font-weight: 500 !important;
    font-size: 13px !important; /* Reduced from 14px */
}

/* Button text sizes */
.btn-primary,
.btn-secondary,
.btn-icon,
.btn-small {
    font-size: 13px !important; /* Reduced from 14px */
}

/* ============== STUDENT MANAGEMENT HEADER ============== */
.glass-panel .panel-header > div h3 {
    font-size: 18px !important;
}

.glass-panel .panel-header > div .help-text {
    font-size: 12px !important;
}

/* ============== COMPACT TABLE VIEW ============== */
/* For even more compact table, uncomment this section */
/*
.pgcrmi-admin-wrapper td,
.pgcrmi-student-wrapper td {
    padding: 10px 12px !important;
    font-size: 12px !important;
}

.pgcrmi-admin-wrapper th,
.pgcrmi-student-wrapper th {
    padding: 10px 12px !important;
    font-size: 9px !important;
}
*/

/* ============== MAKE "ALL STUDENTS (1)" HEADING SMALLER ============== */
.glass-panel h3 {
    font-size: 18px !important;
}

/* Mobile phone numbers - monospace font for better readability */
.pgcrmi-admin-wrapper td:nth-child(7),
.pgcrmi-student-wrapper td:nth-child(7) {
    font-family: 'Courier New', monospace !important;
    font-size: 12px !important;
}
/* ============== MODERN MODAL STYLES ============== */
.pgcrmi-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 99999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
}

.modal-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.75) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

.modal-content-new {
    position: relative !important;
    background: white !important;
    border-radius: 20px !important;
    width: 100% !important;
    max-width: 650px !important;
    max-height: 85vh !important;
    overflow: hidden !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4) !important;
    animation: modalZoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

@keyframes modalZoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============== EDIT MODAL STYLING ============== */
.modal-header-new {
    padding: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-new h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.modal-close-new {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close-new:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body-new {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(90vh - 180px);
}

.modal-footer-new {
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #f9fafb;
    border-radius: 0 0 12px 12px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input[readonly] {
    background: #f3f4f6;
    cursor: not-allowed;
}

.btn-secondary {
    padding: 10px 20px;
    background: #6b7280;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-primary {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}


/* Student Detail Rows */
.student-detail-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
}

.student-detail-card {
    background: #f9fafb !important;
    padding: 16px !important;
    border-radius: 12px !important;
    border: 2px solid #f3f4f6 !important;
    transition: all 0.3s !important;
}

.student-detail-card:hover {
    border-color: #667eea !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1) !important;
}

.detail-label-new {
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: #9ca3af !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 6px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.detail-value-new {
    color: #1f2937 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    word-break: break-word !important;
}

.detail-value-new.highlight {
    color: #667eea !important;
    font-weight: 700 !important;
    font-size: 16px !important;
}

.detail-icon {
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .student-detail-grid {
        grid-template-columns: 1fr !important;
    }
    
    .modal-content-new {
        max-width: 95% !important;
    }
}

/* ============== FORM GRIDS (FIXED) ============== */
.form-grid-4 {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    margin-bottom: 20px !important;
}

.form-grid-3 {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    margin-bottom: 20px !important;
}

.form-grid-2 {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
    margin-bottom: 20px !important;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .form-grid-4, .form-grid-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .form-grid-4, .form-grid-3, .form-grid-2 {
        grid-template-columns: 1fr !important;
    }
}

/* ============== FORM SECTION STYLING ============== */

/* 1. Wrapper for each section */
.form-section {
    margin-bottom: 30px !important;       
    padding-bottom: 25px !important;      
    border-bottom: 1px dashed #d1d5db !important; 
}

/* Remove border from the last section so it doesn't clash with buttons */
.form-section:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 20px !important;
}

/* 2. The Title Row (Icon + Text) */
.section-title {
    display: flex !important;             
    align-items: center !important;       
    gap: 12px !important;                 
    margin-bottom: 25px !important;
}

/* 3. The Icon Box */
.section-icon {
    width: 36px !important;
    height: 36px !important;
    background: #eef2ff !important;       
    color: #667eea !important;            
    border-radius: 8px !important;        
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;           
    flex-shrink: 0 !important;            
}

/* 4. The Heading Text */
.section-title h5 {
    margin: 0 !important;                 
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #374151 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* 5. Required Asterisk */
.required {
    color: #ef4444 !important;
    margin-left: 4px !important;
}


.registration-card {
    /* 1. Limit the height so it doesn't run off the screen */
    max-height: 85vh; /* Uses 85% of the viewport height */

    /* 2. Enable vertical scrolling if content is too long */
    overflow-y: auto; 

    /* 3. (Optional) Ensure it stays on top correctly if it uses fixed positioning */
    position: relative; 
}

/* Remove default browser icon to use our custom emoji */
input[type="date"]::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
    z-index: 1;
}

/* Card Hover Effects */
.att-card {
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    padding: 12px 20px;
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    transition: all 0.2s ease;
}
.att-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-color: #a5b4fc;
}


input[type="date"] {
    appearance: textfield;       /* Standard property (Fixes the error) */
    -moz-appearance: textfield;  /* Firefox fallback */
    -webkit-appearance: none;    /* Chrome/Safari removal of default UI */
    position: relative;
}

/* ============================================================
   FINAL "GHOST INPUT" FIX (High Specificity)
   ============================================================ */

/* 1. CONTAINER: The visible white box */
.pgcrmi-admin-wrapper .date-wrapper {
    position: relative !important;
    width: 200px !important;
    height: 42px !important;
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    overflow: hidden !important;
}

/* 2. ICON: Sits behind the input */
.pgcrmi-admin-wrapper .date-icon {
    position: absolute !important;
    left: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 16px !important;
    color: #6b7280 !important;
    z-index: 1 !important;
    pointer-events: none !important;
    line-height: 1 !important;
}

/* 3. INPUT: Invisible overlay but clickable */
/* Note: We use 'input.custom-date-picker' to beat the global rule */
.pgcrmi-admin-wrapper input.custom-date-picker {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    
    /* CRITICAL: Override global white background */
    background: transparent !important; 
    border: none !important;
    box-shadow: none !important;
    
    /* CRITICAL: Override global padding */
    padding: 0 !important; 
    padding-left: 40px !important; /* Push text past the icon */
    padding-right: 10px !important;
    
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #374151 !important;
    cursor: pointer !important;
    z-index: 5 !important;
    outline: none !important;
}

/* 4. CLICK TRIGGER: Stretches over the whole box */
.pgcrmi-admin-wrapper input.custom-date-picker::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: block !important;
}

/* 5. SEARCH BAR */
.pgcrmi-admin-wrapper .search-wrapper {
    position: relative !important;
    width: 240px !important;
    height: 42px !important;
}

.pgcrmi-admin-wrapper .search-icon-overlay {
    position: absolute !important;
    left: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #9ca3af !important;
    font-size: 16px !important;
    z-index: 2 !important;
    pointer-events: none !important;
}

.pgcrmi-admin-wrapper input#attendance_search {
    width: 100% !important;
    height: 100% !important;
    padding-left: 40px !important; /* Force text after icon */
    padding-right: 12px !important;
    background: white !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
}

/* ============== CUSTOM NOTIFICATIONS (TOASTS) ============== */
#pgcrmi-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000000;
    display: flex;
    flex-direction: column;
    gap: 10px;
	pointer-events: none;
}

.pgcrmi-toast {
    background: white;
    min-width: 300px;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 5px solid #ccc;
    font-weight: 500;
    font-size: 14px;
    color: #1f2937;
	pointer-events: auto;
}

.pgcrmi-toast.success { border-left-color: #10b981; }
.pgcrmi-toast.error { border-left-color: #ef4444; }
.pgcrmi-toast.info { border-left-color: #3b82f6; }

.toast-icon { font-size: 20px; }

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOutToast {
    from { opacity: 1; }
    to { opacity: 0; transform: translateY(-10px); }
}

/* ============== CUSTOM CONFIRM MODAL ============== */
#custom-confirm-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    z-index: 10000001;
    justify-content: center;
    align-items: center;
}

#custom-confirm-modal.show { display: flex; }

.confirm-box {
    background: white;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    animation: zoomIn 0.2s ease-out;
}

.confirm-icon {
    font-size: 40px;
    margin-bottom: 15px;
    display: block;
}

.confirm-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 10px;
}

.confirm-text {
    color: #6b7280;
    margin-bottom: 25px;
    line-height: 1.5;
}

.confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-confirm-yes {
    background: #667eea; color: white; border: none; padding: 10px 24px;
    border-radius: 8px; font-weight: 600; cursor: pointer;
}
.btn-confirm-no {
    background: #f3f4f6; color: #4b5563; border: 1px solid #e5e7eb; padding: 10px 24px;
    border-radius: 8px; font-weight: 600; cursor: pointer;
}

@keyframes zoomIn { from {transform: scale(0.9); opacity:0;} to {transform: scale(1); opacity:1;} }


/* ============== ATTENDANCE ============== */

/* 1. Fix the Date Input (No more cut-off text) */
#attendance_date {
    height: 40px !important;
    padding: 0 15px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    background: white !important;
    color: #1f2937 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    width: 160px !important;
    opacity: 1 !important; /* Make sure it's visible */
    position: static !important; /* Remove absolute positioning */
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
    cursor: pointer !important;
}

/* 2. Attendance Status Buttons */
.att-btn-group {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
    background: transparent;
}

.att-btn {
    padding: 6px 14px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    border: 1px solid #e5e7eb !important;
    background: white !important;
    color: #6b7280 !important;
    cursor: pointer !important;
    transition: all 0.15s ease-in-out !important;
    min-width: 65px !important;
    text-align: center !important;
}

/* Active: Present (Green) */
.active-present {
    background: #10b981 !important;
    color: white !important;
    border-color: #10b981 !important;
    box-shadow: 0 2px 5px rgba(16, 185, 129, 0.3) !important;
}

/* Active: Absent (Red) */
.active-absent {
    background: #ef4444 !important;
    color: white !important;
    border-color: #ef4444 !important;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.3) !important;
}

/* Hover effects */
.att-btn:hover:not(.active-present):not(.active-absent) {
    background: #f9fafb !important;
    border-color: #d1d5db !important;
    transform: translateY(-1px);
}
/* ============== HEADER CONTROLS ============== */

/* 1. Base Style (Inputs & Selects) */
.header-control {
    width: auto !important;
    min-width: 140px !important;
    height: 40px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    background-color: white !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #111827 !important; /* Force Black */
    cursor: pointer !important;
    position: relative !important;
    z-index: 20 !important;
    box-sizing: border-box !important;
}

/* 2. Specific Fix for DROPDOWNS (Select) */
select.header-control {
    line-height: normal !important;  /* CRITICAL: Restores text */
    padding-top: 10px !important;    /* Centers text vertically */
    padding-bottom: 10px !important;
    padding-left: 12px !important;
    padding-right: 35px !important;  /* Space for arrow */
    
    /* Custom Arrow Styling */
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23333%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 10px auto !important;
}

/* 3. Specific Fix for DATE INPUT */
input[type="date"].header-control {
    padding: 0 12px !important;
    line-height: 38px !important; /* Input handles this fine */
    font-family: inherit !important;
    font-weight: 600 !important;
}

/* Hover/Focus States */
.header-control:hover { border-color: #9ca3af !important; }
.header-control:focus { border-color: #667eea !important; outline: none !important; }


/* ============== FORCE RESET DATE PICKER (FIX OVERLAY BUG) ============== */

#attendance_date {
    /* Reset Positioning: Prevents it from covering other elements */
    position: static !important; 
    display: inline-block !important;
    
    /* Reset Size: Forces it to be small button size */
    width: auto !important;
    min-width: 150px !important;
    max-width: 180px !important;
    height: 40px !important;
    
    /* Visibility: Make sure it's visible and standard */
    opacity: 1 !important;
    z-index: 10 !important;
    
    /* text Styling */
    padding: 0 10px !important;
    font-family: inherit !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    color: #111827 !important;
    background: white !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    cursor: text !important;
}

/* Ensure container doesn't stretch it */
.date-wrapper {
    position: static !important;
    width: auto !important;
    display: inline-block !important;
}
/* Fix for Day Scholar Stats Layout */
#dayscholar .glass-grid-2 {
    display: flex !important; /* Use Flexbox instead of Grid for better control here */
    flex-wrap: wrap;
    gap: 20px;
}

#dayscholar .stat-card {
    flex: 1;
    min-width: 250px;
    background: white !important; /* Force white background */
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Redesign the Green/Blue borders */
#dayscholar .stat-card[style*="border-left:5px solid #10b981"] {
    border-left: 5px solid #10b981 !important;
    background: linear-gradient(to right, #ecfdf5 50%, white 50%) !important; /* Optional: Subtle gradient */
    background: #ecfdf5 !important;
}

#dayscholar .stat-card[style*="border-left:5px solid #3b82f6"] {
    border-left: 5px solid #3b82f6 !important;
    background: #eff6ff !important;
}

#dayscholar .stat-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

#dayscholar .stat-value {
    font-size: 32px;
    font-weight: 800;
}

/* MODERN CARD STYLES */
.modern-card {
    padding: 20px 25px !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
    border-radius: 16px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04) !important;
    border: 1px solid rgba(0,0,0,0.04) !important;
    transition: transform 0.2s ease;
}

.modern-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08) !important;
}

/* Header Row (Icon + Title + Dropdown) */
.card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    width: 100%;
    position: relative;
}

.card-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #6b7280 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 !important;
    flex-grow: 1;
    margin-left: 12px !important;
}

/* Icon Boxes */
.icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.icon-box.blue { background: #e0e7ff; color: #4338ca; }
.icon-box.green { background: #dcfce7; color: #15803d; }
.icon-box.red { background: #fee2e2; color: #b91c1c; }

/* Pill Dropdown */
.pill-select-wrapper {
    position: relative;
}
.pill-select {
    appearance: none;
    -webkit-appearance: none;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 20px !important;
    padding: 4px 12px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #4b5563 !important;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    outline: none !important;
}
.pill-select:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

/* Meal Split Layout */
.meal-split-layout {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 10px 0;
}
.split-col {
    text-align: center;
}
.split-label {
    font-size: 10px;
    font-weight: 700;
    color: #9ca3af;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 4px;
}
.split-value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}
.split-sub {
    font-size: 10px;
    color: #9ca3af;
}
.text-blue { color: #4338ca; }
.text-gray { color: #9ca3af; }

.vertical-divider {
    width: 1px;
    height: 40px;
    background: #e5e7eb;
}

/* Center Stat (Revenue/Pending) */
.center-stat {
    text-align: center;
    margin-top: 5px;
}
.big-number {
    font-size: 32px !important;
    font-weight: 800 !important;
    color: #111827 !important;
    letter-spacing: -0.5px;
}

/* Quick Actions Grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.qa-btn {
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 15px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.qa-btn:hover {
    background: white !important;
    border-color: #667eea !important;
    color: #667eea !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.qa-btn span { font-size: 20px; }

/* Activity List */
.activity-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px dashed #f3f4f6;
}
.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    margin-top: 6px;
    margin-right: 12px;
}
.activity-content {
    display: flex;
    flex-direction: column;
}
.activity-text { font-size: 13px; color: #374151; font-weight: 500; }
.activity-time { font-size: 11px; color: #9ca3af; }

/* ==========================================
   RE-DESIGNED PREMIUM DASHBOARD CARDS
   ========================================== */

.premium-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 20px !important;
    padding: 24px !important;
    position: relative; /* Essential for absolute positioning of dropdown */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    min-height: 200px; /* Taller card for better spacing */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.premium-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e1 !important;
}

/* --- 1. HEADER (Icon + Title) --- */
.premium-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px; /* More breathing room */
}

.premium-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

/* Icon Colors - Soft & Modern */
.icon-blue   { background: #eff6ff; color: #3b82f6; }
.icon-green  { background: #f0fdf4; color: #16a34a; }
.icon-orange { background: #fff7ed; color: #ea580c; }

.premium-title-group h3 {
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #64748b !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.premium-subtitle {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
    margin-top: 2px;
}

/* --- 2. FLOATING DROPDOWN (Fixes Overlap) --- */
.premium-actions {
    position: absolute;
    top: 24px;
    right: 24px;
}

.premium-select {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 30px 6px 12px; /* Extra right padding for arrow */
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    /* Custom Arrow SVG */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.premium-select:hover {
    background-color: #ffffff;
    border-color: #cbd5e1;
}

.premium-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* --- 3. MAIN VALUE (CENTERED) --- */
.premium-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically center */
    align-items: center;     /* Horizontally center */
    text-align: center;
}

.premium-value {
    font-size: 38px;
    font-weight: 800;
    color: #1e293b; /* Dark Slate for readability */
    letter-spacing: -1px;
    margin-bottom: 8px;
    line-height: 1.1;
}

/* --- 4. FOOTER / TRENDS --- */
.premium-footer {
    display: flex;
    justify-content: center;
    margin-top: auto;
}

.trend-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.trend-green { background: #dcfce7; color: #15803d; }
.trend-red   { background: #fee2e2; color: #b91c1c; }
.trend-blue  { background: #dbeafe; color: #1e40af; }

/* --- 5. MEAL SPLIT LAYOUT --- */
.meal-split-container {
    display: flex;
    width: 100%;
    justify-content: space-around;
    align-items: center;
    margin-top: 10px;
}

.meal-col {
    text-align: center;
}

.meal-num {
    font-size: 32px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1;
    display: block;
    margin-bottom: 4px;
}

.meal-lbl {
    font-size: 11px;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
}
.meal-divider {
    width: 1px;
    height: 40px;
    background: #e2e8f0;
}


MOBILE-CSS-ADDITIONS.css

/* ============================================================================
   MOBILE-OPTIMIZED STUDENT PANEL CSS
   Add these styles to pgcrmi-styles.css
   ============================================================================ */

/* Base Mobile Optimizations */
@media (max-width: 768px) {

    /* Force full-width on mobile */
    .pgcrmi-student-wrapper {
        width: 100% !important;
        padding: 0 !important;
        overflow-x: hidden;
    }

    /* Mobile-friendly login form */
    .login-view {
        padding: 15px !important;
    }

    .login-view .glass-panel {
        max-width: 100% !important;
        padding: 25px 20px !important;
    }

    /* Touch-friendly inputs */
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="number"],
    select,
    textarea {
        min-height: 48px !important;
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 12px 14px !important;
        touch-action: manipulation;
    }

    /* Touch-friendly buttons */
    button,
    .btn,
    a.button {
        min-height: 48px !important;
        padding: 14px 20px !important;
        font-size: 15px !important;
        touch-action: manipulation;
        cursor: pointer;
    }

    /* Responsive financial cards */
    .main-container > div:first-child {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    /* Better card spacing */
    .main-container > div {
        margin-bottom: 15px !important;
    }

    /* Mobile table wrapper */
    .desktop-table {
        display: none !important;
    }

    .mobile-cards {
        display: block !important;
    }

    /* Improve mobile card readability */
    .mobile-cards > div {
        font-size: 14px !important;
        line-height: 1.5;
    }

    /* Stack elements vertically */
    .two-column-layout {
        grid-template-columns: 1fr !important;
    }

    /* Mobile header */
    .header-container h2 {
        font-size: 18px !important;
    }

    .header-container p {
        font-size: 12px !important;
    }

    /* Reduce padding for mobile */
    .main-container {
        padding: 12px !important;
    }

    /* Mobile-friendly tables (if absolutely needed) */
    table {
        font-size: 12px !important;
    }

    table th,
    table td {
        padding: 8px 6px !important;
        white-space: nowrap;
    }

    /* Horizontal scroll for tables */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -15px;
        padding: 0 15px;
    }

    /* Collapsible sections indicator */
    .collapsible-header::after {
        content: '▼';
        float: right;
        transition: transform 0.3s;
    }

    .collapsible-header.open::after {
        transform: rotate(180deg);
    }
}

/* Landscape mobile (480px - 768px) */
@media (min-width: 480px) and (max-width: 768px) {
    .main-container > div:first-child {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Portrait mobile (up to 479px) */
@media (max-width: 479px) {

    /* Even smaller fonts for tiny screens */
    body {
        font-size: 14px !important;
    }

    h2 {
        font-size: 18px !important;
    }

    h3 {
        font-size: 16px !important;
    }

    /* Tighter spacing */
    .main-container {
        padding: 10px !important;
    }

    .main-container > div {
        padding: 15px !important;
        margin-bottom: 12px !important;
    }

    /* Financial summary cards in single column */
    .main-container > div:first-child {
        grid-template-columns: 1fr !important;
    }
}

/* High DPI screens (Retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Sharper borders */
    .glass-panel,
    .mobile-cards > div,
    input,
    button {
        border-width: 1.5px;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .pgcrmi-student-wrapper {
        background: #0f172a !important;
        color: #e2e8f0 !important;
    }

    .glass-panel,
    .main-container > div {
        background: #1e293b !important;
        color: #e2e8f0 !important;
        border-color: #334155 !important;
    }
}

/* Touch-specific improvements */
@media (pointer: coarse) {
    /* Larger touch targets */
    a, button, input, select {
        min-height: 48px !important;
        min-width: 48px;
    }

    /* Better spacing for thumbs */
    .main-container > div {
        margin-bottom: 20px !important;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    /* Fix iOS input zoom */
    input,
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Fix iOS safe area */
    .pgcrmi-student-wrapper {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .header-container {
        padding-top: max(20px, env(safe-area-inset-top));
    }
}

/* Android Chrome specific fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    select {
        appearance: none;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 10px center;
        background-size: 20px;
        padding-right: 40px;
    }
}

/* ============================================================================
   END MOBILE CSS
   ============================================================================ */
/* ============== STUDENT PANEL TABLE FIX ============== */

/* All table rows: white background */
.pgcrmi-student-wrapper tbody tr {
    background: white !important;
}

/* Table data: dark text */
.pgcrmi-student-wrapper tbody td {
    color: #1f2937 !important;
    font-weight: 500 !important;
}

/* Hover effect: light gray background */
.pgcrmi-student-wrapper tbody tr:hover {
    background: #f9fafb !important;
}

.pgcrmi-student-wrapper tbody tr:hover td {
    color: #1f2937 !important;
}

/* Specific color overrides for inline styles */
.pgcrmi-student-wrapper td[style*="color:#334155"] {
    color: #334155 !important;
}

.pgcrmi-student-wrapper td[style*="color:#64748b"] {
    color: #64748b !important;
}

.pgcrmi-student-wrapper td[style*="color:#dc2626"] {
    color: #dc2626 !important;
}

.pgcrmi-student-wrapper td[style*="color:#16a34a"] {
    color: #16a34a !important;
}
/* ==========================================
   FIX NUMBER INPUTS (BILLS TABLE)
   ========================================== */

/* 1. Hide the up/down spin buttons */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  margin: 0; 
}
input[type=number] {
  -moz-appearance: textfield; /* Firefox */
}

/* 2. Style the Extras Input in the Table */
#bills-table input[type="number"] {
    width: 110px !important; /* Increased from 70px */
    padding: 8px 10px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-align: center !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    background: #fff !important;
}

#bills-table input[type="number"]:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}
