/**
 * ═══════════════════════════════════════════════════════════
 * NAMOVI Admin - Global Styles
 * ═══════════════════════════════════════════════════════════
 * Dark modern admin panel theme
 */

/* ─── CSS Variables ───────────────────────────────────────── */
:root {
    color-scheme: dark;
    --bg-primary: #0a0a0f;
    --bg-secondary: #0e0e16;
    --bg-card: rgba(18, 18, 28, 0.8);
    --bg-card-solid: #12121c;
    --bg-sidebar: #0c0c14;
    --bg-input: rgba(255, 255, 255, 0.04);
    --bg-hover: rgba(255, 255, 255, 0.04);
    
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --border-active: rgba(99, 102, 241, 0.3);
    
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --primary-bg: rgba(99, 102, 241, 0.08);
    --primary-bg-hover: rgba(99, 102, 241, 0.15);
    
    --success: #00d26a;
    --success-bg: rgba(0, 210, 106, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --info: #06b6d4;
    --info-bg: rgba(6, 182, 212, 0.1);
    
    --text-primary: #f0f0f5;
    --text-secondary: rgba(255, 255, 255, 0.55);
    --text-muted: rgba(255, 255, 255, 0.3);
    
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --topbar-height: 0px;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.15);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.25);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.35);
    --shadow-glow: 0 0 30px rgba(99,102,241,0.15);
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
}

/* ─── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary);
}

img {
    max-width: 100%;
    height: auto;
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}


/* ═══════════════════════════════════════════════════════════
   ADMIN LAYOUT
   ═══════════════════════════════════════════════════════════ */

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


/* ─── Sidebar ─────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: width var(--transition-normal), transform var(--transition-normal);
    overflow: hidden;
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
}

.sidebar-brand {
    overflow: hidden;
    white-space: nowrap;
}

.sidebar-brand h2 {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.sidebar-brand span {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 1rem 0.75rem;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-section-title {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 0 0.75rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    overflow: hidden;
    text-decoration: none;
    border: 1px solid transparent;
    position: relative;
}

.sidebar-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: var(--primary-bg);
    color: var(--primary-light);
    border-color: rgba(99,102,241,0.15);
    font-weight: 600;
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.sidebar-link-icon {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-link-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-link-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 20px;
    background: var(--primary);
    color: white;
    flex-shrink: 0;
}

/* Sidebar footer */
.sidebar-footer {
    padding: 1rem 0.75rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    overflow: hidden;
}

.sidebar-user:hover {
    background: var(--bg-hover);
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--success), #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}

.sidebar-user-name {
    font-size: 0.85rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

.sidebar-logout {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.3rem;
    border-radius: 6px;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.sidebar-logout:hover {
    color: var(--danger);
    background: var(--danger-bg);
}

/* Sidebar collapse toggle */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 150;
    width: 40px;
    height: 40px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.sidebar-toggle:hover {
    background: var(--primary-bg);
    border-color: var(--border-active);
}


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

.page-container {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}


/* ─── Page Header ─────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-header-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-bg);
    border: 1px solid rgba(99,102,241,0.15);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.page-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

.page-header-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}


/* ═══════════════════════════════════════════════════════════
   COMPONENTS
   ═══════════════════════════════════════════════════════════ */

/* ─── Cards ───────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all var(--transition-fast);
}

.card:hover {
    border-color: var(--border-hover);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
}

.card-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
}


/* ─── Stat Cards ──────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--stat-color, var(--primary));
    border-radius: 3px 3px 0 0;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

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

.stat-card:hover::before {
    opacity: 1;
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.stat-card-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    background: var(--stat-bg, var(--primary-bg));
}

.stat-card-trend {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
}

.stat-trend-up {
    background: var(--success-bg);
    color: var(--success);
}

.stat-trend-down {
    background: var(--danger-bg);
    color: var(--danger);
}

.stat-card-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.stat-card-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}


/* ─── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(99,102,241,0.35);
    color: white;
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-secondary);
    border-color: var(--border);
}

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

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

.btn-success:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: rgba(239,68,68,0.2);
}

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

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

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

.btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: var(--radius-sm);
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.8rem 1.75rem;
    font-size: 1rem;
}


/* ─── Tables ──────────────────────────────────────────────── */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

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

.data-table thead {
    background: rgba(255,255,255,0.03);
}

.data-table th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--bg-hover);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}


/* ─── Badges / Status ─────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
}

.badge-primary { background: var(--primary-bg); color: var(--primary-light); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-muted { background: rgba(255,255,255,0.05); color: var(--text-muted); }
.badge-ghost { background: rgba(255,255,255,0.04); color: var(--text-secondary); border: 1px solid var(--border); }
.badge-primary { background: var(--primary-bg); color: var(--primary-light); }


/* ─── Forms ───────────────────────────────────────────────── */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all var(--transition-fast);
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 2.5rem;
    color-scheme: dark; /* Force browser to use dark theme for dropdown list */
}

/* Fix for invisible dropdown choices in dark theme */
.form-select option {
    background-color: #12121c; /* Fallback for some browsers */
    color: #f0f0f5;
}

/* Multiple Checkbox List */
.form-checkbox-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    max-height: 200px;
    overflow-y: auto;
}

.form-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.form-checkbox-item:hover {
    color: var(--primary-light);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.form-error {
    font-size: 0.75rem;
    color: var(--danger);
    margin-top: 0.3rem;
}


/* ─── Modals ──────────────────────────────────────────────── */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(10px);
    transition: transform var(--transition-normal);
}

.modal-backdrop.open .modal {
    transform: scale(1) translateY(0);
}

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

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

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

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border);
}


/* ─── Empty State ─────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}


/* ─── Loading Skeleton ────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, 
        rgba(255,255,255,0.04) 25%, 
        rgba(255,255,255,0.08) 50%, 
        rgba(255,255,255,0.04) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}


/* ─── Toast Notifications ─────────────────────────────────── */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 280px;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease-out;
    border: 1px solid transparent;
}

.toast-success {
    background: var(--bg-card-solid);
    border-color: rgba(0,210,106,0.2);
    color: var(--success);
}

.toast-error {
    background: var(--bg-card-solid);
    border-color: rgba(239,68,68,0.2);
    color: var(--danger);
}

.toast-warning {
    background: var(--bg-card-solid);
    border-color: rgba(245,158,11,0.2);
    color: var(--warning);
}

.toast-info {
    background: var(--bg-card-solid);
    border-color: rgba(6,182,212,0.2);
    color: var(--info);
}

@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast-exit {
    animation: toastOut 0.2s ease-in forwards;
}

@keyframes toastOut {
    to { transform: translateX(100%); opacity: 0; }
}


/* ─── Tabs ────────────────────────────────────────────────── */
.tabs {
    display: flex;
    gap: 0.25rem;
    background: rgba(255,255,255,0.02);
    padding: 0.3rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.tab {
    padding: 0.55rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

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

.tab.active {
    background: var(--primary-bg);
    color: var(--primary-light);
    font-weight: 600;
}


/* ─── Search Bar ──────────────────────────────────────────── */
.search-bar {
    position: relative;
    max-width: 320px;
}

.search-bar input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    transition: all var(--transition-fast);
}

.search-bar input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.search-bar-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    opacity: 0.4;
    pointer-events: none;
}


/* ─── Pagination ──────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.pagination-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pagination-btn:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.pagination-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

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


/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: flex;
    }

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

    .page-container {
        padding: 1.5rem;
        padding-top: 4rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 640px) {
    .page-container {
        padding: 1rem;
        padding-top: 4rem;
    }

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

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal {
        max-width: 100%;
        border-radius: var(--radius-lg);
    }

    .toast-container {
        left: 1rem;
        right: 1rem;
    }

    .toast {
        min-width: auto;
        max-width: none;
    }
}

/* Mobile sidebar overlay */
@media (max-width: 1024px) {
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99;
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
    }

    .sidebar-overlay.visible {
        opacity: 1;
        visibility: visible;
    }
}


/* ─── Utility Classes ─────────────────────────────────────── */
.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


/* ═══════════════════════════════════════════════════════════
   DASHBOARD SPECIFIC
   ═══════════════════════════════════════════════════════════ */

/* Quick Actions Grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quick-action-btn:hover {
    background: var(--primary-bg);
    border-color: rgba(99,102,241,0.2);
    color: var(--primary-light);
    transform: translateY(-2px);
}

.quick-action-icon {
    font-size: 1.5rem;
}

.quick-action-label {
    font-size: 0.8rem;
    font-weight: 600;
}

/* Pipeline */
.pipeline-stages {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pipeline-stage {
    text-align: center;
    flex: 1;
    min-width: 80px;
}

.pipeline-stage-count {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
}

.pipeline-stage-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    white-space: nowrap;
}

.pipeline-arrow {
    color: var(--text-muted);
    font-size: 1rem;
    opacity: 0.3;
}

/* Recent Articles */
.recent-article-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
}

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

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

.recent-article-title {
    font-weight: 600;
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-article-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}


/* ═══════════════════════════════════════════════════════════
   AI STUDIO SPECIFIC
   ═══════════════════════════════════════════════════════════ */

.ai-generator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1rem;
}

.ai-generator-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.ai-generator-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.ai-gen-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.ai-gen-icon-lg {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

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

.ai-gen-name {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.ai-gen-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ai-gen-arrow {
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
    flex-shrink: 0;
}

.ai-generator-card:hover .ai-gen-arrow {
    transform: translateX(4px);
    color: var(--primary-light);
}


/* ═══════════════════════════════════════════════════════════
   RESPONSIVE OVERRIDES
   ═══════════════════════════════════════════════════════════ */

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

    .ai-generator-grid {
        grid-template-columns: 1fr;
    }

    .pipeline-stages {
        gap: 0.25rem;
    }

    .pipeline-arrow {
        display: none;
    }

    /* Two column cards to single column on mobile */
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   LOGO SELECTOR GRID
   ═══════════════════════════════════════════════════════════ */

.logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.logo-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    padding: 1.25rem 1rem;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: rgba(255,255,255,0.02);
    cursor: pointer;
    transition: all .25s ease;
}

.logo-option:hover {
    border-color: rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.logo-option--active {
    border-color: var(--primary);
    background: rgba(99,102,241,0.06);
    box-shadow: 0 0 0 1px rgba(99,102,241,0.3);
}

.logo-option--selected {
    border-color: #22c55e;
    background: rgba(34,197,94,0.06);
    box-shadow: 0 0 0 1px rgba(34,197,94,0.3);
}

.logo-option__preview {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform .3s ease;
}

.logo-option:hover .logo-option__preview {
    transform: scale(1.08);
}

.logo-option__preview svg {
    width: 100%;
    height: 100%;
    display: block;
}

.logo-option__info {
    text-align: center;
}

.logo-option__name {
    font-weight: 700;
    font-size: .9rem;
    margin-bottom: .2rem;
    color: var(--text-primary);
}

.logo-option__desc {
    font-size: .75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.logo-option__badge {
    position: absolute;
    top: .5rem;
    right: .5rem;
    font-size: .65rem;
    font-weight: 700;
    padding: .2rem .5rem;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    letter-spacing: .03em;
}

@media (max-width: 480px) {
    .logo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: .75rem;
    }
    .logo-option {
        padding: .75rem .5rem;
    }
    .logo-option__preview {
        width: 56px;
        height: 56px;
        border-radius: 14px;
    }
    .logo-option__name {
        font-size: .8rem;
    }
    .logo-option__desc {
        font-size: .7rem;
    }
}


/* ═══════════════════════════════════════════════════════════
   AI STUDIO v2 — 3-Column Brand Layout
   ═══════════════════════════════════════════════════════════ */

/* ─── Brand Columns Grid ──────────────────────────────────── */
.ai-brand-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 0.5rem;
}

.ai-brand-column {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
}

.ai-brand-column__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: color-mix(in srgb, var(--brand-color, #6366f1) 8%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--brand-color, #6366f1) 15%, transparent);
}

.ai-brand-column__icon {
    font-size: 1.1rem;
}

.ai-brand-column__name {
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    color: var(--brand-color, var(--text-primary));
}

.ai-brand-column__count {
    margin-left: auto;
    font-size: 0.7rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.04);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
}

.ai-brand-column__cards {
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    gap: 0.35rem;
}

/* ─── Specialist Card ─────────────────────────────────────── */
.ai-spec-card {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.65rem;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.ai-spec-card:hover {
    background: rgba(255,255,255,0.04);
    border-color: var(--border);
    transform: translateY(-1px);
}

.ai-spec-card--disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.ai-spec-card--disabled:hover {
    background: transparent;
    border-color: transparent;
    transform: none;
}

.ai-spec-card__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    background: color-mix(in srgb, var(--spec-color, #6366f1) 12%, transparent);
    flex-shrink: 0;
}

.ai-spec-card__body {
    flex: 1;
    min-width: 0;
}

.ai-spec-card__name {
    font-weight: 600;
    font-size: 0.82rem;
    margin-bottom: 0.1rem;
}

.ai-spec-card__desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.ai-spec-card__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.ai-spec-card__uses {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.ai-spec-card__linker {
    font-size: 0.7rem;
    opacity: 0.6;
}

.ai-spec-card__arrow {
    font-size: 1rem;
    color: var(--text-muted);
    transition: transform 0.15s ease;
}
.ai-spec-card:hover .ai-spec-card__arrow {
    transform: translateX(3px);
    color: var(--spec-color, var(--primary-light));
}

/* ─── Internal Linker Info ────────────────────────────────── */
.ai-linker-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: rgba(34, 197, 94, 0.05);
    border: 1px solid rgba(34, 197, 94, 0.1);
    margin-top: 1rem;
}

.ai-linker-badge {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--success);
    white-space: nowrap;
}

.ai-linker-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ─── Extracted Meta Preview ──────────────────────────────── */
.ai-meta-preview {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 0.75rem;
    background: rgba(99, 102, 241, 0.04);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.ai-meta-header {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 0.75rem;
}

.ai-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}

.ai-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.ai-meta-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.ai-meta-value {
    font-size: 0.78rem;
    color: var(--text-primary);
    line-height: 1.3;
}

/* ─── AI Prompts Editor (Settings Tab) ────────────────────── */
.ai-prompt-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.ai-prompt-row:hover {
    background: rgba(255,255,255,0.04);
    border-color: var(--border);
}

.ai-prompt-row__icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.ai-prompt-row__body {
    flex: 1;
    min-width: 0;
}

.ai-prompt-row__name {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.1rem;
}

.ai-prompt-row__preview {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    font-family: monospace;
}

.ai-prompt-row__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.ai-prompt-row__arrow {
    font-size: 0.9rem;
    opacity: 0.5;
    transition: opacity 0.15s ease;
}
.ai-prompt-row:hover .ai-prompt-row__arrow {
    opacity: 1;
}

/* ─── Specialist Icon (large version) ─────────────────────── */
.ai-spec-icon-lg {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* ─── Skeleton loading ────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg,
        rgba(255,255,255,0.03) 25%,
        rgba(255,255,255,0.06) 50%,
        rgba(255,255,255,0.03) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.5rem;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 1100px) {
    .ai-brand-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .ai-brand-columns {
        grid-template-columns: 1fr;
    }
    .ai-meta-grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 480px) {
    .ai-meta-grid {
        grid-template-columns: 1fr;
    }
}


/* ─── Recipe Admin Cards ────────────────────────────────── */
.recipe-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.25rem;
}
.recipe-admin-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.recipe-admin-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
}
.recipe-admin-card__img {
    height: 160px;
    background: var(--bg-tertiary);
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.recipe-admin-card__status {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
}
.recipe-admin-card__body {
    padding: 1rem 1.25rem 0.75rem;
}
.recipe-admin-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}
.recipe-admin-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.recipe-admin-card__tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 0.15rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.72rem;
    font-weight: 500;
}
.recipe-admin-card__diff {
    font-size: 0.75rem;
    font-weight: 600;
}
.recipe-admin-card__time {
    font-size: 0.72rem;
    color: var(--text-secondary);
}
.recipe-admin-card__info {
    display: flex;
    gap: 1rem;
    font-size: 0.72rem;
    color: var(--text-muted);
}
.recipe-admin-card__actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-color);
}

/* ─── Recipe Editor Tabs ────────────────────────────────── */
.recipe-editor-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}
.recipe-editor-tabs .tab {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
}

@media (max-width: 640px) {
    .recipe-admin-grid {
        grid-template-columns: 1fr;
    }
}


/* ═══════════════════════════════════════════════════════════
   Image Upload Component (.nm-upload)
   ═══════════════════════════════════════════════════════════ */
.nm-upload {
    margin-bottom: 1rem;
}
.nm-upload__label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}
.nm-upload__zone {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.25s, background 0.25s;
    overflow: hidden;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nm-upload__zone:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
}
.nm-upload__zone--dragover {
    border-color: var(--primary-light) !important;
    background: var(--primary-bg-hover) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Placeholder */
.nm-upload__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1.5rem 1rem;
    text-align: center;
}
.nm-upload__icon {
    font-size: 2rem;
    line-height: 1;
    opacity: 0.6;
}
.nm-upload__text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.nm-upload__text strong {
    color: var(--primary);
}
.nm-upload__hint {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Preview */
.nm-upload__preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
}
.nm-upload__preview img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 10px;
}
.nm-upload__remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}
.nm-upload__remove:hover {
    background: var(--danger, #ef4444);
}

/* OR divider */
.nm-upload__or {
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin: 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Status messages */
.nm-upload__status {
    font-size: 0.78rem;
    margin-top: 0.35rem;
    padding: 0.25rem 0;
}
.nm-upload__status--loading { color: var(--primary); }
.nm-upload__status--success { color: var(--success); }
.nm-upload__status--error   { color: var(--danger, #ef4444); }

/* ═══════════════════════════════════════════════════════════
   YOGA MEDIA MANAGER
   ═══════════════════════════════════════════════════════════ */

.ym-stats {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.ym-stat strong { color: var(--text-primary); font-weight: 600; }
.ym-stat-sep { color: var(--border-hover); }
.ym-stat-warn { color: #f59e0b; }

/* Toolbar */
.ym-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.ym-search-wrap { flex: 1; }
.ym-search {
    width: 100%;
    max-width: 400px;
}
.ym-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.ym-filter {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.ym-filter:hover {
    border-color: var(--border-hover);
    color: var(--text-secondary);
}
.ym-filter.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Grid */
.ym-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1rem;
}

/* Card */
.ym-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.2s;
}
.ym-card:hover {
    border-color: var(--border-hover);
}
.ym-card.ym-changed {
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.15);
}

.ym-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.ym-card-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}
.ym-card-cat {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ym-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    flex-shrink: 0;
}
.ym-badge {
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
}
.ym-badge-video {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}
.ym-badge-img {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}
.ym-badge-warn {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}
.ym-badge-default {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}
.ym-badge-clip {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
}

/* Video thumbnail preview */
.ym-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    background: #000;
}
.ym-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ym-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 2rem;
    text-decoration: none;
    transition: background 0.2s;
}
.ym-play-overlay:hover {
    background: rgba(0, 0, 0, 0.55);
}

/* Fields */
.ym-card-fields {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.ym-field { }
.ym-field-row {
    display: flex;
    gap: 0.5rem;
}
.ym-field-half {
    flex: 1;
}
.ym-input-time {
    font-family: monospace;
    text-align: center;
    max-width: 100%;
}
.ym-clip-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.75);
    color: #c084fc;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    backdrop-filter: blur(4px);
}
.ym-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}
.ym-input {
    font-size: 0.8rem !important;
    padding: 0.45rem 0.6rem !important;
}

/* Actions */
.ym-card-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.ym-save-btn {
    flex: 1;
}
.ym-preview-img-btn {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.ym-preview-img-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.ym-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .ym-grid {
        grid-template-columns: 1fr;
    }
    .ym-stats {
        flex-wrap: wrap;
        font-size: 0.75rem;
    }
}

/* ═══════ Photo Moderation ═══════ */
.pm-stats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem;
    margin-bottom: 1rem;
}
.pm-stat {
    text-align: center; padding: 0.6rem;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
}
.pm-stat strong { display: block; font-size: 1.2rem; color: var(--text-primary); }
.pm-stat span { font-size: 0.7rem; color: var(--text-muted); }

.pm-filters { display: flex; gap: 0.4rem; margin-bottom: 1rem; }
.pm-filter {
    padding: 0.4rem 0.8rem; border-radius: var(--radius-md); border: 1px solid var(--border);
    background: var(--bg-card); color: var(--text-muted); font-size: 0.75rem;
    cursor: pointer; font-weight: 600; transition: all 0.2s;
}
.pm-filter.active { background: rgba(167,139,250,0.15); border-color: #a78bfa; color: #a78bfa; }

.pm-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.pm-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
}
.pm-card-img-wrap { position: relative; }
.pm-card-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.pm-card-cat {
    position: absolute; top: 0.5rem; left: 0.5rem;
    background: rgba(0,0,0,0.5); padding: 0.15rem 0.4rem;
    border-radius: 8px; font-size: 0.65rem; color: #fff;
}
.pm-card-body { padding: 0.75rem; }
.pm-card-user strong { display: block; font-size: 0.85rem; }
.pm-card-user span { font-size: 0.7rem; color: var(--text-muted); }
.pm-card-caption { font-size: 0.78rem; color: var(--text-secondary); margin: 0.3rem 0; }
.pm-card-meta { display: flex; gap: 0.75rem; font-size: 0.68rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.pm-card-notes {
    font-size: 0.7rem; color: #f59e0b; padding: 0.3rem 0.5rem;
    background: rgba(245,158,11,0.1); border-radius: var(--radius-sm); margin-bottom: 0.5rem;
}
.pm-card-actions { display: flex; gap: 0.4rem; }
.pm-approve { background: rgba(34,197,94,0.15) !important; color: #4ade80 !important; border: 1px solid rgba(34,197,94,0.3) !important; }
.pm-reject { background: rgba(239,68,68,0.1) !important; color: #f87171 !important; border: 1px solid rgba(239,68,68,0.3) !important; }
.pm-delete { background: transparent !important; color: var(--text-muted) !important; border: 1px solid var(--border) !important; }

.pm-empty { text-align: center; color: var(--text-muted); padding: 2rem; font-size: 0.9rem; }
.pm-loading { text-align: center; color: var(--text-muted); padding: 2rem; }