/* Admin Panel Styles */

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-tertiary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #FFB347;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --border: rgba(255, 255, 255, 0.08);
    --radius-md: 10px;
    --radius-lg: 16px;
    --sidebar-width: 240px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh; /* fallback */
    min-height: -webkit-fill-available; /* iOS Safari */
    min-height: 100dvh; /* modern browsers */
    display: flex;
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh; /* fallback */
    min-height: -webkit-fill-available; /* iOS Safari */
    min-height: 100dvh; /* modern browsers */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: auto;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

header h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 700;
}

header h1 svg {
    color: var(--accent);
}

.stats {
    display: flex;
    gap: 24px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.filter-bar select {
    flex: 1;
    max-width: 300px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
}

.select-all-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
}

.select-all-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

/* Touch target improvements for mobile */
@media (max-width: 768px) {
    .btn {
        min-height: 48px;
        padding: 14px 20px;
    }
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
}

/* Moderation Queue */
.moderation-queue {
    display: grid;
    gap: 16px;
}

.moderation-item {
    display: grid;
    grid-template-columns: 40px 200px 1fr auto;
    gap: 20px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    align-items: center;
}

.moderation-item:hover {
    border-color: var(--accent);
}

.moderation-item.selected {
    background: rgba(255, 179, 71, 0.1);
    border-color: var(--accent);
}

.item-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent);
}

.item-image {
    width: 200px;
    height: 200px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-tertiary);
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.item-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.item-prompt {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-secondary);
}

.item-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.flagged {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.status-badge.rejected {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.status-badge.hidden {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.reports-badge {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.deleted-badge {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.item-actions {
    display: flex;
    gap: 8px;
}

.item-actions .btn {
    min-height: 44px;
    padding: 10px 16px;
    font-size: 13px;
}

/* Touch target improvements for mobile */
@media (max-width: 768px) {
    .item-actions .btn {
        min-height: 48px;
        padding: 12px 16px;
    }
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #16a34a;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.empty-state svg {
    margin-bottom: 20px;
    opacity: 0.2;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
}

/* Loading State */
.loading-state {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 100px 20px;
    gap: 12px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Detail Modal */
.modal-large {
    max-width: 900px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: auto;
    max-height: 90vh;
    max-height: 90dvh;
}

.modal-body {
    padding: 24px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.detail-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 20px;
}

.detail-image img {
    max-width: 100%;
    max-height: 400px;
    border-radius: var(--radius-md);
}

.detail-info h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-info p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
    max-height: 100px;
    overflow-y: auto;
}

.detail-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.detail-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* ==================== ADMIN TABS ==================== */

.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

/* ==================== QUICK ACTIONS ==================== */

.quick-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

/* Touch target improvements for mobile */
@media (max-width: 768px) {
    .action-btn {
        min-height: 48px;
        padding: 14px 16px;
    }
}

.action-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.action-btn.active {
    background: var(--warning);
    border-color: var(--warning);
    color: white;
}

/* ==================== MODERATION SUBTABS ==================== */

.moderation-subtabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.subtab-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.subtab-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
}

.subtab-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}

.subtab-btn svg {
    flex-shrink: 0;
}

/* ==================== DASHBOARD PANELS ==================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

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

.panel {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.panel-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.panel-body {
    padding: 20px 24px;
}

/* ==================== SYSTEM HEALTH ==================== */

.health-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.health-item:last-child {
    margin-bottom: 0;
}

.health-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.health-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.health-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.health-fill.warning {
    background: var(--warning);
}

.health-fill.danger {
    background: var(--error);
}

.health-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ==================== ACTIVITY FEED ==================== */

.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.activity-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.activity-icon.signup {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.activity-icon.generation {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
}

.activity-icon.admin {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.activity-icon.flagged {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.activity-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.activity-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.4;
}

.activity-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.activity-empty {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* ==================== CHART ==================== */

.chart-container {
    height: 200px;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    padding: 20px 0;
}

.chart-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.chart-bar-fill {
    width: 100%;
    background: var(--accent);
    border-radius: 4px 4px 0 0;
    transition: height 0.3s ease;
    min-height: 4px;
}

.chart-bar:hover .chart-bar-fill {
    background: #60a5fa;
}

.chart-bar-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

.chart-bar-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-empty {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: var(--text-secondary);
    font-size: 14px;
}

/* ==================== USER HISTORY ==================== */

.user-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
    max-height: 500px;
    overflow-y: auto;
}

.history-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.history-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.history-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.history-item-info {
    padding: 12px;
}

.history-item-date {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.history-item-prompt {
    font-size: 13px;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.history-item-status {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.8);
    color: white;
}

.history-item-status.approved {
    background: rgba(34, 197, 94, 0.9);
}

.history-item-status.pending {
    background: rgba(245, 158, 11, 0.9);
}

.history-item-status.flagged {
    background: rgba(239, 68, 68, 0.9);
}

.history-item-status.rejected {
    background: rgba(239, 68, 68, 0.9);
}

.history-item-status.hidden {
    background: rgba(107, 114, 128, 0.9);
}

/* ==================== TIERS TABLE ==================== */

.tiers-table {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
}

.tiers-list {
    display: flex;
    flex-direction: column;
}

.tier-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    gap: 24px;
}

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

.tier-item:hover {
    background: var(--bg-tertiary);
}

.tier-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tier-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.tier-limits {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.tier-limits span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tier-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
}

.tier-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tier-user-count {
    font-size: 13px;
    color: var(--text-secondary);
}

.tier-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.tier-status.active {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.tier-status.inactive {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.tier-actions {
    display: flex;
    gap: 8px;
}

/* Touch target improvements for mobile */
@media (max-width: 768px) {
    .tier-actions .btn {
        min-height: 48px;
        padding: 12px 16px;
    }
}

/* ==================== AUDIT LOG ==================== */

.audit-log-table {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
}

.audit-log-list {
    display: flex;
    flex-direction: column;
}

.audit-log-item {
    display: grid;
    grid-template-columns: 200px 150px 1fr 150px;
    gap: 20px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    align-items: center;
}

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

.audit-log-item:hover {
    background: var(--bg-tertiary);
}

.audit-time {
    font-size: 13px;
    color: var(--text-secondary);
}

.audit-admin {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
}

.audit-action {
    font-size: 14px;
    color: var(--text-primary);
}

.audit-details {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
}

.audit-details span {
    display: flex;
    align-items: center;
    gap: 4px;
}

@media (max-width: 768px) {
    .audit-log-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

/* Touch target improvements for mobile */
@media (max-width: 768px) {
    .tab-btn {
        min-height: 48px;
        padding: 14px 20px;
    }
}

.tab-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--accent);
    color: white;
}

.tab-content {
    display: none;
}

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

/* ==================== DASHBOARD STATS GRID ==================== */

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

@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.stat-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-md);
    color: var(--accent);
}

.stat-card.warning .stat-icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.stat-card.danger .stat-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

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

.stat-info .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-info .stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: normal;
}

/* ==================== USERS TABLE ==================== */

.users-header {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

#user-search {
    flex: 1;
    max-width: 400px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
}

#user-search::placeholder {
    color: var(--text-secondary);
}

#user-search:focus {
    outline: none;
    border-color: var(--accent);
}

#users-table {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow-x: auto;
}

.users-table-inner {
    width: 100%;
    border-collapse: collapse;
}

.users-table-inner thead {
    background: var(--bg-secondary);
}

.users-table-inner th {
    padding: 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.users-table-inner td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.users-table-inner tbody tr:hover {
    background: var(--bg-secondary);
}

.user-row td {
    font-size: 14px;
}

.user-email {
    font-weight: 500;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.admin {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.badge.user {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
}

.badge.active {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.badge.banned {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 12px;
}

/* ==================== PAGINATION ==================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.pagination-btn {
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--accent);
    border-color: var(--accent);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ==================== MODAL ==================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.2s;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
}

.form-group input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.error-message,
.success-message {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-bottom: 16px;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
}

.success-message {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }

    header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .stats {
        width: 100%;
        justify-content: space-between;
    }

    .moderation-item {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .item-image {
        width: 100%;
        height: 250px;
    }

    .item-actions {
        width: 100%;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-actions {
        grid-template-columns: 1fr;
    }

    .admin-tabs {
        flex-wrap: wrap;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .users-table-inner {
        font-size: 12px;
    }

    .users-table-inner th,
    .users-table-inner td {
        padding: 12px 8px;
    }
}

/* ==================== BULK ACTIONS ==================== */

.bulk-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(255, 179, 71, 0.1);
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    gap: 16px;
}

.bulk-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
}

.bulk-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.bulk-actions .btn {
    min-height: 40px;
    padding: 10px 16px;
    font-size: 13px;
}

/* Selected row highlighting */
.users-table-inner tbody tr.selected {
    background: rgba(255, 179, 71, 0.1);
}

.users-table-inner tbody tr.selected:hover {
    background: rgba(255, 179, 71, 0.15);
}

/* Checkbox cell styling */
.checkbox-cell {
    width: 40px;
    text-align: center;
    padding: 16px 8px !important;
}

.checkbox-cell input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
    display: inline-block;
    visibility: visible;
    opacity: 1;
}

/* Bulk toolbar responsive */
@media (max-width: 768px) {
    .bulk-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .bulk-actions {
        width: 100%;
    }

    .bulk-actions .btn {
        flex: 1;
    }
}
