/* ===== PresentlyStudio Admin Panel — Black Theme ===== */

:root {
    --bg: #ffffff;
    --bg-sidebar: #0e0e0e;
    --bg-card: #ffffff;
    --bg-page: #f7f8fa;
    --bg-input: #f4f5f7;
    --bg-hover: #f0f0f0;
    --border: #e2e5ea;
    --border-focus: #1a1a1a;
    --text: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #94a3b8;
    --text-white: #ffffff;
    --primary: #1a1a1a;
    --primary-hover: #333333;
    --primary-light: #f0f0f0;
    --accent: #c9a96e;
    --success: #10b981;
    --success-bg: #ecfdf5;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --warning: #f59e0b;
    --info: #3b82f6;
    --info-bg: #eff6ff;
    --warning-bg: #fffbeb;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
    --sidebar-width: 260px;
    --transition: 0.2s ease;
    --transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { border: none; cursor: pointer; font-family: inherit; }
img { max-width: 100%; display: block; }

/* ===== LOGIN PAGE ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0e0e0e 0%, #1a1a1a 50%, #0e0e0e 100%);
    background-attachment: fixed;
    position: relative;
}
.login-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 40%, rgba(255,255,255,0.04) 0%, transparent 70%);
    pointer-events: none;
}
.login-container {
    width: 100%;
    max-width: 420px;
    padding: 24px;
    position: relative;
    z-index: 1;
}
.login-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 48px 36px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-header {
    text-align: center;
    margin-bottom: 32px;
}
.login-header h1 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}
.login-header p {
    color: var(--text-muted);
    font-size: 14px;
}
.login-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #141414 0%, #0e0e0e 100%);
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
}
.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-white);
}
.brand-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: #ffffff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}
.brand-text {
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.01em;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 5px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 10px; }
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }
.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: rgba(255,255,255,0.55);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
    margin-bottom: 4px;
    border-left: 3px solid transparent;
    background: rgba(255,255,255,0.03);
}
.nav-link:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.08);
}
.nav-link.active {
    color: #ffffff;
    background: rgba(255,255,255,0.12);
    border-left-color: var(--primary);
}
.nav-link svg {
    transition: transform var(--transition);
}
.nav-link:hover svg {
    transform: scale(1.1);
}
.nav-link svg {
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    margin-bottom: 8px;
}
.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    color: #ffffff;
}
.user-details {
    display: flex;
    flex-direction: column;
}
.user-name {
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
}
.user-role {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
}
.logout-link {
    color: rgba(255,255,255,0.4) !important;
}
.logout-link:hover {
    color: #ef4444 !important;
    background: rgba(239,68,68,0.08) !important;
}

/* Sidebar toggle */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1001;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: var(--shadow);
    align-items: center;
    justify-content: center;
    color: var(--text);
}
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 32px;
    min-height: 100vh;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}
.page-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.page-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 2px;
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-page);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-title {
    font-size: 16px;
    font-weight: 600;
}
.card-body {
    padding: 24px;
}

/* ===== STATS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    border-top: 3px solid var(--border);
    box-shadow: var(--shadow);
    padding: 24px;
    transition: all var(--transition-slow);
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.stat-card-primary { border-top-color: var(--primary); }
.stat-card-success { border-top-color: var(--success); }
.stat-card-warning { border-top-color: var(--warning); }
.stat-card-danger { border-top-color: var(--danger); }
.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    margin-bottom: 12px;
}
.stat-card-primary .stat-icon { background: var(--primary-light); color: var(--primary); }
.stat-card-success .stat-icon { background: var(--success-bg); color: var(--success); }
.stat-card-warning .stat-icon { background: var(--warning-bg); color: var(--warning); }
.stat-card-danger .stat-icon { background: var(--danger-bg); color: var(--danger); }
.stat-value {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 8px;
}
.stat-success { color: var(--success); }
.stat-warning { color: var(--warning); }
.stat-primary { color: var(--primary); }
.stat-muted { color: var(--text-muted); }
.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== QUICK ACTIONS ===== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.quick-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all var(--transition);
    font-weight: 500;
}
.quick-action:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}
.quick-action svg {
    color: var(--text-muted);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition);
    white-space: nowrap;
    cursor: pointer;
    border: none;
}
.btn-primary {
    background: var(--primary);
    color: var(--text-white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
}
.btn-secondary {
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--text-muted);
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}
.btn-outline:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
}
.btn-outline-danger {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--danger);
}
.btn-outline-danger:hover {
    background: var(--danger-bg);
    border-color: var(--danger);
}
.btn-outline-success {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--success);
}
.btn-outline-success:hover {
    background: var(--success-bg);
    border-color: var(--success);
}
.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}
.btn-full {
    width: 100%;
    justify-content: center;
}
.btn-danger {
    background: var(--danger);
    color: white;
    box-shadow: 0 1px 3px rgba(239,68,68,0.3);
}
.btn-danger:hover {
    background: #dc2626;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 20px;
}
.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    background: #ffffff;
    font-size: 14px;
    font-family: var(--font);
    color: var(--text);
    transition: all var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}
.form-textarea {
    resize: vertical;
    min-height: 100px;
}
.form-hint {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}
.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}
.input-prefix-group {
    display: flex;
    align-items: stretch;
}
.input-prefix {
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: var(--radius) 0 0 var(--radius);
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}
.input-prefix-group .form-input {
    border-radius: 0 var(--radius) var(--radius) 0;
}

/* ===== ALERTS ===== */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 16px;
}
.alert-success {
    background: var(--success-bg);
    color: #065f46;
    border: 1px solid #d1fae5;
}
.alert-error {
    background: var(--danger-bg);
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ===== TABLE ===== */
.table-responsive {
    overflow-x: auto;
}
.table {
    width: 100%;
    border-collapse: collapse;
}
.table th {
    text-align: left;
    padding: 12px 24px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    background: var(--bg-page);
}
.table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.table tr:last-child td {
    border-bottom: none;
}
.table tr:hover td {
    background: rgba(0,0,0,0.02);
}

.client-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}
.client-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: var(--text-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}
.client-name {
    font-weight: 500;
    font-size: 14px;
}
.client-email {
    font-size: 12px;
    color: var(--text-muted);
}
.slug-badge {
    padding: 2px 8px;
    background: var(--primary-light);
    border-radius: 4px;
    font-size: 13px;
    color: var(--primary);
}
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
}
.status-active {
    background: var(--success-bg);
    color: #065f46;
}
.status-inactive {
    background: #f5f5f5;
    color: var(--text-muted);
}
.status-open {
    background: #dbeafe;
    color: #1e40af;
}
.status-resolved {
    background: #d1fae5;
    color: #065f46;
}
.badge-unread {
    background: var(--danger);
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.search-form {
    display: flex;
    gap: 12px;
    align-items: center;
}
.search-form .form-input {
    flex: 1;
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    overflow-x: auto;
}
.tab-link {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: all var(--transition-slow);
    white-space: nowrap;
    cursor: pointer;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}
.tab-link:hover {
    color: var(--text);
}
.tab-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}
.tab-panel {
    display: none;
}
.tab-panel.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

/* ===== SIDEBAR DIVIDER & SECTION LABEL ===== */
.sidebar-divider { height: 1px; background: rgba(255,255,255,0.1); margin: 12px 16px; }
.sidebar-section-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(255,255,255,0.4); padding: 8px 20px 4px; display: block; }

/* Submenu toggle + collapsible */
.submenu-toggle { cursor: pointer; border: none; width: 100%; text-align: left; font-family: inherit; background: rgba(255,255,255,0.03); }
.submenu-toggle .submenu-chevron { margin-left: auto; flex-shrink: 0; transition: transform 0.2s ease; opacity: 0.5; }
.submenu-toggle.open .submenu-chevron { transform: rotate(180deg); }
.submenu { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.submenu.open { max-height: 300px; }
.nav-link.sub-link { padding: 7px 14px 7px 44px; font-size: 13px; margin-bottom: 1px; border-left: none; opacity: 0.75; }
.nav-link.sub-link:hover { opacity: 1; }
.nav-link.sub-link.active { opacity: 1; background: rgba(255,255,255,0.08); }

/* ===== FORM GRID ===== */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ===== GALLERY ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    transition: all var(--transition-slow);
}
.gallery-item:hover {
    box-shadow: var(--shadow-md);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gallery-item-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
}
.gallery-item-actions button {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(0,0,0,0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: none;
    cursor: pointer;
}
.gallery-item-actions button:hover {
    background: rgba(0,0,0,0.9);
}
.gallery-drag-handle {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(0,0,0,0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.gallery-item:hover .gallery-drag-handle {
    opacity: 1;
}
.gallery-drag-handle:active {
    cursor: grabbing;
}
.gallery-item.dragging {
    opacity: 0.4;
    border: 2px dashed var(--primary);
}
.gallery-item.drag-over {
    border: 2px solid var(--primary);
    transform: scale(1.05);
    transition: transform 0.15s ease;
}
.gallery-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    color: var(--text-muted);
}
.gallery-upload:hover {
    border-color: var(--text-muted);
    background: var(--bg-hover);
}
.gallery-upload svg {
    margin-bottom: 8px;
}

/* ===== SERVICES ===== */
.service-card-editor {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    background: #fafafa;
}
.service-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.service-features-list {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.feature-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
}
.feature-row .form-input {
    flex: 1;
}
.feature-row .feature-price {
    width: 100px;
}

/* ===== AVAILABILITY ===== */
.availability-grid {
    display: grid;
    gap: 12px;
}
.availability-row {
    display: grid;
    grid-template-columns: 100px 1fr 1fr 160px;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.availability-row:last-child {
    border-bottom: none;
}
.day-label {
    font-weight: 600;
    font-size: 14px;
}

/* ===== TEXT UTILITIES ===== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* ===== STATUS TOGGLE ===== */
.status-toggle-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}
.status-pill:hover {
    border-color: var(--text-muted);
}
.status-pill.active {
    border-color: var(--pill-color, var(--primary));
    background: #fff;
    color: var(--text);
    box-shadow: 0 0 0 1px var(--pill-color, var(--primary));
}
.status-pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ===== TESTIMONIAL EDITOR ===== */
.testimonial-card-editor {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    background: #fafafa;
}
.testimonial-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.star-rating {
    display: flex;
    gap: 4px;
}
.star-rating .star {
    width: 24px;
    height: 24px;
    cursor: pointer;
    color: var(--border);
    transition: color 0.15s;
}
.star-rating .star.filled {
    color: #f59e0b;
}
.char-counter {
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
    margin-top: 4px;
}

/* ===== AVAILABILITY OVERRIDES ===== */
.override-card-editor {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    background: #fafafa;
}
.override-card-editor.past-override {
    opacity: 0.5;
}
.override-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.override-conditional {
    display: none;
    margin-top: 12px;
}
.override-conditional.visible {
    display: block;
}

/* ===== GALLERY STAGING ===== */
.staging-area {
    display: none;
    margin-top: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    background: #fafafa;
}
.staging-area.visible {
    display: block;
}
.staging-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.staging-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    cursor: grab;
}
.staging-card img,
.staging-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.staging-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px 8px;
    background: rgba(0,0,0,0.7);
    font-size: 11px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.staging-card-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    border: none;
}
.staging-card:hover .staging-card-remove {
    opacity: 1;
}
.staging-card .video-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}
.staging-card.dragging {
    opacity: 0.4;
    border: 2px dashed var(--primary);
}
.staging-card.drag-over {
    border: 2px solid var(--primary);
}
.staging-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}
.progress-bar-container {
    flex: 1;
    height: 6px;
    background: var(--bg-input);
    border-radius: 3px;
    overflow: hidden;
    display: none;
}
.progress-bar-container.visible {
    display: block;
}
.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #a07d4a, #c9a96e, #dfc08a);
    border-radius: 3px;
    transition: width 0.2s ease;
}

/* ===== THEME PICKER ===== */
.theme-category-heading {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 36px 0 20px;
}
.theme-category-heading:first-of-type {
    margin-top: 0;
}
.theme-category-heading span {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.theme-category-heading span::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.theme-category-heading.cat-dark span::before {
    background: #1a1a2e;
    border: 2px solid #3a3a5e;
}
.theme-category-heading.cat-light span::before {
    background: #f0ede6;
    border: 2px solid #d0cdc6;
}
.theme-category-heading hr {
    flex: 1;
    border: none;
    border-top: 1px solid var(--border);
    margin: 0;
}
.theme-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}
.theme-card {
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s ease;
    background: var(--bg-card);
}
.theme-card:hover {
    border-color: var(--text-muted);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.theme-card-active {
    border-color: #c9a96e !important;
    box-shadow: 0 0 0 2px #c9a96e, var(--shadow-lg);
}
.theme-card-preview {
    height: 200px;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 20px;
    overflow: hidden;
}
.theme-card-active-check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: #22c55e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 2;
}
.theme-card-active-check svg {
    width: 16px;
    height: 16px;
}
.theme-card-wireframe {
    position: absolute;
    inset: 0;
    opacity: 0.2;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.theme-card-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    color: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.theme-card-info {
    padding: 18px 16px;
}
.theme-card-swatches {
    display: flex;
    gap: 10px;
    margin: 14px 16px 0;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border);
    flex-shrink: 0;
}
.theme-card-fonts {
    display: flex;
    gap: 18px;
    margin: 12px 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
}
.theme-card-fonts span {
    font-size: 22px;
    line-height: 1;
    margin-right: 4px;
}
.theme-card-name {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 6px;
}
.theme-card-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}
.theme-card-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tag-dark {
    background: #1a1a2e;
    color: #a0a0c0;
}
.tag-light {
    background: #f0ede6;
    color: #6b6b6b;
}
.tag-bold {
    background: #2d1810;
    color: #e0a060;
}
.tag-elegant {
    background: #1a1a1a;
    color: #c9a96e;
}
.theme-card-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    body.sidebar-open .sidebar {
        transform: translateX(0);
    }
    body.sidebar-open .sidebar-overlay {
        display: block;
    }
    .sidebar-toggle {
        display: flex;
    }
    .main-content {
        margin-left: 0;
        padding: 24px 16px;
        padding-top: 72px;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .availability-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .availability-row .day-label {
        grid-column: 1 / -1;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
