/* ===================================
   PH Neutro - Custom CSS Design System
   Mobile-First Responsive Design
   =================================== */

/* === CSS Variables === */
:root {
    /* Colors - Modern Palette */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #ec4899;
    --secondary-dark: #db2777;
    --accent: #10b981;
    --accent-dark: #059669;

    /* Neutrals */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --sidebar-width: 260px;
    --topbar-height: 64px;
}

/* === Reset & Base Styles === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.5;
    color: var(--gray-900);
    background: var(--gray-50);
    overflow-x: hidden;
}

/* === Login Screen - Split Layout (Premium) === */
.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: row;
    background: var(--white);
    overflow: hidden;
}

/* Panel Izquierdo: Imagen */
.login-hero {
    flex: 1;
    background-image: url('logo.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    /* Sombras para fundir ligeramente con la capa derecha */
    box-shadow: inset -10px 0 30px rgba(0, 0, 0, 0.1);
}

/* Panel Derecho: Formulario y Fondo Blanco/Gris */
.login-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: var(--spacing-2xl);
    position: relative;
}

.login-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
    padding: var(--spacing-2xl);
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 10;
    transform: translateY(20px);
    opacity: 0;
    animation: slideUpFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFadeIn {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse-subtle {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.85;
        transform: scale(1.01);
    }
}

.animate-pulse-subtle {
    animation: pulse-subtle 3s infinite ease-in-out;
}

/* === Custom Scrollbar === */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

/* === Quick Amount Buttons V2 === */
.btn-quick-amount-v2 {
    padding: 8px 14px;
    background: white;
    border: 1.5px solid #eef2ff;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    color: #6366f1;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.btn-quick-amount-v2:hover {
    background: #f5f7ff;
    border-color: #6366f1;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.1);
}

.btn-quick-amount-v2:active {
    transform: translateY(0);
}

.login-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.login-header h1 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-sm);
}

.login-header p {
    color: var(--gray-600);
    font-size: var(--font-size-lg);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* Modifying inputs strictly for Login */
.login-form .form-group label {
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.85rem;
    margin-bottom: 6px;
    display: block;
}

.login-form input {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    width: 100%;
}

.login-form input:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    outline: none;
}

.login-form button[type="submit"] {
    margin-top: 10px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    border: none;
    border-radius: var(--radius-md);
    transition: transform 0.2s, box-shadow 0.2s;
}

.login-form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}


.login-footer {
    text-align: center;
    margin-top: var(--spacing-md);
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: var(--transition);
}

.login-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* === Información del Emprendimiento (Pie del Login) === */
.login-company-info {
    margin-top: 2.5rem;
    text-align: center;
    color: var(--gray-600);
    font-size: 0.75rem;
    max-width: 440px;
    animation: fadeIn 1.2s ease forwards;
    opacity: 0;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.login-company-info .company-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.login-company-info .company-phones {
    font-weight: 600;
    margin-top: 6px;
    color: var(--primary-dark);
}

/* === Responsive Layout (Móvil) === */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }

    .login-hero {
        flex: 0.4;
        /* Toma el 40% superior de la pantalla en móviles */
        min-height: 250px;
    }

    .login-side {
        flex: 0.6;
        padding: var(--spacing-lg);
    }
}

/* === App Container === */
.app-container {
    display: grid;
    grid-template-areas:
        "topbar topbar"
        "sidebar main";
    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-rows: var(--topbar-height) 1fr;
    min-height: 100vh;
}

/* === Topbar === */
.topbar {
    grid-area: topbar;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    z-index: 100;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-sm);
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    position: relative;
    transition: var(--transition);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    transition: var(--transition);
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

.app-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.topbar-center {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.branch-selector select {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    cursor: pointer;
    background: var(--white);
    transition: var(--transition);
}

.branch-selector select:hover {
    border-color: var(--primary);
}

.currency-toggle {
    display: flex;
    gap: var(--spacing-xs);
    background: var(--gray-100);
    padding: 4px;
    border-radius: var(--radius-md);
}

.currency-btn {
    padding: var(--spacing-xs) var(--spacing-md);
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: var(--font-size-sm);
    font-weight: 600;
    transition: var(--transition);
    color: var(--gray-600);
}

.currency-btn.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.topbar-right {
    display: flex;
    align-items: center;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.user-name {
    font-weight: 600;
    color: var(--gray-900);
}

.user-role {
    font-size: var(--font-size-xs);
    color: var(--gray-500);
    padding: 2px 8px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
}

/* === Sidebar === */
.sidebar {
    grid-area: sidebar;
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    overflow-y: auto;
    padding: var(--spacing-lg) 0;
}

.nav-menu {
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    color: var(--gray-700);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--gray-50);
    color: var(--primary);
}

.nav-item.active {
    background: var(--primary-light);
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1) 0%, transparent 100%);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

.nav-icon {
    font-size: var(--font-size-xl);
}

.nav-divider {
    height: 1px;
    background: var(--gray-200);
    margin: var(--spacing-md) var(--spacing-lg);
}

/* === Main Content === */
.main-content {
    grid-area: main;
    padding: var(--spacing-xl);
    overflow-y: auto;
    background: var(--gray-50);
}

.module {
    display: none;
}

.module.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.module-header {
    margin-bottom: var(--spacing-xl);
}

.module-header h2 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--spacing-xs);
}

.breadcrumb {
    font-size: var(--font-size-sm);
    color: var(--gray-500);
}

/* === Form Components === */
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.form-group label {
    font-weight: 500;
    color: var(--gray-700);
    font-size: var(--font-size-sm);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-family: var(--font-family);
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* === Buttons === */
.btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-800);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: var(--accent-dark);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-outline:hover {
    background: var(--gray-50);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-sm {
    padding: 6px 12px;
    font-size: var(--font-size-sm);
}

.btn-block {
    width: 100%;
}

/* === Cards === */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: var(--spacing-lg);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--gray-200);
}

.card-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--gray-900);
}

.card-body {
    color: var(--gray-700);
}

/* === Grid System === */
.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-cols-1 {
    grid-template-columns: repeat(1, 1fr);
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* === Tables === */
.table-container {
    overflow-x: auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--gray-50);
}

th {
    padding: var(--spacing-md);
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    font-size: var(--font-size-sm);
    border-bottom: 2px solid var(--gray-200);
}

td {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-900);
}

tr:hover {
    background: var(--gray-50);
}

/* === Toast Notifications === */
.toast-container {
    position: fixed;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    max-width: 400px;
}

.toast {
    background: var(--white);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--error);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

.toast.info {
    border-left: 4px solid var(--info);
}

/* === Loading Overlay === */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* === Responsive Design === */

/* Tablet */
@media (max-width: 1024px) {
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .topbar-center {
        gap: var(--spacing-sm);
    }

    .user-name {
        display: none;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 0;
        --topbar-height: 56px;
    }

    .app-container {
        grid-template-columns: 1fr;
        grid-template-areas:
            "topbar"
            "main";
    }

    .menu-toggle {
        display: block;
    }

    .sidebar {
        position: fixed;
        left: -100%;
        top: var(--topbar-height);
        bottom: 0;
        width: 280px;
        z-index: 999;
        transition: var(--transition);
        box-shadow: var(--shadow-xl);
    }

    .sidebar.open {
        left: 0;
    }

    .main-content {
        padding: var(--spacing-md);
    }

    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }

    .topbar {
        padding: 0 var(--spacing-md);
    }

    .app-title {
        font-size: var(--font-size-lg);
    }

    .currency-toggle {
        display: none;
    }

    .user-role {
        display: none;
    }

    .table-container {
        border-radius: var(--radius-md);
    }

    th,
    td {
        padding: var(--spacing-sm);
        font-size: var(--font-size-sm);
    }

    .toast-container {
        left: var(--spacing-md);
        right: var(--spacing-md);
        max-width: none;
    }
}

/* === Utility Classes === */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-1 {
    margin-bottom: var(--spacing-sm);
}

.mb-2 {
    margin-bottom: var(--spacing-md);
}

.mb-3 {
    margin-bottom: var(--spacing-lg);
}

.mt-1 {
    margin-top: var(--spacing-sm);
}

.mt-2 {
    margin-top: var(--spacing-md);
}

.mt-3 {
    margin-top: var(--spacing-lg);
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: var(--spacing-md);
}

.hidden {
    display: none;
}

.font-bold {
    font-weight: 700;
}

.text-primary {
    color: var(--primary);
}

.text-success {
    color: var(--success);
}

.text-error {
    color: var(--error);
}

.text-gray {
    color: var(--gray-600);
}

/* === Tabs === */
.tabs {
    display: flex;
    gap: var(--spacing-sm);
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 1px;
    overflow-x: auto;
}

.tab-btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--gray-600);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--primary);
    background: var(--gray-50);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

/* === Modals === */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--gray-900);
}

.modal-close {
    background: none;
    border: none;
    font-size: var(--font-size-xl);
    color: var(--gray-500);
    cursor: pointer;
}

.modal-body {
    padding: var(--spacing-lg);
}

.modal-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-md);
}

/* === EXTREME PRECISION MATCH POS (IMAGE FIDELITY) === */

.pos-dashboard {
    display: grid;
    grid-template-columns: 1fr 440px;
    gap: 24px;
    height: calc(100vh - 160px);
    padding: 0 10px;
    background-color: transparent;
    font-family: var(--font-family, 'Inter', sans-serif);
}

.pos-main-panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow: hidden;
}

/* Header Hierarchy */
.pos-header-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pos-title {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.pos-breadcrumb {
    font-size: 13px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pos-rate-tag {
    font-weight: 600;
    color: #64748b;
}

/* Search Area - IMAGE MATCH */
.pos-search-bar {
    display: flex;
    gap: 16px;
    align-items: center;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    transition: border-color 0.2s;
}

.search-input-wrapper:focus-within {
    border-color: #cbd5e1;
}

.search-icon {
    font-size: 14px;
    color: #94a3b8;
    margin-right: 10px;
}

.search-input-wrapper input {
    border: none;
    padding: 10px 0;
    font-size: 14px;
    color: #475569;
    width: 100%;
}

.search-input-wrapper input:focus {
    outline: none;
}

.category-select-wrapper {
    width: 180px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
}

.category-select-wrapper select {
    border: none;
    width: 100%;
    font-size: 13px;
    color: #475569;
    background: transparent;
}

.category-select-wrapper select:focus {
    outline: none;
}

/* Product Catalog Grid - 3 COLUMNS to balance with wider sidebar */
.pos-catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    overflow-y: auto;
    padding-bottom: 20px;
    padding-right: 4px;
}

.pos-product-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    padding: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
}

.pos-product-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.pos-product-card .card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.pos-product-card .p-code {
    font-size: 9px;
    font-weight: 500;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pos-product-card .p-stock {
    background: #f8fafc;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #475569;
}

.pos-product-card .p-name {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
}

.pos-product-card .p-price-usd {
    font-size: 16px;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 2px;
}

.pos-product-card .p-price-ves {
    font-size: 10px;
    font-weight: 500;
    color: #94a3b8;
}

.pos-product-card .p-wholesale {
    margin-top: 6px;
    font-size: 9px;
    font-weight: 600;
    color: #0d9488;
}

/* Sidebar - Dashboard Style */
.pos-side-panel {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: var(--font-family, 'Inter', sans-serif);
}

.side-panel-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
}

.side-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #334155;
    font-family: inherit;
}

.side-panel-badge {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 400;
}

.btn-limpiar-side {
    background: transparent;
    border: 1px solid #e2e8f0;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
}

.side-panel-body {
    flex: 1;
    overflow-y: auto;
}

/* Empty State - Minimalist */
.cart-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.cart-empty-icon {
    font-size: 40px;
    color: #e2e8f0;
    margin-bottom: 16px;
}

.cart-empty-text {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 4px;
}

.cart-empty-subtext {
    font-size: 11px;
    color: #cbd5e1;
}

.side-panel-footer {
    padding: 20px 24px;
    border-top: 1px solid #f1f5f9;
    background: #fdfdfd;
    font-family: inherit;
}

.footer-section {
    margin-bottom: 20px;
}

.footer-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.footer-label {
    font-size: 12px;
    color: #94a3b8;
    font-family: inherit;
}

.footer-link {
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

.footer-value-box {
    padding: 8px 0;
    font-size: 14px;
    color: #475569;
}

.switch-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.switch-label {
    font-size: 13px;
    color: #64748b;
    font-family: inherit;
}

.totals-group {
    border-top: 1px dotted #e2e8f0;
    padding-top: 16px;
    margin-bottom: 24px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.total-usd-val {
    font-size: 24px;
    font-weight: 900;
    color: #1e293b;
    font-family: inherit;
    letter-spacing: -0.5px;
}

#total-ves {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 600;
}

.btn-cobrar-premium {
    background: linear-gradient(135deg, #0d9488 0%, #059669 100%);
    color: white;
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    font-family: inherit;
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.3);
}

.btn-cobrar-premium:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(13, 148, 136, 0.4);
}

.btn-cobrar-premium:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-cobrar-premium i {
    font-size: 18px;
}

/* === PREMIUM CART INTERACTIONS (IMAGE FEEDBACK) === */

.qty-adjuster-premium {
    display: inline-flex;
    align-items: center;
    background: #f8fafc;
    border-radius: 20px;
    padding: 2px;
    gap: 4px;
    border: 1px solid #f1f5f9;
    vertical-align: middle;
}

.btn-qty-adj {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
}

.btn-qty-adj:hover {
    background: #f1f5f9;
    color: #0d9488;
}

.qty-val-display {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    min-width: 28px;
    text-align: center;
    user-select: none;
}

/* === CUSTOM QTY MODAL CSS === */
.pos-qty-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 2000;
}

.pos-qty-modal-container {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 380px;
    overflow: hidden;
    animation: posModalSlideUp 0.3s ease-out;
}

@keyframes posModalSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.pos-qty-modal-header {
    padding: 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    position: relative;
}

.pos-qty-modal-header-content {
    width: calc(100% - 30px);
}

.pos-qty-modal-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.pos-qty-modal-subtitle {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0.125rem 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pos-qty-modal-close {
    background: none;
    border: none;
    color: #94a3b8;
    padding: 0.375rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    line-height: 1;
}

.pos-qty-modal-close:hover {
    background: #e2e8f0;
    color: #475569;
}

.pos-qty-modal-body {
    padding: 1.5rem;
}

.pos-qty-modal-info {
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.25rem;
    border: 1px solid #f1f5f9;
}

.pos-qty-modal-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.pos-qty-modal-info-row:last-child {
    margin-bottom: 0;
}

.pos-qty-modal-info-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
}

.pos-qty-modal-info-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1e293b;
}

.pos-qty-modal-wholesale-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #2563eb;
}

.pos-qty-modal-wholesale-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: #2563eb;
}

.pos-qty-modal-field {
    margin-bottom: 1.25rem;
}

.pos-qty-modal-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.5rem;
}

.pos-qty-modal-input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    text-align: center;
    font-weight: 700;
    font-size: 1.125rem;
    color: #1e293b;
    outline: none;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.pos-qty-modal-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.pos-qty-modal-hint {
    font-size: 10px;
    text-align: center;
    color: #64748b;
    margin-top: 0.5rem;
}

.pos-qty-modal-presets {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.pos-qty-modal-preset-btn {
    padding: 0.375rem 0;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.pos-qty-modal-preset-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.pos-qty-modal-actions {
    display: flex;
    gap: 0.75rem;
}

.pos-qty-modal-btn-cancel {
    flex: 1;
    padding: 0.625rem 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.pos-qty-modal-btn-cancel:hover {
    background: #f8fafc;
}

.pos-qty-modal-btn-confirm {
    flex: 1;
    padding: 0.625rem 0;
    background: #2563eb;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.pos-qty-modal-btn-confirm:hover {
    background: #1d4ed8;
}

.pos-qty-modal-btn-icon {
    font-size: 1.125rem;
    line-height: 1;
}

.btn-remove-premium {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-remove-premium:hover {
    background: #fef2f2;
    color: #ef4444;
    border-color: #fee2e2;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e2e8f0;
    transition: .3s;
    border-radius: 20px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.toggle-switch input:checked+.toggle-slider {
    background-color: #0d9488;
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(16px);
}

/* === PAYMENT METHOD MODAL PREMIUM STYLES === */

.btn-payment-method {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
}

.btn-payment-method:hover {
    border-color: #5f9e91;
    background: #f0f9f7;
    transform: translateX(4px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.pm-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-payment-method:hover .pm-icon {
    background: white;
    box-shadow: inset 0 0 0 1px rgba(95, 158, 145, 0.2);
}

.pm-info {
    display: flex;
    flex-direction: column;
}

.pm-name {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

.pm-desc {
    font-size: 11px;
    color: #64748b;
}

/* Modal specific tweaks for POS */
.modal-body .w-full {
    width: 100%;
}

.modal-body .p-2 {
    padding: 0.5rem;
}

.modal-body .mb-4 {
    margin-bottom: 1rem;
}

.cursor-pointer {
    cursor: pointer;
}

/* === MULTI-PAYMENT MODAL ADDITIONAL STYLES === */

.btn-payment-mini {
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-payment-mini:hover {
    border-color: #5f9e91;
    background: #f0f9f7;
    color: #0d9488;
}

.btn-payment-mini.active {
    background: #0d9488;
    color: white;
    border-color: #0d9488;
}

#payment-amount:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
    outline: none;
}

.bg-orange-50 {
    background-color: #fffaf3;
}

.border-orange-200 {
    border-color: #fed7aa;
}

.text-orange-600 {
    color: #ea580c;
}

.text-orange-700 {
    color: #c2410c;
}

.text-orange-400 {
    color: #fb923c;
}

.bg-green-50 {
    background-color: #f0fdf4;
}

.border-green-200 {
    border-color: #bbf7d0;
}

.text-green-600 {
    color: #16a34a;
}

.text-green-700 {
    color: #15803d;
}

.text-green-400 {
    color: #4ade80;
}

.bg-slate-100 {
    background-color: #f1f5f9;
}

.border-slate-200 {
    border-color: #e2e8f0;
}


.btn-quick-amount {
    flex: 1;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-quick-amount:hover {
    border-color: #5f9e91;
    color: #5f9e91;
    background: #f0f9f7;
}

/* === Utility classes used by JS modules === */

/* Badge backgrounds */
.bg-green-100 {
    background-color: #dcfce7;
}

.bg-red-100 {
    background-color: #fee2e2;
}

.bg-orange-100 {
    background-color: #ffedd5;
}

.bg-blue-100 {
    border-color: #bfdbfe;
}

/* Light backgrounds */
.bg-blue-50 {
    background-color: #eff6ff;
}

.bg-red-50 {
    background-color: #fef2f2;
}

/* Text colors */
.text-blue-800 {
    color: #1e40af;
}

.text-green-800 {
    color: #166534;
}

.text-orange-800 {
    color: #9a3412;
}

/* Arbitrary value utilities */
.text-\[11px\] {
    font-size: 11px;
}

.min-h-\[40px\] {
    min-height: 40px;
}

.w-6 {
    width: 1.5rem;
}

.h-6 {
    height: 1.5rem;
}

/* === Caja Status Grid === */
.caja-status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* === POS Mobile Responsive Layout === */
@media (max-width: 1024px) {
    .pos-dashboard {
        grid-template-columns: 1fr;
        height: auto;
        gap: 20px;
    }
    
    .pos-main-panel {
        order: 1;
        overflow: visible;
    }
    
    .pos-side-panel {
        order: 2;
        margin-bottom: 20px;
    }
    
    .pos-catalog-grid {
        grid-template-columns: repeat(3, 1fr);
        max-height: 50vh;
        overflow-y: auto;
        padding-right: 5px;
    }
}

@media (max-width: 768px) {
    .pos-catalog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .caja-status-grid {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .pos-catalog-grid {
        grid-template-columns: 1fr;
    }
    
    .pos-side-panel {
        border-radius: 8px;
        margin-top: 10px;
    }
}