/* ============================================
   VIMEEN ADMIN PANEL - Premium Dark UI
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-primary: #0d0d0f;
    --bg-secondary: #141416;
    --bg-card: #1a1a1e;
    --bg-hover: #212126;
    --border: #2a2a30;
    --border-light: #333340;
    --accent: #fa545f;
    --accent-2: #e377c2;
    --accent-3: #e1b072;
    --gradient: linear-gradient(135deg, #e377c2, #fa545f, #e1b072);
    --text-primary: #f0f0f5;
    --text-secondary: #9999aa;
    --text-muted: #555565;
    --success: #43e97b;
    --error: #fa545f;
    --warning: #f9ca24;
    --sidebar-width: 250px;
    --topbar-height: 64px;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --transition: all 0.2s ease;
    
    /* Dedicated Metric Variables */
    --metric-bg: #111114;
    --metric-border: #2a2a30;
    --metric-label: #9999aa;
    --metric-value: #ffffff;
    
    /* Live Badge Colors - Dark Default */
    --live-bg: rgba(255, 0, 0, 0.08);
    --live-border: rgba(255, 0, 0, 0.2);
    --live-text: #ff4d4d;
    --live-active-bg: rgba(255, 193, 7, 0.2);
    --live-active-border: rgba(255, 193, 7, 0.6);
    --live-active-text: #ffd000;
}

:root.light-mode, body.light-mode {
    --bg-primary: #f5f6fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #f1f2f6;
    --border: #e1e2e6;
    --border-light: #d1d2d6;
    --text-primary: #2f3542;
    --text-secondary: #57606f;
    --text-muted: #a4b0be;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    
    /* Dedicated Metric Variables - Light */
    --metric-bg: #ffffff;
    --metric-border: #e1e2e6;
    --metric-label: #57606f;
    --metric-value: #2f3542;
    
    /* Live Badge Colors - Light */
    --live-bg: rgba(255, 0, 0, 0.05);
    --live-border: rgba(255, 0, 0, 0.15);
    --live-text: #e53e3e;
    --live-active-bg: rgba(255, 193, 7, 0.1);
    --live-active-border: rgba(217, 119, 6, 0.4);
    --live-active-text: #b45309;
}

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

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

/* Custom Scrollbar - Premium Look */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
    border: 2px solid var(--bg-primary);
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.admin-sidebar::-webkit-scrollbar {
    width: 4px;
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.05);
}

.admin-sidebar:hover::-webkit-scrollbar-thumb {
    background: var(--border);
}

/* ============ LOGIN PAGE ============ */
body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
}

.login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.12;
    animation: blobFloat 8s ease-in-out infinite;
}

.blob1 {
    width: 600px;
    height: 600px;
    background: #fa545f;
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.blob2 {
    width: 500px;
    height: 500px;
    background: #e377c2;
    bottom: -200px;
    right: -100px;
    animation-delay: 3s;
}

.blob3 {
    width: 400px;
    height: 400px;
    background: #e1b072;
    top: 40%;
    left: 40%;
    animation-delay: 6s;
}

@keyframes blobFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, -30px) scale(1.05);
    }
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 2rem;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo img {
    height: 44px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    filter: brightness(1.2);
}

.login-brand {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.login-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow), 0 0 60px rgba(250, 84, 95, 0.05);
}

.login-form h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 13px;
}

.btn-login {
    width: 100%;
    padding: 0.875rem;
    background: var(--gradient);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(250, 84, 95, 0.4);
}

.login-back {
    text-align: center;
    margin-top: 1.5rem;
}

.login-back a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition);
}

.login-back a:hover {
    color: var(--accent);
}

/* Login & Forgot Password specific input styling */
.login-form .input-wrap input[type="email"],
.login-form .input-wrap input[type="text"],
.login-form .input-wrap input[type="password"] {
    background: var(--bg-primary) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    color: var(--text-primary) !important;
}

/* Fix browser autofill (especially Chrome) for dark inputs */
.login-form .input-wrap input[type="email"]:-webkit-autofill,
.login-form .input-wrap input[type="email"]:-webkit-autofill:hover,
.login-form .input-wrap input[type="email"]:-webkit-autofill:focus,
.login-form .input-wrap input[type="email"]:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px var(--bg-primary) inset !important;
    box-shadow: 0 0 0 1000px var(--bg-primary) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    caret-color: var(--text-primary) !important;
    border: 1px solid var(--border) !important;
}

.toggle-pass {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0 0.5rem;
    transition: var(--transition);
}

.toggle-pass:hover {
    color: var(--accent);
}

/* ============ ADMIN LAYOUT ============ */
.admin-body {
    background: var(--bg-primary);
}

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

/* Sidebar */
.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: none; /* Disabled by default */
    overflow-y: auto;
}

.sidebar-initialized .admin-sidebar {
    transition: transform 0.3s ease;
}

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

.early-sidebar-collapsed .admin-sidebar,
.early-sidebar-collapsed .admin-main {
    transition: none !important;
}

@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    .admin-sidebar.active {
        transform: translateX(0);
    }
    .admin-main {
        margin-left: 0 !important;
    }
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
}

.sidebar-logo img {
    height: 32px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    filter: brightness(1.2);
}

.sidebar-logo span {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.sidebar-nav {
    padding: 1rem 0;
    flex: 1;
}

.nav-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 1rem 1.5rem 0.4rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    font-size: 13.5px;
    font-weight: 500;
}

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

.nav-item.active {
    color: var(--accent);
    background: rgba(250, 84, 95, 0.1);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient);
    border-radius: 0 3px 3px 0;
}

.nav-item i {
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.nav-item.logout {
    margin-top: auto;
    color: var(--error);
}

.nav-item.logout:hover {
    background: rgba(250, 84, 95, 0.1);
}

/* Main Content */
.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: none; /* Disabled by default */
}

.sidebar-initialized .admin-main {
    transition: margin-left 0.3s ease;
}

.admin-main.expanded,
.early-sidebar-collapsed .admin-main {
    margin-left: 0;
}

/* Mobile Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 95;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Topbar */
.admin-topbar {
    height: var(--topbar-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 90;
}

.sidebar-toggle {
    background: var(--bg-hover);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sidebar-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: rotate(90deg);
}

.sidebar-toggle i {
    transition: transform 0.3s ease;
}

.admin-sidebar.collapsed + .admin-main #sidebarToggle i {
    transform: rotate(180deg);
}

.theme-toggle {
    background: var(--bg-hover);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
}

body.light-mode .theme-toggle i::before {
    content: "\f185"; /* Sun icon */
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.topbar-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.topbar-link:hover {
    color: var(--accent);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    padding: 0.4rem 0.8rem;
    background: var(--bg-hover);
    border-radius: 20px;
    border: 1px solid var(--border);
}

.topbar-user i {
    color: var(--accent);
}

/* Content Area */
.admin-content {
    padding: 2.5rem;
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

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

.admin-page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.admin-page-header h1 i {
    color: var(--accent);
    font-size: 1.3rem;
}

/* Cards */
.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

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

.card-header h2 {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.card-header h2 i {
    color: var(--accent);
}

.card-body {
    padding: 1.5rem;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

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

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

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    flex-shrink: 0;
}

.stat-info h3 {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-info p {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 1.25rem;
    background: var(--gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary:hover {
    opacity: 0.85;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(250, 84, 95, 0.35);
}

.btn-primary.full-width {
    width: 100%;
    justify-content: center;
    padding: 0.875rem;
    font-size: 15px;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 1.25rem;
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

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

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 1.25rem;
    background: rgba(250, 84, 95, 0.15);
    color: var(--error);
    border: 1px solid rgba(250, 84, 95, 0.3);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

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

/* Action buttons */
.action-btns {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-action {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition);
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.btn-action:hover {
    transform: scale(1.1);
}

.btn-action.view {
    color: #4facfe;
}

.btn-action.view:hover {
    background: rgba(79, 172, 254, 0.15);
    color: #4facfe;
}

.btn-action.edit {
    color: #f9ca24;
}

.btn-action.edit:hover {
    background: rgba(249, 202, 36, 0.15);
    color: #f9ca24;
}

.btn-action.images {
    color: #43e97b;
}

.btn-action.images:hover {
    background: rgba(67, 233, 123, 0.15);
    color: #43e97b;
}

.btn-action.delete {
    color: var(--error);
}

.btn-action.delete:hover {
    background: rgba(250, 84, 95, 0.15);
    color: var(--error);
}

/* Table */
.table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.admin-table thead th {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.admin-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

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

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

.admin-table td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
}

.table-model-name {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.model-name-text {
    font-weight: 600;
    color: var(--text-primary);
}

.model-slug {
    font-size: 11px;
    color: var(--text-muted);
    font-family: monospace;
}

.date-cell {
    color: var(--text-secondary);
    font-size: 12px;
    white-space: nowrap;
}

.table-empty {
    text-align: center;
    padding: 3rem 1rem !important;
    color: var(--text-muted);
}

.table-empty a {
    color: var(--accent);
}

.price-badge {
    background: rgba(249, 202, 36, 0.1);
    color: var(--warning);
    border: 1px solid rgba(249, 202, 36, 0.2);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

.count-badge {
    background: var(--bg-hover);
    color: var(--text-secondary);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.status-badge.active {
    background: rgba(67, 233, 123, 0.12);
    color: var(--success);
    border: 1px solid rgba(67, 233, 123, 0.25);
}

.status-badge.inactive {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.status-badge:hover {
    opacity: 0.8;
}

/* Thumbnails */
.admin-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.admin-thumb-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 16px;
}

/* Pagination */
.admin-pagination {
    display: flex;
    gap: 6px;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
}

.page-num {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    background: var(--bg-hover);
}

.page-num.active {
    background: var(--gradient);
    color: #fff;
}

.page-num:hover:not(.active) {
    background: var(--border);
    color: var(--text-primary);
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-weight: 500;
    font-size: 13.5px;
    transition: opacity 0.3s ease;
}

.alert-success {
    background: rgba(67, 233, 123, 0.1);
    border: 1px solid rgba(67, 233, 123, 0.25);
    color: var(--success);
}

.alert-error {
    background: rgba(250, 84, 95, 0.1);
    border: 1px solid rgba(250, 84, 95, 0.25);
    color: var(--error);
}

/* Forms */
.form-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
    align-items: start;
}

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

.form-group:last-child {
    margin-bottom: 0;
}

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

.form-group label small {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-muted);
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(250, 84, 95, 0.1);
}

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

.form-group small {
    display: block;
    margin-top: 0.35rem;
    font-size: 11px;
    color: var(--text-muted);
}

.form-group .required {
    color: var(--accent);
}

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

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrap>i:first-child {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 13px;
    pointer-events: none;
    z-index: 1;
}

.input-wrap input {
    padding-left: 2.5rem !important;
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
}

.input-with-prefix {
    display: flex;
    align-items: stretch;
}

.input-prefix {
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-right: none;
    padding: 0.75rem 0.75rem;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    color: var(--text-muted);
    font-size: 11px;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.input-with-prefix input {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
}

/* Toggle Switch */
.toggle-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13.5px !important;
    color: var(--text-primary) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-weight: 500 !important;
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    width: 42px;
    height: 24px;
    background: var(--border);
    border-radius: 12px;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: var(--transition);
}

.toggle-label input:checked~.toggle-slider {
    background: var(--accent);
}

.toggle-label input:checked~.toggle-slider::after {
    left: 21px;
}

/* Checkboxes */
.checkboxes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.checkbox-label:hover {
    color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
    flex-shrink: 0;
}

/* Formats */
.format-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.format-type-select {
    width: 120px !important;
    flex-shrink: 0;
    padding: 0.65rem 0.75rem !important;
    font-size: 13px !important;
}

.format-row input {
    flex: 1;
    padding: 0.65rem 0.9rem !important;
    font-size: 13px !important;
}

/* Search Form */
.admin-search-form {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 1rem 1.5rem;
}

.admin-search-form .input-wrap {
    flex: 1;
}

.admin-search-form input {
    width: 100%;
    padding: 0.65rem 0.75rem 0.65rem 2.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

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

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

.image-card {
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    transition: var(--transition);
}

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

.image-card.is-cover {
    border-color: var(--accent);
}

.image-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.cover-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.image-card-actions {
    display: flex;
    gap: 6px;
    padding: 8px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    justify-content: center;
}

.image-order-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: var(--bg-hover);
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-muted);
}

.order-input {
    width: 60px;
    padding: 0.2rem 0.4rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 12px;
    text-align: center;
    outline: none;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border-light);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-primary);
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--accent);
    background: rgba(250, 84, 95, 0.05);
}

.upload-icon {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.upload-area p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.upload-browse {
    color: var(--accent);
    cursor: pointer;
    font-weight: 600;
}

.upload-browse:hover {
    text-decoration: underline;
}

.upload-note {
    font-size: 11px;
    color: var(--text-muted) !important;
}

.upload-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.preview-item {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-primary);
}

.preview-item img {
    width: 100%;
    height: 90px;
    object-fit: cover;
}

.preview-item span {
    display: block;
    padding: 4px 8px;
    font-size: 10px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Image Preview Overlay */
.img-preview-container {
    position: relative;
    width: 100%;
    cursor: pointer;
}

.img-preview-container:hover .preview-overlay {
    opacity: 1 !important;
}

.model-info-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.875rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 1100px) {
    .form-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-content {
        padding: 1rem;
    }

    .admin-topbar {
        padding: 0 1rem;
    }

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

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

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

    .form-sidebar {
        order: -1;
    }
}

/* Sortable Images */
.sortable-grid .image-card {
    position: relative;
    cursor: default;
}

.drag-handle {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    z-index: 5;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.drag-handle:hover {
    opacity: 1;
    background: #fa545f;
}

.sortable-ghost {
    opacity: 0.2;
    transform: scale(0.95);
    border: 2px dashed #fa545f;
}

.image-card.is-cover .drag-handle {
    top: 40px;
}

/* Tags Management UI */
/* Tags Management UI */
.tags-input-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    min-height: 45px;
    align-items: center;
}

.tags-input-container:focus-within {
    border-color: var(--accent);
}

.tag-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-hover);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tag-badge:hover {
    border-color: var(--accent);
    background: #333;
}

.tag-badge i {
    cursor: pointer;
    font-size: 11px;
    color: #aaa;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.tag-badge i:hover {
    color: #fff;
    background: rgba(250, 84, 95, 0.2);
}

.tags-input-container input {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
    min-width: 100px;
    flex: 1;
    color: var(--text-primary);
}

.tags-input-container input:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Alerts */
.admin-alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    font-weight: 600;
}

.admin-alert.success {
    background: rgba(67, 233, 123, 0.1);
    color: var(--success);
    border: 1px solid rgba(67, 233, 123, 0.2);
}

.admin-alert.error {
    background: rgba(250, 84, 95, 0.1);
    color: var(--error);
    border: 1px solid rgba(250, 84, 95, 0.2);
}

/* Form Grid */
.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.admin-form-container .form-group input {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    transition: var(--transition);
}

.admin-form-container .form-group input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(250, 84, 95, 0.1);
}

.admin-form-container .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}





/* REAL-TIME ORDER NOTIFICATION (TOP-CENTER ALERT) */
.shopify-toast-container {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 20px;
    pointer-events: none;
    width: 100%;
    align-items: center;
}

.shopify-toast {
    background: #1a1a20;
    border: 2px solid #008060;
    border-radius: 16px;
    padding: 24px;
    width: 420px;
    max-width: 90vw;
    box-shadow: 0 0 30px rgba(0, 128, 96, 0.4), 0 15px 45px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    gap: 20px;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    animation: 
        shopifyAlertTopIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards,
        shopifyGlowPulse 3s infinite ease-in-out;
}

@keyframes shopifyAlertTopIn {
    from { opacity: 0; transform: translateY(-100px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes shopifyAlertTopOut {
    to { opacity: 0; transform: translateY(-50px) scale(0.95); }
}

.shopify-toast.fade-out {
    animation: shopifyAlertTopOut 0.5s cubic-bezier(0.64, 0, 0.78, 0) forwards;
}

@keyframes shopifyGlowPulse {
    0% { box-shadow: 0 0 20px rgba(0, 128, 96, 0.3), 0 15px 45px rgba(0, 0, 0, 0.6); }
    50% { box-shadow: 0 0 50px rgba(0, 128, 96, 0.7), 0 15px 45px rgba(0, 0, 0, 0.8); }
    100% { box-shadow: 0 0 20px rgba(0, 128, 96, 0.3), 0 15px 45px rgba(0, 0, 0, 0.6); }
}

.shopify-toast::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(45deg, transparent, rgba(0, 128, 96, 0.05), transparent);
    animation: shopifyGlassShine 3s infinite linear;
}

@keyframes shopifyGlassShine {
    0% { transform: translateX(-100%) translateY(-100%); }
    100% { transform: translateX(100%) translateY(100%); }
}

.toast-icon {
    width: 60px;
    height: 60px;
    background: #008060;
    color: #fff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    box-shadow: 0 8px 16px rgba(0, 128, 96, 0.4);
    z-index: 2;
}

.toast-content {
    flex: 1;
    z-index: 2;
}

.toast-title {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast-title::after {
    content: 'LIVE';
    font-size: 10px;
    background: #fa545f;
    padding: 2px 6px;
    border-radius: 4px;
    animation: blinker 1s linear infinite;
}

@keyframes blinker { 50% { opacity: 0; } }

.toast-desc {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    line-height: 1.5;
}

.toast-desc strong {
    color: #fff;
}

.toast-price {
    font-size: 18px;
    font-weight: 900;
    color: #008060;
    margin-top: 8px;
    display: block;
    text-shadow: 0 0 10px rgba(0, 128, 96, 0.2);
}

.light-mode .shopify-toast {
    background: #ffffff;
    border-color: #008060;
    box-shadow: 0 0 30px rgba(0, 128, 96, 0.2), 0 15px 45px rgba(0, 0, 0, 0.1);
}

.light-mode .toast-title { color: #1a1a1a; }
.light-mode .toast-desc { color: #555; }
.light-mode .toast-desc strong { color: #000; }

/* CUSTOM PAYMENT TOAST OVERRIDES */
.shopify-toast.payment-toast {
    border-color: #ff9100;
    box-shadow: 0 0 30px rgba(255, 145, 0, 0.4), 0 15px 45px rgba(0, 0, 0, 0.6);
}

.payment-toast .toast-icon {
    background: #ff9100;
    box-shadow: 0 8px 16px rgba(255, 145, 0, 0.4);
}

.payment-toast .toast-price {
    color: #ff9100;
    text-shadow: 0 0 10px rgba(255, 145, 0, 0.2);
}

.light-mode .shopify-toast.payment-toast {
    box-shadow: 0 0 30px rgba(255, 145, 0, 0.2), 0 15px 45px rgba(0, 0, 0, 0.1);
}
