:root {
    --primary: #E63946;
    --secondary: #F4A261;
    --accent: #2A9D8F;
    --dark: #5D4037;
    --light: #FFF8E7;
    --white: #FFFFFF;
    --gray: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --info: #17a2b8;
    --warning: #ffc107;
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
    --shadow-hover: 0 20px 40px rgba(0,0,0,0.12);
    --border-radius: 20px;
    --border-radius-sm: 12px;
    --border-radius-lg: 50px;
    --transition: all 0.3s ease;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Poppins', sans-serif; line-height: 1.6; color: var(--dark); background-color: var(--light); min-height: 100vh; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* === HEADER === */
header { background: linear-gradient(135deg, var(--dark) 0%, var(--secondary) 100%); color: var(--white); padding: 1rem 0; position: fixed; width: 100%; top: 0; z-index: 1000; box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
nav { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.6rem; font-weight: 800; color: var(--white); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.logo i { font-size: 2rem; color: var(--primary); }
.logo span { color: var(--primary); }
.nav-links { display: flex; gap: 1rem; list-style: none; align-items: center; }
.nav-links a { color: var(--white); text-decoration: none; font-weight: 500; transition: var(--transition); display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; border-radius: 8px; cursor: pointer; }
.nav-links a:hover, .nav-links a.active { background: rgba(255,255,255,0.15); color: var(--white); }
.mobile-menu { display: none; font-size: 1.5rem; cursor: pointer; color: var(--white); }

/* === MAIN === */
main { margin-top: 90px; padding: 2rem 0; flex: 1; }
.section-title { font-size: 1.8rem; margin: 0 0 1rem 0; color: var(--dark); display: flex; align-items: center; gap: 0.5rem; }
.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }

/* === TABS === */
.tabs-container { display: flex; gap: 1rem; margin-bottom: 2rem; border-bottom: 3px solid var(--light); padding-bottom: 0.5rem; }
.tab-btn { display: flex; align-items: center; gap: 0.5rem; padding: 0.8rem 1.2rem; background: transparent; border: none; border-radius: 12px 12px 0 0; font-family: inherit; font-size: 1rem; font-weight: 600; color: var(--gray); cursor: pointer; transition: all 0.3s ease; }
.tab-btn:hover { color: var(--dark); background: var(--light); }
.tab-btn.active { color: var(--primary); background: white; box-shadow: var(--shadow); }
.tab-content { display: none; animation: fadeIn 0.3s ease; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* === AVISO PREMIUM === */
.aviso-premium { background: linear-gradient(135deg, #FFF8E7, #FFE0B2); padding: 1rem 1.5rem; border-radius: var(--border-radius-sm); margin-bottom: 1.5rem; display: flex; align-items: center; gap: 1rem; color: var(--dark); font-weight: 600; border: 1px solid var(--secondary); }
.aviso-premium i { color: #FFD700; font-size: 1.5rem; }

/* === GRID PRODUCTOS === */
.products-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; }
.product-admin-card { background: var(--white); border-radius: var(--border-radius); overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); }
.product-admin-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-5px); }
.product-admin-img { height: 160px; background-size: cover; background-position: center; position: relative; background-color: #f5f5f5; display: flex; align-items: center; justify-content: center; }
.product-admin-img i.default-icon { font-size: 3rem; color: #ccc; }
.product-admin-info { padding: 1rem; }
.product-admin-info h4 { color: var(--dark); margin-bottom: 0.3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-admin-badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 20px; font-size: 0.7rem; font-weight: 700; margin-bottom: 0.5rem; background: var(--secondary); color: var(--dark); }
.product-admin-price { color: var(--primary); font-weight: 700; font-size: 1.1rem; }

/* === PEDIDOS === */
.pedidos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.pedido-card-tienda { background: var(--white); border-radius: var(--border-radius); padding: 1.5rem; box-shadow: var(--shadow); border-left: 5px solid var(--gray); }
.pedido-card-tienda.pendiente { border-left-color: var(--warning); }
.pedido-card-tienda.en-camino { border-left-color: var(--info); }
.pedido-card-tienda.entregado { border-left-color: var(--success); }
.pedido-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.pedido-id { font-weight: 700; color: var(--dark); font-size: 1.1rem; }
.estado-badge { padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; }
.estado-pendiente { background: var(--warning); color: #000; }
.estado-en-camino { background: var(--info); color: #fff; }
.estado-entregado { background: var(--success); color: #fff; }
.pedido-detalles p { margin-bottom: 0.4rem; font-size: 0.9rem; color: var(--gray); }
.pedido-detalles p strong { color: var(--dark); }
.pedido-productos { background: var(--light); padding: 0.8rem; border-radius: var(--border-radius-sm); margin-top: 0.8rem; font-size: 0.85rem; color: var(--dark); }

/* === BOTONES === */
.btn { padding: 0.8rem 1.8rem; border-radius: var(--border-radius-lg); text-decoration: none; font-weight: 600; transition: var(--transition); display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; border: none; cursor: pointer; font-family: inherit; font-size: 0.95rem; }
.btn-primary { background: var(--primary); color: var(--white); box-shadow: 0 4px 15px rgba(230,57,70,0.4); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 6px 25px rgba(230,57,70,0.5); }
.btn-secondary { background: transparent; color: var(--dark); border: 2px solid var(--dark); }
.btn-block { width: 100%; }

/* === LOGIN === */
.body-login { background: linear-gradient(135deg, var(--dark) 0%, var(--secondary) 100%); display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-box { background: var(--white); border-radius: 20px; padding: 40px; width: 100%; max-width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); text-align: center; }
.logo-login { font-size: 2rem; font-weight: 800; color: var(--dark); margin-bottom: 10px; display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; }
.logo-login span { color: var(--primary); }
.subtitle { color: var(--gray); margin-bottom: 30px; }
.rol-info { background: var(--light); padding: 15px; border-radius: 10px; margin-bottom: 20px; font-size: 0.85rem; color: var(--gray); }
.rol-info i { color: var(--accent); margin-right: 5px; }
.error { background: #ffebee; color: #c62828; padding: 12px; border-radius: 8px; font-size: 0.9rem; margin-bottom: 20px; display: none; }
.back-link { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--white); text-decoration: none; margin-top: 20px; font-size: 0.9rem; }
.form-group { margin-bottom: 1.2rem; text-align: left; }
.form-group label { display: flex; margin-bottom: 0.5rem; font-weight: 500; color: var(--dark); align-items: center; gap: 0.5rem; }
.form-group input { width: 100%; padding: 0.9rem 1rem; border: 2px solid #e0e0e0; border-radius: var(--border-radius-sm); font-family: inherit; font-size: 1rem; transition: var(--transition); }
.form-group input:focus { outline: none; border-color: var(--primary); }

/* === UTILITARIOS === */
.spinner { width: 50px; height: 50px; border: 4px solid var(--light); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .nav-links { display: none; position: absolute; top: 70px; left: 0; width: 100%; background: linear-gradient(135deg, var(--dark), var(--secondary)); flex-direction: column; padding: 1rem; text-align: center; gap: 0.5rem; border-radius: 0 0 16px 16px; z-index: 999; }
    .nav-links.active { display: flex; }
    .mobile-menu { display: block; }
    .nav-links a { color: var(--white); background: rgba(255,255,255,0.1); padding: 14px; border-radius: 10px; width: 100%; justify-content: center; }
    .nav-links a:hover { background: var(--primary); }
}