/* =====================================================
   ADMIN PANEL STYLES
   ===================================================== */

:root {
    --primary: #00d4ff;
    --primary-dark: #00a8cc;
    --secondary: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --dark: #0a0a0f;
    --dark-100: #0f0f17;
    --dark-200: #141420;
    --dark-300: #1a1a2e;
    --dark-400: #252540;
    --dark-500: #333355;
    --light: #ffffff;
    --light-100: #f8fafc;
    --light-400: #94a3b8;
    --light-500: #64748b;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    --sidebar-width: 280px;
    --topbar-height: 70px;
}

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

body {
    font-family: var(--font-main);
    background: var(--dark);
    color: var(--light);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--dark-100);
    border-right: 1px solid var(--dark-400);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
}

.logo-text { color: var(--light); }
.logo-accent { color: var(--primary); }

.admin-badge {
    padding: 4px 10px;
    background: var(--primary);
    color: var(--dark);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 20px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin: 4px 12px;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--light-400);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover {
    background: var(--dark-300);
    color: var(--light);
}

.sidebar .nav-link.active {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(139, 92, 246, 0.1));
    color: var(--primary);
}

.sidebar .nav-link svg {
    flex-shrink: 0;
}

.badge {
    margin-left: auto;
    padding: 2px 8px;
    background: var(--primary);
    color: var(--dark);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 10px;
}

.badge.success {
    background: var(--success);
}

.sidebar-footer {
    padding: 20px 12px;
    border-top: 1px solid var(--dark-400);
}

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

.sidebar.collapsed + .main-content {
    margin-left: 0;
}

/* Topbar */
.topbar {
    position: sticky;
    top: 0;
    height: var(--topbar-height);
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--dark-400);
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 30px;
    z-index: 50;
}

.sidebar-toggle {
    display: none;
    padding: 8px;
    background: none;
    border: none;
    color: var(--light);
    cursor: pointer;
}

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

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

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

    .sidebar-toggle {
        display: block;
    }
}

.search-box {
    flex: 1;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--dark-200);
    border: 1px solid var(--dark-400);
    border-radius: 10px;
}

.search-box svg {
    color: var(--light-500);
}

.search-box input {
    flex: 1;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--light);
    outline: none;
}

.search-box input::placeholder {
    color: var(--light-500);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.action-btn {
    position: relative;
    padding: 10px;
    background: var(--dark-200);
    border: 1px solid var(--dark-400);
    border-radius: 10px;
    color: var(--light-400);
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: var(--dark-300);
    color: var(--light);
}

.notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--error);
    border-radius: 50%;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--dark-200);
    border: 1px solid var(--dark-400);
    border-radius: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--dark);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--light);
}

.user-role {
    font-size: 0.75rem;
    color: var(--light-500);
}

/* Content Sections */
.content-section {
    display: none;
    padding: 30px;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-header h1 {
    font-family: var(--font-display);
    font-size: 1.75rem;
}

.section-header p {
    color: var(--light-500);
    margin-top: 5px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--dark);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.btn-secondary {
    background: var(--dark-300);
    color: var(--light);
    border: 1px solid var(--dark-400);
}

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

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: var(--dark-200);
    border: 1px solid var(--dark-400);
    border-radius: 16px;
}

.stat-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.stat-icon.blue { background: rgba(0, 212, 255, 0.1); color: var(--primary); }
.stat-icon.green { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.1); color: var(--secondary); }
.stat-icon.orange { background: rgba(245, 158, 11, 0.1); color: var(--warning); }

.stat-content {
    flex: 1;
}

.stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--light);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--light-500);
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.stat-change.positive { color: var(--success); }
.stat-change.negative { color: var(--error); }
.stat-change.neutral { color: var(--light-500); }

/* Cards */
.card {
    background: var(--dark-200);
    border: 1px solid var(--dark-400);
    border-radius: 16px;
    overflow: hidden;
}

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

.card-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.view-all {
    font-size: 0.9rem;
    color: var(--primary);
    text-decoration: none;
}

.view-all:hover {
    text-decoration: underline;
}

.card-body {
    padding: 24px;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 16px;
    text-align: left;
}

.data-table th {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--light-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--dark-400);
}

.data-table td {
    border-bottom: 1px solid var(--dark-400);
}

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

.data-table.full {
    min-width: 800px;
}

.customer-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--dark);
}

.customer-cell strong {
    display: block;
    color: var(--light);
}

.customer-cell span {
    font-size: 0.85rem;
    color: var(--light-500);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
}

.status-badge.confirmed { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.status-badge.pending { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.status-badge.completed { background: rgba(0, 212, 255, 0.1); color: var(--primary); }
.status-badge.cancelled { background: rgba(239, 68, 68, 0.1); color: var(--error); }
.status-badge.success { background: rgba(16, 185, 129, 0.1); color: var(--success); }

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-300);
    border: none;
    border-radius: 8px;
    color: var(--light-400);
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: var(--dark-400);
    color: var(--light);
}

.icon-btn.delete:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

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

/* Grant List */
.grant-list {
    display: flex;
    flex-direction: column;
}

.grant-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--dark-400);
}

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

.grant-info strong {
    display: block;
    color: var(--light);
    margin-bottom: 4px;
}

.grant-info span {
    font-size: 0.85rem;
    color: var(--light-500);
}

.grant-status {
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
}

.grant-status.eligible { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.grant-status.pending { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.grant-status.not-eligible { background: rgba(239, 68, 68, 0.1); color: var(--error); }

/* Quick Actions */
.quick-actions h2 {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 30px 20px;
    background: var(--dark-200);
    border: 1px solid var(--dark-400);
    border-radius: 16px;
    color: var(--light-400);
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-card:hover {
    background: var(--dark-300);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-5px);
}

.action-card span {
    font-weight: 500;
}

/* Filters */
.filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-select,
.filter-date {
    padding: 10px 16px;
    background: var(--dark-300);
    border: 1px solid var(--dark-400);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--light);
    cursor: pointer;
}

/* Pricing Grid */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.price-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--dark-400);
}

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

.price-input {
    width: 100px;
    padding: 10px 14px;
    background: var(--dark-300);
    border: 1px solid var(--dark-400);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    text-align: right;
}

.price-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Settings */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-bottom: 1px solid var(--dark-400);
}

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

.setting-info strong {
    display: block;
    color: var(--light);
    margin-bottom: 4px;
}

.setting-info p {
    font-size: 0.85rem;
    color: var(--light-500);
}

/* Toggle Switch */
.toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    min-width: 50px;
    height: 28px;
    vertical-align: middle;
    flex-shrink: 0;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--dark-400);
    border-radius: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    bottom: 3px;
    background: var(--light);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toggle input:checked + .toggle-slider {
    background: var(--success);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--light);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--dark-300);
    border: 1px solid var(--dark-400);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--light);
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

.text-muted {
    color: var(--light-500);
    font-size: 0.85rem;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--light-500);
}

/* ==================== SERVICE PAGE BUILDER ==================== */

/* Block type selector grid */
.sp-block-type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.sp-block-type-card {
    background: var(--dark-200);
    border: 1px solid var(--dark-400);
    border-radius: 12px;
    padding: 20px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.sp-block-type-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}
.sp-block-type-card .sp-bt-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--primary);
}
.sp-block-type-card .sp-bt-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--light);
}

/* Block cards in builder */
.sp-block-card {
    background: var(--dark-100);
    border: 1px solid var(--dark-400);
    border-radius: 12px;
    margin-bottom: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.sp-block-card.dragging {
    opacity: 0.5;
    border-color: var(--primary);
}
.sp-block-card.drag-over {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.3);
}
.sp-block-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
}
.sp-drag-handle {
    cursor: grab;
    color: var(--light-500);
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.sp-drag-handle:active { cursor: grabbing; }
.sp-block-info {
    flex: 1;
    min-width: 0;
}
.sp-block-info .sp-block-type {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    font-weight: 600;
}
.sp-block-info .sp-block-preview {
    font-size: 0.9rem;
    color: var(--light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sp-block-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.sp-block-actions button {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: var(--dark-300);
    color: var(--light-500);
}
.sp-block-actions button:hover { color: var(--light); }
.sp-block-actions button.sp-btn-edit:hover { background: rgba(0,212,255,0.2); color: #00d4ff; }
.sp-block-actions button.sp-btn-delete:hover { background: rgba(239,68,68,0.2); color: #ef4444; }
.sp-block-actions button.sp-btn-toggle.off { opacity: 0.5; }

/* Repeater fields in block editor */
.sp-repeater-items { margin-bottom: 12px; }
.sp-repeater-item {
    background: var(--dark-200);
    border: 1px solid var(--dark-400);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 10px;
    position: relative;
}
.sp-repeater-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(239,68,68,0.15);
    color: #ef4444;
    border: none;
    border-radius: 6px;
    width: 26px;
    height: 26px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sp-repeater-remove:hover { background: #ef4444; color: white; }
.sp-repeater-add {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--dark-300);
    border: 1px dashed var(--dark-400);
    border-radius: 8px;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.85rem;
}
.sp-repeater-add:hover { border-color: var(--primary); }

/* Block editor form styles */
.sp-field-group {
    margin-bottom: 16px;
}
.sp-field-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--light-500);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sp-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Image upload field */
.sp-image-field {
    display: flex;
    align-items: center;
    gap: 12px;
}
.sp-image-field .sp-image-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 1px solid var(--dark-400);
    object-fit: cover;
}
.sp-image-field .sp-image-btn {
    padding: 6px 14px;
    background: var(--dark-300);
    border: 1px solid var(--dark-400);
    border-radius: 8px;
    color: var(--light);
    cursor: pointer;
    font-size: 0.85rem;
}
.sp-image-field .sp-image-btn:hover { border-color: var(--primary); }

/* SEO Score Circle */
.sp-seo-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    background: conic-gradient(var(--seo-color, #ef4444) var(--seo-pct, 0%), var(--dark-400) 0%);
    position: relative;
}
.sp-seo-circle::before {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: var(--dark-100);
}
.sp-seo-circle span {
    position: relative;
    z-index: 1;
}

/* SEO Length Bars */
.sp-seo-bar {
    height: 4px;
    background: var(--dark-400);
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}
.sp-seo-bar .sp-seo-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s, background 0.3s;
    width: 0%;
}

/* SEO Checklist */
.sp-seo-checklist {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sp-seo-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--dark-200);
}
.sp-seo-check.pass { color: #10b981; }
.sp-seo-check.fail { color: var(--light-500); }
.sp-seo-check .sp-check-icon { flex-shrink: 0; width: 18px; text-align: center; }

/* Social Preview */
.sp-social-preview {
    border: 1px solid var(--dark-400);
    border-radius: 12px;
    overflow: hidden;
    max-width: 500px;
    background: var(--dark-200);
}
.sp-social-preview-img {
    height: 160px;
    background: var(--dark-300);
    background-size: cover;
    background-position: center;
}
.sp-social-preview-body { padding: 12px 16px; }
.sp-social-preview-domain { font-size: 0.75rem; color: var(--light-500); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.sp-social-preview-title { font-size: 0.95rem; font-weight: 600; color: var(--light); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-social-preview-desc { font-size: 0.8rem; color: var(--light-500); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

@media (max-width: 768px) {
    .sp-block-type-grid { grid-template-columns: repeat(2, 1fr); }
    .sp-field-row { grid-template-columns: 1fr; }
}

/* ==================== SITE MEDIA ==================== */
.sm-grid { display: grid; gap: 20px; }
.sm-grid-2 { grid-template-columns: repeat(2, 1fr); }
.sm-grid-3 { grid-template-columns: repeat(3, 1fr); }

.sm-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--dark-500);
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    background: var(--dark-700);
}
.sm-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.sm-preview {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--dark-800);
}
.sm-card-small .sm-preview { height: 120px; }

.sm-preview img, .sm-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sm-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--dark-400);
}

.sm-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.25s;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    z-index: 2;
    pointer-events: none;
}
.sm-card:hover .sm-overlay { opacity: 1; }

.sm-label {
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--light);
    background: var(--dark-700);
    border-top: 1px solid var(--dark-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sm-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 1;
}
.sm-badge-video { background: rgba(139,92,246,0.9); color: #fff; }
.sm-badge-image { background: rgba(16,185,129,0.9); color: #fff; }

@media (max-width: 768px) {
    .sm-grid-2, .sm-grid-3 { grid-template-columns: 1fr; }
    .sm-preview { height: 140px; }
}
