:root {
    --gold: #C9A84C;
    --gold-dark: #A8872E;
    --gold-light: #F5E6B8;
    --gold-glow: rgba(201, 168, 76, 0.25);
    --gold-bg: #FFF8E7;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #3B82F6;
    --dark: #1A1A2E;
    --gray: #6B7280;
    --gray-light: #E5E7EB;
    --gray-dark: #4B5563;
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.35);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    --glass-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.1);
    --sidebar-width: 270px;
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Cairo', 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f5f0e8 0%, #fff8e7 40%, #f0ebe0 100%);
    color: var(--dark);
    line-height: 1.6;
    direction: rtl;
}

a { text-decoration: none; color: inherit; }

.app { display: flex; min-height: 100vh; }

/* ─── Sidebar ─── */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, rgba(26, 26, 46, 0.97) 0%, rgba(40, 35, 55, 0.95) 100%);
    backdrop-filter: blur(20px);
    color: #fff;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: var(--transition);
    border-left: 1px solid rgba(201, 168, 76, 0.15);
}

.sidebar-header {
    padding: 28px 24px 20px;
    border-bottom: 1px solid rgba(201, 168, 76, 0.12);
    text-align: center;
}

.sidebar-header .logo-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    box-shadow: 0 4px 15px var(--gold-glow);
}

.sidebar-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-header p { font-size: 0.8rem; color: rgba(255,255,255,0.4); margin-top: 2px; }

.sidebar-nav { padding: 16px 12px; }

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    color: rgba(255,255,255,0.55);
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    margin-bottom: 2px;
}

.sidebar-nav a:hover {
    background: rgba(201, 168, 76, 0.1);
    color: var(--gold-light);
}

.sidebar-nav a.active {
    background: linear-gradient(135deg, rgba(201, 168, 76, 0.18), rgba(201, 168, 76, 0.06));
    color: var(--gold);
    box-shadow: inset 3px 0 0 var(--gold);
}

.sidebar-nav .icon { font-size: 1.15rem; width: 24px; text-align: center; opacity: 0.7; }
.sidebar-nav a.active .icon { opacity: 1; }

.sidebar-nav .nav-label { flex: 1; }
.sidebar-nav .nav-badge {
    background: var(--gold);
    color: #1a1a2e;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 50px;
    min-width: 20px;
    text-align: center;
}

/* ─── Main Content ─── */
.main-content {
    flex: 1;
    margin-right: var(--sidebar-width);
    min-height: 100vh;
}

.content-header {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 18px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.content-header h1 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--gray);
    font-size: 0.9rem;
}

.content-body { padding: 28px 32px; }

/* ─── Glass Card ─── */
.card, .stat-card, .quick-actions {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
}

.card {
    padding: 24px;
    margin-bottom: 24px;
}

.card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 16px; color: var(--dark); }

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(201, 168, 76, 0.25);
    border-radius: 10px;
    transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 168, 76, 0.45);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(201, 168, 76, 0.25) transparent;
}

/* ─── Stat Panels (2 panels layout) ─── */
.stat-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.stat-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.stat-panel:hover {
    box-shadow: 0 12px 40px rgba(201, 168, 76, 0.08);
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(201, 168, 76, 0.1);
}

.panel-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.panel-icon {
    font-size: 1.1rem;
    color: var(--gold);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(201, 168, 76, 0.08);
    border-radius: 8px;
}

.panel-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 4px;
}

.metric-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 8px;
    transition: var(--transition);
    margin: 2px;
}

.metric-item:hover {
    background: rgba(201, 168, 76, 0.04);
}

.metric-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(201, 168, 76, 0.06);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--gold);
    flex-shrink: 0;
}

.metric-info {
    flex: 1;
    min-width: 0;
}

.metric-label {
    display: block;
    font-size: 0.75rem;
    color: var(--gray);
    line-height: 1.2;
}

.metric-value {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.3;
    margin-top: 1px;
}

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

@media (max-width: 480px) {
    .panel-metrics { grid-template-columns: 1fr; }
}

/* ─── Tables ─── */
.table-responsive { overflow-x: auto; border-radius: var(--radius-sm); }

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.table th {
    background: rgba(201, 168, 76, 0.08);
    padding: 14px 18px;
    text-align: right;
    font-weight: 600;
    color: var(--gold-dark);
    border-bottom: 2px solid rgba(201, 168, 76, 0.15);
    white-space: nowrap;
    font-size: 0.82rem;
    letter-spacing: 0.3px;
}

.table td {
    padding: 13px 18px;
    border-bottom: 1px solid rgba(201, 168, 76, 0.06);
    vertical-align: middle;
}

.table tbody tr { transition: var(--transition); }
.table tbody tr:hover { background: rgba(201, 168, 76, 0.04); }
.table tbody tr:last-child td { border-bottom: none; }

.table .actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    font-family: inherit;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #fff;
    box-shadow: 0 4px 15px var(--gold-glow);
}
.btn-primary:hover { box-shadow: 0 6px 25px var(--gold-glow); }

.btn-success { background: linear-gradient(135deg, #10B981, #059669); color: #fff; }
.btn-danger { background: linear-gradient(135deg, #EF4444, #DC2626); color: #fff; }
.btn-warning { background: linear-gradient(135deg, #F59E0B, #D97706); color: #fff; }
.btn-info { background: linear-gradient(135deg, #3B82F6, #2563EB); color: #fff; }
.btn-secondary { background: var(--gray); color: #fff; }
.btn-dark { background: var(--dark); color: #fff; }

.btn-sm { padding: 6px 14px; font-size: 0.78rem; border-radius: 8px; }
.btn-block { width: 100%; }

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--gold);
    color: var(--gold-dark);
}
.btn-outline:hover { background: var(--gold); color: #fff; }

/* ─── Badges ─── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.badge-active, .badge-approved, .badge-success { background: rgba(16, 185, 129, 0.12); color: #065F46; }
.badge-pending, .badge-timeout, .badge-warning { background: rgba(245, 158, 11, 0.12); color: #92400E; }
.badge-banned, .badge-rejected, .badge-deleted, .badge-danger, .badge-cancelled { background: rgba(239, 68, 68, 0.12); color: #991B1B; }
.badge-expired { background: rgba(107, 114, 128, 0.12); color: #374151; }
.badge-free { background: rgba(201, 168, 76, 0.1); color: #A8872E; }
.badge-pro { background: rgba(16, 185, 129, 0.12); color: #065F46; }
.badge-business { background: rgba(245, 158, 11, 0.12); color: #92400E; }
.badge-enterprise { background: rgba(139, 92, 246, 0.12); color: #6B21A8; }
.badge-manager { background: rgba(59, 130, 246, 0.12); color: #1E40AF; }
.badge-agent { background: rgba(16, 185, 129, 0.12); color: #065F46; }
.badge-viewer { background: rgba(107, 114, 128, 0.08); color: #374151; }

/* ─── Forms ─── */
.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-dark);
    margin-bottom: 6px;
}

.form-control, input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="date"], input[type="file"], select, textarea {
    width: 100%;
    padding: 11px 16px;
    border: 1.5px solid rgba(201, 168, 76, 0.15);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    transition: var(--transition);
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(8px);
    font-family: inherit;
    color: var(--dark);
}

.form-control:focus, input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px var(--gold-glow);
    background: #fff;
}

textarea { resize: vertical; min-height: 80px; }

.form-inline { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.form-inline .form-group { margin-bottom: 0; flex: 1; min-width: 150px; }

/* ─── Filters ─── */
.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.filters select, .filters input { width: auto; min-width: 160px; }

/* ─── Pagination ─── */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pagination button {
    padding: 8px 14px;
    border: 1px solid rgba(201, 168, 76, 0.15);
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.82rem;
    font-family: inherit;
    color: var(--dark);
}

.pagination button:hover { border-color: var(--gold); background: rgba(201, 168, 76, 0.06); }
.pagination button.active { background: var(--gold); color: #fff; border-color: var(--gold); }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─── Modal ─── */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show { display: flex; }

.modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.12);
    animation: modalIn 0.3s ease;
}

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

.modal-lg { max-width: 700px; }

.modal-close {
    position: absolute;
    top: 16px;
    left: 16px;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--gray);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    background: rgba(0,0,0,0.03);
}

.modal-close:hover { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

.modal h3 { margin-bottom: 20px; font-size: 1.15rem; color: var(--dark); }

.modal-actions { display: flex; gap: 12px; margin-top: 24px; }

/* ─── Alerts ─── */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.88rem;
}

.alert-danger { background: rgba(239, 68, 68, 0.08); color: #991B1B; border: 1px solid rgba(239, 68, 68, 0.15); }
.alert-success { background: rgba(16, 185, 129, 0.08); color: #065F46; border: 1px solid rgba(16, 185, 129, 0.15); }
.alert-warning { background: rgba(245, 158, 11, 0.08); color: #92400E; border: 1px solid rgba(245, 158, 11, 0.15); }
.alert-info { background: rgba(59, 130, 246, 0.08); color: #1E40AF; border: 1px solid rgba(59, 130, 246, 0.15); }

/* ─── Login Page ─── */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #2a1f3d 50%, #1a1a2e 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.08) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    animation: float 8s ease-in-out infinite;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.05) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    animation: float 6s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -30px); }
}

.login-container { width: 100%; max-width: 420px; padding: 20px; position: relative; z-index: 1; }

.login-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    padding: 44px 40px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}

.login-header { text-align: center; margin-bottom: 36px; }

.login-logo { margin-bottom: 16px; }

.login-logo svg rect { fill: url(#goldGradient); }

.login-header h1 {
    font-size: 1.6rem;
    color: #fff;
    margin-bottom: 4px;
}

.login-header p { color: rgba(255,255,255,0.5); font-size: 0.88rem; }

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

.login-form label { color: rgba(255,255,255,0.7); }

.login-form .form-control {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
    color: #fff;
}

.login-form .form-control::placeholder { color: rgba(255,255,255,0.3); }

.login-form .form-control:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(201, 168, 76, 0.15);
    background: rgba(255,255,255,0.1);
}

.login-form .btn-primary {
    padding: 14px;
    font-size: 1rem;
}

/* ─── Quick Actions ─── */
.quick-actions {
    padding: 24px;
    margin-bottom: 24px;
}

.quick-actions h3 { margin-bottom: 16px; }

.action-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

/* ─── Grid layouts ─── */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

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

/* ─── User Detail ─── */
.user-detail-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.user-detail-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 15px var(--gold-glow);
}

.user-detail-info { flex: 1; }
.user-detail-info h2 { font-size: 1.4rem; margin-bottom: 4px; }
.user-detail-info .meta { color: var(--gray); font-size: 0.88rem; }
.user-detail-info .meta span { margin-left: 16px; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .sidebar {
        width: 0;
        overflow: hidden;
    }

    .sidebar.open {
        width: var(--sidebar-width);
    }

    .main-content { margin-right: 0; }

    .content-header, .content-body { padding: 16px; }

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

    .filters select, .filters input { min-width: 120px; }

    .form-inline .form-group { min-width: 100%; }

    .user-detail-card { flex-direction: column; align-items: center; text-align: center; }

    .modal-content { margin: 10px; padding: 20px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .action-buttons { flex-direction: column; }
    .action-buttons .btn { width: 100%; }
}

/* ─── Utility ─── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.mw-100 { max-width: 100%; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.mr-auto { margin-right: auto; }
.mt-3 { margin-top: 8px; }

/* ─── Mobile toggle ─── */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--dark);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-toggle { display: block; }
}

/* ─── Loading ─── */
.loading-spinner {
    width: 40px; height: 40px;
    border: 3px solid rgba(201, 168, 76, 0.15);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
.loading-spinner-centered { margin: 40px auto; }

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

/* ─── Empty / Error states ─── */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
    font-size: 14px;
}
.empty-state-full { width: 100%; }

.error-state { color: var(--danger); }

/* ─── Toast ─── */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 14px;
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.3s ease;
    min-width: 200px;
    text-align: center;
}

.toast-success { background: rgba(16, 185, 129, 0.9); }
.toast-error { background: rgba(239, 68, 68, 0.9); }
.toast-warning { background: rgba(245, 158, 11, 0.9); }
.toast-info { background: rgba(59, 130, 246, 0.9); }

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

/* ─── Icon SVG helper ─── */
.icon-svg { vertical-align: middle; flex-shrink: 0; }
.sidebar-nav .icon-svg { width: 20px; height: 20px; }

/* ─── Plans ─── */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }

.plan-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 24px;
    position: relative;
    transition: var(--transition);
}

.plan-card:hover { transform: translateY(-3px); box-shadow: var(--glass-shadow-lg); border-color: rgba(201, 168, 76, 0.25); }
.plan-card.recommended { border-color: var(--gold); border-width: 2px; }
.plan-card.inactive { opacity: 0.6; }

.plan-badge {
    position: absolute;
    top: -10px;
    left: 20px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 4px 12px var(--gold-glow);
}

.plan-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.plan-name { font-size: 1.2rem; font-weight: 700; margin: 0; }
.plan-slug { color: var(--gray); font-size: 0.8rem; font-family: monospace; }
.plan-price { font-size: 1.6rem; font-weight: 700; }
.plan-price.free { color: var(--success); }
.plan-duration { color: var(--gray); font-size: 0.85rem; }

.plan-features { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.plan-feature {
    background: rgba(201, 168, 76, 0.06);
    color: var(--gray-dark);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
}

.plan-limits { display: flex; gap: 16px; font-size: 0.85rem; color: var(--gray); margin: 12px 0; }
.plan-limit { display: inline-flex; align-items: center; gap: 4px; }
.plan-status { margin: 12px 0; display: flex; gap: 6px; }
.plan-actions { margin-top: 12px; display: flex; gap: 8px; }

/* ─── Stat helpers ─── */
.stat-warning { color: var(--warning); }
.stat-danger { color: var(--danger); }
.stat-success { color: var(--success); }
.stat-info { color: var(--info); }
.stat-gray { color: var(--gray); }

/* ─── Display ─── */
.d-none { display: none; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }
.d-block { display: block; }

/* ─── Text truncation ─── */
.text-truncate { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-truncate-sm { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── Charts/bars ─── */
.bar-chart { height: 200px; display: flex; align-items: flex-end; gap: 4px; padding: 10px; border-radius: var(--radius-sm); }
.bar-chart-sm { height: 150px; display: flex; align-items: flex-end; gap: 4px; padding: 10px; }
.bar-fill { height: 6px; background: rgba(201, 168, 76, 0.1); border-radius: 3px; margin-top: 4px; }
.bar-fill-inner { height: 100%; border-radius: 3px; }

.chart-legend { display: flex; justify-content: space-between; margin-top: 8px; color: var(--gray); font-size: 12px; }

/* ─── Tabs ─── */
.tabs { display: flex; gap: 0; margin-bottom: 20px; border-bottom: 2px solid rgba(201, 168, 76, 0.1); }
.tab-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--gray);
    font-family: inherit;
    transition: var(--transition);
    border-radius: 8px 8px 0 0;
}
.tab-btn:hover { color: var(--gold-dark); background: rgba(201, 168, 76, 0.04); }
.tab-active { color: var(--gold-dark); font-weight: 600; border-bottom: 2px solid var(--gold); margin-bottom: -2px; }

/* ─── Empty state card ─── */
.empty-state-card { text-align: center; padding: 40px; }

/* ─── AI Moderation ─── */
.ai-placeholder-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.ai-placeholder-text { color: var(--gray); margin-bottom: 8px; }

/* ─── Color inputs ─── */
.color-input { height: 40px; padding: 4px; }

/* ─── Pie chart ─── */
.pie-chart-segment { border-radius: 50%; }

/* ─── Bulk actions ─── */
.bulk-actions { display: none; }
.bulk-actions.show { display: flex; }

/* ─── File upload ─── */
.file-input-hidden { display: none; }

/* ─── Feature Limits ─── */
.limit-bar {
    width: 100%;
    height: 6px;
    background: rgba(201, 168, 76, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}
.limit-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}
.limit-bar-fill.low { background: var(--success); }
.limit-bar-fill.medium { background: var(--warning); }
.limit-bar-fill.high { background: var(--danger); }

.feature-locked {
    opacity: 0.4;
    position: relative;
    cursor: not-allowed;
}

/* ─── Upsell banner ─── */
.upsell-banner {
    background: linear-gradient(135deg, rgba(201, 168, 76, 0.1), rgba(201, 168, 76, 0.03));
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: var(--radius);
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.upsell-banner h3 { color: var(--gold-dark); margin-bottom: 4px; }
.upsell-banner p { color: var(--gray); font-size: 0.9rem; }

/* ─── Sidebar footer ─── */
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(201, 168, 76, 0.08);
    position: sticky;
    bottom: 0;
    background: inherit;
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
    padding: 8px 12px;
    border-radius: 8px;
    transition: var(--transition);
}

.sidebar-footer a:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.06);
}

/* ─── Card header row ─── */
.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.card-header-row h3 { margin-bottom: 0; }
