/* ================================================
   Admin Panel — Extended Styles
   Builds on top of the main style.css
   ================================================ */

/* ── Tab Bar ──────────────────────────────────────────────── */
.admin-tab-bar {
    display: flex;
    gap: 4px;
    background: var(--white-color);
    padding: 8px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 1.4rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.admin-tab-bar::-webkit-scrollbar { display: none; }

.admin-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: transparent;
    font-family: 'Prompt', sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    color: #777;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
    position: relative;
}

.admin-tab:hover {
    background: var(--light-grey-color);
    color: var(--dark-grey-color);
}

.admin-tab.active {
    background: var(--primary-color);
    color: var(--white-color);
}

.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

.admin-tab.active .tab-badge {
    background: rgba(255,255,255,0.3);
}

/* ── Stats Row ────────────────────────────────────────────── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.stat-card {
    background: var(--white-color);
    border-radius: 12px;
    padding: 1.2rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: box-shadow 0.2s;
}

.stat-card:hover {
    box-shadow: var(--shadow-hover);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-body {
    min-width: 0;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--dark-grey-color);
    line-height: 1.1;
}

.stat-label {
    font-size: 0.8rem;
    color: #999;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Filter Bar ───────────────────────────────────────────── */
.admin-filter-bar {
    background: var(--white-color);
    border-radius: 12px;
    padding: 1.2rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.2rem;
}

.admin-filter-row {
    display: flex;
    gap: 0.8rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

/* ── Table ────────────────────────────────────────────────── */
.admin-table-wrap {
    background: var(--white-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow-x: auto;
    margin-bottom: 1rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.admin-table thead tr {
    background: var(--light-grey-color);
    border-bottom: 2px solid var(--border-color);
}

.admin-table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 700;
    color: #666;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.admin-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--dark-grey-color);
    vertical-align: middle;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table tbody tr:hover {
    background: #fafbfa;
}

.table-loading {
    text-align: center !important;
    color: #aaa;
    padding: 2.5rem !important;
    font-size: 0.95rem;
}

.table-empty {
    text-align: center !important;
    color: #bbb;
    padding: 2.5rem !important;
}

/* Cell helpers */
.cell-name {
    font-weight: 600;
    color: var(--dark-grey-color);
}

.cell-sub {
    font-size: 0.78rem;
    color: #999;
    margin-top: 2px;
}

.cell-mono {
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    color: #555;
}

/* Action buttons in table */
.table-actions {
    display: flex;
    gap: 5px;
    flex-wrap: nowrap;
}

.btn-table {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid transparent;
    font-family: 'Prompt', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.btn-table-primary {
    background: var(--primary-light);
    color: var(--primary-color);
    border-color: rgba(65,130,110,0.2);
}

.btn-table-primary:hover {
    background: var(--primary-color);
    color: #fff;
}

.btn-table-danger {
    background: #fff0f0;
    color: var(--danger);
    border-color: rgba(231,76,60,0.2);
}

.btn-table-danger:hover {
    background: var(--danger);
    color: #fff;
}

.btn-table-warning {
    background: #fff8e6;
    color: #856404;
    border-color: rgba(255,193,7,0.3);
}

.btn-table-warning:hover {
    background: #ffc107;
    color: #333;
}

.btn-table-info {
    background: #e3f2fd;
    color: #1565c0;
    border-color: rgba(21,101,192,0.2);
}

.btn-table-info:hover {
    background: #1565c0;
    color: #fff;
}

.btn-table:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Admin Pagination ─────────────────────────────────────── */
.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 0.85rem 1.2rem;
    background: var(--white-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 1.4rem;
}

.admin-pagination-info {
    font-size: 0.82rem;
    color: #999;
}

.admin-pagination-controls {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

/* ── User Search Dropdown ─────────────────────────────────── */
.user-search-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    background: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    z-index: 500;
    max-height: 220px;
    overflow-y: auto;
}

.user-search-dropdown-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}

.user-search-dropdown-item:last-child {
    border-bottom: none;
}

.user-search-dropdown-item:hover {
    background: var(--light-grey-color);
}

.user-search-dropdown-item .dd-name {
    font-weight: 600;
    color: var(--dark-grey-color);
}

.user-search-dropdown-item .dd-email {
    font-size: 0.78rem;
    color: #999;
}

/* Selected user chip */
.selected-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--primary-light);
    border: 1px solid rgba(65,130,110,0.25);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
}

.selected-user-chip button {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    transition: color 0.15s;
}

.selected-user-chip button:hover {
    color: var(--danger);
}

/* ── Verify slip badge in bookings table ──────────────────── */
.slip-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.slip-verified-badge.verified {
    background: #bfe8c8;
    color: #12573f;
}

.slip-verified-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.slip-verified-badge.none {
    background: #f5f5f5;
    color: #999;
}

/* ================================================
   Edit User Form Grid
   ================================================ */
.edit-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
}

@media (max-width: 520px) {
    .edit-form-grid {
        grid-template-columns: 1fr;
    }
    .edit-form-grid .form-row[style*="grid-column"] {
        grid-column: 1 !important;
    }
}

/* ── Phone Input Row ────────────────────────────────────────── */
.phone-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.phone-input-row input[type="text"] {
    flex: 1;
    width: auto;
    padding: 9px 13px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Prompt', sans-serif;
    font-size: 0.92rem;
    color: var(--dark-grey-color);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.phone-input-row input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(65, 130, 110, 0.12);
}

.phone-input-row input.input-error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.btn-remove-phone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(231, 76, 60, 0.25);
    background: #fff0f0;
    color: var(--danger);
    cursor: pointer;
    flex-shrink: 0;
    font-size: 0.85rem;
    transition: background 0.15s, color 0.15s;
}

.btn-remove-phone:hover {
    background: var(--danger);
    color: #fff;
}

.btn-remove-phone:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-add-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px dashed var(--primary-color);
    background: var(--primary-light);
    color: var(--primary-color);
    font-family: 'Prompt', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-style 0.15s;
    margin-top: 2px;
}

.btn-add-phone:hover {
    background: rgba(65, 130, 110, 0.18);
    border-style: solid;
}

#modal-user-body {
    animation: fade-in-up 0.22s ease;
}

/* ── Edit / View mode transition ───────────────────────────── */
#modal-user-edit-form {
    animation: fade-in-up 0.22s ease;
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Edit toggle button active state ───────────────────────── */
#btn-toggle-edit-user.editing {
    background: #fff3cd;
    color: #856404;
    border-color: rgba(255, 193, 7, 0.35);
}

/* ================================================
   Slip Hover Preview
   ================================================ */
.slip-hover-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: default;
}

/* ── Portal preview — appended to <body> ────────────────────── */
#slip-preview-portal {
    position: fixed;
    z-index: 600;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.92);
    transition:
        opacity   0.18s ease,
        transform 0.18s ease;
    /* Width fixed — positioned via JS */
    width: 300px;
}

#slip-preview-portal.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: none; /* preview itself never blocks clicks */
}

/* Card shell */
.slip-preview-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
    padding: 6px;
    overflow: hidden;
}

/* Arrow — rendered as a child div, rotated via JS class */
.slip-preview-arrow {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left:  8px solid transparent;
    border-right: 8px solid transparent;
}

/* Arrow pointing up (preview below the badge) */
.slip-preview-arrow.arrow-up {
    border-bottom: 9px solid var(--border-color);
    top: -9px;
}

.slip-preview-arrow.arrow-up::after {
    content: '';
    position: absolute;
    left: -7px;
    top: 2px;
    width: 0;
    height: 0;
    border-left:  7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 8px solid #fff;
}

/* Arrow pointing down (preview above the badge) */
.slip-preview-arrow.arrow-down {
    border-top: 9px solid var(--border-color);
    bottom: -9px;
}

.slip-preview-arrow.arrow-down::after {
    content: '';
    position: absolute;
    left: -7px;
    top: -10px;
    width: 0;
    height: 0;
    border-left:  7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 8px solid #fff;
}

/* Image area */
.slip-preview-img-wrap {
    width: 100%;
    height: 450px;
    border-radius: 6px;
    background: #f5f5f5;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.slip-preview-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 6px;
}

.slip-preview-img-wrap .slip-preview-loading {
    position: absolute;
    inset: 0;
    border-radius: 6px;
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #fafafa 50%,
        #f0f0f0 75%
    );
    background-size: 400% 100%;
    animation: shimmer 1.2s infinite;
}

.slip-preview-img-wrap .slip-preview-error {
    font-size: 0.75rem;
    color: #bbb;
    text-align: center;
    padding: 0.5rem;
    display: none;
}

/* Label */
.slip-preview-label {
    font-size: 0.7rem;
    color: #aaa;
    text-align: center;
    margin-top: 5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Hint icon on badge */
.slip-verified-badge.has-preview {
    cursor: pointer;
    gap: 6px;
}

.slip-preview-icon {
    font-size: 0.68rem;
    opacity: 0.5;
    transition: opacity 0.15s;
}

.slip-hover-wrap:hover .slip-preview-icon {
    opacity: 1;
}

.btn-slip-note-edit {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid rgba(65, 130, 110, 0.25);
    background: var(--primary-light);
    color: var(--primary-color);
    font-family: 'Prompt', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.btn-slip-note-edit:hover {
    background: var(--primary-color);
    color: #fff;
}

#slip-note-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(65, 130, 110, 0.12);
}

/* Touch — no hover, no portal shown */
@media (hover: none) {
    #slip-preview-portal {
        display: none !important;
    }
}

/* Create booking */
.schedule-card {
    background: var(--white-color);
    border: 2px solid var(--border-color);  /* use border not outline */
    border-radius: 8px;
    padding: 10px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.schedule-card:hover {
    background: var(--primary-light);
    border-color: rgba(65, 130, 110, 0.4);
}

/* Fix: was `.schedule-card .selected` (child) — now `.schedule-card.selected` (self) */
.schedule-card.selected {
    background: var(--primary-light);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(65, 130, 110, 0.2);
}

.schedule-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-grey-color);
}

.schedule-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.78rem;
    color: #999;
}

.form-error {
    color: var(--danger, #e74c3c);
    font-size: 0.85rem;
    padding: 8px 12px;
    background: #fff0f0;
    border-radius: 8px;
    border: 1px solid rgba(231, 76, 60, 0.25);
    margin-top: 0.5rem;
}

.form-error.hidden { display: none; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: 1fr 1fr;
    }

    .admin-filter-row {
        flex-direction: column;
    }

    .admin-filter-row .form-row {
        width: 100%;
    }

    .admin-table th:nth-child(4),
    .admin-table td:nth-child(4),
    .admin-table th:nth-child(7),
    .admin-table td:nth-child(7),
    .admin-table th:nth-child(8),
    .admin-table td:nth-child(8) {
        display: none;
    }

    .admin-tab span:not(.tab-badge) {
        display: none;
    }

    .admin-tab {
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
}

/* ================================================
   Transfer Points Tab
   ================================================ */

.section-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

.section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark-grey-color);
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-subtitle {
    font-size: 0.82rem;
    color: #999;
    margin: 0;
}

/* ── Add form ── */
.tp-add-form {
    background: var(--white-color);
    border: 1.5px dashed var(--primary-color);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    margin-bottom: 1.2rem;
    animation: fade-in-up 0.2s ease;
}

.tp-add-form-inner {
    display: flex;
    gap: 0.8rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.tp-add-actions {
    display: flex;
    gap: 6px;
    align-self: flex-end;
    padding-bottom: 1px;
}

/* ── List wrapper ── */
.tp-list-wrap {
    background: var(--white-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.tp-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.2rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
    font-size: 0.88rem;
    color: #666;
    background: var(--light-grey-color);
}

.tp-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ── Loading / Empty ── */
.tp-loading,
.tp-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #bbb;
    font-size: 0.92rem;
}

.tp-empty i {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #ddd;
}

/* ── Individual item ── */
.tp-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.2rem;
    border-bottom: 1px solid var(--border-color);
    gap: 0.8rem;
    transition: background 0.15s;
    animation: fade-in-up 0.18s ease;
}

.tp-item:last-child {
    border-bottom: none;
}

.tp-item:hover {
    background: #fafbfa;
}

.tp-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.tp-rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--primary-light);
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Top-3 rank highlights */
.tp-rank-badge.rank-1 {
    background: #fff3cd;
    color: #856404;
}

.tp-rank-badge.rank-2 {
    background: #f5f5f5;
    color: #555;
}

.tp-rank-badge.rank-3 {
    background: #fde8d8;
    color: #b55a00;
}

.tp-keyword {
    font-size: 0.93rem;
    font-weight: 600;
    color: var(--dark-grey-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tp-weight-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--light-grey-color);
    color: #888;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.tp-item-actions {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.btn-tp-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid rgba(231, 76, 60, 0.2);
    background: #fff0f0;
    color: var(--danger);
    font-family: 'Prompt', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.btn-tp-delete:hover {
    background: var(--danger);
    color: #fff;
}

.btn-tp-delete:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Error / success toast inline ── */
.tp-toast {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 1.2rem 0.8rem;
    animation: fade-in-up 0.18s ease;
}

.tp-toast.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.tp-toast.error {
    background: #fff0f0;
    color: var(--danger);
    border: 1px solid rgba(231, 76, 60, 0.2);
}

/* ================================================
   Statistics Tab
   ================================================ */

/* ── Filter bar ── */
.stats-filter-bar {
    background: var(--white-color);
    border-radius: 12px;
    padding: 1.2rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.4rem;
}

.stats-filter-row {
    display: flex;
    gap: 0.8rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

/* ── 2×2 Chart grid ── */
.stats-chart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

@media (max-width: 900px) {
    .stats-chart-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Chart card ── */
.stats-chart-card {
    background: var(--white-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 1.2rem 1.2rem 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: box-shadow 0.2s;
}

.stats-chart-card:hover {
    box-shadow: var(--shadow-hover);
}

.stats-chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.stats-chart-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--dark-grey-color);
    display: flex;
    align-items: center;
    gap: 7px;
}

.stats-chart-badge {
    font-size: 0.75rem;
    color: #aaa;
    white-space: nowrap;
}

.stats-chart-area {
    min-height: 280px;
}

/* ── Loading skeleton for charts ── */
.chart-skeleton {
    width: 100%;
    height: 280px;
    border-radius: 8px;
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #fafafa 50%,
        #f0f0f0 75%
    );
    background-size: 400% 100%;
    animation: shimmer 1.2s infinite;
}

/* ── No-data overlay ── */
.chart-no-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 280px;
    color: #ccc;
    gap: 8px;
    font-size: 0.88rem;
}

.chart-no-data i {
    font-size: 2.2rem;
}

@media (max-width: 600px) {
    .stats-filter-row {
        flex-direction: column;
    }

    .stats-filter-row .form-row {
        width: 100%;
    }
}