/* ==========================================
   Prompt House Admin — Design System
   Dark mode, RTL-aware, Professional
   ========================================== */

:root {
    --bg:            #0a0a0f;
    --surface:       #12121a;
    --surface-2:     #1a1a28;
    --surface-3:     #222236;
    --surface-hover: rgba(255, 255, 255, 0.04);
    --border:        #2a2a3e;
    --border-light:  #3a3a52;
    --text:          #e8e8f0;
    --text-dim:      #8888a8;
    --text-muted:    #5a5a78;
    --accent:        #22d3ee;
    --accent-hover:  #06b6d4;
    --accent-glow:   rgba(34, 211, 238, 0.12);
    --selection-bg:  rgba(34, 211, 238, 0.25);
    --success:       #10b981;
    --success-bg:    rgba(16, 185, 129, 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);
    --radius-sm:     8px;
    --radius:        12px;
    --radius-lg:     16px;
    --radius-xl:     20px;
    --shadow:        0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg:     0 12px 40px rgba(0, 0, 0, 0.5);
    --bg-secondary:  #1a1a28;
    --transition:    0.2s ease;
    --sidebar-width: 260px;
}

[data-theme="light"] {
    --bg:            #f8fafc;
    --surface:       #ffffff;
    --surface-2:     #f1f5f9;
    --surface-3:     #e2e8f0;
    --surface-hover: rgba(0, 0, 0, 0.04);
    --bg-secondary:  #f1f5f9;
    --border:        #e2e8f0;
    --border-light:  #cbd5e1;
    --text:          #0f172a;
    --text-dim:      #475569;
    --text-muted:    #64748b;
    --accent:        #0284c7;
    --accent-hover:  #0369a1;
    --accent-glow:   rgba(2, 132, 199, 0.12);
    --selection-bg:  rgba(2, 132, 199, 0.2);
    --shadow:        0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg:     0 12px 40px rgba(0, 0, 0, 0.12);
}

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

/* Custom Selection & Scrollbars */
::selection {
    background: var(--selection-bg);
    color: var(--text);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--surface-3);
    border-radius: var(--radius-sm);
    border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

/* Accessibility: Universal Focus Visible Ring */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

body {
    font-family: 'Cairo', 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    direction: rtl;
    overflow-x: hidden;
}

/* ==========================================
   Mobile Header & Navigation Drawer
   ========================================== */

.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 1rem;
    align-items: center;
    justify-content: space-between;
    z-index: 150;
}

.mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 1.05rem;
    cursor: pointer;
    transition: all var(--transition);
}

.mobile-menu-btn:hover {
    background: var(--surface-3);
    color: var(--accent);
    border-color: var(--accent);
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 14px;
}

.mobile-logo-text {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    transition: opacity var(--transition);
}

.sidebar-backdrop.active {
    display: block;
    opacity: 1;
}

.sidebar-close-btn {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    cursor: pointer;
    font-size: 1.05rem;
    transition: all var(--transition);
}

.sidebar-close-btn:hover {
    color: var(--danger);
    border-color: var(--danger);
    background: var(--danger-bg);
}

/* ==========================================
   Layout: Sidebar + Main
   ========================================== */

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

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

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

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: #000;
    flex-shrink: 0;
}

.sidebar-logo-text h2 {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
}

.sidebar-logo-text span {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0.75rem;
    overflow-y: auto;
}

.nav-section-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 0.75rem 0.75rem 0.35rem;
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: right;
    font-family: inherit;
    min-height: 44px;
}

.nav-item:hover {
    background: var(--surface-2);
    color: var(--text);
}

.nav-item.active {
    background: var(--accent-glow);
    color: var(--accent);
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 0.88rem;
}

.nav-item .badge {
    margin-right: auto;
    margin-left: 0;
    background: var(--surface-3);
    padding: 2px 8px;
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    color: var(--text-dim);
    min-width: 26px;
    text-align: center;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface-3);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.user-name {
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.btn-logout {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

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

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

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

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

.page-title i {
    margin-left: 10px;
    color: var(--accent);
}

/* ==========================================
   Stats Cards
   ========================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all var(--transition);
}

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

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-icon.accent { background: var(--accent-glow); color: var(--accent); }
.stat-icon.success { background: var(--success-bg); color: var(--success); }
.stat-icon.warning { background: var(--warning-bg); color: var(--warning); }
.stat-icon.info { background: var(--info-bg); color: var(--info); }
.stat-icon.danger { background: var(--danger-bg); color: var(--danger); }

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* ==========================================
   Data Tables
   ========================================== */

.table-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.88rem;
    font-family: inherit;
    transition: border-color var(--transition);
}

.search-input:focus {
    border-color: var(--accent);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.filter-select {
    padding: 10px 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.88rem;
    font-family: inherit;
    cursor: pointer;
}

.filter-select:focus {
    border-color: var(--accent);
}

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

.data-table th {
    padding: 12px 16px;
    text-align: right;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    font-weight: 600;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
    vertical-align: middle;
}

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

.data-table tr:hover td {
    background: var(--surface-hover);
}

.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* ==========================================
   Badges & Tags
   ========================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.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-accent  { background: var(--accent-glow); color: var(--accent); }
.badge-muted   { background: var(--surface-3);  color: var(--text-dim); }

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tag {
    padding: 2px 8px;
    background: var(--surface-3);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* ==========================================
   Buttons
   ========================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    min-height: 38px;
}

.btn:hover {
    border-color: var(--border-light);
    background: var(--surface-3);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.75rem;
    min-height: 32px;
}

.btn-icon {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    font-size: 0.88rem;
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

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

.btn-danger:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.btn-success {
    background: var(--success-bg);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.btn-success:hover {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

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

.btn-ghost:hover {
    background: var(--surface-2);
    color: var(--text);
}

/* ==========================================
   Modals
   ========================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    width: 95%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.modal-close:hover {
    background: var(--surface-3);
    color: var(--text);
}

.modal-footer {
    display: flex;
    justify-content: flex-start;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* ==========================================
   Form Fields
   ========================================== */

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dim);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.88rem;
    font-family: inherit;
    transition: border-color var(--transition);
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--accent);
}

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

/* ==========================================
   Toasts (Semantic Theme Tokens)
   ========================================== */

.toast-container {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 2000;
    display: flex;
    flex-direction: column-reverse;
    gap: 0.5rem;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease;
    min-width: 280px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
}

.toast.success {
    background: var(--surface-2);
    color: var(--success);
    border-color: var(--success);
}

.toast.error {
    background: var(--surface-2);
    color: var(--danger);
    border-color: var(--danger);
}

.toast.info {
    background: var(--surface-2);
    color: var(--accent);
    border-color: var(--accent);
}

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

/* ==========================================
   Image Gallery
   ========================================== */

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

.image-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
    cursor: pointer;
}

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

.image-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.image-card-info {
    padding: 8px 12px;
    font-size: 0.75rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ==========================================
   Pagination
   ========================================== */

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination .btn {
    min-width: 36px;
    justify-content: center;
}

.pagination .btn.active {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: var(--accent);
}

/* ==========================================
   Responsive (Mobile & Tablet)
   ========================================== */

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

    .mobile-menu-btn {
        display: flex;
    }

    .sidebar-close-btn {
        display: flex;
    }

    .app-layout {
        padding-top: 60px;
    }

    .sidebar {
        transform: translateX(100%);
        top: 0;
        z-index: 200;
    }

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

    .main-content {
        margin-right: 0;
        padding: 1rem;
    }

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

    .table-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input {
        width: 100%;
    }
}

/* ==========================================
   Utilities
   ========================================== */

.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.text-dim { color: var(--text-dim); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

.d-none { display: none !important; }
.d-flex { display: flex; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

.dashboard-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

.skeleton {
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

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

/* Prompt thumbnail in table */
.prompt-thumb {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--border);
}

.prompt-thumb-placeholder {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--surface-3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Toggle switches */
.toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.toggle-btn:hover {
    background: var(--surface-3);
}

.toggle-btn.on { color: var(--success); }
.toggle-btn.off { color: var(--text-muted); }

/* Action buttons group in table */
.action-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-dim);
}

.empty-state i {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.empty-state h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* Loading overlay */
.loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.loading-overlay .spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ==========================================
   Prompt Cards View
   ========================================== */

.prompt-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    padding: 1.25rem;
}

.prompt-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all var(--transition);
}

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

.prompt-card-header {
    position: relative;
    height: 140px;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.prompt-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prompt-card-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
}

.prompt-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.prompt-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.prompt-card-text {
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.5;
    flex: 1;
    margin-bottom: 0.5rem;
}

.prompt-card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--surface-hover);
}

.prompt-card-stats {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.prompt-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ==========================================
   Theme Switch
   ========================================== */

.theme-switch-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 44px;
    cursor: pointer;
}

.theme-switch-wrapper input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.theme-slider {
    position: relative;
    cursor: pointer;
    width: 46px;
    height: 24px;
    background-color: var(--surface-3);
    border-radius: var(--radius-xl);
    transition: all var(--transition);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
}

.theme-slider:hover {
    border-color: var(--border-light);
}

.theme-slider i {
    font-size: 0.75rem;
    color: var(--text-muted);
    z-index: 1;
}

.theme-slider::before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    right: 3px;
    bottom: 3px;
    background-color: var(--accent);
    border-radius: 50%;
    transition: transform var(--transition), background-color var(--transition);
    z-index: 2;
}

input:checked + .theme-slider::before {
    transform: translateX(-20px);
    background-color: var(--warning);
}

.theme-slider .dark-icon {
    color: var(--text);
}

input:checked + .theme-slider .dark-icon {
    color: var(--text-muted);
}

input:checked + .theme-slider .light-icon {
    color: var(--text);
}

/* ==========================================
   Accessibility: Selective Reduced Motion
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
    .nav-item, .btn, .stat-card, .image-card, .prompt-card, .theme-slider, .theme-slider::before {
        transition-duration: 0.15s !important;
    }
}

