/* Admin Dashboard Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Loading Screen */
.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;
    color: white;
}

.loading-content {
    text-align: center;
    max-width: 400px;
}

.loading-spinner {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #fff;
}

.loading-content h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.loading-content p {
    font-size: 1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.loading-progress {
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.admin-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.admin-info span:first-child {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.admin-info span:last-child {
    color: #666;
    font-size: 0.9rem;
}

.user-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-logout {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

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

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

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

.btn-logout {
    background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
    border: none !important;
    color: white !important;
    padding: 0.6rem 1.2rem !important;
    border-radius: 25px !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;
}

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

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

.btn-logout i {
    color: white !important;
    font-size: 1rem !important;
}

/* Admin Dashboard */
.admin-dashboard {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-section h2 i {
    color: #667eea;
}

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

.stat-card {
    background: linear-gradient(135deg, #6dd5ed, #2193b0);
    color: #fff;
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.25);
}

.stat-card.password-changed-card {
    background: linear-gradient(135deg, #0f9b0f, #0b5d37);
    box-shadow: 0 18px 40px rgba(11, 93, 55, 0.4);
    cursor: pointer;
}

.stat-card.password-changed-card .stat-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #0f9b0f;
}

.stat-card.password-changed-card .stat-icon i {
    color: #116a35;
}

.stat-card.password-changed-card:hover {
    box-shadow: 0 22px 52px rgba(11, 93, 55, 0.5);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
}

.stat-content p {
    color: rgba(255,255,255,0.95);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Colorful variants for cards in order */
.stats-grid .stat-card:nth-child(1) { background: linear-gradient(135deg, #36d1dc, #5b86e5); }
.stats-grid .stat-card:nth-child(2) { background: linear-gradient(135deg, #00b09b, #96c93d); }
.stats-grid .stat-card:nth-child(3) { background: linear-gradient(135deg, #f7971e, #ffd200); }
.stats-grid .stat-card:nth-child(4) { background: linear-gradient(135deg, #fc466b, #3f5efb); }

/* Admin Actions */
.admin-actions h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-actions h3 i {
    color: #667eea;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.action-buttons .btn-primary {
    justify-content: center;
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: 500;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 40px 20px;
    overflow-y: auto;
    box-sizing: border-box;
}

.modal-content {
    background: linear-gradient(180deg, #ffffff, #f7f9fc);
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-content.large-modal { max-width: 960px; }

/* Support Inbox (Admin) */
.support-inbox-modalHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 12px;
    border-radius: 16px;
    background: linear-gradient(135deg, #7c3aed, #06b6d4);
    color: #fff;
    box-shadow: 0 10px 28px rgba(0,0,0,0.18);
}

.support-inbox-modalHeader h3 {
    margin: 0;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 10px;
}

.support-inbox-titleStack {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.05;
    gap: 2px;
}

.support-inbox-titleMain {
    font-weight: 900;
    letter-spacing: 0.2px;
}

.support-inbox-titleSub {
    font-size: 0.92rem;
    font-weight: 700;
    opacity: 0.95;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 52vw;
}

.support-inbox-modalHeader h3 i {
    color: rgba(255,255,255,0.95);
}

.support-inbox-modalHeaderActions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.support-inbox-backTop {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255,255,255,0.18);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 18px rgba(0,0,0,0.10);
}

.support-inbox-backTop:hover {
    background: rgba(255,255,255,0.26);
}

.support-inbox-backTop:active {
    transform: translateY(1px);
}

.support-inbox-closeTop {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255,255,255,0.18);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 18px rgba(0,0,0,0.10);
}

.support-inbox-closeTop:hover {
    background: rgba(255,255,255,0.26);
}

.support-inbox-closeTop:active {
    transform: translateY(1px);
}

.support-inbox-fab {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #e74c3c, #f39c12);
    color: #fff;
    box-shadow: 0 10px 28px rgba(0,0,0,0.22);
    z-index: 9999;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.support-inbox-fab i {
    font-size: 22px;
}

.support-inbox-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #2ecc71;
    color: #fff;
    border-radius: 999px;
    padding: 2px 7px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 2px solid #fff;
}

.support-inbox-modal .support-inbox-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 12px;
    margin-top: 12px;
}

.support-inbox-modal .support-inbox-list,
.support-inbox-modal .support-inbox-chat {
    min-width: 0;
}

.support-inbox-search input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    outline: none;
    font-family: inherit;
}

.support-inbox-open-nic {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    align-items: stretch;
}

.support-inbox-open-nic input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    outline: none;
    font-family: inherit;
}

.support-inbox-open-nic .btn-primary {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 10px 14px;
    font-size: 0.9rem;
}

.support-inbox-items {
    margin-top: 10px;
    border: 1px solid #eee;
    border-radius: 12px;
    background: #fafafa;
    overflow: auto;
    height: 420px;
}

.support-inbox-item {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.support-inbox-item:hover {
    background: rgba(231, 76, 60, 0.07);
}

.support-inbox-item.active {
    background: rgba(52, 152, 219, 0.10);
}

.support-inbox-item .topline {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-weight: 700;
    color: #2c3e50;
}

.support-inbox-item .subline {
    font-size: 0.85rem;
    color: #666;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.support-inbox-item .flag {
    font-size: 0.78rem;
    font-weight: 800;
    color: #fff;
    background: #e74c3c;
    border-radius: 999px;
    padding: 2px 8px;
    align-self: flex-start;
}

.support-inbox-chatHeader {
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(124,58,237,0.10), rgba(6,182,212,0.12));
    border: 1px solid #eee;
    border-radius: 12px;
    font-weight: 700;
    color: #333;
}

.support-inbox-messages {
    margin-top: 10px;
    border: 1px solid #eee;
    border-radius: 12px;
    background: #fff;
    height: 320px;
    overflow: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.support-inbox-bubble {
    max-width: 85%;
    padding: 10px 12px;
    border-radius: 14px;
    white-space: pre-wrap;
    word-break: break-word;
    border: 1px solid rgba(0,0,0,0.06);
}

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

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

.support-inbox-metaRow .ticks {
    margin-left: 8px;
    font-weight: 900;
    letter-spacing: -1px;
    color: #9aa0a6;
}

.support-inbox-metaRow .ticks.seen {
    color: #25D366;
}

.support-inbox-bubble.user {
    align-self: flex-start;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
}

.support-inbox-bubble.admin {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.18), rgba(124, 58, 237, 0.18));
    border: 1px solid rgba(124, 58, 237, 0.18);
}

.support-inbox-modal.support-inbox-chatOnly .support-inbox-list {
    display: none;
}

.support-inbox-modal.support-inbox-chatOnly .support-inbox-layout {
    grid-template-columns: 1fr;
}

.support-inbox-modal.support-inbox-chatOnly .support-inbox-chatHeader {
    font-weight: 800;
    color: #0f172a;
    background: linear-gradient(135deg, rgba(6,182,212,0.12), rgba(124,58,237,0.10));
    border-color: rgba(124,58,237,0.16);
}

.support-inbox-modal.support-inbox-chatOnly #supportInboxChatHeader {
    display: none;
}

.support-inbox-modal.support-inbox-chatOnly .support-inbox-titleMain {
    display: none;
}

.support-inbox-modal.support-inbox-chatOnly .support-inbox-modalHeader h3 i {
    display: none;
}

.support-inbox-modal.support-inbox-chatOnly .support-inbox-titleSub {
    font-size: 1.02rem;
    font-weight: 900;
    opacity: 1;
}

/* Default: before selecting school, show only placeholder header */
.support-inbox-modal:not(.support-inbox-hasSelection) .support-inbox-messages,
.support-inbox-modal:not(.support-inbox-hasSelection) .support-inbox-reply {
    display: none;
}

.support-inbox-modal:not(.support-inbox-hasSelection) .support-inbox-chat {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.support-inbox-modal:not(.support-inbox-hasSelection) .support-inbox-chatHeader {
    margin: 0;
    width: 100%;
    max-width: 620px;
    text-align: center;
    font-weight: 800;
    font-size: 1.04rem;
    line-height: 1.45;
    color: #334155;
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(241,245,249,0.96));
    border: 1px dashed rgba(124,58,237,0.34);
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

@media (min-width: 901px) {
    .support-inbox-modal:not(.support-inbox-hasSelection) .support-inbox-chat {
        min-height: 420px;
    }
    .support-inbox-modal:not(.support-inbox-hasSelection) .support-inbox-chatHeader {
        font-size: 1.1rem;
        max-width: 680px;
        padding: 22px 24px;
    }
}

@media (max-width: 600px) {
    .support-inbox-modalHeader {
        padding: 10px 10px;
        border-radius: 12px;
    }
    .support-inbox-modal.support-inbox-chatOnly .support-inbox-modalHeader {
        padding: 8px 10px;
    }
}

.support-inbox-reply {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

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

@media (max-width: 900px) {
    .support-inbox-modal .support-inbox-layout {
        grid-template-columns: 1fr;
    }
    .support-inbox-items {
        height: 280px;
    }
}

@media (max-width: 600px) {
    /* Fullscreen mobile modal */
    #supportInboxModal.modal {
        padding: 0;
        align-items: stretch;
        justify-content: stretch;
    }
    #supportInboxModal .modal-content.support-inbox-modal {
        width: 100%;
        max-width: none;
        height: 100svh;
        max-height: none;
        border-radius: 0;
        padding: 14px;
        overflow: hidden;
        box-shadow: none;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    #supportInboxModal .modal-buttons {
        display: flex;
        margin-top: 8px;
        padding-top: 6px;
        background: #fff;
        position: sticky;
        bottom: 0;
        z-index: 3;
    }

    .support-inbox-modalHeader {
        border-radius: 14px;
        position: sticky;
        top: 0;
        z-index: 2;
    }

    /* Show more of selected school on mobile header */
    .support-inbox-modalHeader h3 {
        min-width: 0;
        flex: 1 1 auto;
    }
    .support-inbox-titleStack {
        min-width: 0;
    }
    .support-inbox-titleSub {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        max-width: none;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    #supportInboxModal .support-inbox-layout {
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
    }

    #supportInboxModal .support-inbox-items {
        height: auto;
        max-height: 34vh;
    }

    #supportInboxModal .support-inbox-chatHeader {
        position: sticky;
        top: 72px;
        z-index: 1;
        backdrop-filter: blur(10px);
    }

    #supportInboxModal .support-inbox-messages {
        height: auto;
        flex: 1 1 auto;
        min-height: 0;
    }

    #supportInboxModal .support-inbox-chat {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    #supportInboxModal .support-inbox-reply {
        position: static;
        padding-top: 10px;
        background: linear-gradient(180deg, rgba(255,255,255,0.0), rgba(255,255,255,1) 35%);
    }

    #supportInboxModal .support-inbox-reply textarea {
        max-height: 120px;
    }
}

.modal-content.password-modal {
    background: linear-gradient(180deg, #ffffff, #f8fdf9);
    border: 1px solid rgba(17, 106, 53, 0.15);
    box-shadow: 0 28px 70px rgba(11, 93, 55, 0.25);
}

.modal-content.password-modal h3 {
    color: #0b5d37;
}

.modal-content.password-modal h3 i {
    color: #17a262;
}

.password-modal .result-container {
    background: transparent;
    padding: 0;
}

.password-modal .password-search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    padding: 12px 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(15, 155, 15, 0.08), rgba(11, 93, 55, 0.08));
    border: 1px solid rgba(17, 106, 53, 0.12);
    align-items: center;
}

.password-modal .password-search-bar input {
    flex: 1;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(17, 106, 53, 0.18);
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    color: #0b5d37;
}

.password-modal .password-search-bar input:focus {
    outline: none;
    border-color: #0f9b0f;
    box-shadow: 0 0 0 3px rgba(15, 155, 15, 0.12);
}

.password-modal .password-search-action {
    padding: 11px 16px;
    border-radius: 10px;
    border: none;
    color: #62be6a;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: linear-gradient(135deg, #009245, #0b5d37);
    box-shadow: 0 12px 26px rgba(0, 146, 69, 0.25);
}

.password-modal .password-search-action:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(11, 93, 55, 0.25);
}

.password-modal .password-search-action:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.password-modal .password-search-action i {
    font-size: 0.85rem;
}

/* Transactions modal search bar - ensure proper styling */
#transactionsModal .password-search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 14px;
    border: 1px solid rgba(52, 152, 219, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#transactionsModal .password-search-bar input {
    flex: 1;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(52, 152, 219, 0.18);
    font-size: 0.95rem;
    color: #2c3e50;
    background: #ffffff;
    transition: all 0.2s ease;
}

#transactionsModal .password-search-bar input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.12);
}

#transactionsModal .password-search-action {
    padding: 11px 16px;
    border-radius: 10px;
    border: none;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

#transactionsModal .password-search-action:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
}

#transactionsModal .password-search-action:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

#transactionsModal .password-search-action i {
    font-size: 0.85rem;
}

.reports-search-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 14px;
    border: 1px solid rgba(52, 73, 94, 0.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.reports-search-bar input {
    flex: 1;
    min-width: 180px;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid #dfe6e9;
    font-size: 0.95rem;
    color: #2c3e50;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}

.reports-search-bar input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.reports-search-bar .password-search-action {
    padding: 11px 16px;
    border-radius: 10px;
    border: none;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: linear-gradient(135deg, #16a085, #0e6655);
    box-shadow: 0 10px 20px rgba(22, 160, 133, 0.18);
}

.reports-search-bar .password-search-action:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(22, 160, 133, 0.25);
}

.reports-search-bar .password-search-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

@media (max-width: 768px) {
    .reports-search-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .reports-search-bar .password-search-action,
    .reports-search-bar input {
        width: 100%;
    }
}

.search-feedback {
    font-size: 0.9rem;
    margin: 0 0 10px 0;
    color: #2c3e50;
    min-height: 18px;
}

.search-feedback-success {
    color: #0f9b0f;
}

.search-feedback-error {
    color: #c0392b;
}

.search-hit {
    border-color: #f39c12 !important;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.3) !important;
    background: #fff9ec !important;
}

/* Mobile responsive for transactions search */
@media (max-width: 768px) {
    #transactionsModal .password-search-bar {
        flex-direction: column;
        align-items: stretch;
    }

    #transactionsModal .password-search-action {
        justify-content: center;
        width: 100%;
    }
}

.modal-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-content h3 i {
    color: #667eea;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.85rem;
}

/* Settings Sections */
.settings-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 1px solid #e9ecef;
}

.settings-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.setting-group {
    margin-bottom: 15px;
}

.setting-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.setting-group input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
}

.setting-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.8rem;
}

/* Modal Buttons */
.modal-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.modal-buttons button {
    flex: 1;
    min-width: 120px;
}

/* Result Container */
.result-container {
    margin-top: 20px;
    padding: 15px;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff, #f2f6ff);
    border: 1px solid #e3e9ff;
    max-height: 300px;
    overflow-y: auto;
}

/* Active Users List - Mobile scrollable */
.schools[data-d][data-b] {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.schools[data-d][data-b] > div {
    min-width: max-content;
}

.password-district-wrapper {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.password-district-card {
    border: 1px solid rgba(17, 106, 53, 0.16);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 38px rgba(11, 93, 55, 0.2);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.password-district-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 48px rgba(11, 93, 55, 0.28);
}

.password-district-header {
    padding: 16px 20px;
    background: linear-gradient(120deg, #0f9b0f, #0b5d37);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: #ffffff;
    gap: 12px;
}

.password-district-header:hover {
    filter: brightness(1.05);
}

.password-district-name {
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.3px;
}

.password-district-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
}

.password-district-body {
    display: none;
    padding: 18px 20px;
    background: linear-gradient(180deg, #ecfff1, #ddf8e5);
}

.password-block-card {
    border: 1px solid rgba(17, 106, 53, 0.15);
    border-radius: 14px;
    margin-bottom: 14px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(11, 93, 55, 0.18);
}

.password-block-header {
    padding: 12px 16px;
    background: linear-gradient(120deg, rgba(17, 106, 53, 0.12), rgba(12, 93, 59, 0.08));
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: #0b5d37;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.password-block-header:hover {
    background: linear-gradient(120deg, rgba(17, 106, 53, 0.18), rgba(12, 93, 59, 0.12));
}

.password-block-count {
    background: rgba(17, 106, 53, 0.15);
    padding: 4px 12px;
    border-radius: 999px;
    font-weight: 600;
    color: #0b5d37;
    font-size: 0.85rem;
}

.password-block-body {
    display: none;
    padding: 12px 18px 6px;
    background: #ffffff;
}

.password-school-row {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 118, 157, 0.12);
}

.password-school-row:last-child {
    border-bottom: none;
}

.password-index {
    font-weight: 700;
    color: #0b5d37;
}

.password-school-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.password-school-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.98rem;
}

.password-school-id {
    font-size: 0.8rem;
    color: #627b6b;
    letter-spacing: 0.4px;
}

.password-value {
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.95rem;
    color: #0b2f1f;
    background: linear-gradient(135deg, #b2f2bb, #6ad69d);
    padding: 6px 14px;
}


/* Tables inside result containers */
.result-container table thead th { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; }
.result-container table th, .result-container table td { border: none; }
.result-container table tbody tr:nth-child(even) { background: rgba(102,126,234,0.06); }

/* Clickable month rows */
.month-row { background: linear-gradient(90deg, rgba(102,126,234,0.12), rgba(118,75,162,0.12)); border-radius: 10px; }
.month-row:hover { background: linear-gradient(90deg, rgba(102,126,234,0.2), rgba(118,75,162,0.2)); }

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .user-info {
        flex-direction: column;
        align-items: center;
    }
    
    .admin-info {
        align-items: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .modal {
        align-items: flex-start;
        justify-content: flex-start;
        padding: 20px 12px;
    }

    .modal-content {
        width: 100%;
        max-height: none;
        margin: 0 auto;
        padding: 24px 20px;
    }

    .modal-buttons {
        flex-direction: column;
    }
    
    .modal-buttons button {
        width: 100%;
    }

    .password-district-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .password-district-count {
        align-self: flex-start;
    }

    .password-modal .password-search-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .password-modal .password-search-action {
        justify-content: center;
        width: 100%;
    }
    
    /* Active Users List - Mobile horizontal scroll */
    .schools[data-d][data-b] {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .schools[data-d][data-b] > div {
        min-width: 500px; /* Minimum width to show all columns on mobile */
    }

    .password-block-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .password-block-count {
        align-self: flex-start;
    }

    .password-block-body {
        padding: 12px 12px 6px;
    }

    .password-school-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .password-value {
        justify-self: flex-start;
        color: #0b2f1f;
        background: linear-gradient(135deg, #b2f2bb, #6ad69d);
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.3rem;
    }
    
    .admin-section h2 {
        font-size: 1.5rem;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-content h3 {
        font-size: 1.5rem;
    }

    .password-district-card {
        border-radius: 14px;
    }

    .password-district-body {
        padding: 14px 14px;
    }

    .password-block-card {
        border-radius: 12px;
    }

    .password-value {
        font-size: 0.9rem;
        padding: 6px 12px;
        color: #0b2f1f;
    }
}

/* PEEO Summary Accordion Styles */
.peeo-district-wrapper {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.peeo-district-card {
    border: 1px solid rgba(108, 92, 231, 0.16);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 38px rgba(108, 92, 231, 0.2);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.peeo-district-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 48px rgba(108, 92, 231, 0.28);
}

.peeo-district-header {
    padding: 16px 20px;
    background: linear-gradient(120deg, #6c5ce7, #5a4fcf);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: #ffffff;
    gap: 12px;
}

.peeo-district-header:hover {
    filter: brightness(1.05);
}

.peeo-district-name {
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.3px;
}

.peeo-district-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
}

.peeo-district-body {
    display: none;
    padding: 18px 20px;
    background: linear-gradient(180deg, #f5f3ff, #ede9fe);
}

.peeo-block-card {
    border: 1px solid rgba(108, 92, 231, 0.15);
    border-radius: 14px;
    margin-bottom: 14px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(108, 92, 231, 0.18);
}

.peeo-block-header {
    padding: 12px 16px;
    background: linear-gradient(120deg, rgba(108, 92, 231, 0.12), rgba(90, 79, 207, 0.08));
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: #6c5ce7;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.peeo-block-header:hover {
    background: linear-gradient(120deg, rgba(108, 92, 231, 0.18), rgba(90, 79, 207, 0.12));
}

.peeo-block-count {
    background: rgba(108, 92, 231, 0.15);
    padding: 4px 12px;
    border-radius: 999px;
    font-weight: 600;
    color: #6c5ce7;
    font-size: 0.85rem;
}

.peeo-block-body {
    display: none;
    padding: 12px 18px 6px;
    background: #ffffff;
}

.peeo-item-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.peeo-item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1) !important;
}

.peeo-item-header {
    transition: background-color 0.2s ease;
    border-radius: 8px;
    padding: 4px;
    margin: -4px;
}

.peeo-item-header:hover {
    background-color: rgba(108, 92, 231, 0.05);
}

.peeo-assigned-list {
    animation: slideDown 0.3s ease;
}

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

@media (max-width: 768px) {
    .peeo-district-header {
        padding: 14px 16px;
        flex-wrap: wrap;
    }
    .peeo-district-name {
        font-size: 0.95rem;
    }
    .peeo-district-count {
        font-size: 0.85rem;
        padding: 3px 10px;
    }
    .peeo-block-header {
        padding: 10px 14px;
        flex-wrap: wrap;
    }
    .peeo-block-count {
        font-size: 0.8rem;
        padding: 3px 10px;
    }
    .peeo-block-body {
        padding: 10px 14px 4px;
    }
}

@media (max-width: 480px) {
    .peeo-district-card {
        border-radius: 12px;
    }
    .peeo-district-body {
        padding: 14px 16px;
    }
    .peeo-block-card {
        border-radius: 12px;
        margin-bottom: 12px;
    }
    .peeo-block-body {
        padding: 8px 12px 4px;
    }
}

/* Hide loading screen */
.initial-loading-screen.hidden {
    display: none;
}

/* PEEO Downloads Modal - Mobile Responsive */
@media (max-width: 768px) {
    #peeoDownloadsModal .modal-content {
        width: 95vw !important;
        max-width: 95vw !important;
        padding: 15px !important;
        margin: 10px auto !important;
    }
    
    #peeoDownloadsModal .result-container {
        max-height: calc(100vh - 200px) !important;
    }
    
    /* Summary card mobile */
    #peeoDownloadsList > div:first-child h4 {
        font-size: 1.2rem !important;
    }
    
    #peeoDownloadsList > div:first-child > div:first-of-type {
        font-size: 2rem !important;
    }
    
    #peeoDownloadsList > div:first-child > div:last-child {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    /* Month row mobile */
    #peeoDownloadsList [id^="peeoDownloadsMonthRow_"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 14px !important;
    }
    
    #peeoDownloadsList [id^="peeoDownloadsMonthRow_"] > div:first-child {
        width: 100%;
    }
    
    #peeoDownloadsList [id^="peeoDownloadsMonthRow_"] > div:last-child {
        width: 100%;
        justify-content: space-between !important;
        flex-wrap: wrap;
    }
    
    /* PEEO row mobile */
    #peeoDownloadsList [id^="peeoRow_"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
        padding: 12px !important;
    }
    
    #peeoDownloadsList [id^="peeoRow_"] > div:first-child {
        width: 100%;
    }
    
    #peeoDownloadsList [id^="peeoRow_"] > div:last-child {
        width: 100%;
        justify-content: space-between !important;
        flex-wrap: wrap;
    }
    
    /* Download details mobile */
    #peeoDownloadsList [id$="_details"] > div {
        flex-direction: column !important;
    }
    
    #peeoDownloadsList [id$="_details"] > div > div {
        min-width: 100% !important;
        width: 100% !important;
    }
    
    #peeoDownloadsList [id$="_details"] > div > div:last-child {
        text-align: left !important;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    #peeoDownloadsModal .modal-content {
        width: 98vw !important;
        max-width: 98vw !important;
        padding: 12px !important;
        margin: 5px auto !important;
    }
    
    #peeoDownloadsModal .result-container {
        max-height: calc(100vh - 150px) !important;
    }
    
    /* Summary card small mobile */
    #peeoDownloadsList > div:first-child {
        padding: 15px !important;
    }
    
    #peeoDownloadsList > div:first-child h4 {
        font-size: 1rem !important;
        margin-bottom: 10px !important;
    }
    
    #peeoDownloadsList > div:first-child > div:first-of-type {
        font-size: 1.8rem !important;
        margin: 10px 0 !important;
    }
    
    #peeoDownloadsList > div:first-child > div:last-child > div {
        padding: 8px 14px !important;
        font-size: 0.9rem !important;
    }
    
    /* Month row small mobile */
    #peeoDownloadsList [id^="peeoDownloadsMonthRow_"] {
        padding: 12px !important;
    }
    
    #peeoDownloadsList [id^="peeoDownloadsMonthRow_"] > div:first-child > div:first-child {
        padding: 8px !important;
    }
    
    #peeoDownloadsList [id^="peeoDownloadsMonthRow_"] > div:first-child > div:first-child i {
        font-size: 1.3rem !important;
    }
    
    #peeoDownloadsList [id^="peeoDownloadsMonthRow_"] > div:first-child > div:last-child > div:first-child {
        font-size: 1.1rem !important;
    }
    
    #peeoDownloadsList [id^="peeoDownloadsMonthRow_"] > div:first-child > div:last-child > div:last-child {
        font-size: 0.85rem !important;
    }
    
    #peeoDownloadsList [id^="peeoDownloadsMonthRow_"] > div:last-child {
        gap: 8px !important;
    }
    
    #peeoDownloadsList [id^="peeoDownloadsMonthRow_"] > div:last-child > div:first-child {
        gap: 8px !important;
    }
    
    #peeoDownloadsList [id^="peeoDownloadsMonthRow_"] > div:last-child > div:first-child > div {
        padding: 6px 12px !important;
        font-size: 0.85rem !important;
    }
    
    /* PEEO row small mobile */
    #peeoDownloadsList [id^="peeoRow_"] {
        padding: 10px !important;
    }
    
    #peeoDownloadsList [id^="peeoRow_"] > div:first-child > div:first-child {
        padding: 8px !important;
    }
    
    #peeoDownloadsList [id^="peeoRow_"] > div:first-child > div:first-child i {
        font-size: 1rem !important;
    }
    
    #peeoDownloadsList [id^="peeoRow_"] > div:first-child > div:last-child > div:first-child {
        font-size: 1rem !important;
    }
    
    #peeoDownloadsList [id^="peeoRow_"] > div:first-child > div:last-child > div:last-child {
        font-size: 0.8rem !important;
    }
    
    #peeoDownloadsList [id^="peeoRow_"] > div:last-child {
        gap: 8px !important;
        flex-wrap: wrap;
    }
    
    #peeoDownloadsList [id^="peeoRow_"] > div:last-child > div:first-child {
        gap: 6px !important;
        flex-wrap: wrap;
    }
    
    #peeoDownloadsList [id^="peeoRow_"] > div:last-child > div:first-child > div {
        padding: 5px 10px !important;
        font-size: 0.8rem !important;
    }
    
    /* Download details small mobile */
    #peeoDownloadsList [id$="_details"] {
        padding: 10px !important;
    }
    
    #peeoDownloadsList [id$="_details"] > div {
        gap: 8px !important;
    }
    
    #peeoDownloadsList [id$="_details"] > div > div {
        padding: 10px !important;
    }
    
    #peeoDownloadsList [id$="_details"] > div > div > div:first-child > div:first-child {
        padding: 6px !important;
    }
    
    #peeoDownloadsList [id$="_details"] > div > div > div:first-child > div:first-child i {
        font-size: 0.9rem !important;
    }
    
    #peeoDownloadsList [id$="_details"] > div > div > div:first-child > div:last-child {
        font-size: 1rem !important;
    }
    
    #peeoDownloadsList [id$="_details"] > div > div > div:last-child {
        min-width: 100% !important;
        margin-top: 8px;
    }
    
    #peeoDownloadsList [id$="_details"] > div > div > div:last-child > div {
        padding: 8px !important;
    }
    
    #peeoDownloadsList [id$="_details"] > div > div > div:last-child > div > div:first-child {
        font-size: 0.75rem !important;
    }
    
    #peeoDownloadsList [id$="_details"] > div > div > div:last-child > div > div:last-child {
        font-size: 0.85rem !important;
    }
}

/* Admin: live chat settings + bulk broadcast */
.support-chat-admin-section .support-chat-admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 12px;
}
.support-chat-admin-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 16px;
}
.support-chat-admin-card h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 1rem;
}
.support-chat-admin-hint {
    margin: 0 0 10px 0;
    font-size: 0.88rem;
    color: #666;
    line-height: 1.45;
}
.support-chat-admin-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    box-sizing: border-box;
}
.support-chat-admin-select {
    width: 100%;
    margin-top: 4px;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-family: inherit;
}
.support-chat-admin-multiselect {
    width: 100%;
    margin-top: 4px;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-family: inherit;
    box-sizing: border-box;
}
.support-chat-admin-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 0.92rem;
    margin-top: 6px;
}
.support-chat-admin-check input {
    margin-top: 3px;
}
.support-chat-admin-placeholders {
    margin: 6px 0 0 0;
    font-size: 0.82rem;
    color: #555;
}
.support-chat-admin-placeholders code {
    background: #eef2f7;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}
.support-chat-admin-status {
    font-size: 0.9rem;
    color: #27ae60;
}
.support-chat-bulk-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: end;
}
.support-chat-bulk-summary {
    margin-top: 10px;
    padding: 10px 12px;
    background: #fff;
    border: 1px dashed #bdc3c7;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #2c3e50;
    line-height: 1.4;
}
@media (max-width: 960px) {
    .support-chat-admin-section .support-chat-admin-grid {
        grid-template-columns: 1fr;
    }
    .support-chat-bulk-row {
        grid-template-columns: 1fr;
    }
}

/* Tool modals (Bulk / Live chat) — स्क्रॉल योग्य बॉडी */
.admin-tools-modal-body {
    max-height: min(70vh, calc(100dvh - 160px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 6px;
    margin-bottom: 8px;
}
.support-chat-admin-field-label {
    display: block;
    margin-top: 12px;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 0.92rem;
    color: #2c3e50;
}
.support-chat-admin-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}
.support-chat-admin-btn {
    min-height: 44px;
    padding: 10px 16px;
    font-size: 0.95rem;
}
.support-chat-admin-btn--full {
    width: 100%;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    box-sizing: border-box;
}
.support-chat-admin-btn--danger {
    background: #c0392b !important;
    border-color: #a93226 !important;
}
.support-chat-admin-placeholders--wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    line-height: 1.5;
}
.support-chat-bulk-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.support-chat-bulk-field {
    width: 100%;
}
.support-chat-bulk-allblocks {
    margin-top: 0;
    padding: 10px 12px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}
.support-chat-admin-textarea,
.support-chat-admin-select {
    font-size: 16px;
}
.support-chat-admin-multiselect {
    font-size: 16px;
    min-height: 120px;
}

/* लाइव चैट — बल्क संदेश मोडल (प्रोफेशनल + रंगीन) */
/* फ्लेक्स: हेडर + फिक्स फुटर, बीच स्क्रॉल — नीचा «बंद» बटन कभी क्लिप न हो */
#supportChatBulkModal.support-chat-bulk-modal-overlay.modal {
    align-items: flex-start;
    justify-content: center;
    padding: 20px 16px 24px;
    box-sizing: border-box;
}

#supportChatBulkModal.support-chat-bulk-modal-overlay .modal-content.support-chat-bulk-modal {
    padding: 0;
    overflow: hidden;
    max-width: 720px;
    width: min(94vw, 720px);
    max-height: min(90vh, calc(100dvh - 40px));
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin-top: auto;
    margin-bottom: auto;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow:
        0 28px 72px rgba(45, 52, 54, 0.38),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    background: #fff;
}

.support-chat-bulk-modal__hero {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    padding: 0.85rem 2.75rem 0.9rem 1rem;
    color: #fff;
    position: relative;
    overflow: hidden;
    background: linear-gradient(125deg, #5f27cd 0%, #341f97 32%, #00b894 72%, #54a0ff 100%);
}

.support-chat-bulk-modal__close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 34px;
    height: 34px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    transition: background 0.15s ease, transform 0.15s ease;
}

.support-chat-bulk-modal__close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

.support-chat-bulk-modal__close:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.55);
}

.support-chat-bulk-modal__close:active {
    transform: scale(0.98);
}

.support-chat-bulk-modal__hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 90% 70% at 100% -10%, rgba(255, 255, 255, 0.4), transparent 50%);
    pointer-events: none;
}

.support-chat-bulk-modal__hero-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
    position: relative;
    z-index: 1;
}

.support-chat-bulk-modal__hero-text {
    position: relative;
    z-index: 1;
    min-width: 0;
}

/* id + h3 + class — .modal-content h3 के color:#333 से ऊपर */
#supportChatBulkModal h3.support-chat-bulk-modal__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.02em;
    color: #ffffff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
}

#supportChatBulkModal .support-chat-bulk-modal__body.admin-tools-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1.2rem 1.25rem 0.85rem;
    margin-bottom: 0;
    background: linear-gradient(180deg, #f4f6ff 0%, #eefcf9 42%, #fff8fb 100%);
}

.support-chat-bulk-section {
    background: #fff;
    border-radius: 16px;
    padding: 1rem 1.15rem 1.15rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(95, 39, 205, 0.14);
    box-shadow: 0 6px 24px rgba(95, 39, 205, 0.08);
}

.support-chat-bulk-section--audience {
    border-left: 4px solid #5f27cd;
}

.support-chat-bulk-section--roster {
    border-left: 4px solid #00b894;
}

.support-chat-bulk-section--compose {
    border-left: 4px solid #fd79a8;
}

.support-chat-bulk-section__head {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 6px;
}

.support-chat-bulk-section__badge {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.support-chat-bulk-section__badge--violet {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
}

.support-chat-bulk-section__badge--teal {
    background: linear-gradient(135deg, #00b894, #55efc4);
}

.support-chat-bulk-section__badge--rose {
    background: linear-gradient(135deg, #fd79a8, #e84393);
}

.support-chat-bulk-section__title {
    margin: 0;
    font-size: 1.06rem;
    font-weight: 700;
    color: #2d3436;
    letter-spacing: 0.02em;
}

.support-chat-bulk-label-hint {
    font-weight: 500;
    color: #636e72;
    font-size: 0.86em;
}

#supportChatBulkModal .support-chat-bulk-fields .support-chat-admin-field-label {
    margin-top: 0;
}

#supportChatBulkModal .support-chat-bulk-section .support-chat-admin-field-label {
    margin-top: 12px;
    color: #2d3436;
}

#supportChatBulkModal .support-chat-bulk-input:focus {
    outline: none;
    border-color: #6c5ce7 !important;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.22);
}

#supportChatBulkModal .support-chat-bulk-allblocks {
    margin-top: 8px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    border: 1px solid #e17055;
    border-radius: 12px;
    color: #2d3436;
    box-shadow: 0 4px 14px rgba(253, 203, 110, 0.35);
}

#supportChatBulkModal .support-chat-bulk-allblocks span {
    font-weight: 500;
}

.support-chat-bulk-roster-hint {
    font-size: 0.89rem;
    color: #636e72;
    margin: 4px 0 12px 0;
    line-height: 1.5;
}

.support-chat-bulk-btn-prepare {
    width: 100%;
    box-sizing: border-box;
    min-height: 48px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #00b894 0%, #00cec9 45%, #0984e3 100%);
    box-shadow: 0 8px 26px rgba(0, 206, 201, 0.42);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.support-chat-bulk-btn-prepare:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 32px rgba(9, 132, 227, 0.4);
}

.support-chat-bulk-btn-prepare:active {
    transform: translateY(0);
}

#supportChatBulkModal .support-chat-bulk-summary--panel {
    margin-top: 14px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #dff9fb 0%, #e8e0ff 48%, #ffeef6 100%);
    border: 1px solid rgba(108, 92, 231, 0.35);
    border-radius: 13px;
    font-size: 0.94rem;
    line-height: 1.5;
    min-height: 3.2rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
    color: #2d3436;
}

#supportChatBulkModal .support-chat-bulk-message-area {
    min-height: 100px;
}

#supportChatBulkModal .support-chat-bulk-placeholders {
    margin-top: 10px;
}

.support-chat-bulk-ph-hint {
    font-weight: 500;
    color: #636e72;
    font-size: 0.82em;
}

.support-chat-bulk-ph-row {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    width: 100%;
}

#supportChatBulkModal .support-chat-bulk-ph-chip,
#supportChatAutoModal .support-chat-bulk-ph-chip {
    font: inherit;
    font-weight: 600;
    font-size: 0.78rem;
    font-family: ui-monospace, 'Cascadia Code', 'Segoe UI Mono', monospace;
    cursor: pointer;
    margin: 0;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #fdcb6e;
    background: linear-gradient(180deg, #fff9e6, #ffeaa7);
    color: #2d3436;
    box-shadow: 0 2px 6px rgba(253, 203, 110, 0.35);
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

#supportChatBulkModal .support-chat-bulk-ph-chip:hover,
#supportChatAutoModal .support-chat-bulk-ph-chip:hover {
    transform: translateY(-1px);
    border-color: #e17055;
    box-shadow: 0 4px 12px rgba(225, 112, 85, 0.28);
}

#supportChatBulkModal .support-chat-bulk-ph-chip:focus,
#supportChatAutoModal .support-chat-bulk-ph-chip:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.35);
}

#supportChatBulkModal .support-chat-bulk-ph-chip:active,
#supportChatAutoModal .support-chat-bulk-ph-chip:active {
    transform: translateY(0);
}

#supportChatAutoModal .support-chat-auto-template-placeholders {
    margin-top: 8px;
}

#supportChatBulkModal .support-chat-bulk-check-unread {
    margin-top: 14px;
    padding: 12px 14px;
    background: linear-gradient(90deg, #f8f9ff, #f1f2f6);
    border-radius: 11px;
    border: 1px dashed #a29bfe;
}

.support-chat-bulk-btn-send {
    width: 100%;
    box-sizing: border-box;
    min-height: 52px;
    margin-top: 16px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.03rem;
    font-weight: 700;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #ff7675 0%, #fd79a8 38%, #e17055 100%);
    box-shadow: 0 10px 30px rgba(253, 121, 168, 0.42);
    letter-spacing: 0.02em;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.support-chat-bulk-btn-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(225, 112, 85, 0.48);
}

.support-chat-bulk-btn-send:active {
    transform: translateY(0);
}

#supportChatBulkModal .support-chat-bulk-modal__footer {
    flex-shrink: 0;
    padding: 14px 1.25rem 1.2rem;
    margin: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.65), #fff);
    border-top: 1px solid rgba(108, 92, 231, 0.14);
    justify-content: center;
}

.support-chat-bulk-btn-close {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-left: 1.1rem;
    padding-right: 1.1rem;
    border-radius: 10px;
    font-weight: 600;
}

@media (max-width: 600px) {
    #supportChatBulkModal.support-chat-bulk-modal-overlay .modal-content.support-chat-bulk-modal {
        width: 94%;
        border-radius: 18px;
    }

    .support-chat-bulk-modal__hero {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 0.6rem;
        padding: 0.55rem 2.4rem 0.6rem 0.65rem;
    }

    .support-chat-bulk-modal__hero-text {
        text-align: left;
    }

    .support-chat-bulk-modal__close {
        top: 6px;
        right: 6px;
        width: 30px;
        height: 30px;
        font-size: 0.82rem;
        border-radius: 8px;
    }

    .support-chat-bulk-modal__hero-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        border-radius: 10px;
    }

    #supportChatBulkModal h3.support-chat-bulk-modal__title {
        font-size: 0.88rem;
        margin: 0;
        line-height: 1.28;
        color: #ffffff;
    }
}

/* पुष्टि / थीम्ड कन्फर्म मोडल — admin.html सिर्फ admin-styles.css लोड करता है, इसलिए यहाँ परिभाषित */
@keyframes adminModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-24px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#themedConfirmModal.confirmation-modal {
    position: fixed;
    inset: 0;
    width: 100%;
    min-height: 100%;
    min-height: 100dvh;
    box-sizing: border-box;
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: rgba(0, 0, 0, 0.72);
    z-index: 50000;
    isolation: isolate;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#themedConfirmModal .confirmation-modal-content {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
    max-width: 450px;
    width: 100%;
    max-height: min(80vh, 100dvh - 32px);
    overflow-y: auto;
    margin: auto;
    animation: adminModalSlideIn 0.28s ease-out;
    flex-shrink: 0;
}

#themedConfirmModal .confirmation-modal-header {
    padding: 1.5rem;
    border-radius: 15px 15px 0 0;
    text-align: center;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: #fff;
}

#themedConfirmModal .confirmation-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

#themedConfirmModal .confirmation-modal-body {
    padding: 1.5rem 1.75rem;
    line-height: 1.55;
}

#themedConfirmModal .confirmation-modal-body p {
    margin: 0;
    color: #333;
    text-align: center;
    font-size: 1rem;
}

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

#themedConfirmModal .confirmation-modal-actions button {
    padding: 0.85rem 1.35rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-width: 120px;
}

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

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

#themedConfirmModal .confirmation-modal-actions button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

@media (max-width: 768px) {
    #themedConfirmModal .confirmation-modal-content {
        width: 100%;
        max-width: none;
    }

    #themedConfirmModal .confirmation-modal-actions {
        flex-direction: column;
    }

    #themedConfirmModal .confirmation-modal-actions button {
        width: 100%;
        min-width: 0;
    }
}
