﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿/* 
 * Modern Light Theme Admin UI 
 * Inspired by Big Tech Design Systems (Ant Design, Tailwind UI, Material)
 */

:root {
    --admin-bg: #ffffff;
    --admin-surface: #ffffff;
    --admin-border: #dbeafe;
    --admin-border-hover: #bfdbfe;
    --admin-text-main: #020617;
    --admin-text-regular: #334155;
    --admin-text-secondary: #64748b;
    --admin-text-disabled: #94a3b8;
    --admin-primary: #2563eb;
    --admin-primary-hover: #1d4ed8;
    --admin-primary-light: #e0edff;
    --admin-primary-ring: rgba(37, 99, 235, 0.35);
    --admin-danger: #ef4444;
    --admin-danger-bg: #fef2f2;
    --admin-success: #10b981;
    --admin-success-bg: #ecfdf5;
    --admin-warning: #f59e0b;
    --admin-warning-bg: #fffbeb;
    --header-height: 64px;
    --sidebar-width: 256px;
    --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.06);
    --shadow-sm: 0 6px 16px -10px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 12px 20px -10px rgba(15, 23, 42, 0.1);
    --shadow-lg: 0 18px 30px -12px rgba(15, 23, 42, 0.14);
    --shadow-xl: 0 24px 45px -18px rgba(15, 23, 42, 0.18);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition-base: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Force unified white background */
html, body.admin-view {
    background-color: #ffffff !important;
    background: #ffffff !important;
}

/* Toast Styles - Added to admin-layout to avoid inline styles */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: white;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    animation: toast-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    border: 1px solid var(--admin-border);
}

.toast.hiding {
    animation: toast-out 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(20px); }
}

.toast-icon { font-size: 20px; flex-shrink: 0; }
.toast-success .toast-icon { color: var(--admin-success); }
.toast-error .toast-icon { color: var(--admin-danger); }
.toast-warning .toast-icon { color: var(--admin-warning); }
.toast-info .toast-icon { color: var(--admin-primary); }
.toast-message { font-size: 14px; color: var(--admin-text-main); line-height: 1.4; }

/* =========================================
   Layout Skeleton 
   ========================================= */

.admin-view {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--admin-bg);
    position: relative;
    z-index: 100;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--admin-text-regular);
    -webkit-font-smoothing: antialiased;
}

.admin-header {
    height: var(--header-height);
    background-color: #ffffff; /* Explicit white */
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 50;
    /* Removed shadow for cleaner separation, or keep it subtle */
    /* box-shadow: var(--shadow-sm); */
}

.admin-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--admin-text-main);
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.01em;
}

.admin-title i {
    font-size: 20px;
    color: var(--admin-primary);
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.admin-title-icon {
    font-size: 22px;
    padding: 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    color: #ffffff;
    box-shadow: 0 8px 16px -10px rgba(37, 99, 235, 0.9);
}

.admin-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.admin-sidebar {
    width: var(--sidebar-width);
    background: #ffffff;
    border-right: 1px solid rgba(226,232,240,0.9);
    box-shadow: none;
    display: flex;
    flex-direction: column;
    padding: 24px 16px; /* Wider horizontal padding */
    overflow-y: auto;
    flex-shrink: 0;
    z-index: 40;
}

.admin-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px; /* More breathing room */
}

.admin-menu-item {
    padding: 8px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--admin-text-regular);
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.admin-menu-item i {
    font-size: 18px;
    color: var(--admin-text-secondary);
    transition: var(--transition-base);
    opacity: 0.9;
    border-radius: 999px;
    padding: 6px;
}

.admin-menu-item:hover {
    background-color: var(--admin-primary-light); /* Blue tint instead of gray */
    color: var(--admin-primary);
}

.admin-menu-item:hover i {
    color: var(--admin-primary);
    background-color: rgba(37,99,235,0.06);
    opacity: 1;
}

.admin-menu-item.active {
    background-color: rgba(37,99,235,0.06);
    color: var(--admin-primary);
    font-weight: 600;
}

.admin-menu-item.active i {
    color: var(--admin-primary);
    background-color: rgba(37,99,235,0.12);
    box-shadow: 0 0 0 1px rgba(37,99,235,0.18);
    opacity: 1;
}

/* Content Area */
.admin-content {
    flex: 1;
    padding: 32px 40px 40px;
    overflow-y: auto;
    scroll-behavior: smooth;
    background: #ffffff;
}

/* Page Headers */
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.page-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--admin-text-main);
    margin: 0 0 6px 0;
    letter-spacing: -0.03em;
}

.products-header-left p {
    color: var(--admin-text-secondary);
    font-size: 15px;
    margin: 0;
}

.products-header-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* =========================================
   Components 
   ========================================= */

/* Cards */
.admin-card {
    background: #ffffff;
    border: 1px solid rgba(226,232,240,0.95);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    margin-bottom: 24px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.admin-card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(148,163,184,0.8);
    transform: translateY(-2px);
}

.admin-card-header {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(226,232,240,0.9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #f9fbff, #eef2ff);
    min-height: 56px;
}

.admin-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--admin-text-main);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-card-body {
    padding: 24px;
}

.admin-full-width {
    width: 100%;
}

/* Tables - Premium Data Grid */
.products-table {
    width: 100%;
    border-radius: calc(var(--radius-md) + 2px);
    overflow: hidden;
    border: 1px solid rgba(191,219,254,0.85);
    box-shadow: var(--shadow-sm);
}

.products-table-header {
    background: linear-gradient(90deg, #eff6ff, #dbeafe);
    color: var(--admin-text-secondary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--admin-border);
}

.products-table-body {
    list-style: none;
    margin: 0;
    padding: 0;
}

.products-table-row {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(191,219,254,0.8);
    background-color: var(--admin-surface);
    transition: var(--transition-base);
    font-size: 14px;
    color: var(--admin-text-main);
}

.products-table-row:last-child {
    border-bottom: none;
}

.products-table-row:hover {
    background-color: #f9fbff;
    border-bottom-color: rgba(191,219,254,1);
    box-shadow: var(--shadow-xs);
}

/* Column Utilities */
.col-sort { width: 60px; text-align: center; color: var(--admin-text-disabled); font-weight: 500; flex-shrink: 0; }
.col-img { width: 64px; flex-shrink: 0; }
.col-actions { width: 120px; display: flex; gap: 8px; justify-content: flex-end; flex-shrink: 0; }

.col-info { flex: 3; min-width: 0; padding-right: 16px; }
.col-cat { flex: 1; min-width: 0; }
.col-price { flex: 1; min-width: 0; text-align: left; font-family: "SF Mono", Consolas, monospace; }
.col-source { flex: 1; min-width: 0; }
.col-stock { flex: 1; min-width: 0; }

.flex-1 { flex: 1; min-width: 0; }
.flex-2 { flex: 2; min-width: 0; }
.flex-3 { flex: 3; min-width: 0; }

.text-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* Admin Search Bar - Pill Shape */
.admin-search-container {
    display: flex;
    align-items: center;
    background: rgba(15,23,42,0.02);
    border: 1px solid rgba(148,163,184,0.55);
    border-radius: 999px; /* Pill shape */
    padding: 0 16px;
    height: 40px;
    width: 320px;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
}
.admin-search-container:focus-within {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 4px var(--admin-primary-ring);
}
.admin-search-icon {
    color: var(--admin-text-secondary);
    font-size: 18px;
    margin-right: 10px;
}
.admin-search-input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 14px;
    color: var(--admin-text-main);
}
.admin-search-input::placeholder {
    color: var(--admin-text-disabled);
}

/* Buttons - Standardized System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 999px; /* Pill shape standard */
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    border: 1px solid transparent;
    gap: 8px;
    text-decoration: none;
    line-height: 1.5;
    position: relative;
    overflow: hidden;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 13px;
    border-radius: var(--radius-md); /* Smaller buttons can be rounded rects */
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid transparent;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:focus {
    box-shadow: 0 0 0 4px var(--admin-primary-ring);
    outline: none;
}

.btn-outline {
    background-color: rgba(255,255,255,0.95);
    border: 1px solid rgba(148,163,184,0.7);
    color: var(--admin-text-regular);
    box-shadow: var(--shadow-xs);
}

.btn-outline:hover {
    border-color: var(--admin-border-hover);
    background-color: #f8fafc;
    color: var(--admin-text-main);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-danger {
    background-color: var(--admin-danger);
    color: white;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background-color: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%; /* Circle */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--admin-text-secondary);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-base);
    font-size: 18px;
}

.icon-btn:hover {
    background-color: rgba(255,255,255,0.95);
    color: var(--admin-primary);
    border-color: var(--admin-border);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.icon-btn.text-danger:hover {
    background-color: var(--admin-danger-bg);
    color: var(--admin-danger);
    border-color: transparent;
}

/* Category Tabs */
.category-tabs {
    display: inline-flex;
    gap: 12px;
    align-items: center;
}

.category-tab {
    cursor: pointer;
    padding: 6px 16px;
    border-radius: var(--radius-md);
    font-weight: 600;
    color: var(--admin-text-secondary);
    transition: var(--transition-base);
    user-select: none;
    font-size: 14px;
}

.category-tab:hover {
    background-color: var(--admin-bg);
    color: var(--admin-text-primary);
}

.category-tab.active {
    background-color: var(--admin-primary-light);
    color: var(--admin-primary);
}

/* Status Badges - Pill Shape */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.status-active { background-color: var(--admin-success-bg); color: var(--admin-success); border: 1px solid rgba(16, 185, 129, 0.2); }
.status-error  { background-color: var(--admin-danger-bg); color: var(--admin-danger); border: 1px solid rgba(239, 68, 68, 0.2); }
.status-pending{ background-color: var(--admin-bg); color: var(--admin-text-secondary); border: 1px solid var(--admin-border); }
.badge-purple { background-color: #F3E8FF; color: #7E22CE; border: 1px solid rgba(126, 34, 206, 0.2); }
.badge-blue { background-color: #EFF6FF; color: #2563EB; border: 1px solid rgba(37, 99, 235, 0.2); }
.badge-cyan { background-color: #ECFEFF; color: #0891B2; border: 1px solid rgba(8, 145, 178, 0.2); }
.badge-gray { background-color: #F3F4F6; color: #4B5563; border: 1px solid rgba(75, 85, 99, 0.2); }
.badge-green { background-color: #ECFDF5; color: #10B981; border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-red { background-color: #FEF2F2; color: #EF4444; border: 1px solid rgba(239, 68, 68, 0.2); }
.badge-orange { background-color: #FFF7ED; color: #F97316; border: 1px solid rgba(249, 115, 22, 0.2); }
.badge-yellow { background-color: #FEFCE8; color: #EAB308; border: 1px solid rgba(234, 179, 8, 0.2); }

/* Icon Colors (matching badge styles + new ones) */
.icon-blue { background-color: #EFF6FF; color: #2563EB; border: 1px solid rgba(37, 99, 235, 0.2); }
.icon-red { background-color: #FEF2F2; color: #EF4444; border: 1px solid rgba(239, 68, 68, 0.2); }
.icon-purple { background-color: #F3E8FF; color: #7E22CE; border: 1px solid rgba(126, 34, 206, 0.2); }
.icon-orange { background-color: #FFF7ED; color: #F97316; border: 1px solid rgba(249, 115, 22, 0.2); }
.icon-teal { background-color: #F0FDFA; color: #14B8A6; border: 1px solid rgba(20, 184, 166, 0.2); }
.icon-indigo { background-color: #EEF2FF; color: #6366F1; border: 1px solid rgba(99, 102, 241, 0.2); }
.icon-cyan { background-color: #ECFEFF; color: #0891B2; border: 1px solid rgba(8, 145, 178, 0.2); }
.icon-sky { background-color: #F0F9FF; color: #0EA5E9; border: 1px solid rgba(14, 165, 233, 0.2); }
.icon-green { background-color: #ECFDF5; color: #10B981; border: 1px solid rgba(16, 185, 129, 0.2); }
.icon-slate { background-color: #F1F5F9; color: #64748B; border: 1px solid rgba(100, 116, 139, 0.2); }

/* Form Elements (for Drawers/Modals) */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--admin-text-main);
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--admin-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--admin-text-main);
    background-color: var(--admin-surface);
    transition: var(--transition-base);
    box-shadow: var(--shadow-xs);
}

.form-input-sm {
    padding: 6px 12px;
    font-size: 13px;
    height: 32px;
    border-radius: var(--radius-sm);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 4px var(--admin-primary-ring);
    outline: none;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Drawer / Modal Overrides */
/* Admin Drawer (Right Sidebar) */
.admin-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5); /* Darker backdrop */
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: flex-end;
    backdrop-filter: blur(2px);
}

.admin-drawer-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.admin-drawer {
    width: 600px; /* Default width */
    height: 100%;
    background: #ffffff;
    box-shadow: -8px 0 32px rgba(0,0,0,0.15);
    transform: translateX(100%);
    /* transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); */
    display: flex;
    flex-direction: column;
}

.admin-drawer-backdrop.active .admin-drawer {
    transform: translateX(0);
}

.admin-drawer.drawer-wide { width: 800px; }

.admin-drawer-header {
    border-bottom: 1px solid var(--admin-border);
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.admin-drawer-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--admin-text-main);
}

.admin-drawer-body {
    flex: 1;
    overflow: hidden; /* Manage scroll internally */
    display: flex;
    flex-direction: column;
}

/* Drawer Internal Layout */
.drawer-content-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.drawer-body-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

.drawer-footer {
    padding: 24px 32px;
    border-top: 1px solid var(--admin-border);
    background: #ffffff;
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    flex-shrink: 0;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group.full-width {
    grid-column: span 2;
}

/* Modern Upload */
.modern-upload {
    border: 2px dashed var(--admin-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    background: var(--admin-bg);
}

.modern-upload:hover {
    border-color: var(--admin-primary);
    background: var(--admin-primary-light);
}

.upload-preview {
    width: 100%;
    height: 160px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: var(--radius-md);
    margin-top: 12px;
}

/* Utilities */
.w-25 { width: 25%; }
.text-2xl { font-size: 24px; line-height: 32px; }
.text-primary { color: var(--admin-primary); }

/* Additional Utilities for Modal/Drawer */
.text-center { text-align: center; }
.p-8 { padding: 32px; }
.text-5xl { font-size: 48px; line-height: 1; }
.mb-4 { margin-bottom: 16px; }
.mb-2 { margin-bottom: 8px; }
.text-lg { font-size: 18px; line-height: 28px; }
.font-medium { font-weight: 500; }
.inline-block { display: inline-block; }
.text-warning { color: var(--admin-warning); }
.bg-danger { background-color: var(--admin-danger); }
.border-danger { border-color: var(--admin-danger); }
.text-white { color: white; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.h-full { height: 100%; }
.text-danger { color: var(--admin-danger); }
.text-success { color: var(--admin-success); }
.text-secondary { color: var(--admin-text-secondary); }
.text-muted { color: var(--admin-text-disabled); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.text-sm { font-size: 14px; }
.text-xs { font-size: 12px; }
.text-xl { font-size: 20px; }
.text-center { text-align: center; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.text-alipay { color: #1677FF; }
.text-wechat { color: #09BB07; }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.min-w-0 { min-width: 0; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.w-16 { width: 64px; }
.w-24 { width: 96px; }
.w-32 { width: 128px; }
.w-48 { width: 192px; }
.w-64 { width: 256px; }

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--admin-text-regular);
    user-select: none;
    padding: 6px 10px;
    border-radius: var(--radius-md);
    transition: var(--transition-base);
}

.checkbox-label:hover {
    background-color: rgba(15,23,42,0.02);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    border-radius: 5px;
    accent-color: var(--admin-primary);
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--admin-text-regular);
    user-select: none;
}

.radio-label input[type="radio"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--admin-primary);
}

.m-0 { margin: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mt-4 { margin-top: 16px; }
.mr-2 { margin-right: 8px; }

.rounded-full { border-radius: 9999px; }
.rounded-sm { border-radius: 4px; }

.bg-primary { background-color: var(--admin-primary); }
.bg-border { background-color: var(--admin-border); }

.overflow-hidden { overflow: hidden; }

.pl-2 { padding-left: 8px; }
.pl-4 { padding-left: 16px; }
.p-1 { padding: 4px; }
.p-2 { padding: 8px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.mr-2 { margin-right: 8px; }

.overflow-y-auto { overflow-y: auto; }
.max-h-64 { max-height: 256px; }
.hidden { display: none !important; }

/* List Item (Sortable) */
.admin-list-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    transition: all 0.2s;
}

.admin-list-item:hover {
    border-color: var(--admin-border-hover);
    box-shadow: var(--shadow-xs);
}

.drag-handle {
    color: var(--admin-text-disabled);
    cursor: grab;
    padding: 4px 8px 4px 0;
    font-size: 18px;
    display: flex;
    align-items: center;
}

.drag-handle:hover {
    color: var(--admin-text-regular);
}

.item-content {
    flex: 1;
    font-size: 14px;
    color: var(--admin-text-main);
}

.item-actions {
    display: flex;
    gap: 4px;
    opacity: 0; /* Optional: hide until hover */
    transition: opacity 0.2s;
}

.admin-list-item:hover .item-actions {
    opacity: 1;
}

/* Preview Box */
.preview-box {
    width: 100%;
    height: 200px;
    background-color: var(--admin-bg);
    border: 1px dashed var(--admin-border);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--admin-text-disabled);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Image Utilities */
.bg-cover { background-size: cover; }
.bg-center { background-position: center; }

.hover-bg-gray:hover {
    background-color: #F9FAFB;
.admin-table-img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background-color: var(--admin-bg);
}

.admin-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--admin-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--admin-text-secondary);
    font-size: 16px;
}    height: 40px;
    border-radius: 6px;
    background-color: var(--admin-bg);
    border: 1px solid var(--admin-border);
    flex-shrink: 0;
}

.banner-preview {
    width: 80px;
    height: 45px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    background-color: var(--admin-bg);
    border: 1px solid var(--admin-border);
}

/* Channel Icons */
.channel-admin-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 18px;
}

/* Empty State */
.empty-state {
    padding: 48px;
    text-align: center;
    color: var(--admin-text-secondary);
    background: #F9FAFB;
    border-radius: var(--radius-md);
    border: 1px dashed var(--admin-border);
    margin: 20px 0;
}

/* Tree View Specifics */
.admin-tree-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-tree-item {
    position: relative;
}

.admin-tree-row {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--admin-border);
    background-color: var(--admin-surface);
    transition: all 0.15s ease;
}

.admin-tree-row:hover {
    background-color: #F9FAFB;
}

.admin-tree-drag-handle {
    cursor: grab;
    color: var(--admin-text-disabled);
    padding: 4px 8px;
    display: flex;
    align-items: center;
}

.admin-tree-drag-handle:hover {
    color: var(--admin-text-secondary);
}

.admin-tree-toggle {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--admin-text-secondary);
    transition: transform 0.2s;
}

.admin-tree-toggle.collapsed {
    transform: rotate(-90deg);
}

.admin-tree-toggle.invisible {
    visibility: hidden;
}

.admin-tree-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-tree-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F3F4F6;
    border-radius: 6px;
    color: var(--admin-text-secondary);
    font-size: 14px;
}

.admin-tree-label {
    font-size: 14px;
    color: var(--admin-text-main);
    font-weight: 500;
}

.admin-tree-count {
    font-size: 12px;
    color: var(--admin-text-disabled);
    background: #F9FAFB;
    padding: 1px 6px;
    border-radius: 99px;
    border: 1px solid var(--admin-border);
}

.admin-tree-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.admin-tree-row:hover .admin-tree-actions {
    opacity: 1;
}

.admin-tree-children {
    display: none;
    padding-left: 24px; /* Indent */
    border-left: 1px dashed var(--admin-border); /* Visual guide */
    margin-left: 20px;
}

.admin-tree-children.expanded {
    display: block;
}

/* Dragging States */
.admin-tree-row.dragging {
    opacity: 0.5;
    background: var(--admin-bg);
}

.admin-tree-row.drag-over-top {
    border-top: 2px solid var(--admin-primary);
}

.admin-tree-row.drag-over-bottom {
    border-bottom: 2px solid var(--admin-primary);
}

.admin-tree-row.drag-over-middle {
    background-color: var(--admin-primary-light);
    border: 1px dashed var(--admin-primary);
}


/* Breadcrumb */
.admin-breadcrumb {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--admin-text-secondary);
    margin-bottom: 16px;
}

.admin-breadcrumb-item {
    display: flex;
    align-items: center;
}

.admin-breadcrumb-item:not(:last-child)::after {
    content: "/";
    margin: 0 8px;
    color: var(--admin-text-disabled);
    font-size: 12px;
}

.admin-breadcrumb-link {
    color: var(--admin-text-regular);
    text-decoration: none;
    transition: var(--transition-base);
}

.admin-breadcrumb-link:hover {
    color: var(--admin-primary);
}

.admin-breadcrumb-current {
    color: var(--admin-text-main);
    font-weight: 500;
}

