/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* Initial Loading Screen Styles */
.initial-loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease, transform 0.5s ease;
    backdrop-filter: blur(5px);
}

.initial-loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
}

.loading-content {
    text-align: center;
    color: white;
    max-width: 400px;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.loading-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.loading-spinner {
    font-size: 4rem;
    margin-bottom: 2rem;
    animation: pulse 2s infinite;
    position: relative;
    display: inline-block;
    z-index: 1;
}

.loading-spinner i {
    color: #fff;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
    animation: spin 2s linear infinite;
    display: inline-block;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading-content h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.loading-content p {
    font-size: 1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    min-height: 1.5rem;
    position: relative;
    z-index: 1;
}

.loading-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    position: relative;
    z-index: 1;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
    z-index: 3;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.progress-text {
    font-size: 0.9rem;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    color: #fff;
    position: relative;
    z-index: 1;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Floating Support (right side, partially hidden; expands on click) */
.support-fab {
    position: fixed;
    right: 12px;
    bottom: 18px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    transform: translateX(48px);
    transition: transform 0.25s ease;
}

.support-fab:hover {
    transform: translateX(18px);
}

.support-fab.active {
    transform: translateX(0);
}

.support-fab__toggle {
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #e74c3c, #f39c12);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    opacity: 0.92;
}

.support-fab__badge {
    position: absolute;
    top: -6px;
    left: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: #2ecc71;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    display: none;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255,255,255,0.9);
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}

.support-fab__toggle {
    position: relative;
}

.support-fab__countPill {
    margin-left: auto;
    background: #2ecc71;
    color: #fff;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 800;
    display: none;
    align-items: center;
    justify-content: center;
}

.support-fab:not(.active) .support-fab__toggle {
    padding: 8px 10px;
    gap: 8px;
    opacity: 0.85;
}

.support-fab:not(.active) .support-fab__icon {
    width: 28px;
    height: 28px;
}

.support-fab:not(.active) .support-fab__icon i {
    font-size: 15px;
}

.support-fab:not(.active) .support-fab__label {
    display: inline;
    font-size: 12px;
    opacity: 0.75;
}

.support-fab__toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.22);
    opacity: 1;
}

.support-fab__icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.18);
}

.support-fab__icon i {
    font-size: 18px;
}

.support-fab__label {
    font-weight: 700;
    letter-spacing: 0.2px;
    font-size: 14px;
    opacity: 0.85;
}

.support-fab__menu {
    display: none;
    flex-direction: column;
    gap: 10px;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
    min-width: 220px;
}

.support-fab.active .support-fab__menu {
    display: flex;
}

.support-fab__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 12px;
    transition: background 0.2s ease, transform 0.2s ease;
}

button.support-fab__item {
    width: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.support-fab__item:hover {
    background: rgba(231, 76, 60, 0.10);
    transform: translateX(-2px);
}

.support-fab__item i {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    flex: 0 0 30px;
}

.support-fab__item.call i { background: #27ae60; }
.support-fab__item.email i { background: #e74c3c; }
.support-fab__item.whatsapp i { background: #25D366; }
.support-fab__item.livechat i { background: #3498db; }

.support-fab__item span {
    font-size: 14px;
    font-weight: 700;
}

/* Support Chat Modal (User) */
.support-chat-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 14px;
}

.support-chat-modal.active {
    display: flex;
}

.support-chat-card {
    width: min(520px, 100%);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    overflow: hidden;
}

.support-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #e74c3c, #f39c12);
    color: #fff;
}

.support-chat-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.support-chat-close {
    border: none;
    background: rgba(255,255,255,0.18);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    cursor: pointer;
}

.support-chat-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.support-chat-meta {
    font-size: 0.9rem;
    color: #666;
}

.support-chat-messages {
    height: 260px;
    overflow: auto;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.support-chat-bubble {
    max-width: 85%;
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 0.95rem;
    line-height: 1.35;
    white-space: pre-wrap;
    word-break: break-word;
    position: relative;
}

.support-chat-metaRow {
    margin-top: 4px;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    font-size: 0.75rem;
    color: #888;
}

.support-chat-metaRow .time {
    color: #8c8c8c;
}

.support-chat-metaRow .ticks {
    font-weight: 900;
    letter-spacing: -1px;
    color: #9aa0a6; /* default grey */
}

.support-chat-metaRow .ticks.seen {
    color: #25D366; /* green like WhatsApp */
}

.support-chat-dateHeader {
    align-self: center;
    background: rgba(0,0,0,0.06);
    color: #555;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
    margin: 6px 0;
 }

.support-chat-bubble.user {
    align-self: flex-end;
    background: #eaf3ff;
    border: 1px solid rgba(52, 152, 219, 0.25);
}

.support-chat-bubble.admin {
    align-self: flex-start;
    background: #fff6e6;
    border: 1px solid rgba(243, 156, 18, 0.25);
}

.support-chat-inputRow {
    display: flex;
    gap: 10px;
}

.support-chat-inputRow textarea {
    flex: 1;
    resize: none;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    padding: 10px 12px;
    font-family: inherit;
    min-height: 44px;
    outline: none;
}

.support-chat-send {
    border: none;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: #fff;
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .support-fab {
        right: 10px;
        bottom: 14px;
        transform: translateX(40px);
    }

    .support-fab:hover {
        transform: translateX(16px);
    }

    .support-fab__toggle {
        padding: 10px 12px;
        gap: 8px;
    }

    .support-fab:not(.active) .support-fab__toggle {
        padding: 7px 9px;
        gap: 6px;
    }

    .support-fab__icon {
        width: 32px;
        height: 32px;
    }

    .support-fab:not(.active) .support-fab__icon {
        width: 26px;
        height: 26px;
    }

    .support-fab:not(.active) .support-fab__icon i {
        font-size: 14px;
    }

    .support-fab__label {
        font-size: 13px;
    }

    .support-fab__menu {
        min-width: 210px;
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .loading-content {
        max-width: 90%;
        padding: 1.5rem;
    }
    
    .loading-spinner {
        font-size: 3rem;
        margin-bottom: 1.5rem;
    }
    
    .loading-content h2 {
        font-size: 1.5rem;
    }
    
    .loading-content p {
        font-size: 0.9rem;
    }
    
    .progress-bar {
        height: 6px;
    }
    
    .progress-text {
        font-size: 0.8rem;
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
    overflow-x: hidden;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    backdrop-filter: blur(15px);
    color: #ffffff;
    padding: 1.2rem 2rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.2),
        0 6px 12px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
    color: #ffffff;
    position: relative;
    transform: perspective(1000px) rotateX(5deg);
    transition: all 0.3s ease;
    text-align: center;
}

.header h1:hover {
    transform: perspective(1000px) rotateX(0deg) scale(1.02);
    text-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.4),
        0 8px 16px rgba(0, 0, 0, 0.3),
        0 12px 24px rgba(0, 0, 0, 0.2);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    position: relative;
    transform: perspective(1000px) rotateX(2deg);
    transition: all 0.3s ease;
    flex: 0 0 auto;
    min-width: 0;
    width: 100%;
}

.logo:hover {
    transform: perspective(1000px) rotateX(0deg) scale(1.02);
}

.logo-img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #ffffff;
    padding: 6px;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.2),
        0 8px 24px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    position: relative;
}

.logo-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.4) 100%);
    border-radius: 10px;
    z-index: -1;
}

.logo-img:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg) scale(1.1);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.3),
        0 16px 48px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.8);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    flex-shrink: 0;
    min-width: 0;
    width: 100%;
}

.school-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    text-align: center;
    width: 100%;
    max-width: 100%;
}

.school-info #schoolName {
    font-weight: 600;
    font-size: 1.2rem;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    line-height: 1.3;
    transition: all 0.3s ease;
}

.school-info #schoolName:hover {
    color: #f1c40f;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.school-info #schoolId {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.school-info #schoolId:hover {
    color: #f39c12;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    transform: scale(1.02);
}

.user-actions {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

/* Wallet button special styling */
#walletHeaderBtn {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    padding: 0.6rem 1.2rem !important;
    min-height: 44px !important;
    min-width: 120px !important;
    flex: 1 !important;
    max-width: 200px !important;
    position: relative !important;
    overflow: hidden !important;
    text-align: center !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

#walletHeaderBtn .btn-label {
    font-size: 0.85rem !important;
    line-height: 1 !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
}

/* Wallet icon styling */
#walletHeaderBtn i {
    flex-shrink: 0 !important;
    font-size: 1rem !important;
    min-width: 16px !important;
}

/* Wallet balance styling */
#walletHeaderBalance {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%) !important;
    color: #ffffff !important;
    padding: 2px 6px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    margin: 0 !important;
    box-shadow: 0 2px 4px rgba(39, 174, 96, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    min-width: fit-content !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

#walletHeaderBalance:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4) !important;
}

.btn-logout, .btn-change-password {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-height: 44px;
    min-width: 120px;
    flex: 1;
    max-width: 200px;
    text-align: center;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.btn-logout:hover, .btn-change-password:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-change-password {
    background: rgba(255, 193, 7, 0.25);
    border-color: rgba(255, 193, 7, 0.4);
}

.btn-change-password:hover {
    background: rgba(255, 193, 7, 0.35);
    border-color: rgba(255, 193, 7, 0.6);
}

.btn-change-password:hover {
    background: rgba(255, 193, 7, 0.3);
}

/* Enhanced PEEO Dashboard Button Styles */
#peeoDashboardBtn {
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%) !important;
    border: none !important;
    color: white !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
}

#peeoDashboardBtn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#peeoDashboardBtn:hover::before {
    width: 300px;
    height: 300px;
}

#peeoDashboardBtn:hover {
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 8px 25px rgba(230, 126, 34, 0.4), 0 4px 15px rgba(243, 156, 18, 0.3) !important;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
}

#peeoDashboardBtn:active {
    transform: translateY(-1px) scale(1.02) !important;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3) !important;
}

#peeoDashboardBtn i {
    transition: transform 0.3s ease !important;
}

#peeoDashboardBtn:hover i {
    transform: rotate(10deg) scale(1.1) !important;
}

/* Password button icon and text styling */
.btn-change-password i {
    flex-shrink: 0 !important;
    font-size: 1rem !important;
    min-width: 16px !important;
}

.btn-change-password .btn-label {
    flex-shrink: 1 !important;
    min-width: 0 !important;
}

/* Logout button icon and text styling */
.btn-logout i {
    flex-shrink: 0 !important;
    font-size: 1rem !important;
    min-width: 16px !important;
}

.btn-logout .btn-label {
    flex-shrink: 1 !important;
    min-width: 0 !important;
}

/* Header action buttons - distinct themed colors */
#changePasswordBtn {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    border: none;
    color: #fff;
}
#changePasswordBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(243, 156, 18, 0.35);
}



#logoutBtn {
    background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
    border: none !important;
    color: white !important;
    padding: 0.6rem 1.2rem !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    text-decoration: none !important;
    font-family: 'Poppins', sans-serif !important;
}

#logoutBtn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 14px rgba(231, 76, 60, 0.35) !important;
}

#logoutBtn .btn-label {
    color: white !important;
    font-weight: 500 !important;
}

#logoutBtn i {
    color: white !important;
    font-size: 1rem !important;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 10px;
    padding-inline: 12px;
    scroll-snap-type: x proximity;
}

.nav-tabs::-webkit-scrollbar {
    display: none;
}

.nav-tab {
    background: none;
    border: none;
    padding: clamp(8px, 2.2vw, 12px) clamp(12px, 3.2vw, 16px);
    cursor: pointer;
    font-size: clamp(0.85rem, 2.6vw, 1rem);
    font-weight: 600;
    color: #495057;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border-bottom: 3px solid transparent;
    border-left: 4px solid transparent;
    min-width: clamp(90px, 28vw, 180px);
    flex: 0 0 auto;
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
}

.nav-tab:hover {
    color: #2c3e50;
    background: rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-tab.active {
    color: #2c3e50;
    border-bottom-color: #3498db;
    background: rgba(52, 152, 219, 0.05);
    font-weight: 700;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nav-tab i {
    color: #3498db;
    font-size: clamp(1rem, 3vw, 1.1rem);
}

.nav-tab.active i {
    color: #2c3e50;
}

/* Different colors for different form tabs */
.nav-tab[data-tab="mdm-report"] {
    border-left: 4px solid #e74c3c;
    transition: all 0.3s ease;
}

.nav-tab[data-tab="mdm-report"]:hover {
    background: rgba(231, 76, 60, 0.1);
    border-left-color: #c0392b;
}

.nav-tab[data-tab="mdm-report"].active {
    background: rgba(231, 76, 60, 0.15);
    border-bottom-color: #e74c3c;
    border-left-color: #c0392b;
}

.nav-tab[data-tab="mdm-report"] i {
    color: #e74c3c;
}

.nav-tab[data-tab="mdm-report"].active i {
    color: #c0392b;
}

.nav-tab[data-tab="financial-report"] {
    border-left: 4px solid #27ae60;
    transition: all 0.3s ease;
}

.nav-tab[data-tab="financial-report"]:hover {
    background: rgba(39, 174, 96, 0.1);
    border-left-color: #229954;
}

.nav-tab[data-tab="financial-report"].active {
    background: rgba(39, 174, 96, 0.15);
    border-bottom-color: #27ae60;
    border-left-color: #229954;
}

.nav-tab[data-tab="financial-report"] i {
    color: #27ae60;
}

.nav-tab[data-tab="financial-report"].active i {
    color: #229954;
}

.nav-tab[data-tab="milk-report"] {
    border-left: 4px solid #f39c12;
    transition: all 0.3s ease;
}

.nav-tab[data-tab="milk-report"]:hover {
    background: rgba(243, 156, 18, 0.1);
    border-left-color: #e67e22;
}

.nav-tab[data-tab="milk-report"].active {
    background: rgba(243, 156, 18, 0.15);
    border-bottom-color: #f39c12;
    border-left-color: #e67e22;
}

.nav-tab[data-tab="milk-report"] i {
    color: #f39c12;
}

.nav-tab[data-tab="milk-report"].active i {
    color: #e67e22;
}

.nav-tab[data-tab="reports"] {
    border-left: 4px solid #9b59b6;
    transition: all 0.3s ease;
}

.nav-tab[data-tab="reports"]:hover {
    background: rgba(155, 89, 182, 0.1);
    border-left-color: #8e44ad;
}

.nav-tab[data-tab="reports"].active {
    background: rgba(155, 89, 182, 0.15);
    border-bottom-color: #9b59b6;
    border-left-color: #8e44ad;
}

.nav-tab[data-tab="reports"] i {
    color: #9b59b6;
}

.nav-tab[data-tab="reports"].active i {
    color: #8e44ad;
}

/* Reports section colors matching navigation tab */
#reports .section-header h2 {
    color: #9b59b6;
    border-left: 4px solid #9b59b6;
    padding-left: 1rem;
}

#reports .month-selector {
    background: rgba(155, 89, 182, 0.1);
    border: 1px solid rgba(155, 89, 182, 0.3);
}

#reports .month-selector select:focus {
    border-color: #9b59b6;
    box-shadow: 0 0 0 2px rgba(155, 89, 182, 0.25);
}

#reports .btn-primary {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    box-shadow: 0 2px 8px rgba(155, 89, 182, 0.3);
}

#reports .btn-primary:hover {
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.4);
}

#reports .btn-secondary {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    box-shadow: 0 2px 8px rgba(155, 89, 182, 0.3);
}

#reports .btn-secondary:hover {
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.4);
}

#reports .report-content {
    background: rgba(155, 89, 182, 0.02);
}

/* "सभी रिपोर्ट" टैब – status table styling */
#reports .report-content table {
    font-size: 0.95rem;
}

#reports .report-content table th,
#reports .report-content table td {
    border-bottom: 1px solid #ecf0f1;
}

#reports .report-content table tbody tr:hover {
    background: #fff7fb;
    transition: background 0.15s ease-in-out;
}

@media (max-width: 600px) {
    #reports .report-content table {
        font-size: 0.85rem;
    }

    #reports .report-content table th,
    #reports .report-content table td {
        padding: 8px !important;
    }
}

#reports .report-section {
    background: rgba(155, 89, 182, 0.05);
    border: 1px solid rgba(155, 89, 182, 0.1);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

#reports .report-section h3 {
    color: #9b59b6;
    border-bottom: 2px solid rgba(155, 89, 182, 0.2);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Individual report sections with their respective tab colors */
#reports .report-section.mdm-report h3 {
    color: #e74c3c;
    border-bottom-color: rgba(231, 76, 60, 0.3);
}

#reports .report-section.financial-report h3 {
    color: #27ae60;
    border-bottom-color: rgba(39, 174, 96, 0.3);
}

#reports .report-section.milk-report h3 {
    color: #f39c12;
    border-bottom-color: rgba(243, 156, 18, 0.3);
}

/* Report section backgrounds based on type */
#reports .report-section.mdm-report {
    background: rgba(231, 76, 60, 0.05);
    border-color: rgba(231, 76, 60, 0.2);
}

#reports .report-section.financial-report {
    background: rgba(39, 174, 96, 0.05);
    border-color: rgba(39, 174, 96, 0.2);
}

#reports .report-section.milk-report {
    background: rgba(243, 156, 18, 0.05);
    border-color: rgba(243, 156, 18, 0.2);
}



/* Main Content */
.main-content {
    padding: 2rem;
    overflow-x: hidden;
}

/* Main content backgrounds matching navigation tabs */
#mdm-report.main-content {
    background: rgba(231, 76, 60, 0.05);
}

#financial-report.main-content {
    background: rgba(39, 174, 96, 0.05);
}

#milk-report.main-content {
    background: rgba(243, 156, 18, 0.05);
}



.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

/* Section header colors matching navigation tabs */
#mdm-report .section-header h2 {
    color: #e74c3c;
    border-left: 4px solid #e74c3c;
    padding-left: 1rem;
}

#financial-report .section-header h2 {
    color: #27ae60;
    border-left: 4px solid #27ae60;
    padding-left: 1rem;
}

#milk-report .section-header h2 {
    color: #f39c12;
    border-left: 4px solid #f39c12;
    padding-left: 1rem;
    font-size: 1.3rem;
    line-height: 1.4;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.month-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-bottom: 1rem;
}

/* Month selector backgrounds matching navigation tabs */
#mdm-report .month-selector {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
}

#financial-report .month-selector {
    background: rgba(39, 174, 96, 0.1);
    border: 1px solid rgba(39, 174, 96, 0.3);
}

#milk-report .month-selector {
    background: rgba(243, 156, 18, 0.1);
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.month-selector label {
    font-weight: 500;
    color: #495057;
}

/* Class Section Visibility */
.class-section {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.class-section.active {
    display: block;
    opacity: 1;
}

/* Class Selector Styling */
.month-selector select {
    margin-right: 15px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    font-size: 14px;
    min-width: 120px;
}

.month-selector select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Month selector colors matching navigation tabs */
#mdm-report .month-selector select:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.25);
}

#financial-report .month-selector select:focus {
    border-color: #27ae60;
    box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.25);
}

#milk-report .month-selector select:focus {
    border-color: #f39c12;
    box-shadow: 0 0 0 2px rgba(243, 156, 18, 0.25);
}

/* Class selector specific styling */
#mdmClass, #milkClass, #financialClass, #reportClass {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-weight: 500;
}

#mdmClass option, #milkClass option, #financialClass option, #reportClass option {
    background: white;
    color: #333;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(149, 165, 166, 0.3);
}

/* Class Sections */
.class-sections {
    display: block;
    margin-top: 2rem;
}

.class-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Form section backgrounds matching navigation tabs */
#mdm-report .class-section {
    background: rgba(231, 76, 60, 0.08);
    border: 1px solid rgba(231, 76, 60, 0.2);
}

#financial-report .class-section {
    background: rgba(39, 174, 96, 0.08);
    border: 1px solid rgba(39, 174, 96, 0.2);
}

#milk-report .class-section {
    background: rgba(243, 156, 18, 0.08);
    border: 1px solid rgba(243, 156, 18, 0.2);
}

.class-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.class-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

/* Forms */
.mdm-form, .milk-form, .financial-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

/* Form label colors matching navigation tabs */
#mdm-report .form-group label {
    color: #000000;
    font-weight: 600;
}

#financial-report .form-group label {
    color: #000000;
    font-weight: 600;
}

#milk-report .form-group label {
    color: #000000;
    font-weight: 600;
}

.form-group input {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #000000;
}

.form-group input::placeholder {
    color: #6c757d;
    opacity: 0.8;
}

/* Form input colors matching navigation tabs */
#mdm-report .form-group input {
    border-left: 4px solid #e74c3c;
    background: #ffffff;
    border-color: rgba(231, 76, 60, 0.3);
    color: #000000;
}

#financial-report .form-group input {
    border-left: 4px solid #27ae60;
    background: #ffffff;
    border-color: rgba(39, 174, 96, 0.3);
    color: #000000;
}

#milk-report .form-group input {
    border-left: 4px solid #f39c12;
    background: #ffffff;
    border-color: rgba(243, 156, 18, 0.3);
    color: #000000;
}

/* Hover effects for form inputs */
#mdm-report .form-group input:hover {
    background: #ffffff;
    border-color: rgba(231, 76, 60, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.2);
}

#financial-report .form-group input:hover {
    background: #ffffff;
    border-color: rgba(39, 174, 96, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.2);
}

#milk-report .form-group input:hover {
    background: #ffffff;
    border-color: rgba(243, 156, 18, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.2);
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Form colors matching navigation tabs */
#mdm-report .form-group input:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

#financial-report .form-group input:focus {
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

#milk-report .form-group input:focus {
    border-color: #f39c12;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1);
}

.form-group input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.form-group input[type="number"]::-webkit-outer-spin-button,
.form-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Calculated Fields */
.calculated-fields {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

/* Form section backgrounds matching navigation tabs */
#mdm-report .calculated-fields {
    background: rgba(231, 76, 60, 0.08);
    border: 1px solid rgba(231, 76, 60, 0.2);
}

#financial-report .calculated-fields {
    background: rgba(39, 174, 96, 0.08);
    border: 1px solid rgba(39, 174, 96, 0.2);
}

#milk-report .calculated-fields {
    background: rgba(243, 156, 18, 0.08);
    border: 1px solid rgba(243, 156, 18, 0.2);
}

.calc-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.calc-field label {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
}

.calc-field span {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    padding: 0.5rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    text-align: center;
}

/* Save Button */
.btn-save {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    align-self: flex-start;
}

/* Save button colors matching navigation tabs */
#mdm-report .btn-save {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

#mdm-report .btn-save:hover {
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

#financial-report .btn-save {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

#financial-report .btn-save:hover {
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

#milk-report .btn-save {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
}

#milk-report .btn-save:hover {
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

/* Report Controls */
.report-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Report Content */
.report-content {
    margin-top: 2rem;
}

.report-placeholder {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.report-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #dee2e6;
}

.report-placeholder p {
    font-size: 1.1rem;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

/* Ensure admin modals are scrollable on small screens */
.modal {
    overflow-y: auto;
}

.modal-content {
    max-height: 90vh;
    margin: 5vh auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Optional: make specific admin modals a bit wider if needed */
#adminSettingsModal .modal-content,
#conversionAmountModal .modal-content,
#adminReportsModal .modal-content {
    max-width: 600px;
}

/* Loading Modal Specific Styles */
#loadingModal {
    z-index: 10001 !important; /* Ensure loading modal appears above all other modals */
}

#loadingModal .modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: 15% auto;
    padding: 2.5rem;
    border-radius: 15px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    animation: modalSlideIn 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

#loadingModal .spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

#loadingModal p {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.5;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.success-icon {
    font-size: 3rem;
    color: #27ae60;
    margin-bottom: 1rem;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.modal-buttons .btn-primary,
.modal-buttons .btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.modal-buttons .btn-primary {
    background: #3498db;
    color: white;
}

.modal-buttons .btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.modal-buttons .btn-secondary {
    background: #6c757d;
    color: white;
}

.modal-buttons .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 0;
        box-shadow: none;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .user-info {
        display: grid;
        grid-template-columns: 1fr;
        align-items: start;
        width: 100%;
        gap: 10px;
    }
    
    .user-actions {
        flex-wrap: nowrap;
        justify-content: center;
        width: 100%;
        gap: 0.5rem;
    }
    
    .user-actions .btn-logout,
    .user-actions .btn-change-password {
        width: 100%;
        max-width: 260px;
    }
    
    .nav-tabs {
        padding: 0 0.5rem;
    }
    
    .nav-tab {
        padding: 0.6rem 0.9rem;
        font-size: 0.95rem;
        gap: 0.35rem;
        font-weight: 600;
        flex: 0 0 auto; /* allow horizontal scroll instead of squishing */
    }
    
    .nav-tab i {
        font-size: 1.05rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .month-selector {
        justify-content: center;
        gap: 0.5rem;
    }
    
    .month-selector select {
        font-size: 16px; /* prevent iOS zoom */
    }
    
    .class-sections {
        gap: 1rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .calculated-fields {
        grid-template-columns: 1fr;
    }
    
    .report-controls {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0.8rem 1rem;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
    
    .header h1 {
        font-size: 1.3rem;
        font-weight: 600;
    }
    
    .header-content {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
        justify-content: center;
    }
    
    .logo {
        gap: 10px;
        width: 100%;
        justify-content: center;
        margin-right: 0;
    }
    
    .logo-img {
        width: 40px;
        height: 40px;
        padding: 4px;
        transform: perspective(800px) rotateY(-3deg) rotateX(3deg);
    }
    
    .logo-img:hover {
        transform: perspective(800px) rotateY(0deg) rotateX(0deg) scale(1.05);
    }
    
    .header h1 {
        text-align: center;
        justify-content: center;
        transform: perspective(800px) rotateX(3deg);
        font-size: 1.2rem;
    }
    
    .header h1:hover {
        transform: perspective(800px) rotateX(0deg) scale(1.01);
    }
    
    .user-info {
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
        margin-left: 0;
    }
    
    .school-info {
        padding: 0.6rem 0.8rem;
        text-align: center;
        align-self: center;
        min-width: 0;
    }
    
    .school-info #schoolName,
    .school-info #schoolId {
        max-width: 100%;
        white-space: normal;
        word-break: break-word;
        overflow: visible;
        text-overflow: initial;
        text-align: center;
    }
    
    .school-info #schoolName {
        font-size: 1.1rem;
    }
    
    .user-actions {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.6rem;
        margin-left: 0;
        width: 100%;
    }
    
    .btn-logout, .btn-change-password {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
        min-height: 44px;
        min-width: 100px;
        flex: 1;
        max-width: 150px;
        justify-content: center;
        flex-wrap: wrap;
        width: 100%;
        box-sizing: border-box;
        gap: 0.3rem;
    }
    
    .btn-change-password i {
        font-size: 0.9rem !important;
        flex-shrink: 0 !important;
        min-width: 14px !important;
    }
    
    .btn-change-password .btn-label {
        font-size: 0.8rem !important;
        flex-shrink: 1 !important;
        min-width: 0 !important;
    }
    
    .btn-logout i {
        font-size: 0.9rem !important;
        flex-shrink: 0 !important;
        min-width: 14px !important;
    }
    
    .btn-logout .btn-label {
        font-size: 0.8rem !important;
        flex-shrink: 1 !important;
        min-width: 0 !important;
    }
    
    #walletHeaderBtn {
        padding: 0.5rem 0.8rem !important;
        min-height: 44px !important;
        min-width: 100px !important;
        flex: 1 !important;
        max-width: 150px !important;
        gap: 0.3rem !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        box-sizing: border-box !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    #walletHeaderBtn .btn-label {
        font-size: 0.75rem !important;
        flex-shrink: 1 !important;
        min-width: 0 !important;
    }
    
    #walletHeaderBtn i {
        font-size: 0.9rem !important;
        flex-shrink: 0 !important;
        min-width: 14px !important;
    }
    
    #walletHeaderBalance {
        font-size: 0.7rem !important;
        padding: 1px 4px !important;
        flex-shrink: 0 !important;
    }
    
    .user-actions .btn-label {
        display: none;
    }
    
    #walletHeaderBalance {
        padding: 0.3rem 0.6rem !important;
        font-size: 0.8rem !important;
    }
    
    /* Ensure buttons are touch-friendly on mobile */
    .btn-logout, .btn-change-password {
        min-height: 44px;
        touch-action: manipulation;
    }
    
    /* Improve mobile header spacing */
    .header::before {
        opacity: 0.7;
    }
    
    .main-content {
        padding: 0.75rem;
    }
}

/* Tablet and medium screen styles */
@media (min-width: 481px) and (max-width: 768px) {
    .header {
        padding: 1rem 1.5rem;
    }
    
    .header h1 {
        font-size: 1.6rem;
    }
    
    .header-content {
        gap: 1.5rem;
        justify-content: space-between;
    }
    
    .logo-img {
        width: 44px;
        height: 44px;
        padding: 5px;
        transform: perspective(900px) rotateY(-4deg) rotateX(4deg);
    }
    
    .logo-img:hover {
        transform: perspective(900px) rotateY(0deg) rotateX(0deg) scale(1.08);
    }
    
    .user-info {
        gap: 1.5rem;
        margin-left: auto;
    }
    
    .school-info {
        padding: 0.6rem 0.9rem;
    }
    
    .school-info #schoolName {
        font-size: 1.15rem;
    }
    
    .btn-logout, .btn-change-password {
        padding: 0.55rem 1rem;
        font-size: 0.85rem;
        min-height: 44px;
        min-width: 110px;
        flex: 1;
        max-width: 180px;
        flex-wrap: wrap;
        width: 100%;
        box-sizing: border-box;
        gap: 0.4rem;
    }
    
    .btn-change-password i {
        font-size: 0.95rem !important;
        flex-shrink: 0 !important;
        min-width: 15px !important;
    }
    
    .btn-change-password .btn-label {
        font-size: 0.85rem !important;
        flex-shrink: 1 !important;
        min-width: 0 !important;
    }
    
    .btn-logout i {
        font-size: 0.95rem !important;
        flex-shrink: 0 !important;
        min-width: 15px !important;
    }
    
    .btn-logout .btn-label {
        font-size: 0.85rem !important;
        flex-shrink: 1 !important;
        min-width: 0 !important;
    }
    
    #walletHeaderBtn {
        padding: 0.55rem 1rem !important;
        min-height: 44px !important;
        min-width: 110px !important;
        flex: 1 !important;
        max-width: 180px !important;
        gap: 0.4rem !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    #walletHeaderBtn .btn-label {
        font-size: 0.8rem !important;
        flex-shrink: 1 !important;
        min-width: 0 !important;
    }
    
    #walletHeaderBtn i {
        font-size: 0.95rem !important;
        flex-shrink: 0 !important;
        min-width: 15px !important;
    }
    
    #walletHeaderBalance {
        font-size: 0.75rem !important;
        padding: 2px 5px !important;
        flex-shrink: 0 !important;
    }
    
    .user-actions .btn-label {
        display: inline-block;
    }
}

/* Desktop styles */
@media (min-width: 769px) {
    .header-content {
        flex-direction: column;
        gap: 1.5rem;
        max-width: 1400px;
        margin: 0 auto;
    }
    
    .user-actions {
        display: flex;
        align-items: stretch;
        gap: 0.75rem;
        justify-content: center;
        flex-wrap: wrap;
        width: 100%;
    }
    
    .btn-logout, .btn-change-password {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        min-height: 48px;
        min-width: 140px;
        flex: 1;
        max-width: 220px;
        flex-shrink: 0;
        flex-wrap: wrap;
        width: 100%;
        box-sizing: border-box;
        gap: 0.5rem;
    }
    
    .btn-change-password i {
        font-size: 1rem !important;
        flex-shrink: 0 !important;
        min-width: 16px !important;
    }
    
    .btn-change-password .btn-label {
        font-size: 0.9rem !important;
        flex-shrink: 1 !important;
        min-width: 0 !important;
    }
    
    .btn-logout i {
        font-size: 1rem !important;
        flex-shrink: 0 !important;
        min-width: 16px !important;
    }
    
    .btn-logout .btn-label {
        font-size: 0.9rem !important;
        flex-shrink: 1 !important;
        min-width: 0 !important;
    }
    
    #walletHeaderBtn {
        padding: 0.6rem 1.2rem !important;
        min-height: 48px !important;
        min-width: 140px !important;
        flex: 1 !important;
        max-width: 220px !important;
        gap: 0.5rem !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    #walletHeaderBtn .btn-label {
        font-size: 0.85rem !important;
        flex-shrink: 1 !important;
        min-width: 0 !important;
    }
    
    #walletHeaderBtn i {
        font-size: 1rem !important;
        flex-shrink: 0 !important;
        min-width: 16px !important;
    }
    
    #walletHeaderBalance {
        font-size: 0.8rem !important;
        padding: 2px 6px !important;
        flex-shrink: 0 !important;
    }
    
    .user-actions .btn-label {
        display: inline-block;
    }
    
    .school-info {
        text-align: center;
        width: 100%;
        max-width: 100%;
    }
    
    .school-info #schoolName {
        font-size: 1.25rem;
    }
    
    .logo {
        width: 100%;
        justify-content: center;
    }
}

/* Large desktop styles */
@media (min-width: 1200px) {
    .header {
        padding: 1.5rem 3rem;
    }
    
    .header-content {
        max-width: 1600px;
    }
    
    .user-actions {
        gap: 1rem;
    }
    
    .school-info #schoolName {
        font-size: 1.3rem;
    }
    
    .btn-logout, .btn-change-password {
        padding: 0.7rem 1.5rem;
        font-size: 1rem;
        min-height: 52px;
        min-width: 160px;
        flex: 1;
        max-width: 250px;
        flex-wrap: wrap;
        width: 100%;
        box-sizing: border-box;
        gap: 0.6rem;
    }
    
    .btn-change-password i {
        font-size: 1.1rem !important;
        flex-shrink: 0 !important;
        min-width: 18px !important;
    }
    
    .btn-change-password .btn-label {
        font-size: 1rem !important;
        flex-shrink: 1 !important;
        min-width: 0 !important;
    }
    
    .btn-logout i {
        font-size: 1.1rem !important;
        flex-shrink: 0 !important;
        min-width: 18px !important;
    }
    
    .btn-logout .btn-label {
        font-size: 1rem !important;
        flex-shrink: 1 !important;
        min-width: 0 !important;
    }
    
    #walletHeaderBtn {
        padding: 0.7rem 1.5rem !important;
        min-height: 52px !important;
        min-width: 160px !important;
        flex: 1 !important;
        max-width: 250px !important;
        gap: 0.6rem !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    #walletHeaderBtn .btn-label {
        font-size: 0.9rem !important;
        flex-shrink: 1 !important;
        min-width: 0 !important;
    }
    
    #walletHeaderBtn i {
        font-size: 1.1rem !important;
        flex-shrink: 0 !important;
        min-width: 18px !important;
    }
    
    #walletHeaderBalance {
        font-size: 0.85rem !important;
        padding: 3px 7px !important;
        flex-shrink: 0 !important;
    }
    
    .header h1 {
        font-size: 2.2rem;
    }
}

/* Small tablet styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .header {
        padding: 1.1rem 2rem;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .logo-img {
        width: 46px;
        height: 46px;
    }
}

/* Desktop styles - prevent overlap */
@media (min-width: 1025px) {
    .header {
        padding: 1.5rem 2.5rem;
    }
    
    .header-content {
        justify-content: space-between;
        gap: 2rem;
    }
    
    .logo {
        flex: 0 0 auto;
        margin-right: 2rem;
    }
    
    .header h1 {
        font-size: 2.2rem;
        white-space: nowrap;
    }
    
    .user-info {
        flex: 0 0 auto;
        margin-left: auto;
    }
    
    .school-info {
        margin-right: 2rem;
    }
}

@media (max-width: 480px) {
    .class-section {
        margin-bottom: 1rem;
    }
    
    .month-selector {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .month-selector select {
        width: 100%;
        padding: 0.5rem;
    }
    
    /* Admin sections: stack buttons on small screens */
    #adminConversionSection .btn-primary,
    #adminFoodRateSection .btn-primary {
        width: 100%;
        margin-left: 0 !important;
    }
    
    /* Mobile: show all tabs without horizontal scroll (wrap to 2 columns) */
    .nav-tabs {
        flex-wrap: wrap;
        overflow-x: visible;
    }
    .nav-tab {
        padding: 0.55rem 0.7rem;
        font-size: 0.9rem;
        gap: 0.25rem;
        font-weight: 600;
        flex: 1 0 calc(50% - 10px);
        min-width: 0;
        justify-content: center;
        text-align: center;
        border-left-width: 3px;
    }
    .nav-tab i {
        font-size: 0.95rem;
    }
    /* Mobile: show icons + text with fluid sizing */
    .user-actions .btn-label { display: inline-block; }
    .user-actions button { padding: clamp(6px, 1.8vw, 10px) clamp(8px, 2.4vw, 12px); border-radius: 10px; }
    .user-actions i { font-size: clamp(14px, 4vw, 18px); }
    .user-actions .btn-label { font-size: clamp(11px, 3.2vw, 13px); }
}

/* Print Styles */
@media print {
    .header, .nav-tabs, .section-header, .btn-save, .btn-primary, .btn-secondary {
        display: none !important;
    }
    
    .container {
        box-shadow: none;
        background: white;
    }
    
    .main-content {
        padding: 0;
    }
    
    .class-section {
        box-shadow: none;
        border: 1px solid #000;
        margin-bottom: 1rem;
        break-inside: avoid;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Focus Styles for Accessibility */
button:focus,
input:focus,
select:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Success Animation */
@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.success-pulse {
    animation: successPulse 0.5s ease;
}

/* Alert Styles */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin: 0.5rem 0;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
} 

/* Mobile-friendly Password Modal Styles */
.password-modal {
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin: 2rem auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: #e9ecef;
    color: #495057;
}

#changePasswordForm {
    padding: 1.25rem;
}

#changePasswordForm .form-group {
    margin-bottom: 1.25rem;
}

#changePasswordForm label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
    font-size: 0.95rem;
}

#changePasswordForm input {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

#changePasswordForm input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.password-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #6c757d;
    font-style: italic;
}

.modal-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn-large {
    flex: 1;
    min-width: 100px;
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 45px;
}

.btn-large:active {
    transform: scale(0.98);
}

.result-container {
    padding: 1rem 1.25rem;
    margin-top: 1rem;
    border-top: 1px solid #e9ecef;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .password-modal {
        max-width: 90vw;
        margin: 1rem;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-header h3 {
        font-size: 1.1rem;
    }
    
    #changePasswordForm {
        padding: 1rem;
    }
    
    #changePasswordForm input {
        padding: 0.75rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .modal-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-large {
        width: 100%;
        min-height: 50px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .password-modal {
        max-width: 95vw;
        margin: 0.5rem;
        border-radius: 8px;
    }
    
    .modal-header {
        padding: 0.875rem;
    }
    
    .modal-header h3 {
        font-size: 1rem;
    }
    
    #changePasswordForm {
        padding: 0.875rem;
    }
    
    #changePasswordForm label {
        font-size: 0.9rem;
    }
    
    #changePasswordForm input {
        padding: 0.75rem;
    }
    
    .btn-large {
        min-height: 55px;
        font-size: 1.1rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn-large {
        min-height: 60px;
    }
    
    #changePasswordForm input {
        min-height: 50px;
    }
    
    .close-btn {
        min-width: 44px;
        min-height: 44px;
    }
} 

/* Mobile-friendly Alert Styles */
.mobile-alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.4;
    margin: 0;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-alert i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.mobile-alert span {
    flex: 1;
    word-wrap: break-word;
}

@media (max-width: 768px) {
    .mobile-alert {
        padding: 0.875rem;
        font-size: 0.95rem;
        gap: 0.5rem;
    }
    
    .mobile-alert i {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .mobile-alert {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .mobile-alert i {
        font-size: 1rem;
    }
} 

/* Admin Settings Styles */
.settings-section {
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.settings-section h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.setting-group {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.setting-group label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.setting-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.setting-group input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.setting-group small {
    display: block;
    color: #6c757d;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    font-style: italic;
}

@media (max-width: 768px) {
    .mobile-alert {
        padding: 0.75rem;
        margin: 0.5rem;
    }
    
    .mobile-alert i {
        font-size: 1rem;
    }
    
    .settings-section {
        padding: 0.75rem;
    }
    
    .setting-group {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .mobile-alert {
        padding: 0.5rem;
        margin: 0.25rem;
        font-size: 0.85rem;
    }
    
    .mobile-alert i {
        font-size: 0.9rem;
    }
    
    .settings-section {
        padding: 0.5rem;
    }
    
    .setting-group {
        padding: 0.5rem;
    }
    
    .setting-group input {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
} 

/* Existing Data Modal Styles */
.btn-outline {
    background: transparent;
    border: 2px solid #6c757d;
    color: #6c757d;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-outline:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.btn-outline:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(108, 117, 125, 0.3);
}

#existingDataModal .modal-content {
    max-width: 500px;
    text-align: center;
}

#existingDataModal .btn-primary,
#existingDataModal .btn-secondary,
#existingDataModal .btn-outline {
    margin: 0.5rem 0;
    padding: 1rem;
    font-size: 1.1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#existingDataModal .btn-primary:hover,
#existingDataModal .btn-secondary:hover,
#existingDataModal .btn-outline:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

#existingDataModal .btn-primary {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border: none;
    color: white;
}

#existingDataModal .btn-secondary {
    background: linear-gradient(135deg, #3498db, #5dade2);
    border: none;
    color: white;
}

#existingDataModal .btn-outline {
    background: transparent;
    border: 2px solid #95a5a6;
    color: #7f8c8d;
}

#existingDataModal .btn-outline:hover {
    background: #95a5a6;
    color: white;
    border-color: #95a5a6;
}

@media (max-width: 768px) {
    #existingDataModal .modal-content {
        margin: 10% auto;
        padding: 1.5rem;
    }
    
    #existingDataModal .btn-primary,
    #existingDataModal .btn-secondary,
    #existingDataModal .btn-outline {
        padding: 0.875rem;
        font-size: 1rem;
    }
} 

/* MDM, Milk, Financial Forms Colorful Styles */
.mdm-form {
    background: linear-gradient(135deg, #e3f0ff 0%, #f6fbff 100%);
    border: 2px solid #b3d8fd;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(52, 152, 219, 0.08);
    padding: 1.5rem 1rem;
}
.milk-form {
    background: linear-gradient(135deg, #fffbe7 0%, #fffde4 100%);
    border: 2px solid #ffe082;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(255, 193, 7, 0.08);
    padding: 1.5rem 1rem;
}
.financial-form {
    background: linear-gradient(135deg, #eaffea 0%, #f6fff6 100%);
    border: 2px solid #b2f2bb;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(39, 174, 96, 0.08);
    padding: 1.5rem 1rem;
}

.form-group label.wheat {
    color: #b8860b;
    font-weight: 600;
}
.form-group label.rice {
    color: #388e3c;
    font-weight: 600;
}
.form-group label.milk {
    color: #00bcd4;
    font-weight: 600;
}
.form-group label.rupee {
    color: #27ae60;
    font-weight: 600;
}

.form-group label i {
    font-size: 1.1em;
    margin-right: 0.3em;
    vertical-align: middle;
}

.form-group input {
    border-image: linear-gradient(90deg, #b3d8fd, #ffe082, #b2f2bb) 1;
    box-shadow: 0 1px 6px rgba(52, 152, 219, 0.04);
} 

/* Report Confirmation Modal Styles */
.report-confirmation-modal,
.existing-reports-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.report-confirmation-content,
.existing-reports-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.report-confirmation-header,
.existing-reports-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 15px 15px 0 0;
    text-align: center;
}

.report-confirmation-header h3,
.existing-reports-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.report-confirmation-body,
.existing-reports-body {
    padding: 2rem;
    line-height: 1.6;
}

.report-confirmation-body p,
.existing-reports-body p {
    margin-bottom: 1rem;
    color: #333;
}

.reports-list {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid #667eea;
}

.report-confirmation-actions,
.existing-reports-actions {
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    border-top: 1px solid #eee;
}

.report-confirmation-actions button,
.existing-reports-actions button {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.report-confirmation-actions .confirm-btn,
.existing-reports-actions .confirm-btn {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.report-confirmation-actions .cancel-btn,
.existing-reports-actions .cancel-btn {
    background: linear-gradient(135deg, #95a5a6, #bdc3c7);
    color: white;
}

.report-confirmation-actions button:hover,
.existing-reports-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .report-confirmation-content,
    .existing-reports-content {
        width: 95%;
        margin: 1rem;
    }
    
    .report-confirmation-actions,
    .existing-reports-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .report-confirmation-actions button,
    .existing-reports-actions button {
        width: 100%;
        min-width: auto;
    }
}

/* Error and Confirmation Modal Styles */
.error-modal,
.confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-modal-content,
.confirmation-modal-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

.error-modal-header,
.confirmation-modal-header {
    padding: 1.5rem;
    border-radius: 15px 15px 0 0;
    text-align: center;
}

.error-modal-header {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.confirmation-modal-header {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}

.error-modal-header h3,
.confirmation-modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.error-modal-body,
.confirmation-modal-body {
    padding: 2rem;
    line-height: 1.6;
}

.error-modal-body p,
.confirmation-modal-body p {
    margin-bottom: 1rem;
    color: #333;
    text-align: center;
}

.error-modal-actions,
.confirmation-modal-actions {
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    border-top: 1px solid #eee;
}

.error-modal-actions button,
.confirmation-modal-actions button {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.error-modal-actions .ok-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.confirmation-modal-actions .confirm-btn {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.confirmation-modal-actions .cancel-btn {
    background: linear-gradient(135deg, #95a5a6, #bdc3c7);
    color: white;
}

.error-modal-actions button:hover,
.confirmation-modal-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Mobile Responsive for Error/Confirmation Modals */
@media (max-width: 768px) {
    .error-modal-content,
    .confirmation-modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .error-modal-actions,
    .confirmation-modal-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .error-modal-actions button,
    .confirmation-modal-actions button {
        width: 100%;
        min-width: auto;
    }
}

/* PEEO Password Modal Specific Styles */
#peeoPasswordModal .modal-content {
    animation: modalSlideIn 0.3s ease;
}

#peeoPasswordModal .modal-header {
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    border-bottom: none;
}

#peeoPasswordModal .modal-header h3 {
    color: white;
}

#peeoPasswordModal .close-btn {
    color: white;
}

#peeoPasswordModal .close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

#peeoPasswordModal input[type="password"],
#peeoPasswordModal input[type="text"] {
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

#peeoPasswordModal input[type="password"]:focus,
#peeoPasswordModal input[type="text"]:focus {
    border-color: #e67e22;
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.1);
    outline: none;
}

#peeoPasswordModal #peeoPasswordSubmitBtn:hover {
    background: linear-gradient(135deg, #d35400, #e67e22) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

#peeoPasswordModal #peeoPasswordSubmitBtn:active {
    transform: translateY(0);
}

#peeoPasswordModal .btn-secondary:hover {
    background: #5a6268 !important;
    transform: translateY(-2px);
}

#togglePeeoPassword {
    transition: color 0.3s ease;
}

#togglePeeoPassword:hover {
    color: #e67e22;
}

@media (max-width: 768px) {
    #peeoPasswordModal .password-modal {
        max-width: 90vw;
        margin: 1rem;
    }
}

