/*
 * Pushpa Almirah House - Admin Panel CMS Stylesheet
 * High-End Dark-Sidebar, Clean Light-Body CMS UI
 */

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

:root {
    --admin-primary: #0f172a;       /* Dark slate sidebar */
    --admin-sidebar-bg: #0f172a;
    --admin-sidebar-hover: #1e293b;
    --admin-accent: #d97706;        /* Warm Gold/Amber */
    --admin-accent-hover: #b45309;
    --admin-bg: #f1f5f9;            /* Cool gray background */
    --admin-card: #ffffff;
    --admin-text-main: #1e293b;
    --admin-text-muted: #64748b;
    --admin-border: #cbd5e1;
    
    --success: #15803d;             /* Dark Green */
    --error: #b91c1c;               /* Dark Red */
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    
    --transition: 0.2s ease-in-out;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--admin-bg);
    color: var(--admin-text-main);
    display: flex;
    min-height: 100vh;
}

/* Auth Login Layout */
.auth-body {
    justify-content: center;
    align-items: center;
    display: flex;
    width: 100vw;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.auth-card {
    background-color: var(--admin-card);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    color: var(--admin-primary);
    font-weight: 800;
}

.auth-logo span {
    color: var(--admin-accent);
}

.auth-title {
    font-size: 1.1rem;
    color: var(--admin-text-muted);
    margin-top: 0.5rem;
}

/* Sidebar Navigation */
.admin-sidebar {
    width: 260px;
    background-color: var(--admin-sidebar-bg);
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 10;
}

.sidebar-brand {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
}

.sidebar-logo span {
    color: var(--admin-accent);
}

.sidebar-sub {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--admin-text-muted);
}

.sidebar-menu {
    list-style: none;
    padding: 1.5rem 0.75rem;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-item {
    margin-bottom: 0.4rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    color: #94a3b8;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-link:hover,
.sidebar-link.active {
    background-color: var(--admin-sidebar-hover);
    color: #fff;
}

.sidebar-link.active i {
    color: var(--admin-accent);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Main Dashboard Panel Content */
.admin-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.admin-header {
    background-color: #fff;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
}

.admin-header-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 38px;
    height: 38px;
    background-color: var(--admin-accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.admin-content {
    padding: 2.5rem;
    flex-grow: 1;
}

/* Dashboard Summary Cards Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background-color: var(--admin-card);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

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

.stat-icon.products {
    background-color: rgba(217, 119, 6, 0.1);
    color: var(--admin-accent);
}

.stat-icon.categories {
    background-color: rgba(15, 23, 42, 0.1);
    color: var(--admin-primary);
}

.stat-icon.reviews {
    background-color: rgba(21, 128, 61, 0.1);
    color: var(--success);
}

.stat-details h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--admin-text-muted);
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 0.25rem;
    line-height: 1;
}

/* Custom Table Layouts */
.panel-card {
    background-color: var(--admin-card);
    border-radius: var(--radius-md);
    border: 1px solid #e2e8f0;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 1rem;
}

.panel-title {
    font-size: 1.15rem;
    font-weight: 600;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--admin-text-main);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--admin-border);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

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

select.form-control {
    background-color: #fff;
    cursor: pointer;
}

/* Alert Notification Boxes */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.alert-success {
    background-color: #dcfce7;
    color: var(--success);
    border: 1px solid #bbf7d0;
}

.alert-danger {
    background-color: #fee2e2;
    color: var(--error);
    border: 1px solid #fecaca;
}

/* Button UI Components */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--admin-primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--admin-sidebar-hover);
}

.btn-accent {
    background-color: var(--admin-accent);
    color: #fff;
}

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

.btn-secondary {
    background-color: #f1f5f9;
    color: var(--admin-text-main);
    border-color: #cbd5e1;
}

.btn-secondary:hover {
    background-color: #e2e8f0;
}

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

.btn-danger:hover {
    background-color: #991b1b;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Tables */
.admin-table-wrapper {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th {
    background-color: #f8fafc;
    font-weight: 600;
    padding: 1rem;
    border-bottom: 2px solid #cbd5e1;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--admin-text-muted);
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.95rem;
    vertical-align: middle;
}

.admin-table tr:hover td {
    background-color: #f8fafc;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

/* Image Upload Slots & Previews */
.image-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.image-preview-box {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-sm);
    border: 2px dashed var(--admin-border);
    overflow: hidden;
    position: relative;
    background-color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Action Controls Panel */
.actions-cell {
    display: flex;
    gap: 0.5rem;
}

/* Specifications Builder */
.spec-builder-row {
    display: grid;
    grid-template-columns: 1fr 1.2fr auto;
    gap: 1rem;
    margin-bottom: 0.75rem;
    align-items: center;
}

/* Custom Responsive layouts for dashboard */
@media (max-width: 992px) {
    body {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .sidebar-menu {
        display: flex;
        flex-wrap: wrap;
        padding: 1rem;
    }
    
    .sidebar-item {
        margin-right: 0.5rem;
        margin-bottom: 0.25rem;
    }
}
