/* ==========================================
   Jewellery & Accessories Hub - Admin Styling
   ========================================== */

:root {
    --admin-sidebar-width: 260px;
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    --warning-color: #f1c40f;
}

/* Base Override for Dashboard Layout */
.admin-body {
    background-color: #f4f6f9;
    display: flex;
    min-height: 100vh;
    font-family: 'Montserrat', sans-serif;
    color: #333;
}

/* ==========================================
   Admin Login Screen
   ========================================== */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #272727 0%, #111111 100%);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 3.5rem 2.5rem;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    text-align: center;
    color: #fff;
}

.login-logo {
    margin-bottom: 2.5rem;
}

.login-logo h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    letter-spacing: 2px;
    color: #fff;
    text-transform: uppercase;
}

.login-logo p {
    font-size: 0.7rem;
    letter-spacing: 4px;
    color: #D4AF37;
    text-transform: uppercase;
}

.login-card label {
    text-align: left;
    color: #ccc;
    font-size: 0.75rem;
}

.login-card input {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    padding: 0.9rem 1.2rem;
    font-size: 0.95rem;
    border-radius: 6px;
    margin-top: 5px;
    width: 100%;
    transition: all 0.3s;
    font-family: 'Montserrat', sans-serif;
}

.login-card input:focus {
    border-color: #D4AF37;
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    outline: none;
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #F3E5AB 0%, #D4AF37 50%, #AA7C11 100%);
    color: #111;
    font-weight: 600;
    padding: 0.9rem;
    border-radius: 6px;
    margin-top: 2rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(212,175,55,0.2);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212,175,55,0.35);
}

.login-error {
    color: var(--danger-color);
    font-size: 0.8rem;
    margin-top: 15px;
    display: none;
}

/* ==========================================
   Admin Layout Sidebar
   ========================================== */
.admin-sidebar {
    width: var(--admin-sidebar-width);
    background-color: #111;
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    box-shadow: 4px 0 15px rgba(0,0,0,0.05);
}

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

.sidebar-brand .logo-text {
    color: #fff;
    font-size: 1.3rem;
}

.sidebar-menu {
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem 1.5rem;
    color: #aaa;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    border-left: 4px solid transparent;
}

.sidebar-link i {
    width: 20px;
    font-size: 1.1rem;
}

.sidebar-link:hover, .sidebar-link.active {
    color: #fff;
    background: rgba(255,255,255,0.03);
}

.sidebar-link.active {
    border-left-color: #D4AF37;
    color: #D4AF37;
    background: rgba(212, 175, 55, 0.05);
}

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

.logout-btn {
    width: 100%;
    background: rgba(231, 76, 60, 0.15);
    color: var(--danger-color);
    border: 1px solid rgba(231, 76, 60, 0.2);
    padding: 0.7rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

/* ==========================================
   Admin Content Panel
   ========================================== */
.admin-main {
    margin-left: var(--admin-sidebar-width);
    flex-grow: 1;
    padding: 2.5rem;
    min-height: 100vh;
}

@media (max-width: 992px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .admin-sidebar.active {
        transform: translateX(0);
    }
    .admin-main {
        margin-left: 0;
        padding: 1.5rem;
    }
    .menu-toggle-btn {
        display: block !important;
    }
}

.menu-toggle-btn {
    display: none;
    background: #111;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 150;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Admin Dashboard Header */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.admin-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: #111;
    font-weight: 600;
}

.admin-header p {
    color: #777;
    font-size: 0.9rem;
    margin-top: 5px;
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

/* ==========================================
   Dashboard Overview Analytics Cards
   ========================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-info h3 {
    font-size: 2rem;
    color: #111;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-info p {
    color: #777;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card:nth-child(1) .stat-icon {
    background: rgba(212, 175, 55, 0.1);
    color: #D4AF37;
}

.stat-card:nth-child(2) .stat-icon {
    background: rgba(46, 204, 113, 0.1);
    color: var(--success-color);
}

.stat-card:nth-child(3) .stat-icon {
    background: rgba(52, 152, 219, 0.1);
    color: var(--info-color);
}

.stat-card:nth-child(4) .stat-icon {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger-color);
}

/* ==========================================
   Admin Panels Content
   ========================================== */
.card-panel {
    background: #fff;
    border-radius: 12px;
    padding: 2.2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

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

.card-panel-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #111;
}

/* Common Table design */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

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

.admin-table th {
    padding: 1rem 1.2rem;
    background: #f8fafc;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}

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

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

.prod-thumb {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.admin-badge {
    padding: 4px 8px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.admin-badge-success { background: #dcfce7; color: #166534; }
.admin-badge-warning { background: #fef9c3; color: #854d0e; }
.admin-badge-danger { background: #fee2e2; color: #991b1b; }
.admin-badge-info { background: #e0f2fe; color: #0369a1; }

.action-btn-group {
    display: flex;
    gap: 8px;
}

.act-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    background: #f1f5f9;
}

.act-btn-edit { color: var(--info-color); }
.act-btn-edit:hover { background: var(--info-color); color: #fff; }

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

/* Category manage layout */
.cat-manage-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .cat-manage-container {
        grid-template-columns: 1fr;
    }
}

.cat-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    padding: 0.8rem 1.2rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-size: 0.9rem;
    font-weight: 500;
}

.cat-delete {
    color: var(--danger-color);
    cursor: pointer;
}

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

.admin-form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.admin-form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    outline: none;
    background: #fff;
}

.admin-form-control:focus {
    border-color: #D4AF37;
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.25);
}

.admin-checkbox-group {
    display: flex;
    gap: 2rem;
    margin: 1.5rem 0;
}

.admin-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-checkbox-item input {
    width: 16px;
    height: 16px;
    accent-color: #D4AF37;
}

/* Multiple Specs Rows Manager */
.specs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.spec-input-row {
    display: flex;
    gap: 10px;
}

.spec-key, .spec-val {
    flex: 1;
}

.spec-remove {
    background: var(--danger-color);
    color: #fff;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

/* Multiple image upload preview container */
.img-upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    margin-bottom: 1.5rem;
    position: relative;
}

.img-upload-zone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.img-upload-icon {
    font-size: 2.2rem;
    color: #94a3b8;
    margin-bottom: 10px;
}

.img-preview-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 15px;
}

.img-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

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

.img-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(231, 76, 60, 0.9);
    color: #fff;
    width: 20px;
    height: 20px;
    font-size: 0.65rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Dynamic slider panel for CRUD overlays */
.admin-slide-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 580px;
    height: 100%;
    background: #fff;
    z-index: 1000;
    box-shadow: -10px 0 30px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-slide-panel.active {
    right: 0;
}

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

.panel-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: #111;
}

.panel-close {
    font-size: 1.2rem;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-close:hover {
    background: #e2e8f0;
}

.panel-body {
    padding: 1.8rem;
    overflow-y: auto;
    flex-grow: 1;
}

.panel-footer {
    padding: 1.5rem 1.8rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #f8fafc;
}
