/* 
  ENTRE LANAS Y PRINCESAS - ADMIN UI
  Estética Boutique, limpia y alineada con la tienda principal.
*/

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

:root {
    /* Brand Colors (Matched with style.css) */
    --primary: #4B2E83;
    --primary-light: #6240a5;
    --primary-bg: #f5f3f9; /* Soft purple tint for backgrounds */
    --accent: #E05A3D;
    
    /* Surfaces & Layout */
    --bg-main: #F9FAFB; /* Very soft off-white/gray */
    --bg-surface: #FFFFFF;
    --sidebar-width: 260px;
    
    /* Text */
    --text-main: #1F2937;
    --text-muted: #6B7280;
    
    /* UI Elements */
    --border: #E5E7EB;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    
    /* State */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', 'Inter', sans-serif;
    color: #111827;
}

/* ================= LAYOUT ================= */
.admin-container {
    display: flex;
    min-height: 100vh;
}

/* ================= SIDEBAR (Light & Clean) ================= */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    padding: 1.25rem 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.sidebar-header img {
    display: block;
}

.sidebar-header span {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.sidebar-menu {
    flex: 1;
    padding: 1.5rem 1rem;
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 4px;
    gap: 12px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    text-decoration: none;
}

.sidebar-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    color: #9ca3af;
    transition: color 0.2s ease;
}

.sidebar-link:hover {
    background: var(--bg-main);
    color: var(--text-main);
}

.sidebar-link:hover i {
    color: var(--primary-light);
}

.sidebar-link.active {
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 600;
}

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

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    background: #fafafa;
}

/* ================= MAIN CONTENT ================= */
.main-content {
    flex: 1;
    padding: 2.5rem 3rem;
    max-width: 1400px;
}

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 5px;
}

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

.stat-card {
    background: var(--bg-surface);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1.2rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

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

.stat-info h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2px;
    font-family: 'Inter', sans-serif;
}

.stat-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ================= PANELS & CARDS ================= */
.panel {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

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

.panel-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #111827;
}

/* DASHBOARD SPECIFIC */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* ================= TABLES (Elegant) ================= */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    text-align: left;
    padding: 12px 15px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
}

.admin-table td {
    padding: 15px;
    font-size: 0.9rem;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

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

/* ================= FORMS ================= */
.form-group { margin-bottom: 1.5rem; }
.form-label { 
    display: block; 
    margin-bottom: 0.5rem; 
    font-weight: 600; 
    font-size: 0.85rem; 
    color: #374151; 
}

.form-control, .form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: #1f2937;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: all 0.2s;
    outline: none;
}

.form-control:focus, .form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

/* ================= BUTTONS ================= */
.btn {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover { 
    background: var(--primary-dark); 
}

.btn-outline {
    background: transparent;
    color: #374151;
    border-color: #d1d5db;
}

.btn-outline:hover {
    background: #f3f4f6;
    color: #111827;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* ================= BADGES ================= */
.badge { 
    padding: 4px 10px; 
    border-radius: 20px; 
    font-size: 0.75rem; 
    font-weight: 600; 
}
.badge-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.badge-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.badge-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* ================= CUSTOMIZER (settings.php) ================= */
.customizer-wrapper { 
    display: flex; 
    background: var(--bg-surface); 
    border-radius: var(--radius-md); 
    overflow: hidden; 
    border: 1px solid var(--border); 
    min-height: 600px;
}
.customizer-nav { 
    width: 260px; 
    background: #fafafa; 
    border-right: 1px solid var(--border); 
    padding: 1.5rem 1rem; 
}
.nav-item { 
    padding: 12px 16px; 
    border-radius: var(--radius-sm); 
    margin-bottom: 6px; 
    cursor: pointer; 
    font-weight: 500; 
    font-size: 0.9rem;
    color: var(--text-muted); 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    transition: 0.2s; 
}
.nav-item:hover { 
    background: #f3f4f6; 
    color: var(--text-main); 
}
.nav-item.active { 
    background: var(--primary-bg); 
    color: var(--primary); 
    font-weight: 600;
}
.customizer-body { flex: 1; padding: 2.5rem; overflow-y: auto; }
.pane { display: none; }
.pane.active { display: block; animation: fadeIn 0.3s ease; }

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

.banner-mock { 
    width: 100%; height: 200px; border-radius: var(--radius-md); background-size: cover; background-position: center; 
    margin-bottom: 2rem; display: flex; align-items: center; justify-content: center; color: white; 
    text-align: center; position: relative; overflow: hidden; 
    border: 1px solid var(--border);
}
.banner-mock::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.3); }
.banner-mock div { position: relative; z-index: 2; padding: 20px; }

.btn-save-float { 
    position: fixed; bottom: 30px; right: 30px; background: var(--primary); color: white; 
    border: none; padding: 14px 28px; border-radius: 30px; font-weight: 600; font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(75, 46, 131, 0.3); cursor: pointer; transition: 0.2s; z-index: 100; 
}
.btn-save-float:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 6px 15px rgba(75, 46, 131, 0.4); }

/* ================= RESPONSIVE ================= */
@media (max-width: 1024px) { 
    .dashboard-grid { grid-template-columns: 1fr; } 
}
@media (max-width: 768px) {
    .admin-container { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: static; border-right: none; border-bottom: 1px solid var(--border); }
    .sidebar-header { padding: 0.75rem 1rem; }
    .sidebar-menu { display: flex; overflow-x: auto; padding: 0.5rem; gap: 8px; border-bottom: 1px solid #f3f4f6; }
    .sidebar-link { padding: 8px 12px; margin-bottom: 0; font-size: 0.85rem; }
    .sidebar-link span { display: none; }
    .sidebar-footer { display: none; }
    .main-content { padding: 1.25rem; }
}


/* New Inventory Utilities */
.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-icon:hover { transform: scale(1.05); }

.btn-text {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 6px;
    transition: 0.2s;
    text-decoration: none;
}
.btn-text:hover { background: #f3f4f6; color: var(--text-main); }

