/* =======================================================
   AURA ADMIN PANEL DESIGN SYSTEM — ADMIN STYLESHEET
   ======================================================= */

:root {
    --admin-sidebar-bg: #0f172a;
    --admin-sidebar-hover: #1e293b;
    --admin-sidebar-text: #94a3b8;
    --admin-sidebar-active: #ffffff;
    --admin-primary: #2563eb;
    --admin-primary-hover: #1d4ed8;
    --admin-bg: #f8fafc;
    --admin-card-bg: #ffffff;
    --admin-border: #e2e8f0;
    --admin-text-main: #0f172a;
    --admin-text-muted: #64748b;
}

body.admin-body {
    background-color: var(--admin-bg);
    color: var(--admin-text-main);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    min-height: 100vh;
}

/* Admin Layout Grid */
.admin-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background: var(--admin-sidebar-bg);
    color: var(--admin-sidebar-text);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    z-index: 100;
    overflow-y: auto;
}

.admin-sidebar-brand {
    padding: 22px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.3px;
}
.admin-sidebar-brand .brand-badge {
    background: linear-gradient(135deg, #2563eb, #0284c7);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.admin-nav {
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.admin-nav-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #475569;
    padding: 12px 12px 6px;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--admin-sidebar-text);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.15s ease;
}
.admin-nav-link:hover {
    background: var(--admin-sidebar-hover);
    color: #ffffff;
}
.admin-nav-link.is-active {
    background: var(--admin-primary);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.admin-sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Admin Main Content Area */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-x: hidden;
}

/* Top Navbar */
.admin-topbar {
    background: #ffffff;
    border-bottom: 1px solid var(--admin-border);
    padding: 14px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
}

.admin-content-body {
    padding: 32px;
    flex: 1;
}

/* Metric / Stat Cards */
.stat-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}
@media (max-width: 1200px) {
    .stat-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .stat-card-grid { grid-template-columns: 1fr; }
}

.stat-card {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.05);
}

.stat-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.stat-icon-blue { background: #eff6ff; color: #2563eb; }
.stat-icon-emerald { background: #ecfdf5; color: #059669; }
.stat-icon-amber { background: #fffbeb; color: #d97706; }
.stat-icon-purple { background: #faf5ff; color: #7c3aed; }

.stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--admin-text-main);
    line-height: 1.1;
}
.stat-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--admin-text-muted);
    margin-top: 4px;
}

/* Card Containers */
.admin-card {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    overflow: hidden;
    margin-bottom: 24px;
}
.admin-card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.admin-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--admin-text-main);
    margin: 0;
}
.admin-card-body {
    padding: 24px;
}

/* Admin Data Tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.admin-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11.5px;
    letter-spacing: 0.5px;
    padding: 12px 18px;
    text-align: left;
    border-bottom: 1px solid var(--admin-border);
}
.admin-table td {
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.admin-table tr:hover td {
    background: #f8fafc;
}

/* Status Badges */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    text-transform: capitalize;
}
.status-active, .status-delivered, .status-paid {
    background: #dcfce7;
    color: #166534;
}
.status-pending, .status-processing, .status-draft {
    background: #fef3c7;
    color: #92400e;
}
.status-shipped {
    background: #e0e7ff;
    color: #3730a3;
}
.status-inactive, .status-cancelled, .status-failed {
    background: #fee2e2;
    color: #991b1b;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: #ffffff;
    font-size: 14px;
    color: #0f172a;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Design Studio Cards Grid */
.theme-studio-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}
@media (max-width: 992px) {
    .theme-studio-grid { grid-template-columns: 1fr; }
}

.theme-studio-card {
    background: #ffffff;
    border: 2px solid var(--admin-border);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}
.theme-studio-card.is-active-theme {
    border-color: var(--admin-primary);
    box-shadow: 0 10px 30px -5px rgba(37, 99, 235, 0.15);
}

.theme-preview-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #f1f5f9;
}

/* Customizer Editor Split */
.customizer-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 24px;
    height: calc(100vh - 120px);
}
.customizer-sidebar-panel {
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    overflow-y: auto;
    padding: 24px;
}
.customizer-preview-frame-wrap {
    background: #0f172a;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.preview-header-bar {
    background: #1e293b;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #cbd5e1;
    font-size: 13px;
}
.preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #ffffff;
}
