/* Admin Panel Styles */
@import '../../css/variables.css';

/* Reset & Base */
body {
    background-color: var(--bg-main);
    background-image: var(--bg-glow-gradient);
    background-attachment: fixed;
    font-family: var(--font-main);
    color: var(--text-main);
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Spacing Helpers */
.pt-120 { padding-top: 120px; }
.pb-80 { padding-bottom: 80px; }
.p-60 { padding: 60px; }
.p-40 { padding: 40px; }
.p-30 { padding: 30px; }
.pb-20 { padding-bottom: 20px; }
.pl-20 { padding-left: 20px; }

.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.mt-100 { margin-top: 100px; }

.mb-10 { margin-bottom: 10px; }
.mb-15 { margin-bottom: 15px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-50 { margin-bottom: 50px; }

/* Layout Utilities */
.container-fluid {
    width: 100%;
    padding-right: 30px;
    padding-left: 30px;
    margin-right: auto;
    margin-left: auto;
    max-width: 1600px;
    /* Wide layout for admin */
}

/* Glass Components */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));

    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius-lg);
    padding: 24px;
    /* Default padded */
}

.glass-header {
    background: rgba(15, 23, 42, 0.85);
    /* Darker for header readability */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

[data-theme="light"] .glass-header {
    background: rgba(255, 255, 255, 0.9);
}

/* Header Navigation */
.admin-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    padding: 0 20px;
}

.brand-logo {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-main);
    margin-right: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-grow: 1;
    margin-left: 20px;
}

.nav-item {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

[data-theme="light"] .nav-item:hover,
[data-theme="light"] .nav-item.active {
    background: rgba(0, 0, 0, 0.05);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.user-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-btn {
    color: var(--text-muted);
    transition: color 0.2s;
}

.logout-btn:hover {
    color: #ef4444;
}

/* Mobile Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

/* Responsive */
@media (max-width: 992px) {
    .admin-navbar {
        height: 70px;
        position: relative;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--glass-border);
        border-radius: 8px;
        width: 40px;
        height: 40px;
        margin-left: auto;
        /* Push to right */
    }

    .main-nav {
        display: none;
        /* Hide by default */
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid var(--glass-border);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
        margin-left: 0;
        gap: 20px;
        z-index: 999;
    }

    [data-theme="light"] .main-nav {
        background: rgba(255, 255, 255, 0.98);
    }

    .main-nav.show {
        display: flex;
        animation: slideDown 0.3s ease;
    }

    .nav-links-container {
        flex-direction: column;
        width: 100%;
        text-align: center;
    }

    .nav-item {
        width: 100%;
        text-align: center;
        padding: 12px;
        background: rgba(255, 255, 255, 0.03);
        margin-bottom: 5px;
    }

    .user-actions {
        display: flex;
        width: 100%;
        justify-content: center;
        padding-top: 20px;
        border-top: 1px solid var(--glass-border);
    }
}

/* Main Content Container */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Sub-Navigation (Tabs) */
.sub-nav-bar {
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--glass-border);
    padding: 10px 20px 0;
    overflow-x: auto;
}

[data-theme="light"] .sub-nav-bar {
    background: rgba(255, 255, 255, 0.5);
}

.sub-nav {
    display: flex;
    gap: 10px;
}

.sub-nav-item {
    padding: 10px 20px;
    color: var(--text-muted);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid transparent;
    border-bottom: none;
    transition: all 0.2s;
}

.sub-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

[data-theme="light"] .sub-nav-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.sub-nav-item.active {
    background: var(--bg-main);
    color: var(--color-primary);
    font-weight: 700;
    border-color: var(--glass-border);
    border-bottom: 3px solid var(--color-primary);
    position: relative;
    top: 1px;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05);
    /* Subtle lift */
}

[data-theme="light"] .sub-nav-item.active {
    background: #ffffff;
    /* Pure white active tab */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

/* Content Area */
.admin-content {
    padding: 30px 0;
    min-height: calc(100vh - 120px);
}

/* Alerts */
.alert-bar {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: var(--radius-md);
    background: rgba(239, 68, 68, 0.15);
    /* Red tint */
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

[data-theme="light"] .alert-bar {
    background: rgba(254, 202, 202, 0.4);
    color: #b91c1c;
}

.alert-bar.warning {
    background: rgba(234, 179, 8, 0.15);
    border-color: rgba(234, 179, 8, 0.3);
    color: #fde047;
}

/* Dashboard Layout Improvements */
.dashboard-top-row {
    display: flex;
    gap: 25px;
    margin-bottom: 30px;
}

@media (max-width: 1200px) {
    .dashboard-top-row {
        flex-direction: column;
    }
}

.dashboard-tasks-panel {
    flex: 2;
    padding: 0; /* Table fills exactly */
}

.dashboard-stats-panel {
    flex: 1;
    min-width: 320px;
}

.admin-tasks-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-tasks-table th,
.admin-tasks-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.admin-tasks-table th {
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.admin-tasks-table tr:last-child td {
    border-bottom: none;
}

.admin-tasks-table .task-type-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.task-video { background: rgba(34, 197, 94, 0.1); color: #4ade80; }
.task-gift { background: rgba(234, 179, 8, 0.1); color: #fde047; }

[data-theme="light"] .task-video { color: #166534; font-weight: 700; }
[data-theme="light"] .task-gift { color: #854d0e; font-weight: 700; }

.admin-tasks-table .admin-note-cell {
    width: 60px;
    text-align: center;
}

/* Mobile Responsive Table (Card Style) */
@media screen and (max-width: 768px) {
    .admin-tasks-table {
        border: 0;
    }

    .admin-tasks-table thead {
        display: none; /* Hide headers on mobile */
    }

    .admin-tasks-table tr {
        display: block;
        margin-bottom: 20px;
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid var(--glass-border);
        border-radius: var(--radius-md);
        padding: 5px;
    }

    .admin-tasks-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 12px 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        gap: 15px;
    }

    .admin-tasks-table td:last-child {
        border-bottom: none;
    }

    .admin-tasks-table td::before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.75rem;
        color: var(--text-muted);
        text-align: left;
        flex-shrink: 0;
    }

    .admin-tasks-table .admin-note-cell {
        /* width: 100%; */
        text-align: right;
        justify-content: space-between;
    }
}

/* Original dashboard-grid still available if needed elsewhere */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Filter Bar - Inputs & Selects */
.filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-input,
.filter-select {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 10px 15px;
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
    min-width: 200px;
}

.filter-input:focus,
.filter-select:focus {
    border-color: rgba(225, 29, 72, 0.5);
    box-shadow: 0 0 10px rgba(225, 29, 72, 0.2);
    background: rgba(15, 23, 42, 0.8);
}

/* Light Theme overrides for inputs */
[data-theme="light"] .filter-input,
[data-theme="light"] .filter-select {
    background: rgba(255, 255, 255, 0.9);
    border-color: #cbd5e1;
    color: #334155;
}

/* Button Group / Toggle Buttons */
.btn-group .btn {
    border-radius: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-group .btn:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.btn-group .btn:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    border-right: none;
}

.btn-group .btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
    font-weight: 500;
}

.btn-group .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-group .btn-secondary.active {
    background: var(--gradient-primary);
    color: #1A1208;
    border-color: transparent;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.3);
}

.info-block {
    background: rgba(253, 224, 71, 0.1);
    /* Yellow tint */
    border: 1px solid rgba(253, 224, 71, 0.2);
    padding: 15px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-main);
}

/* Data Tables */
.data-table-container {
    overflow-x: auto;
    /* Hide scrollbar but keep functionality */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.data-table-container::-webkit-scrollbar {
    display: none;
}

.table {
    width: 100%;
    border-collapse: separate;
    /* Changed for border-radius on rows if needed */
    border-spacing: 0;
    font-size: 0.9rem;
}

.table th,
.table td {
    padding: 16px 20px;
    /* More padding */
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
    vertical-align: middle;
}

.table th {
    background: rgba(255, 255, 255, 0.03);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

[data-theme="light"] .table th {
    background: rgba(0, 0, 0, 0.06);
    /* Darker header */
    color: #334155;
    /* Darker text */
}

.table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .table tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* Status Badges - Button-like */
.status-badge,
.status-done {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    border-radius: 9999px !important;
    /* Force pill shape */
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s;
    text-decoration: none !important;
    line-height: 1;
    /* Fix vertical alignment */
}

.status-done {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
    box-shadow: 0 2px 5px rgba(34, 197, 94, 0.1);
}

.status-done:hover {
    background: rgba(34, 197, 94, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(34, 197, 94, 0.2);
}

[data-theme="light"] .status-done {
    background: rgba(34, 197, 94, 0.1);
    /* Lighter bg for light mode */
    color: #16a34a;
    /* Darker green text */
    border-color: rgba(34, 197, 94, 0.3);
}

/* Badges (Counters) */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
}

.badge-gray {
    background: rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
}

[data-theme="light"] .badge-gray {
    background: rgba(148, 163, 184, 0.3);
    color: #475569;
}

.badge-red {
    background: var(--gradient-primary);
    /* Use brand gradient */
    color: #1A1208;
    box-shadow: 0 2px 5px rgba(225, 29, 72, 0.3);
}

/* Mobile Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

/* Responsive */
@media (max-width: 992px) {
    .admin-navbar {
        height: 70px;
        padding: 0 20px;
        position: relative;
    }

    .mobile-menu-toggle {
        display: block;
        border: 1px solid var(--glass-border);
        border-radius: 8px;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .main-nav {
        display: none;
        /* Hide by default */
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(15, 23, 42, 0.95);
        /* Solid background for legibility */
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid var(--glass-border);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
        gap: 10px;
        z-index: 999;
    }

    [data-theme="light"] .main-nav {
        background: rgba(255, 255, 255, 0.95);
    }

    .main-nav.show {
        display: flex;
        animation: slideDown 0.3s ease;
    }

    .nav-item {
        width: 100%;
        text-align: center;
        padding: 12px;
        background: rgba(255, 255, 255, 0.03);
    }

    /* .user-actions {
        display: none;
    } */

    /* We need to inject user actions into mobile menu via JS or CSS duplicate if we want them there */
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sub-nav scrolling polish */
.sub-nav-bar {
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 0px;
    /* Remove extra padding since we hide scrollbar */
}

.sub-nav-bar::-webkit-scrollbar {
    display: none;
}

.sub-nav {
    padding-bottom: 10px;
    /* Add internal padding for hover effects */
}

/* --- Statistics Page Styles --- */

/* Filters Bar */
.filters-bar {
    display: flex;
    align-items: flex-end;
    /* Align to bottom so labels don't mess up input alignment */
    gap: 20px;
    padding: 25px;
    /* More padding */
    flex-wrap: wrap;
    margin-bottom: 40px;
    /* More space below filters */
}

.filter-group {
    display: flex;
    flex-direction: column;
    /* Stack label above input */
    gap: 8px;
}

.filter-group label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
    margin-left: 2px;
}

.filter-input,
.filter-select {
    background: rgba(15, 23, 42, 0.6);
    /* Darker background for contrast */
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 10px 15px;
    /* Larger hit area */
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
    min-width: 150px;
}

.filter-input:focus,
.filter-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.2);
}

[data-theme="light"] .filter-input,
[data-theme="light"] .filter-select {
    background: #ffffff;
    color: var(--text-main);
    border-color: #cbd5e1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* specific style for the 'Show' button alignment */
.filters-bar .btn-primary {
    height: 42px;
    /* Match input height manually if needed */
    padding: 0 30px;
    margin-bottom: 1px;
    /* Fine-tune alignment */
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

.chart-container {
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.chart-container.full-width {
    grid-column: 1 / -1;
}

.chart-title {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-main);
    font-weight: 600;
}

.chart-wrapper {
    position: relative;
    height: 300px;
}

/* Tertiary Navigation (Pills / Buttons) */
.tertiary-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    margin-top: 10px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.tertiary-nav-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    /* Default glass background */
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    /* Slightly more rounded */
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.tertiary-nav-item:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    transform: translateY(-1px);
}

/* Active State - Primary Button Style */
.tertiary-nav-item.active {
    background: var(--gradient-primary);
    /* Use primary gradient */
    color: #1A1208;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.4);
    /* Red glow matches primary */
}

/* Statistics Summary List */
.stats-summary-list {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.stats-summary-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    width: 100%;
    /* Ensure full width */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    /* Subtle separator */
    font-size: 1rem;
    color: var(--text-muted);
}

.stats-summary-list li:last-child {
    border-bottom: none;
}

.stats-summary-list li strong {
    color: var(--text-main);
    font-weight: 500;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.95rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #1A1208;
    box-shadow: 0 4px 15px rgba(225, 29, 72, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(225, 29, 72, 0.5);
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.85rem;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5);
    color: white;
}


/* Status Closed / Declined */
.status-closed {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.1);
}

.status-closed:hover {
    background: rgba(239, 68, 68, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.2);
}

[data-theme="light"] .status-closed {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.3);
}

/* Status Pending / Waiting */
.status-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
    box-shadow: 0 2px 5px rgba(245, 158, 11, 0.1);
}

.status-pending:hover {
    background: rgba(245, 158, 11, 0.25);
    transform: translateY(-1px);
}

[data-theme="light"] .status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.3);
}

/* Status New */
.status-new {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.25);
    box-shadow: 0 2px 5px rgba(59, 130, 246, 0.1);
}

.status-new:hover {
    background: rgba(59, 130, 246, 0.25);
    transform: translateY(-1px);
}

[data-theme="light"] .status-new {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border-color: rgba(59, 130, 246, 0.3);
}


/* Table Padding Adjustment */
.table th,
.table td {
    padding: 16px 20px;
    /* Increased padding */
}

.table td,
.table th {
    vertical-align: middle;
}

/* Column Tint Classes */
.bg-col-blue {
    background: rgba(59, 130, 246, 0.04) !important;
}

.bg-col-green {
    background: rgba(16, 185, 129, 0.04) !important;
}

.bg-col-amber {
    background: rgba(245, 158, 11, 0.04) !important;
}

.bg-col-red {
    background: rgba(239, 68, 68, 0.04) !important;
}

.bg-col-purple {
    background: rgba(139, 92, 246, 0.04) !important;
}

.bg-col-pink {
    background: rgba(236, 72, 153, 0.04) !important;
}

.bg-col-gray {
    background: rgba(0, 0, 0, 0.02) !important;
}

[data-theme="light"] .bg-col-blue {
    background: rgba(59, 130, 246, 0.08) !important;
}

[data-theme="light"] .bg-col-green {
    background: rgba(16, 185, 129, 0.08) !important;
}

[data-theme="light"] .bg-col-amber {
    background: rgba(245, 158, 11, 0.08) !important;
}

[data-theme="light"] .bg-col-red {
    background: rgba(239, 68, 68, 0.08) !important;
}

[data-theme="light"] .bg-col-purple {
    background: rgba(139, 92, 246, 0.08) !important;
}

[data-theme="light"] .bg-col-pink {
    background: rgba(236, 72, 153, 0.08) !important;
}

[data-theme="light"] .bg-col-gray {
    background: rgba(0, 0, 0, 0.04) !important;
}


/* Table Padding Adjustment */
.table th,
.table td {
    padding: 16px 20px;
    /* Increased padding */
}

/* Utility Classes */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.text-primary {
    color: var(--color-primary) !important;
}

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

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

.hover-underline:hover {
    text-decoration: underline;
}

.mb-30 {
    margin-bottom: 30px;
}

.ml-5 {
    margin-left: 5px;
}

/* ================================================
   Girls Table — translator_girls.php
   ================================================ */

/* Avatar cell */
.girl-avatar-wrap {
    width: 48px;
    height: 55px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
}

.girl-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.girl-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.4rem;
}

/* ID link button */
.id-link {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(225, 29, 72, 0.1);
    border: 1px solid rgba(225, 29, 72, 0.25);
    border-radius: 6px;
    color: var(--color-primary, #e11d48);
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}

.id-link:hover {
    background: rgba(225, 29, 72, 0.22);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(225, 29, 72, 0.2);
    color: var(--color-primary, #e11d48);
}

/* Row tint when online */
.girl-row.row-online {
    background: rgba(34, 197, 94, 0.03) !important;
}

[data-theme="light"] .girl-row.row-online {
    background: rgba(34, 197, 94, 0.05) !important;
}

/* Language badge */
.lang-badge {
    display: inline-block;
    padding: 2px 7px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    font-size: 0.74rem;
    color: var(--text-muted);
    white-space: nowrap;
}

[data-theme="light"] .lang-badge {
    background: rgba(0, 0, 0, 0.05);
}

/* Mini status badges (intro / wink) */
.mini-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.75rem;
    border: 1px solid transparent;
    cursor: default;
}

.mini-badge.badge-green {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.mini-badge.badge-yellow {
    background: rgba(234, 179, 8, 0.15);
    border-color: rgba(234, 179, 8, 0.3);
    color: #fde047;
}

.mini-badge.badge-gray {
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(148, 163, 184, 0.2);
    color: var(--text-muted);
}

/* Gift toggle button */
.gift-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 6px;
    border: 1px solid transparent;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.gift-toggle-btn.gift-on {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.gift-toggle-btn.gift-on:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.35);
    color: #f87171;
}

.gift-toggle-btn.gift-off {
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(148, 163, 184, 0.2);
    color: var(--text-muted);
}

.gift-toggle-btn.gift-off:hover {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.25);
    color: #4ade80;
}

/* Chat icon link */
.chat-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #60a5fa;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.chat-link:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

/* Online / Offline cell */
.online-toggle-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.online-status {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.online-status.status-online {
    color: #4ade80;
}

.online-status.status-offline {
    color: #f87171;
}

.online-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0;
    color: inherit;
    transition: all 0.2s;
}

.online-toggle-btn[data-state="on"] {
    color: #4ade80;
}

.online-toggle-btn[data-state="off"] {
    color: rgba(148, 163, 184, 0.4);
}

.online-toggle-btn:hover {
    transform: scale(1.15);
}

/* Pagination */
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 8px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}

.page-btn:hover:not(.disabled) {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    transform: translateY(-1px);
}

[data-theme="light"] .page-btn:hover:not(.disabled) {
    background: rgba(0, 0, 0, 0.06);
}

.page-btn.active {
    background: var(--gradient-primary, linear-gradient(135deg, #be123c, #e11d48));
    border-color: transparent;
    color: #1A1208;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(225, 29, 72, 0.35);
}

.page-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.page-dots {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 0 4px;
}

/* Girls table responsive */
@media (max-width: 768px) {
    .girls-table th,
    .girls-table td {
        padding: 10px 10px;
    }

    /* Hide Intro & Wink columns */
    .girls-table th:nth-child(6),
    .girls-table td:nth-child(6),
    .girls-table th:nth-child(7),
    .girls-table td:nth-child(7) {
        display: none;
    }

    .id-link {
        font-size: 0.75rem;
        padding: 3px 7px;
    }

    .girl-avatar-wrap {
        width: 38px;
        height: 44px;
    }
}

@media (max-width: 576px) {
    /* Also hide Translator column on small phones */
    .girls-table th:nth-child(3),
    .girls-table td:nth-child(3) {
        display: none;
    }
}

/* ================================================
   Interaction Page — translator_interaction.php
   ================================================ */

/* Filter panel */
.interaction-filter-panel {
    padding: 20px 24px;
}

.interaction-filter-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Row with picker only (no girl selected) */
.interaction-picker-row {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}

/* Girl header row (when girl is selected) */
.interaction-girl-header {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 4px;
}

.interaction-girl-info {
    font-size: 0.95rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 7px;
}

.interaction-girl-info strong {
    color: var(--text-main);
    font-weight: 600;
}

.interaction-change-girl {
    font-size: 0.83rem;
    color: var(--color-primary, #e11d48);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.interaction-change-girl:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Generic row inside filter */
.interaction-row {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    flex-wrap: wrap;
}

/* Inline group (Id + label) */
.interaction-inline-group .filter-addon-wrap {
    display: flex;
    align-items: center;
}

.filter-addon {
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    height: 38px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--glass-border);
    border-right: none;
    border-radius: var(--radius-sm, 6px) 0 0 var(--radius-sm, 6px);
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

[data-theme="light"] .filter-addon {
    background: rgba(0,0,0,0.04);
}

.filter-addon-input {
    border-radius: 0 var(--radius-sm, 6px) var(--radius-sm, 6px) 0 !important;
}

/* Checkboxes row */
.interaction-row-checks {
    align-items: flex-start;
    margin-top: 4px;
}

.interaction-checks-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 240px;
}

.check-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.check-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--color-primary, #e11d48);
}

.check-label span {
    transition: color 0.15s;
}

.check-label:hover span {
    color: var(--text-main);
}

.interaction-search-col {
    display: flex;
    align-items: flex-end;
    margin-left: auto;
    padding-bottom: 2px;
}

/* Meta row "N мужчин" */
.interaction-meta {
    margin-bottom: 16px;
}

/* ---- Interaction Table ---- */
.interaction-table {
    width: 100%;
    min-width: 860px;
}

.interaction-th-man {
    text-align: left;
    padding: 12px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    vertical-align: bottom;
}

.interaction-th-section {
    text-align: center;
    padding: 8px 6px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    border-bottom: 2px solid;
}

.from-man-header {
    color: #60a5fa;
    border-color: rgba(59,130,246,0.4);
    background: rgba(59,130,246,0.04);
}

.from-girl-header {
    color: #f472b6;
    border-color: rgba(244,114,182,0.4);
    background: rgba(244,114,182,0.04);
}

.interaction-th-sub {
    text-align: center;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 6px 8px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Row hover / labeled */
.interaction-row-tr:hover td {
    background: rgba(255,255,255,0.02);
}

[data-theme="light"] .interaction-row-tr:hover td {
    background: rgba(0,0,0,0.015);
}

.interaction-row-tr.row-labeled {
    background: rgba(245,158,11,0.06) !important;
}

/* Man photo cell */
.interaction-photo-td {
    width: 52px;
    padding: 8px 6px 8px 14px;
    vertical-align: middle;
}

.man-avatar-wrap {
    width: 44px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    flex-shrink: 0;
}

.man-avatar-wrap.man-no-photo {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.man-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.man-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* Name cell */
.interaction-name-td {
    vertical-align: middle;
    padding: 8px 10px;
}

.man-name {
    font-weight: 600;
    font-size: 0.93rem;
    color: var(--text-main);
}

.man-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 3px;
}

.man-id-link {
    color: var(--color-primary, #e11d48);
    font-weight: 600;
    text-decoration: none;
}

.man-id-link:hover {
    text-decoration: underline;
}

.man-age {
    color: var(--text-muted);
}

.man-online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.man-online-dot.is-online {
    background: #4ade80;
    box-shadow: 0 0 5px rgba(74,222,128,0.7);
}

.man-online-dot.is-offline {
    background: rgba(148,163,184,0.3);
}

/* Label button cell */
.interaction-label-td {
    width: 44px;
    text-align: center;
    vertical-align: middle;
    padding: 6px;
}

.label-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.label-btn:hover,
.label-btn.label-active {
    background: rgba(245,158,11,0.15);
    border-color: rgba(245,158,11,0.35);
    color: #fbbf24;
}

/* Generic interaction cell */
.interaction-cell {
    text-align: center;
    vertical-align: middle;
    padding: 8px 6px;
    font-size: 0.82rem;
}

/* Wrapper that keeps button + badge inline */
.cell-action-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.from-man-cell {
    background: rgba(59,130,246,0.03);
}

.from-girl-cell {
    background: rgba(244,114,182,0.03);
}

[data-theme="light"] .from-man-cell {
    background: rgba(59,130,246,0.04);
}

[data-theme="light"] .from-girl-cell {
    background: rgba(244,114,182,0.04);
}

/* Check mark (already done) */
.comm-check {
    color: #4ade80;
    font-size: 0.9rem;
}

/* Counter badge — circular bubble */
.comm-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    border-radius: 11px;
    background: rgba(59,130,246,0.2);
    color: #60a5fa;
    font-size: 0.75rem;
    font-weight: 800;
    border: 1px solid rgba(59,130,246,0.4);
    box-shadow: 0 0 7px rgba(59,130,246,0.25);
    flex-shrink: 0;
    line-height: 1;
}

.comm-badge-like {
    background: rgba(244,114,182,0.2);
    color: #f472b6;
    border-color: rgba(244,114,182,0.4);
    box-shadow: 0 0 7px rgba(244,114,182,0.25);
}

.comm-badge-visit {
    background: rgba(139,92,246,0.2);
    color: #a78bfa;
    border-color: rgba(139,92,246,0.4);
    box-shadow: 0 0 7px rgba(139,92,246,0.25);
}

/* Date below badge */
.comm-date {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 3px;
    white-space: nowrap;
}

/* Limit reached text */
.comm-limit {
    font-size: 0.75rem;
    color: #f87171;
    line-height: 1.3;
    display: inline-block;
}

/* Action button (Отправить) */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.2);
    color: #60a5fa;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.action-btn:hover {
    background: rgba(59,130,246,0.22);
    border-color: rgba(59,130,246,0.35);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(59,130,246,0.15);
    color: #60a5fa;
}

/* Intro action special color */
.intro-td .action-btn {
    background: rgba(34,197,94,0.1);
    border-color: rgba(34,197,94,0.2);
    color: #4ade80;
}

.intro-td .action-btn:hover {
    background: rgba(34,197,94,0.2);
    border-color: rgba(34,197,94,0.35);
    box-shadow: 0 3px 8px rgba(34,197,94,0.15);
    color: #4ade80;
}

/* Interaction table responsive */
@media (max-width: 992px) {
    .interaction-table {
        min-width: 720px;
    }
    .interaction-checks-col {
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .interaction-filter-panel {
        padding: 14px 16px;
    }

    .interaction-search-col {
        margin-left: 0;
        width: 100%;
    }

    .interaction-search-col .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ================================================
   Users Stat Page — users_stat.php
   ================================================ */

/* Journal link */
.stat-journal-link {
    font-size: 0.85rem;
    color: var(--color-primary, #e11d48);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    opacity: 0.85;
    transition: opacity 0.2s;
    margin-top: 4px;
}

.stat-journal-link:hover { opacity: 1; text-decoration: underline; }

/* --- Tab bar --- */
.stat-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.12) transparent;
    flex-wrap: nowrap;
}

.stat-tabs::-webkit-scrollbar { height: 4px; }
.stat-tabs::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

/* --- Tab button --- */
.stat-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}

.stat-tab-btn i {
    font-size: 0.78rem;
    opacity: 0.75;
}

.stat-tab-btn:hover {
    background: rgba(255,255,255,0.07);
    color: var(--text-main);
    border-color: rgba(255,255,255,0.18);
}

[data-theme="light"] .stat-tab-btn:hover {
    background: rgba(0,0,0,0.04);
}

.stat-tab-btn.active {
    background: rgba(225,29,72,0.12);
    border-color: rgba(225,29,72,0.35);
    color: var(--text-main);
    box-shadow: 0 2px 10px rgba(225,29,72,0.12);
}

[data-theme="light"] .stat-tab-btn.active {
    background: rgba(225,29,72,0.08);
}

/* Count badge on tab */
.stat-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

.stat-tab-btn.active .stat-tab-count {
    background: rgba(225,29,72,0.2);
    color: #fb7185;
}

.stat-tab-count-green,
.stat-tab-btn.active .stat-tab-count-green {
    background: rgba(74,222,128,0.15);
    color: #4ade80;
}

.stat-dot-online { color: #4ade80; font-size: 0.55rem !important; }

/* --- Tab hint subtitle --- */
.stat-tab-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* --- Tab panels --- */
.stat-tab-panel { display: none; }
.stat-tab-panel.active { display: block; }

/* --- Empty state --- */
.stat-empty {
    text-align: center;
    padding: 50px 30px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.stat-empty i { font-size: 2rem; opacity: 0.35; }
.stat-empty p { font-size: 0.95rem; margin: 0; }

/* ---- User Stat Cards (Новые / Профайлы) ---- */
.stat-two-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.user-stat-card {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-stat-card-header {
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

.user-stat-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.user-stat-id-link {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-primary, #e11d48);
    text-decoration: none;
}

.user-stat-id-link:hover { text-decoration: underline; }

.user-stat-nick {
    font-size: 0.88rem;
    color: var(--text-main);
    font-weight: 500;
}

.user-stat-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px; height: 18px;
    border-radius: 50%;
    font-size: 0.65rem;
    flex-shrink: 0;
}

.badge-confirmed {
    background: rgba(74,222,128,0.18);
    color: #4ade80;
    border: 1px solid rgba(74,222,128,0.35);
}

.user-stat-email {
    font-size: 0.8rem;
    color: var(--text-muted);
    word-break: break-all;
}

.user-stat-rows {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.user-stat-row {
    display: flex;
    gap: 8px;
    font-size: 0.82rem;
    line-height: 1.4;
}

.user-stat-label {
    color: var(--text-muted);
    flex-shrink: 0;
    width: 100px;
    text-align: right;
}

.user-stat-val {
    color: var(--text-main);
    word-break: break-word;
}

/* ---- Changes list ---- */
.changes-list {
    max-height: 520px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.changes-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 16px;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.85rem;
    transition: background 0.15s;
}

.changes-item:last-child { border-bottom: none; }

.changes-item:hover {
    background: rgba(255,255,255,0.025);
}

[data-theme="light"] .changes-item:hover {
    background: rgba(0,0,0,0.015);
}

.changes-date {
    color: var(--text-muted);
    font-size: 0.8rem;
    white-space: nowrap;
    min-width: 130px;
}

.changes-id-link {
    color: var(--color-primary, #e11d48);
    font-weight: 700;
    text-decoration: none;
}

.changes-id-link:hover { text-decoration: underline; }

.changes-name {
    color: var(--text-main);
    font-weight: 500;
}

.changes-nick {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ---- Online list ---- */
.online-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.online-item {
    padding: 14px 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex-wrap: wrap;
}

.online-item-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
    min-width: 200px;
}

.online-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 6px rgba(74,222,128,0.7);
    margin-top: 4px;
    flex-shrink: 0;
}

.online-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-main);
}

.online-nick {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.online-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 3px;
}

.online-branch {
    font-size: 0.8rem;
    color: var(--color-primary, #e11d48);
    font-weight: 500;
}

.online-sep { color: var(--text-muted); font-size: 0.75rem; }

.online-role {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.online-times {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 240px;
}

.online-time-row {
    display: flex;
    gap: 8px;
    font-size: 0.8rem;
}

.online-time-label {
    color: var(--text-muted);
    white-space: nowrap;
}

.online-time-val {
    color: var(--text-main);
    font-weight: 500;
}

/* ---- Same IP Groups ---- */
.sameip-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sameip-group {
    padding: 14px 18px;
}

.sameip-ip {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--glass-border);
}

.sameip-ip i { color: var(--text-muted); font-size: 0.8rem; }

.sameip-users {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sameip-user-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.82rem;
}

.sameip-email-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(59,130,246,0.15);
    color: #60a5fa;
    font-size: 0.72rem;
    font-weight: 700;
    border: 1px solid rgba(59,130,246,0.25);
    flex-shrink: 0;
}

.sameip-status {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
}

.sameip-inactive {
    background: rgba(251,191,36,0.15);
    color: #fbbf24;
    border: 1px solid rgba(251,191,36,0.3);
}

.sameip-deleted {
    background: rgba(248,113,113,0.15);
    color: #f87171;
    border: 1px solid rgba(248,113,113,0.3);
}

.sameip-user-text {
    color: var(--text-muted);
    line-height: 1.4;
}

.sameip-email {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .stat-two-col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .user-stat-label {
        width: 80px;
        font-size: 0.78rem;
    }

    .online-item {
        flex-direction: column;
        gap: 10px;
    }

    .online-times {
        min-width: unset;
        width: 100%;
    }

    .changes-date {
        min-width: unset;
        width: 100%;
    }
}

/* ================================================
   Users Branch Page — users_branch.php
   ================================================ */

.branches-table .branch-row-closed td {
    opacity: 0.65;
}

.branch-name {
    font-weight: 600;
    color: var(--text-main);
}

.branch-name-closed {
    font-weight: 500;
    color: #f87171;
    font-style: italic;
}

.branch-location {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.branch-location-warn {
    color: #f87171;
    font-weight: 500;
}

.branch-phone {
    font-size: 0.82rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.branch-actions {
    white-space: nowrap;
}

.branch-action-link {
    font-size: 0.8rem;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 4px;
    transition: opacity 0.15s;
}

.branch-action-link:hover { opacity: 0.75; }

.branch-edit  { color: var(--color-primary, #e11d48); }
.branch-disable { color: #94a3b8; }
.branch-enable  { color: #4ade80; }

/* ================================================
   Users List Page — users_list.php
   ================================================ */

.ul-action-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ul-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    flex-wrap: wrap;
}
.ul-filter-label {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    color: var(--text-muted);
}
.ul-filter-select {
    flex: 0 0 260px;
}

/* Table */
.ul-table { width: 100%; }

.ul-rules-cell { text-align: center; }
.ul-rules-ok  { color: #4ade80; font-size: 1.1rem; }
.ul-rules-no  { color: #f87171; font-size: 1.1rem; }

.ul-name  { font-weight: 600; }
.ul-login { color: var(--text-muted); font-size: 0.88rem; }

.ul-group-badge {
    display: inline-block;
    font-size: 0.78rem;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(255,255,255,0.08);
    color: var(--text-muted);
}

.ul-actions { white-space: nowrap; }
.ul-link {
    font-size: 0.8rem;
    text-decoration: none;
    margin-right: 4px;
    transition: opacity 0.15s;
}
.ul-link:hover { opacity: 0.7; }
.ul-link-edit  { color: var(--color-primary, #e11d48); }
.ul-link-del   { color: #f87171; }
.ul-link-login { color: #60a5fa; }
.ul-link-kill  { color: #f87171; font-size: 0.75rem; }

.ul-session { font-size: 0.8rem; }
.ul-session-info { display: flex; flex-direction: column; gap: 4px; }
.ul-session-ip {
    font-family: monospace;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.ul-session-rows { color: var(--text-muted); line-height: 1.5; }
.ul-session-rows strong { color: var(--text-main); }

/* ================================================
   User Add / Edit Form (users_list_add_*.php)
   ================================================ */

.user-form-page { max-width: 860px; }

.user-form-card { padding: 28px 32px; }

.user-form-section-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.user-form-role-hint {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--text-muted);
    font-style: italic;
}

.user-form-grid { display: flex; flex-direction: column; gap: 12px; }

.user-form-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: center;
    gap: 16px;
}
.user-form-label {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-muted);
    text-align: right;
}
.user-form-field { display: flex; align-items: center; gap: 10px; }

/* Role badges */
.user-form-group-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
}
.user-form-group-admin      { background: rgba(225,29,72,.15);  color: #f87171; }
.user-form-group-editor     { background: rgba(96,165,250,.15); color: #60a5fa; }
.user-form-group-translator { background: rgba(74,222,128,.15); color: #4ade80; }

.user-form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-bottom: 40px;
}

/* ================================================
   Permissions Editor — _users_perm_form.php
   ================================================ */

.perm-editor { margin-top: 0; }

/* Section tabs */
.perm-section-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 0;
    border-bottom: 2px solid rgba(255,255,255,0.08);
    padding-bottom: 0;
}

.perm-section-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    transition: background 0.15s, color 0.15s;
    position: relative;
    bottom: -2px;
    border-bottom: 2px solid transparent;
}
.perm-section-btn:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-main);
}
.perm-section-btn.active {
    color: var(--text-main);
    border-bottom: 2px solid var(--color-primary, #e11d48);
    background: rgba(255,255,255,0.04);
}

/* Badge showing on/total */
.perm-sec-badge {
    font-size: 0.7rem;
    padding: 1px 5px;
    border-radius: 10px;
    font-weight: 700;
}
.perm-sec-all     { background: rgba(74,222,128,.2);  color: #4ade80; }
.perm-sec-partial { background: rgba(250,204,21,.2);  color: #fbbf24; }
.perm-sec-none    { background: rgba(148,163,184,.1); color: #94a3b8; }

/* Section panels */
.perm-section-panel { display: none; padding-top: 12px; }
.perm-section-panel.active { display: block; }

/* Master toggle row */
.perm-master-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 4px;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.06);
}
.perm-master-label {
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
}

/* Item rows */
.perm-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.1s;
}
.perm-item-row:hover { background: rgba(255,255,255,0.03); }

.perm-item-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-main);
}
.perm-expand-btn {
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); padding: 0 2px;
    font-size: 0.75rem;
}
.perm-expand-btn i { transition: transform 0.2s; }
.perm-leaf-indent { display: inline-block; width: 22px; }
.perm-child       { padding-left: 32px; }
.perm-child-bullet { color: var(--text-muted); margin-right: 2px; }

/* Children panel */
.perm-children-panel { display: none; }
.perm-children-panel.open { display: block; }

/* Toggle switch */
.perm-toggle-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}
.perm-toggle-wrap input { opacity: 0; width: 0; height: 0; position: absolute; }
.perm-toggle-slider {
    display: inline-block;
    width: 36px;
    height: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    position: relative;
    transition: background 0.2s;
}
.perm-toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 14px; height: 14px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}
.perm-toggle-wrap input:checked + .perm-toggle-slider {
    background: var(--color-primary, #e11d48);
}
.perm-toggle-wrap input:checked + .perm-toggle-slider::after {
    transform: translateX(16px);
}

@media (max-width: 600px) {
    .user-form-row { grid-template-columns: 90px 1fr; }
    .user-form-card { padding: 18px 16px; }
    .ul-action-bar { flex-direction: column; }
    .perm-section-btn { padding: 7px 10px; font-size: 0.78rem; }
}

/* ================================================
   Rights Table — users_rights_table.php
   ================================================ */

/* Section filter pills */
.rt-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    flex-wrap: wrap;
}
.rt-filter-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}
.rt-section-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.rt-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
}

.rt-sec-pill {
    padding: 4px 12px;
    border-radius: 20px;
    border: 1.5px solid;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    transition: color 0.18s, border-color 0.18s, opacity 0.18s;
    opacity: 1;
}
/* Active = coloured, inactive = gray */
.rt-sec-pill:not(.active) {
    border-color: #555 !important;
    color: #666 !important;
    opacity: 0.7;
}

/* Pill colours per section */
.rt-sec-pill.rt-sec-home  { border-color: #f87171; color: #f87171; }
.rt-sec-pill.rt-sec-tr    { border-color: #60a5fa; color: #60a5fa; }
.rt-sec-pill.rt-sec-users { border-color: #4ade80; color: #4ade80; }
.rt-sec-pill.rt-sec-site  { border-color: #a78bfa; color: #a78bfa; }
.rt-sec-pill.rt-sec-set   { border-color: #fbbf24; color: #fbbf24; }

/* Scroll wrapper */
.rt-outer { border-radius: 12px; }
.rt-scroll-wrap {
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 320px);
    min-height: 300px;
}

/* Table */
.rt-table {
    border-collapse: separate;
    border-spacing: 0;
    font-size: 11px;
    white-space: nowrap;
    width: max-content;
}

/* User (row header) column — sticky left, OPAQUE */
.rt-col-user,
.rt-col-user-sticky {
    position: sticky;
    left: 0;
    z-index: 3;
    /* solid opaque so scrolled content doesn't bleed through */
    background: #1a1b2e;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    min-width: 200px;
    max-width: 200px;
    padding: 8px 10px;
    font-weight: 600;
    text-align: left;
    border-right: 2px solid rgba(255,255,255,0.1);
}
.rt-col-user { /* thead corner — highest z-index */
    z-index: 5;
    top: 0;
    background: #16172a;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Permission column headers — sticky top, OPAQUE */
thead tr th.rt-col-perm {
    position: sticky;
    top: 0;
    z-index: 2;
    min-width: 80px;
    max-width: 80px;
    /* solid bg prevents content bleed-through */
    background: #1a1b2e;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 6px 4px;
    text-align: center;
    /* pin content to TOP so section labels don't staircase */
    vertical-align: top;
    overflow: hidden;
    border-bottom: 2px solid rgba(255,255,255,0.1);
}

.rt-th-inner {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 100%;
}
.rt-th-sec {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    /* keeps label at top, never wraps onto next column */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    max-width: 78px;
}
.rt-th-lbl {
    font-size: 0.7rem;
    font-weight: 400;
    color: rgba(255,255,255,0.6);
    white-space: normal;
    word-break: break-word;
    line-height: 1.3;
}

/* Section colour themes for headers */
.rt-sec-home  .rt-th-sec { color: #f87171; }
.rt-sec-tr    .rt-th-sec { color: #60a5fa; }
.rt-sec-users .rt-th-sec { color: #4ade80; }
.rt-sec-site  .rt-th-sec { color: #a78bfa; }
.rt-sec-set   .rt-th-sec { color: #fbbf24; }

/* Data cells */
.rt-cell {
    text-align: center;
    padding: 5px 4px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    transition: background 0.1s;
}
.rt-cell:hover { background: rgba(255,255,255,0.06); }

/* Section tint on alternating cells (subtle) */
.rt-sec-home  { background: rgba(248,113,113, 0.03); }
.rt-sec-tr    { background: rgba(96,165,250,  0.03); }
.rt-sec-users { background: rgba(74,222,128,  0.03); }
.rt-sec-site  { background: rgba(167,139,250, 0.03); }
.rt-sec-set   { background: rgba(251,191,36,  0.03); }

/* Check / cross icons */
.rt-check { color: #4ade80; font-size: 0.85rem; }
.rt-cross { color: #f87171; font-size: 0.85rem; }

/* Branch separator — sticky, left-aligned */
.rt-branch-row th.rt-branch-cell {
    position: sticky;
    left: 0;          /* sticks to the left edge */
    text-align: left; /* content starts at left, not centred */
    padding: 7px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    background: #1e1f33;
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255,255,255,0.08);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    letter-spacing: 0.04em;
    width: 200px;    /* matches user column width */
    min-width: 200px;
}
.rt-branch-row th.rt-branch-cell i { margin-right: 6px; opacity: 0.6; }

/* User rows */
.rt-user-row:nth-child(even) .rt-col-user-sticky,
.rt-user-row:nth-child(even) .rt-cell {
    background-color: rgba(255,255,255,0.02);
}

/* Role badges */
.rt-role-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    margin-right: 4px;
    text-transform: lowercase;
    letter-spacing: 0.02em;
}
.rt-badge-admin  { background: #e11d48; color: #fff; }
.rt-badge-editor { background: #2563eb; color: #fff; }
.rt-badge-tr     { background: #475569; color: #fff; }

/* ── Light theme overrides for rights table ── */
[data-theme="light"] .rt-col-user,
[data-theme="light"] .rt-col-user-sticky {
    background: #f8fafc;
    border-right-color: rgba(0,0,0,0.1);
}
[data-theme="light"] .rt-col-user {
    background: #f1f5f9;
}
[data-theme="light"] thead tr th.rt-col-perm {
    background: #f1f5f9;
    border-bottom-color: rgba(0,0,0,0.1);
}
[data-theme="light"] .rt-th-lbl {
    color: rgba(0,0,0,0.5);
}
[data-theme="light"] .rt-branch-row th.rt-branch-cell {
    background: #e2e8f0;
    border-top-color: rgba(0,0,0,0.07);
    border-bottom-color: rgba(0,0,0,0.07);
}
[data-theme="light"] .rt-cell {
    border-bottom-color: rgba(0,0,0,0.05);
}
[data-theme="light"] .rt-cell:hover {
    background: rgba(0,0,0,0.04);
}
[data-theme="light"] .rt-user-row:nth-child(even) .rt-col-user-sticky,
[data-theme="light"] .rt-user-row:nth-child(even) .rt-cell {
    background-color: rgba(0,0,0,0.02);
}
[data-theme="light"] .rt-sec-pill:not(.active) {
    border-color: #aaa !important;
    color: #888 !important;
}
/* =====================================================================
   GIRLS SECTION  (users_girls.php, users_girls_rating.php, etc.)
   ===================================================================== */

/* ── Action bar ─────────────────────────────────────────────────────── */
.gg-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 6px;
    vertical-align: middle;
}

/* ── Filter bar ─────────────────────────────────────────────────────── */
.gg-filter { padding: 16px 20px; }
.gg-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}
.gg-filter-row--second { margin-top: 12px; }
.gg-filter-group { display: flex; flex-direction: column; gap: 4px; }
.gg-filter-group--wide { flex: 1 1 180px; }
.gg-filter-label { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.gg-input {
    background: rgba(255,255,255,0.06);
    border: 1.5px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 6px 12px;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.18s;
    min-width: 120px;
}
.gg-input:focus { border-color: var(--accent-primary); }
.gg-select {
    background: rgba(255,255,255,0.06);
    border: 1.5px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 6px 12px;
    font-size: 0.875rem;
    outline: none;
    cursor: pointer;
    transition: border-color 0.18s;
    min-width: 160px;
}
.gg-select:focus { border-color: var(--accent-primary); }

/* Status filter pills */
.gg-radio-group { display: flex; gap: 6px; flex-wrap: wrap; }
.gg-radio {
    padding: 5px 14px;
    border-radius: 20px;
    border: 1.5px solid rgba(255,255,255,0.15);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
}
.gg-radio.active,
.gg-radio:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(139,92,246,0.1);
}
.gg-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
}
.gg-checkbox {
    width: 16px; height: 16px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}
.gg-search-btn { align-self: flex-end; }

/* ── Card grid ──────────────────────────────────────────────────────── */
.gg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}
.gg-grid--draft {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.gg-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
    transition: transform 0.18s, box-shadow 0.18s;
}
.gg-card:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,0.35); }

/* Card head */
.gg-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px 8px;
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.gg-card__name {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}
.gg-card__id {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 500;
    flex-shrink: 0;
    margin-left: 6px;
}

/* Photo area */
.gg-card__photo-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    background: rgba(0,0,0,0.25);
    overflow: hidden;
}
.gg-card__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gg-card__no-photo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.2);
    font-size: 3.5rem;
}

/* Icon overlays (top-left) */
.gg-card__icons {
    position: absolute;
    top: 6px;
    left: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.gg-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    border-radius: 50%;
    font-size: 0.7rem;
    color: #fff;
}
.gg-ico--blocked  { background: rgba(239,68,68,0.85); }
.gg-ico--west-ua  { background: rgba(245,158,11,0.85); }

/* Status badge (overlayed at bottom) */
.gg-card__status {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    text-align: center;
    color: #fff;
}
.gg-status--inactive   { background: rgba(100,116,139,0.88); }
.gg-status--home       { background: rgba(16,185,129,0.82); }
.gg-status--moderation { background: rgba(245,158,11,0.88); }

/* Quick nav links */
.gg-card__links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid rgba(255,255,255,0.07);
}
.gg-card__links a {
    padding: 7px 6px;
    font-size: 0.73rem;
    color: var(--text-secondary);
    text-decoration: none;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.gg-card__links a:nth-child(even) { border-right: none; }
.gg-card__links a:hover {
    background: rgba(139,92,246,0.12);
    color: var(--accent-primary);
}

/* Draft-specific link layout */
.gg-card__links--draft {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    grid-template-columns: none;
    border-top: 1px solid rgba(255,255,255,0.07);
}
.gg-card__links--draft a {
    border: none;
    border-radius: 7px;
}

/* Card footer */
.gg-card__footer {
    padding: 8px 12px;
    font-size: 0.72rem;
    color: var(--text-muted);
    background: rgba(0,0,0,0.12);
    border-top: 1px solid rgba(255,255,255,0.06);
}
.gg-card__footer > div { line-height: 1.5; }

/* ── Pagination ─────────────────────────────────────────────────────── */
.gg-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    padding: 8px 0;
}
.gg-page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1.5px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
}
.gg-page-btn:hover,
.gg-page-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}
.gg-page-ellipsis {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 1rem;
    padding: 0 4px;
}
.gg-page-next {
    font-size: 0.8rem;
}
.mt-16 { margin-top: 16px; }

/* ── Rating table ───────────────────────────────────────────────────── */
.gg-rat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.gg-rat-table thead tr {
    background: rgba(255,255,255,0.04);
    border-bottom: 2px solid rgba(255,255,255,0.1);
}
.gg-rat-table th {
    padding: 10px 14px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    white-space: nowrap;
}
.gg-rat-table td {
    padding: 9px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    vertical-align: middle;
}
.gg-rat-table tbody tr:hover { background: rgba(255,255,255,0.04); }
.gg-rat-rank {
    font-weight: 700;
    color: var(--text-muted);
    width: 32px;
}
.gg-rat-id { color: var(--text-muted); font-size: 0.8rem; }
.gg-rat-credit { font-weight: 700; color: #a78bfa; text-align: right; }
.gg-rat-bonus  { text-align: right; }
.gg-bonus--pos { color: #34d399; }

.gg-sort { cursor: pointer; user-select: none; }
.gg-sort:hover { color: var(--text-primary); }
.gg-sort--desc i { color: var(--accent-primary); }
.gg-sort--asc  i { color: var(--accent-primary); }

.table-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.15s;
}
.table-link:hover { color: var(--accent-primary); }

/* ── Profile sub-nav ────────────────────────────────────────────────── */
.gg-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.gg-subnav__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 8px;
    border: 1.5px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.18s;
}
.gg-subnav__link:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(139,92,246,0.08);
}
.gg-subnav__link.active {
    border-color: var(--accent-primary);
    background: rgba(139,92,246,0.18);
    color: var(--accent-primary);
}

/* ── Placeholder panels ─────────────────────────────────────────────── */
.gg-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
}
.gg-placeholder__icon {
    font-size: 3rem;
    color: rgba(139,92,246,0.4);
    margin-bottom: 16px;
}
.gg-placeholder__title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--text-primary);
}
.gg-placeholder__text {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}



/* ═══════════════════════════════════════════════════════════════════════════
   GIRLS PROFILE SUB-PAGES — v2 styles
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Profile view: bio + avatar layout ──────────────────────────────────── */
.gg-profile-row {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}
.gg-profile-bio {
    flex: 1;
    min-width: 0;
}
.gg-profile-avatar-wrap {
    flex: 0 0 200px;
    width: 200px;
}
.gg-profile-avatar {
    width: 100%;
    border-radius: var(--radius);
    display: block;
    border: 2px solid rgba(139,92,246,0.3);
}
@media (max-width: 600px) {
    .gg-profile-row { flex-direction: column-reverse; }
    .gg-profile-avatar-wrap { width: 100%; flex: none; }
    .gg-profile-avatar { max-width: 200px; }
}

/* ── Definition list for profile bio ────────────────────────────────────── */
.gg-dl {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 6px 12px;
    margin: 0;
}
.gg-dl dt {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    align-self: start;
}
.gg-dl dd {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-primary);
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    word-break: break-word;
}
@media (max-width: 500px) {
    .gg-dl { grid-template-columns: 1fr; }
    .gg-dl dt { border-bottom: none; padding-bottom: 0; }
}

/* ── Section heading inside pages ───────────────────────────────────────── */
.gg-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.gg-section-title .text-muted {
    font-weight: 400;
    font-size: 0.85rem;
}

/* ── Horizontal photo strip (profile view summary) ──────────────────────── */
.gg-photo-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.gg-photo-thumb {
    display: block;
    width: 90px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(139,92,246,0.2);
    transition: border-color 0.2s;
}
.gg-photo-thumb:hover {
    border-color: var(--accent-primary);
}
.gg-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Photo management table ─────────────────────────────────────────────── */
.gg-photo-table {
    width: 100%;
    border-collapse: collapse;
}
.gg-photo-table tr {
    border-bottom: 1px solid rgba(255,255,255,0.07);
    transition: background 0.15s;
}
.gg-photo-table tr:hover {
    background: rgba(139,92,246,0.06);
}
.gg-photo-table td {
    padding: 8px 10px;
    vertical-align: middle;
    font-size: 0.88rem;
    color: var(--text-primary);
}
.gg-photo-table__thumb {
    width: 70px;
}
.gg-photo-table__actions {
    width: 80px;
    text-align: center;
    white-space: nowrap;
}
.gg-img-td {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    background-color: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
}
/* highlight dragged row */
.cur-tr td {
    background: rgba(139,92,246,0.15) !important;
}

/* ── Settings / management page ─────────────────────────────────────────── */
.gg-settings-form {
    padding: 4px 0;
}
.gg-setting-row {
    display: grid;
    grid-template-columns: 220px 60px 1fr;
    gap: 8px 16px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.gg-setting-row--wide {
    grid-template-columns: 220px 1fr;
}
.gg-setting-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}
.gg-setting-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}
.gg-setting-value {
    display: flex;
    align-items: center;
}
@media (max-width: 580px) {
    .gg-setting-row {
        grid-template-columns: 1fr 60px;
        grid-template-rows: auto auto;
    }
    .gg-setting-hint {
        grid-column: 1 / -1;
    }
}

/* ── CSS toggle switch (replaces jQuery bootstrap-switch) ───────────────── */
.gg-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
    margin: 0;
}
.gg-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.gg-toggle__slider {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.12);
    border-radius: 24px;
    transition: background 0.25s;
}
.gg-toggle__slider::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.25s;
}
.gg-toggle input:checked + .gg-toggle__slider {
    background: var(--accent-primary);
}
.gg-toggle input:checked + .gg-toggle__slider::before {
    transform: translateX(20px);
}
.gg-toggle--danger input:checked + .gg-toggle__slider {
    background: var(--danger-color);
}

/* ── Small utils used inside profile pages ──────────────────────────────── */
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.gg-form-group  { margin-bottom: 14px; }
.gg-form-label  { display: block; margin-bottom: 6px; font-size: 0.88rem; color: var(--text-muted); }
.gg-form-actions { display: flex; gap: 10px; flex-wrap: wrap; }


/* ═══════════════════════════════════════════════════════════════════════════
   LIGHTBOX — full-screen photo viewer
   ═══════════════════════════════════════════════════════════════════════════ */
.gg-lb {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gg-lb__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.88);
    backdrop-filter: blur(6px);
}
.gg-lb__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 90vw;
    max-height: 90vh;
}
.gg-lb__img {
    max-width: 80vw;
    max-height: 86vh;
    border-radius: 10px;
    box-shadow: 0 8px 40px rgba(0,0,0,.7);
    object-fit: contain;
    display: block;
}
.gg-lb__close {
    position: absolute;
    top: -44px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
    opacity: .8;
    transition: opacity .2s;
}
.gg-lb__close:hover { opacity: 1; }
.gg-lb__nav {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
    font-size: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.gg-lb__nav:hover { background: rgba(139,92,246,.5); }
.gg-lb__counter {
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,.7);
    font-size: .85rem;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOGGLE SWITCH — fix: ON state must be visually distinct
   ═══════════════════════════════════════════════════════════════════════════ */
/* Override the earlier definition with !important-free specificity boost */
.gg-settings-form .gg-toggle__slider {
    background: rgba(255,255,255,0.15);
}
.gg-settings-form .gg-toggle input:checked ~ .gg-toggle__slider,
.gg-settings-form .gg-toggle input:checked + .gg-toggle__slider {
    background: #7c3aed;
    box-shadow: 0 0 8px rgba(124,58,237,0.55);
}
/* danger variant */
.gg-settings-form .gg-toggle--danger input:checked + .gg-toggle__slider {
    background: #dc2626;
    box-shadow: 0 0 8px rgba(220,38,38,0.55);
}
/* make the OFF state thumb slightly grey so it reads as "off" */
.gg-toggle__slider::before {
    background: rgba(255,255,255,0.7);
}
.gg-toggle input:checked + .gg-toggle__slider::before {
    background: #fff;
}

/* ═══════════════════════════════════════════════════════════════════════════
   GIRL EDIT / ADD FORM — horizontal layout
   ═══════════════════════════════════════════════════════════════════════════ */
.gg-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 30px;
}
.gg-page-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 20px;
    padding: 0 30px;
}
.gg-page-title .text-muted { font-size: 1rem; font-weight: 400; }
.gg-section-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-primary);
    margin: 0 0 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--glass-border);
}
.gg-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 30px;
}
.gg-tabs .btn.active {
    background: var(--gradient-primary);
    color: #fff;
    border-color: transparent;
}

/* Form layout */
.gg-form-horizontal { width: 100%; }
.gg-form-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.gg-form-row:last-child { border-bottom: none; }
.gg-form-label {
    min-width: 230px;
    max-width: 230px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    padding-top: 10px;
    flex-shrink: 0;
    line-height: 1.4;
}
.gg-form-input {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Inputs & selects inherit gg-input / gg-select from existing styles.
   Add sizing behaviours: */
.gg-input {
    background: rgba(15,23,42,0.55);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 9px 14px;
    color: var(--text-main);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
    box-sizing: border-box;
}
.gg-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(225,29,72,.18);
}
.gg-select {
    background: rgba(15,23,42,0.55);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 9px 14px;
    color: var(--text-main);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color .2s;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
}
.gg-select:focus { border-color: var(--color-primary); }
[data-theme="light"] .gg-input,
[data-theme="light"] .gg-select {
    background: rgba(255,255,255,0.9);
    border-color: #cbd5e1;
    color: #334155;
}
textarea.gg-input { resize: vertical; min-height: 42px; }

/* Inline (horizontal inside a row) */
.gg-inline-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

/* Language fields row */
.gg-lang-row {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
}
.gg-lang-field {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 160px;
}
.gg-lang-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(124,58,237,0.25);
    border: 1px solid rgba(124,58,237,0.45);
    color: #a78bfa;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    padding: 2px 6px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Textarea with lang badge */
.gg-lang-textarea-wrap {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.gg-lang-textarea-wrap .gg-lang-badge { margin-top: 10px; }
.gg-lang-textarea-wrap textarea { flex: 1; }

/* Input + unit addon (e.g. "см", "кг", "от") */
.gg-input-addon-wrap {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    width: 100%;
}
.gg-input-addon-wrap .gg-input {
    border: none;
    border-radius: 0;
    flex: 1;
    min-width: 0;
}
.gg-input-addon {
    display: flex;
    align-items: center;
    padding: 0 10px;
    background: rgba(255,255,255,0.08);
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}
[data-theme="light"] .gg-input-addon-wrap { border-color: #cbd5e1; }
[data-theme="light"] .gg-input-addon { background: #f1f5f9; }

/* Checkboxes grid */
.gg-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 4px 12px;
}
.gg-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 0;
    margin: 0;
    transition: color .15s;
}
.gg-checkbox-label:hover { color: var(--text-main); }
.gg-checkbox-label input[type="checkbox"] {
    flex-shrink: 0;
    width: 16px; height: 16px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

/* Spacing helpers */
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

/* Main + Content wrappers used in the new pages */
.gg-main { padding: 30px 0; min-height: calc(100vh - 120px); }
.gg-content { max-width: 1200px; margin: 0 auto; padding: 0 30px; }

/* Responsive */
@media (max-width: 768px) {
    .gg-form-row { flex-direction: column; gap: 6px; }
    .gg-form-label { min-width: unset; max-width: unset; padding-top: 0; }
    .gg-inline-row { flex-direction: column; align-items: stretch; }
    .gg-lang-row { flex-direction: column; }
    .gg-tabs { padding: 0 16px; }
    .gg-page-title { padding: 0 16px; }
    .gg-breadcrumb { padding: 0 16px; }
    .gg-content { padding: 0 16px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   GG MODAL — vanilla JS overlay (no Bootstrap dependency)
   ═══════════════════════════════════════════════════════════════════════════ */
.gg-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 3000;
    align-items: center;
    justify-content: center;
}
.gg-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(4px);
    cursor: pointer;
}
.gg-modal__box {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    border-radius: var(--radius-lg);
    animation: ggModalIn .2s ease;
    overflow: hidden;
    margin: 20px;
}
.gg-modal__box--sm { max-width: 380px; }
@keyframes ggModalIn {
    from { opacity:0; transform: translateY(-16px) scale(.97); }
    to   { opacity:1; transform: none; }
}
.gg-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--glass-border);
    gap: 12px;
}
.gg-modal__header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}
.gg-modal__close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    margin-left: auto;
    transition: color .15s;
    flex-shrink: 0;
}
.gg-modal__close:hover { color: var(--text-main); }
.gg-modal__body {
    padding: 20px;
    color: var(--text-muted);
    font-size: .95rem;
    line-height: 1.6;
}
.gg-modal__footer {
    padding: 16px 20px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ── Photo table (shared: photo & private pages) ───────────────────────── */
.gg-photo-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.gg-photo-table tr {
    border-bottom: 1px solid var(--glass-border);
    transition: background .15s;
}
.gg-photo-table tr:last-child { border-bottom: none; }
.gg-photo-table tr:hover { background: rgba(255,255,255,.03); }
.gg-photo-table td { padding: 10px 12px; vertical-align: middle; border-bottom: 1px solid var(--glass-border); }
.gg-photo-table__thumb { width: 64px; padding: 8px 12px 8px 0 !important; }
.gg-img-td {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    background-size: cover;
    background-position: center;
    background-color: rgba(255,255,255,.06);
    display: block;
}
.gg-photo-table__actions { width: 90px; text-align: right; white-space: nowrap; }
.btn-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--color-primary);
    text-decoration: underline;
    cursor: pointer;
    font-size: .875rem;
}
.btn-link:hover { color: #f43f5e; }
.text-danger { color: #ef4444 !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   MM CARD — men user cards (users_men.php)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Slightly thinner card links list on men cards */
.mm-card__links {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 12px;
    border-top: 1px solid var(--glass-border);
}
.mm-card__links a,
.mm-status-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    font-size: .8125rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: background .15s, color .15s;
    line-height: 1.2;
}
.mm-card__links a:hover { background: rgba(255,255,255,.06); color: var(--text-main); }

/* ── Status pill strip (Бонусы / Взаимодействие) ──────────────────────── */
.mm-card__statuses {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px 4px;
}
.mm-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 3px 10px 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
}
.mm-pill--bonuses {
    background: rgba(251,191,36,.15);
    color: #fbbf24;
    border: 1px solid rgba(251,191,36,.45);
}
.mm-pill--bonuses i { color: #fbbf24; }
.mm-pill--interact {
    background: rgba(244,63,94,.12);
    color: #f43f5e;
    border: 1px solid rgba(244,63,94,.35);
}
.mm-pill--interact i { color: #f43f5e; }

/* Photo — taller on men cards (square-ish) */
.mm-card__photo {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: var(--radius-sm);
    display: block;
}

/* Bottom badge: Не активен / Нет e-mail */
.mm-card__badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    font-size: .75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: .02em;
    pointer-events: none;
}
.mm-badge--inactive {
    background: rgba(251,191,36,.2);
    color: #fbbf24;
    border: 1px solid #fbbf24;
}
.mm-badge--no-email {
    background: rgba(244,63,94,.18);
    color: #f43f5e;
    border: 1px solid #f43f5e;
}

/* ── Favourite heart — lives in the footer row ────────────────────────── */
.mm-card__fav {
    background: none;
    border: none;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    font-size: 1.25rem;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    transition: color .2s, transform .15s, background .15s;
    flex-shrink: 0;
    align-self: center;
}
.mm-card__fav:hover              { color: #f43f5e; transform: scale(1.2); background: rgba(244,63,94,.1); }
.mm-card__fav--active            { color: #f43f5e; }
.mm-card__fav--active:hover      { background: rgba(244,63,94,.15); }

/* Footer row: dates left + heart right */
.mm-card__footer {
    padding: 8px 12px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.mm-card__footer-dates {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: .78rem;
    color: var(--text-muted);
}
.mm-card__footer-dates strong { color: var(--text-main); }

/* ═══════════════════════════════════════════════════════════════════════════
   MEN PROFILE SUB-PAGES  (users_men_profile*.php)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Profile nav bar (compact — men profile sub-pages) ──────────────────── */
.mpnav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 0 14px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 22px;
}
.mpnav__title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .95rem;
    font-weight: 700;
    color: var(--text-main);
}
.mpnav__id   { color: var(--text-muted); font-weight: 400; }
.mpnav__name { color: var(--text-main); }
.mpnav__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.mpnav__tab {
    display: inline-block;
    padding: 4px 13px;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(255,255,255,.05);
    border: 1px solid var(--glass-border);
    text-decoration: none;
    transition: background .18s, color .18s, border-color .18s;
    white-space: nowrap;
}
.mpnav__tab:hover {
    background: rgba(255,255,255,.1);
    color: var(--text-main);
    text-decoration: none;
}
.mpnav__tab.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    font-weight: 600;
}
.mpnav__tab--login {
    background: rgba(251,191,36,.12);
    color: #fbbf24;
    border-color: rgba(251,191,36,.4);
}
.mpnav__tab--login:hover {
    background: rgba(251,191,36,.22);
    color: #fde68a;
}

/* modal backdrop when open */
.gg-modal[style*="flex"] {
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(3px);
}

/* ── Section title ──────────────────────────────────────────────────────── */
.gg-section-title {
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 20px 0 10px;
}

/* ── Horizontal rule ───────────────────────────────────────────────────── */
.gg-hr {
    border: none;
    border-top: 1px solid var(--glass-border);
    margin: 16px 0;
}

/* ── Definition list for profile data ──────────────────────────────────── */
.gg-dl {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 4px 12px;
    font-size: .875rem;
}
.gg-dl dt {
    color: var(--text-muted);
    font-weight: 500;
    padding: 4px 0;
    white-space: nowrap;
}
.gg-dl dd {
    color: var(--text-main);
    padding: 4px 0;
    margin: 0;
    border-bottom: 1px solid rgba(255,255,255,.04);
}
.req-star { color: #f59e0b; font-size: .7em; vertical-align: middle; }

/* ── Generic data table ─────────────────────────────────────────────────── */
.gg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}
.gg-table th {
    text-align: left;
    padding: 8px 10px;
    color: var(--text-muted);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--glass-border);
}
.gg-table td {
    padding: 8px 10px;
    color: var(--text-main);
    border-bottom: 1px solid rgba(255,255,255,.04);
    vertical-align: middle;
}
.gg-table tbody tr:hover td { background: rgba(255,255,255,.03); }
.gg-table a { color: var(--color-primary); }
.gg-table a:hover { text-decoration: underline; }

/* ── Form fieldset ──────────────────────────────────────────────────────── */
.gg-fieldset {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 16px 20px 8px;
    margin-bottom: 20px;
}
.gg-fieldset__legend {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0 8px;
}

/* ── Edit form 2-column grid ────────────────────────────────────────────── */
.adm-edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 4px 20px;
}

/* ── Form rows / inputs ─────────────────────────────────────────────────── */
.gg-form-row {
    display: flex;
    flex-direction: column;
    padding: 6px 0;
}
.gg-form-label {
    font-size: .8rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 5px;
}
.gg-input,
.gg-select {
    background: rgba(255,255,255,.06);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: .875rem;
    padding: 7px 11px;
    outline: none;
    transition: border-color .18s, background .18s;
    width: 100%;
    box-sizing: border-box;
}
.gg-input:focus,
.gg-select:focus {
    border-color: var(--color-primary);
    background: rgba(255,255,255,.1);
}
.gg-select option { background: #1e1e2e; color: var(--text-main); }
textarea.gg-input { resize: vertical; }

/* ── Toggle switch (Управление / settings page) ─────────────────────────── */
.adm-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .05em;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,.2);
    background: rgba(255,255,255,.07);
    color: var(--text-muted);
    transition: background .18s, color .18s, border-color .18s;
}
.adm-toggle--on {
    background: rgba(34,197,94,.18);
    border-color: rgba(34,197,94,.5);
    color: #22c55e;
}
.adm-toggle:hover { opacity: .85; }

/* ── Settings table ─────────────────────────────────────────────────────── */
.adm-settings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}
.adm-settings-table tr + tr { border-top: 1px solid rgba(255,255,255,.05); }
.adm-settings__label {
    padding: 12px 12px 12px 0;
    color: var(--text-main);
    font-weight: 500;
    width: 200px;
    vertical-align: top;
}
.adm-settings__control {
    padding: 10px 20px 10px 0;
    vertical-align: top;
    width: 80px;
}
.adm-settings__hint {
    padding: 12px 0;
    color: var(--text-muted);
    font-size: .82rem;
    line-height: 1.5;
    vertical-align: top;
}

/* ── Utility ────────────────────────────────────────────────────────────── */
.mb-20 { margin-bottom: 20px; }

/* Global Form Inputs */
.form-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    color: var(--text-main);
    font-size: 0.9rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.form-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.15), inset 0 1px 2px rgba(0,0,0,0.1);
}

.form-input:hover:not(:focus) {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.07);
}

.form-input--number {
    text-align: center;
    font-weight: 600;
}

textarea.form-input {
    line-height: 1.6;
    resize: vertical;
}

[data-theme="light"] .form-input {
    background: rgba(255, 255, 255, 0.9);
    border-color: #cbd5e1;
    color: #334155;
}

[data-theme="light"] .form-input:focus {
    background: #fff;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   FILTERS GRID — responsive filter panel for request pages
   ═══════════════════════════════════════════════════════════════════════════ */
.filters-grid-panel {
    padding: 20px 25px;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    align-items: end;
}

/* Reset min-width inside grid so inputs fit their cells */
.filters-grid .filter-input,
.filters-grid .filter-select {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Button wrapper — stays in grid flow, button fills the cell */
.filters-grid-btn {
    display: flex;
    align-items: flex-end;
}

.filters-grid-btn .btn {
    width: 100%;
    height: 42px;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — 768px (Tablet / Small Laptop)
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* Container padding */
    .container,
    .container-fluid {
        padding: 0 16px;
    }

    .admin-content {
        padding: 20px 0;
    }

    /* ── Sub-navigation (header tabs) ── */
    .sub-nav-bar {
        padding: 8px 16px 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .sub-nav-bar::-webkit-scrollbar { display: none; }

    .sub-nav {
        flex-wrap: nowrap; /* Keep on one line — scrollable */
        gap: 4px;
        white-space: nowrap;
    }

    .sub-nav-item {
        padding: 8px 14px;
        font-size: 0.82rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* ── Tertiary nav (statistics tabs) ── */
    .tertiary-nav {
        gap: 8px;
        margin-bottom: 16px;
        padding-bottom: 16px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .tertiary-nav::-webkit-scrollbar { display: none; }

    .tertiary-nav-item {
        padding: 8px 16px;
        font-size: 0.85rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* ── Filters bar ── */
    .filters-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px;
    }

    /* ── Filters grid (request pages) ── */
    .filters-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .filters-grid-panel {
        padding: 16px;
    }

    .filters-bar > div {
        flex-wrap: wrap;
        gap: 10px;
    }

    .filter-group {
        flex: 1 1 calc(50% - 6px);
        min-width: 0;
    }

    .filter-input,
    .filter-select {
        min-width: 0;
        width: 100%;
        font-size: 0.9rem;
        padding: 9px 12px;
    }

    /* ── Dashboard grid (index page info blocks) ── */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 20px;
    }

    /* ── Stats summary panel (index page) ── */
    .dashboard-stats-panel {
        min-width: 0 !important;
    }

    .glass-panel[style*="max-width: 400px"] {
        max-width: 100% !important;
    }

    /* ── Charts grid ── */
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .chart-wrapper {
        height: 240px;
    }

    .chart-container.full-width .chart-wrapper {
        height: 300px;
    }

    /* ── Data tables ── */
    .data-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table th,
    .table td {
        font-size: 0.82rem;
        padding: 10px 12px;
        white-space: nowrap;
    }

    /* ── Page header title ── */
    .page-header .page-title {
        font-size: 1.3rem;
    }

    h2.mb-20 {
        font-size: 1.25rem !important;
    }

    h3.mb-20 {
        font-size: 1.1rem !important;
    }

    /* ── Stats summary list ── */
    .stats-summary-list li {
        font-size: 0.9rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — 390px (Mobile / iPhone)
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 430px) {

    /* Container */
    .container,
    .container-fluid {
        padding: 0 12px;
    }

    .admin-content {
        padding: 16px 0;
    }

    /* ── Header ── */
    .admin-navbar {
        padding: 0 12px;
    }

    .brand-logo {
        font-size: 1rem;
    }

    /* ── Sub-nav ── */
    .sub-nav-item {
        padding: 7px 12px;
        font-size: 0.78rem;
    }

    /* ── Tertiary nav ── */
    .tertiary-nav-item {
        padding: 7px 12px;
        font-size: 0.8rem;
    }

    /* ── Filters — single column ── */
    .filter-group {
        flex: 1 1 100%;
    }

    .filters-bar {
        padding: 12px;
        gap: 10px;
    }

    /* ── Filters grid (request pages) ── */
    .filters-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filters-grid-btn .btn {
        height: 44px;
    }

    /* ── Alert bar ── */
    .alert-bar {
        font-size: 0.85rem;
        padding: 12px 14px;
    }

    /* ── Dashboard info blocks ── */
    .info-block {
        font-size: 0.82rem;
        padding: 12px;
    }

    /* ── Charts ── */
    .chart-wrapper {
        height: 200px;
    }

    .chart-container.full-width .chart-wrapper {
        height: 250px;
    }

    .chart-title {
        font-size: 0.95rem;
    }

    /* ── Tables ── */
    .table th,
    .table td {
        font-size: 0.78rem;
        padding: 8px 10px;
    }

    /* ── Glass panel adjustments ── */
    .glass-panel {
        border-radius: var(--radius-md);
        padding: 16px; /* Reduced from 24px */
    }

    .dashboard-top-row {
        gap: 16px;
    }

    /* ── Page titles ── */
    h2.mb-20 {
        font-size: 1.1rem !important;
    }

    h3.mb-20 {
        font-size: 0.95rem !important;
    }

    /* ── Buttons full-width in filter bars ── */
    .filters-bar .btn {
        width: 100%;
        justify-content: center;
    }

    /* ── Stats summary list ── */
    .stats-summary-list li {
        font-size: 0.82rem;
    }
}
