:root {
    --primary: #D40026;
    --primary-bg: #800018;
    --secondary: #111111;
    --accent: #FFD700;
    --surface: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --text: #ffffff;
    --text-dim: #a0a0a0;
    --bg: #000000;
    --radius: 12px;
    --p-sm: 8px;
    --p-md: 16px;
    --p-lg: 24px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, .logo-text {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -1px;
}

/* Glassmorphism */
.glass {
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.sticky {
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Header */
header {
    height: 80px;
    display: flex;
    align-items: center;
    padding: 0 var(--p-md);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo-text {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
}

.badge {
    background: var(--primary);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    margin-left: 10px;
}

/* Icon Buttons */
.icon-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px;
    border-radius: var(--radius);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

#cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary);
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

/* Loader */
.loader-container {
    height: 50vh;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.app-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.4s ease, visibility 0.4s;
}

.app-loader-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(238, 29, 35, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: rotate 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes rotate {
    to { transform: rotate(360deg); }
}

/* Public Menu Area */
.category-bar {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: var(--p-md);
    scrollbar-width: none;
    background: var(--bg);
}

.category-bar::-webkit-scrollbar { display: none; }

.category-item {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 30px;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dim);
    cursor: pointer;
    transition: var(--transition);
}

.category-item.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Product Cards */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--p-md);
    padding: var(--p-md);
}

.product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.product-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: var(--p-md);
}

.product-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.product-desc {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 15px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--accent);
}

.product-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Sidebar (Cart) */
.sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: #0a0a0a;
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

.sidebar.active {
    right: 0;
}

.sidebar-header {
    padding: var(--p-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: var(--p-md);
}

.sidebar-footer {
    padding: var(--p-md);
    background: var(--surface);
}

.total-area {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
}

/* Form Styles */
.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

input, textarea, select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: white;
    padding: 12px;
    border-radius: var(--radius);
    outline: none;
    font-family: inherit;
    transition: var(--transition);
}

input:focus, textarea:focus {
    border-color: var(--primary);
}

.btn {
    padding: 14px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

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

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

.full-width {
    width: 100%;
}

/* Responsive */
@media (max-width: 600px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* Landing Hero */
.landing-hero {
    text-align: center;
    max-width: 800px;
    margin: 50px auto;
}

.landing-hero h1 {
    font-size: 3.5rem;
    background: linear-gradient(135deg, #fff, #D40026);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.landing-links ul {
    list-style: none;
    padding: 0;
}

.landing-links li {
    margin: 10px 0;
    font-size: 1.2rem;
}

/* Admin Dashboard Styles */
.admin-container {
    max-width: 1000px;
    margin: 0 auto;
}

.admin-grid {
    display: grid;
    gap: 20px;
}

.store-card-admin {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--surface);
    border-radius: var(--radius);
    padding: var(--p-md);
}

.admin-store-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.admin-store-main {
    flex: 1;
}

.status-tag {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-right: 15px;
}

.status-tag.active {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.status-tag.inactive {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.btn.danger { background: #e74c3c !important; }
.btn.success { background: #2ecc71 !important; }

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--surface);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: slideUp 0.3s ease-out;
    font-weight: 600;
}

.toast.success { border-left: 4px solid var(--primary); }
.toast.error { border-left: 4px solid #e74c3c; }

.toast.fade-out {
    opacity: 0;
    transform: translateY(20px);
    transition: 0.5s;
}

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

/* Utilities */
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 32px; }
.p-md { padding: 16px; }
.p-lg { padding: 32px; }

.error-container {
    text-align: center;
    max-width: 500px;
    margin: 100px auto;
}

.error-icon {
    width: 64px;
    height: 64px;
    color: var(--primary);
    margin-bottom: 20px;
}

/* Misc */
hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}
/* Enterprise Admin Layout Styles */
#app.admin-layout {
    background-color: #f5f5f5;
    color: #333;
    min-height: 100vh;
}

#app.admin-layout #main-header {
    display: none; /* We use a custom sidebar/topbar in admin */
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 200px;
    background-color: #337ab7;
    color: white;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.logo-icon {
    width: 24px;
    height: 24px;
}

.sidebar-nav {
    padding-top: 20px;
}

.nav-item {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.nav-item:hover {
    background: rgba(0,0,0,0.1);
}

.nav-item.active {
    background: rgba(0,0,0,0.15);
}

.nav-item i {
    width: 18px;
    height: 18px;
}

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

.admin-top-bar {
    height: 50px;
    background: #337ab7;
    color: white;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 20px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}

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

.hamburger-menu {
    display: none;
}

.page-title h1 {
    font-size: 1.8rem;
    font-weight: 400;
    color: #444;
    margin-bottom: 5px;
}

.page-title h1 small {
    font-size: 1rem;
    color: #777;
    margin-left: 10px;
}

/* Breadcrumb */
.breadcrumb {
    background: #eeeeee;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #777;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 25px;
}

.bc-icon {
    width: 14px;
    height: 14px;
}

.bc-current {
    color: #333;
}

.bc-divider {
    color: #ccc;
}

/* Table Card */
.table-container {
    background: white;
    border: 1px solid #ddd;
    border-radius: 0;
    padding: 20px;
    box-shadow: none;
    overflow-x: auto;
}

.table-header-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
}

.search-area {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

#admin-search {
    border: 1px solid #ccc;
    padding: 5px 10px;
    border-radius: 0;
    background: white;
    color: #333;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.admin-table th {
    background: #f9f9f9;
    padding: 12px 10px;
    text-align: left;
    border-bottom: 2px solid #ddd;
    font-weight: 600;
    border-right: 1px solid #ddd;
}

.admin-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
    border-right: 1px solid #ddd;
    color: #444;
}

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

.admin-table .center {
    text-align: center;
}

.action-icon {
    width: 18px;
    height: 18px;
    cursor: pointer;
    color: #333;
}

.login-link {
    color: #337ab7;
    text-decoration: none;
    font-weight: bold;
}

.access-icon-container {
    width: 32px;
    height: 32px;
    background: #f5f5f5;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.table-logo {
    width: 24px;
    height: 24px;
    object-fit: cover;
}

.company-name {
    font-weight: 600;
}

.user-cell {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
}

.user-email {
    color: #777;
    font-size: 0.75rem;
}

.store-type {
    font-weight: bold;
}

.date-cell {
    white-space: nowrap;
}

/* ==========================================================================
   ESTILOS DE MODALES Y COMPONENTES ADMINISTRATIVOS
   ========================================================================== */
.admin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.admin-modal-overlay.active {
    display: flex;
}

.admin-modal {
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    animation: zoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
    background: #f5f5f5;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.2rem;
    color: #444;
}

.modal-form {
    padding: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #666;
}

.form-group input, .form-group select {
    border: 1px solid #ddd;
    color: #333;
    padding: 10px;
    background: #fff;
    border-radius: 4px;
}

.status-pill {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.status-pill.active {
    background: #e1f7e1;
    color: #27ae60;
    border: 1px solid #27ae60;
}

.status-pill.expired {
    background: #ffebeb;
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.table-actions-flex .action-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: 0.2s;
    background: #f8f9fa;
    border: 1px solid #eee;
    padding: 5px;
}

.table-actions-flex .action-icon:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.table-actions-flex .action-icon.view { color: #3498db; }
.table-actions-flex .action-icon.edit { color: #f39c12; }
.table-actions-flex .action-icon.reset { color: #9b59b6; }
.table-actions-flex .action-icon.delete { color: #e74c3c; }

/* ==========================================================================
   DASHBOARD Y ESTADÍSTICAS (MEJORAS VISUALES)
   ========================================================================== */
.admin-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header-tools {
    display: flex;
    gap: 15px;
    align-items: center;
}

.caja-diaria {
    background: white;
    padding: 8px 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
    display: flex;
    flex-direction: column;
}

.caja-label {
    font-size: 0.65rem;
    color: #999;
    font-weight: 700;
}

.caja-value {
    font-size: 1.1rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
}

.info-banner {
    background: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px !important; /* Spacing adjusted */
}

/* VISTA DETALLADA DEL DASHBOARD (GRÁFICO + LISTADO) */
.dashboard-detail-view {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

@media (max-width: 900px) {
    .dashboard-detail-view { flex-direction: column; }
    .detail-chart-wrapper { max-width: 100% !important; }
}

.detail-chart-wrapper {
    flex: 2;
    max-width: 60%;
    height: 320px;
    background: #fff;
}

.detail-list-wrapper {
    flex: 1;
    background: #fdfdfd;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #eee;
    max-height: 320px;
    overflow-y: auto;
}

.detail-list-header {
    font-size: 0.72rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
}

.detail-list-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 0.85rem;
}

.detail-list-item:last-child {
    border-bottom: none;
}

.detail-list-label {
    font-weight: 500;
    color: #444;
}

.detail-list-value {
    color: #337ab7;
    font-weight: 700;
}

.date-filter.compact-calendar {
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.date-filter input {
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
    font-size: 0.82rem;
    font-weight: 600;
    color: #333;
    width: 160px;
    cursor: pointer;
}

.stat-icon-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.stat-icon-circle i {
    width: 20px;
    color: white;
}

.stat-icon-circle.blue { background: #3498db; }
.stat-icon-circle.green { background: #2ecc71; }
.stat-icon-circle.yellow { background: #f1c40f; }

.dashboard-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.chart-mini-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.chart-mini-card:hover {
    border-color: #337ab7;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transform: translateY(-3px);
}

.chart-mini-card h2 {
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 5px;
}

.chart-mini-card p {
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 20px;
    line-height: 1.4;
}

.mini-chart-preview {
    height: 100px;
    width: 100%;
    background: #f9f9f9;
    border-radius: 4px;
    overflow: hidden;
    pointer-events: none;
}

#dashboard-main-chart {
    width: 100% !important;
    height: 100% !important;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.btn.success {
    background: #2ecc71 !important;
}

.table-header-actions .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* LOGIN button in table */
.login-btn-link {
    background: transparent;
    border: none;
    color: #337ab7;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 5px 10px;
}

.login-btn-link:hover {
    text-decoration: underline;
}

/* Login Card (Image Reference) */
.login-card {
    width: 100%;
    max-width: 450px;
    background: white;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    border-radius: 8px;
    overflow: hidden;
    animation: zoomIn 0.3s ease-out;
}

.login-header-blue {
    background-color: #337ab7;
    color: white;
    padding: 12px;
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.login-header-gray {
    background-color: #555;
    color: white;
    padding: 8px;
    text-align: center;
    font-style: italic;
    font-weight: 400;
}

.login-logo-circle {
    width: 100px;
    height: 100px;
    background: #004b63;
    border-radius: 50%;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.login-logo-img {
    width: 40px;
    height: 40px;
}

.logo-txt {
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 2px;
}

.input-with-icon {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.icon-box {
    width: 45px;
    background: #f8f8f8;
    border-right: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.input-with-icon input {
    flex: 1;
    border: none !important;
    padding: 12px !important;
    font-size: 1rem;
    color: #333;
    background: white !important;
}

.btn-ingresar {
    width: 100%;
    background: #1e88e5;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-ingresar:hover {
    background: #1565c0;
}

.login-footer-bar {
    height: 8px;
    background: linear-gradient(to right, #337ab7, #555);
}

/* Store Admin Dashboard Grid */
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

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

.stat-box h3 {
    font-family: 'Outfit', sans-serif;
}

/* Ultra-Compact Vertical List Sidebar - Micro Style */
.admin-sidebar {
    width: 220px; /* Slightly wider to show names fully */
}

.scrollable-nav {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    overflow-y: auto;
    max-height: calc(100vh - 80px);
}

.nav-section-title {
    font-size: 0.55rem;
    color: rgba(255,255,255,0.4);
    padding: 10px 15px 4px;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.scrollable-nav .nav-item {
    flex-direction: row;
    justify-content: flex-start;
    padding: 4px 15px;
    text-align: left;
    gap: 10px;
    background: transparent !important;
    border: none !important;
    transition: all 0.2s;
    border-radius: 0;
}

.scrollable-nav .nav-item i {
    width: 12px;
    height: 12px;
    opacity: 0.6;
}

.scrollable-nav .nav-item span {
    font-size: 0.7rem;
    font-weight: 400;
    white-space: normal; /* Full text */
    overflow: visible;
    text-overflow: unset;
    display: block;
    line-height: 1.2;
}

.scrollable-nav .nav-item:hover {
    background: rgba(255,255,255,0.06) !important;
}

.scrollable-nav .nav-item.active {
    background: rgba(255,255,255,0.1) !important;
    border-left: 2px solid #fff !important;
    padding-left: 13px;
}

.scrollable-nav .nav-item.active i {
    opacity: 1;
}

/* Scrollbar styling for cleanliness */
.scrollable-nav::-webkit-scrollbar { width: 3px; }
.scrollable-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); }

/* Stats Loading Animation */
.stats-updating {
    animation: statsFade 0.5s ease;
}

@keyframes statsFade {
    0% { opacity: 0.5; transform: translateY(5px); }
    100% { opacity: 1; transform: translateY(0); }
}

.date-filter input {
    cursor: pointer;
}

/* Header Tools & Caja Diaria */
.admin-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 10px;
}

.header-tools {
    display: flex;
    gap: 15px;
    align-items: center;
}

.caja-diaria {
    display: flex;
    flex-direction: column;
    padding: 10px 20px;
    border: 1px solid #eee;
    background: white;
}

.caja-label {
    font-size: 0.65rem;
    font-weight: bold;
    color: #888;
}

.caja-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: #2ecc71;
}

.date-filter {
    display: flex;
    align-items: center;
    background: white;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    gap: 10px;
    height: 48px;
}

.date-filter i {
    width: 18px;
    color: #337ab7;
}

.date-filter input {
    border: none !important;
    padding: 0 !important;
    font-size: 0.85rem;
    color: #555;
    background: white !important;
    width: 180px;
}

/* Dropdown User Profile */
.user-profile.dropdown {
    position: relative;
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: white;
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 10;
    border-radius: 4px;
    margin-top: 10px;
}

.user-profile.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.user-profile.dropdown:hover .dropdown-content {
    display: block;
}

/* Stats Styling Refinement */
.stat-box {
    display: flex;
    align-items: center;
    gap: 20px;
    background: white;
    border: 1px solid #eee;
}

.stat-icon {
    width: 48px;
    height: 48px;
    padding: 10px;
    border-radius: 8px;
}

.stat-icon.blue { background: #e3f2fd; color: #2196f3; }

/* Product Details Modal Styling */
.product-details-modal {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.product-details-modal .modal-content {
    animation: slideUp 0.4s ease-out;
}

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

.extras-selection-list label {
    transition: background 0.2s;
}

.extras-selection-list label:hover {
    background: #f9f9f9;
}

.extras-selection-list input[type="checkbox"] {
    accent-color: #ff4500;
}

/* Scrollbar for extras list */
.extras-selection-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.extras-selection-list::-webkit-scrollbar {
    width: 6px;
}

.extras-selection-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.extras-selection-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.extras-selection-list::-webkit-scrollbar-thumb:hover {
    background: #888;
}
.stat-icon.green { background: #e8f5e9; color: #4caf50; }
.stat-icon.yellow { background: #fffde7; color: #fbc02d; }

.info-banner {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    background: #fdfdfd;
    border: 1px solid #eee;
    color: #666;
    border-left: 4px solid #337ab7;
}

/* Compact Config View Styles */
.form-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.form-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.span-2 { grid-column: span 2; }
.span-4 { grid-column: span 4; }

.section-title-line {
    font-size: 1rem;
    font-weight: 700;
    color: #444;
    border-bottom: 2px solid #337ab7;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.locked-input {
    background-color: #f5f5f5 !important;
    color: #888;
    cursor: not-allowed;
    border-color: #ddd !important;
}

.logo-config-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    grid-column: span 4;
}

.logo-preview-container {
    position: relative;
    width: 80px;
}

.remove-logo {
    position: absolute;
    top: -5px;
    right: -25px;
    background: #e74c3c;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
}

.whatsapp-group {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0 10px;
    background: white;
    height: 48px;
}

.whatsapp-group input {
    border: none !important;
    padding: 0 !important;
    height: 100% !important;
}

.rich-editor-sim {
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
}

.editor-toolbar {
    background: #efefef;
    padding: 8px 15px;
    display: flex;
    gap: 15px;
    border-bottom: 1px solid #ddd;
    font-size: 0.8rem;
    color: #666;
    align-items: center;
}

.editor-toolbar i { width: 14px; cursor: pointer; }

/* Toggles */
.toggle-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #555;
    font-size: 0.9rem;
}

.toggle-switch {
    width: 45px;
    height: 22px;
    background: #ccc;
    border-radius: 50px;
    position: relative;
    cursor: pointer;
    transition: 0.3s;
}

.toggle-switch .handle {
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: 0.3s;
}

.toggle-switch.active { background: #337ab7; }
.toggle-switch.active .handle { left: 25px; }

.color-picker-sim {
    width: 100%;
    height: 35px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.center-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-footer {
    border-top: 1px solid #eee;
    padding-top: 20px;
    display: flex;
    justify-content: flex-start;
}
.whatsapp-selector {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    padding: 0 10px;
    min-width: 120px;
    height: 48px;
    cursor: pointer;
}

.country-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 250px;
    background: white;
    border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
    border-radius: 4px;
}

.whatsapp-selector:hover .country-dropdown {
    display: block;
}

.country-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    transition: 0.2s;
    font-size: 0.85rem;
    color: #333; /* Dark text for visibility */
}

.country-item:hover {
    background: #f5f5f5;
}

.country-item img { width: 20px; }
.country-code { font-weight: bold; color: #666; margin-left: auto; }

/* Legibility Fixes */
.form-group label {
    color: #444 !important; /* Force dark label */
    font-weight: 600;
    margin-bottom: 5px;
}

.form-group input, .form-group select {
    color: #333 !important; /* Dark text in inputs */
    border: 1px solid #ccc !important;
}

.form-group input::placeholder {
    color: #999;
}

/* Color Picker Container */
.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #ccc;
    padding: 5px 10px;
    border-radius: 4px;
    background: #f9f9f9;
}

.color-picker-wrapper input[type="color"] {
    width: 30px;
    height: 30px;
    border: none;
    padding: 0;
    cursor: pointer;
    background: none;
}

/* Toggles Update */
.toggle-switch {
    background: #e0e0e0;
}

.toggle-switch.active {
    background: #2ecc71; /* Green for active */
}

/* Map refinements */
.map-search-bar {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    z-index: 5;
}

.map-search-bar input {
    flex: 1;
    background: white !important;
    padding: 8px 15px !important;
    height: 35px !important;
    font-size: 0.8rem !important;
}

/* Action Icons Styling */
.action-icon.reset {
    color: #333;
}
.action-icon.reset:hover {
    color: #337ab7;
    transform: rotate(-45deg);
}

.action-icon.delete {
    color: #333;
}
.action-icon.delete:hover {
    color: #d40026;
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}
/* REPOSNSIVE ADJUSTMENTS */
@media (max-width: 1024px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar-nav {
        display: none; /* We would need a hamburger menu for admin on mobile */
    }
}

@media (max-width: 768px) {
    :root {
        --p-md: 15px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .header-container {
        padding: 0 15px;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .action-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    /* Admin specific mobile */
    .admin-wrapper {
        position: relative;
    }

    .admin-sidebar {
        position: fixed;
        left: -200px; /* Hidden by default */
        top: 0;
        bottom: 0;
        z-index: 1500;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 10px 0 30px rgba(0,0,0,0.2);
    }

    .admin-wrapper.sidebar-active .admin-sidebar {
        left: 0;
    }

    /* Overlay when sidebar is open */
    .admin-wrapper.sidebar-active::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        backdrop-filter: blur(2px);
        z-index: 1400;
        animation: fadeIn 0.3s ease;
    }

    .admin-main {
        width: 100%;
        min-width: 100%;
    }

    .admin-top-bar {
        padding: 0 15px;
        justify-content: space-between !important;
    }

    .hamburger-menu {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        color: white;
        cursor: pointer;
    }

    .subscription-countdown {
        display: none !important; /* Hide on very small screens to save space, or make it smaller */
    }
    
    .admin-body {
        padding: 15px;
    }
    
    .form-grid-4, .form-grid-3, .form-grid-2 {
        grid-template-columns: 1fr !important;
    }
    
    .span-2, .span-4 {
        grid-column: span 1 !important;
    }

    .store-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .store-stats {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .product-modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 15px;
    }

    .category-item {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Premium Loader */
.app-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

.app-loader-overlay .spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(238, 29, 35, 0.1);
    border-top: 4px solid #ee1d23;
    border-radius: 50%;
    animation: spin-loader 1s linear infinite, pulse-red 2s ease-in-out infinite;
}

@keyframes pulse-red {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(238, 29, 35, 0.2); }
    50% { transform: scale(1.05); box-shadow: 0 0 40px rgba(238, 29, 35, 0.4); }
}

@keyframes spin-loader {
    to { transform: rotate(360deg); }
}

/* Red Banner Degrade (Horizontal Black-Red-Black) - EXACT REPLICA OF "POSTA" */
.social-banner-radial {
    background: #000 !important;
    background: linear-gradient(90deg, #000 0%, #000 10%, #ee1d23 50%, #000 90%, #000 100%) !important;
    padding: 12px 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 30px !important;
    margin: 0 !important;
    min-height: 75px !important;
    width: 100% !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 2px solid #000;
    z-index: 100;
    position: relative;
    overflow: hidden;
}

.social-icon-circle {
    background: #ffffff !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6) !important;
    text-decoration: none !important;
    border: none !important;
    outline: none !important;
    flex-shrink: 0 !important;
}

/* Specificity boost for the icons inside the circles */
.social-icon-circle i, 
.social-icon-circle svg,
.social-icon-circle .lucide {
    width: 22px !important;
    height: 22px !important;
    color: #ee1d23 !important;
    stroke: #ee1d23 !important;
    stroke-width: 2.5px !important;
    fill: none !important;
}

.social-icon-circle:hover {
    transform: translateY(-5px) scale(1.15) !important;
    box-shadow: 0 10px 25px rgba(238, 29, 35, 0.5) !important;
    background: #ffffff !important;
}

/* Ensure icons are centered */
.social-icon-circle svg {
    display: block;
    margin: auto;
}
/* Admin Action Login Button */
.btn-action-login {
    background: #3498db;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 auto;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}

.btn-action-login:hover {
    background: #2980b9;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.5);
}

.btn-action-login i {
    width: 16px;
    height: 16px;
}


/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 9999;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    color: #fff;
}

.whatsapp-float i {
    width: 32px;
    height: 32px;
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    .whatsapp-float i {
        width: 26px;
        height: 26px;
    }
}
