:root {
    --pos-bg: #0f172a;
    --pos-surface: #1e293b;
    --pos-surface-alt: #334155;
    --pos-primary: #8b5cf6;
    --pos-primary-glow: rgba(139, 92, 246, 0.4);
    --pos-secondary: #6366f1;
    --pos-accent: #a78bfa;
    --pos-text: #f1f5f9;
    --pos-text-muted: #94a3b8;
    --pos-border: rgba(255, 255, 255, 0.1);
    --pos-success: #10b981;
    --pos-warning: #f59e0b;
    --pos-danger: #ef4444;
    --header-height: 70px;
}

/* RADICAL HIDDEN - Ensure no global elements show up in POS */
body.pos-active .tenant-header,
body.pos-active #breadcrumbs,
body.pos-active .sidebar,
body.pos-active .sidebar-toggle,
body.pos-active .mobile-menu-btn,
body.pos-active .quick-actions-bar {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Base Wrapper */
body.pos-active {
    background: #0f172a !important;
    overflow-x: hidden;
}

/* Forzar ocultación de elementos globales en POS */
body.pos-active .tenant-header,
body.pos-active #breadcrumbs,
body.pos-active .sidebar,
body.pos-active .sidebar-toggle,
body.pos-active .quick-actions-bar {
    display: none !important;
}

/* Base Layout Enhancements */
body.pos-active .main-content {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    min-width: 100% !important;
    background: #0f172a !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    flex-direction: column !important;
}

body.pos-active #page-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    flex-direction: column !important;
}

.pos-main-wrapper {
    display: flex !important;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    background: #0f172a;
    font-family: 'Inter', sans-serif;
}

.pos-container-centered {
    width: 100%;
    max-width: 1300px;
    /* Ancho máximo para que el centrado sea visible */
    margin: 0 auto;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Header styling similar to Home */
.pos-header {
    margin-bottom: 8px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
}

.pos-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 24px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
    width: 100%;
}

.pos-header-info h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff !important;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    display: block !important;
    visibility: visible !important;
}

.pos-header-badges {
    display: flex;
    gap: 12px;
}

.pos-badge {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pos-badge i {
    color: var(--pos-primary);
}

.pos-badge.branch {
    border-color: rgba(16, 185, 129, 0.3);
    color: #4ade80;
}

.pos-badge.branch i {
    color: #4ade80;
}

.pos-badge.branch.active {
    border-color: rgba(139, 92, 246, 0.4);
    color: #a78bfa;
    cursor: pointer;
    position: relative;
    user-select: none;
}

.pos-badge.branch.active:hover {
    background: rgba(139, 92, 246, 0.1);
}

/* Branch Selector Modernized */
.branch-selector-modern {
    position: relative;
    display: flex;
}

/* Branch Dropdown Modern */
.pos-branch-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
}

.branch-selector-modern.open .pos-branch-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.pos-branch-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 10px;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.pos-branch-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.pos-branch-item.active {
    background: rgba(139, 92, 246, 0.15);
    color: var(--pos-primary);
}

.pos-branch-item i {
    font-size: 0.9rem;
    opacity: 0.7;
}

.pos-header-actions {
    display: flex;
    gap: 12px;
}

.pos-action-btn-modern {
    height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.pos-action-btn-modern:hover {
    background: #334155;
    border-color: #475569;
    transform: translateY(-2px);
}

.pos-action-btn-modern.logout {
    width: 44px;
    padding: 0;
    justify-content: center;
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.2);
}

.pos-action-btn-modern.logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Botón toggle búsqueda — oculto en desktop, visible solo en mobile */
.pos-search-toggle-btn {
    display: none;
}

/* Cart Sheet Back Button */
.receipt-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.btn-back-cart {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-back-cart:hover {
    background: #f1f5f9;
    color: #334155;
}

.btn-back-cart i {
    font-size: 0.85rem;
}

/* Content Area Centered */
.pos-content-area {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    align-items: start;
}

/* Sidebar Lean */
.pos-sidebar-lean {
    background: rgba(30, 41, 59, 0.4);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 20px;
    backdrop-filter: blur(10px);
}

.sidebar-label {
    font-size: 10px;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 1px;
    margin: 1.5rem 0.5rem 0.75rem 0.5rem;
    text-transform: uppercase;
}

.sidebar-label:first-child {
    margin-top: 0;
}

.cat-pill {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    color: #e2e8f0;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-bottom: 10px;
}

.cat-pill i {
    width: 20px;
    color: var(--pos-primary);
    font-size: 1.1rem;
}

.cat-pill:hover {
    background: #1e293b;
    transform: translateX(4px);
    border-color: var(--pos-primary);
}

.cat-pill.active {
    background: linear-gradient(135deg, var(--pos-primary), var(--pos-secondary));
    border-color: transparent;
    color: white;
}

.cat-pill.active i {
    color: white;
}

.cat-pill.action {
    background: rgba(255, 255, 255, 0.03);
    border-style: dashed;
}

.cat-pill.action:hover {
    background: rgba(255, 255, 255, 0.08);
}

.cat-pill.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #f87171;
}

.cat-pill.danger i {
    color: #ef4444;
}

/* Items Main Area */
.pos-items-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    /* Ensure full width */
}

.pos-grid-controls {
    display: flex;
    gap: 16px;
    padding: 12px;
    background: rgba(30, 41, 59, 0.3);
    border-radius: 16px;
    width: 100%;
}

.search-input-wrapper-pos {
    position: relative;
    flex: 1;
}

.search-input-wrapper-pos i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
}

.search-input-wrapper-pos input {
    width: 100%;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 12px 16px 12px 42px;
    color: white;
    font-size: 0.95rem;
    transition: all 0.3s;
}

/* Grid Scroll V2 */
.pos-grid-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0 100px 0;
}

/* Grid & Cards Refined */
.pos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    /* Larger items */
    gap: 24px;
    width: 100%;
}

/* Card V2 Styles */
.pos-card-v2 {
    background: rgba(30, 41, 59, 0.4);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 20px;
    display: flex;
    gap: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    width: 100%;
}

.pos-card-v2:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: var(--pos-primary);
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.card-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    position: relative;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.2);
}

.card-icon-wrapper.service {
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
}

.card-icon-wrapper.product {
    background: rgba(16, 185, 129, 0.1);
    color: #4ade80;
}

.stock-tag {
    position: absolute;
    top: -5px;
    right: -5px;
    padding: 2px 8px;
    background: #334155;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stock-tag.critical {
    background: #ef4444;
}

.card-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.card-meta {
    font-size: 10px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.card-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-price-v2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fbbf24;
}

.btn-add-quick {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--pos-primary);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-add-quick:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

/* Bottom Bar Centered */
.pos-bottom-cart-bar {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    width: calc(100% - 48px);
    max-width: 600px;
    /* More compact and centered */
    background: linear-gradient(135deg, var(--pos-secondary), var(--pos-primary));
    border-radius: 24px;
    padding: 1.25rem 2.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.3);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 1000;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Centered Layout */
@media (max-width: 1024px) {
    .pos-content-area {
        grid-template-columns: 1fr;
    }

    .pos-sidebar-lean {
        display: none;
        /* Hide sidebar on small screens for now, or make it horizontal */
    }

    .pos-header-content {
        flex-direction: column;
        text-align: center;
    }

    .pos-header-info h1 {
        font-size: 1.8rem;
    }
}

.pos-bottom-cart-bar.visible {
    transform: translateX(-50%) translateY(0);
}

.cart-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-bar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.items-count-badge {
    width: 28px;
    height: 28px;
    background: white;
    color: var(--pos-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
}

.cart-text {
    font-weight: 600;
    font-size: 0.95rem;
}

.cart-bar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.total-preview {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.total-label {
    font-size: 0.65rem;
    opacity: 0.8;
    text-transform: uppercase;
    font-weight: 700;
}

.total-value {
    font-size: 1.2rem;
    font-weight: 800;
}

/* Responsive Centered Layout & Mobile Fixes */
@media (max-width: 1100px) {
    .pos-container-centered {
        max-width: 95%;
        padding: 24px 16px;
    }
}

@media (max-width: 1024px) {
    .pos-content-area {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Fixed Bottom Nav Bar for Mobile */
    .pos-sidebar-lean {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 75px !important;
        background: rgba(15, 23, 42, 0.98) !important;
        backdrop-filter: blur(25px) !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        border-top: 1px solid rgba(139, 92, 246, 0.3) !important;
        z-index: 2000 !important;
        box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.5) !important;
    }

    /* internal container for horizontal layout */
    .category-pills-lean {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        height: 100% !important;
        overflow-x: auto !important;
        justify-content: flex-start !important;
        /* Start from left */
        align-items: center !important;
        padding: 0 10px !important;
        gap: 8px !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch;
    }

    .category-pills-lean::-webkit-scrollbar {
        display: none !important;
    }

    /* Truly hide redundant elements */
    .category-pills-lean .sidebar-label,
    .category-pills-lean .sidebar-divider {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        visibility: hidden !important;
    }

    .cat-pill {
        flex: 0 0 auto !important;
        /* FIXED: Don't grow/shrink too much */
        min-width: 75px !important;
        max-width: 90px !important;
        height: 60px !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 4px !important;
        padding: 4px !important;
        background: transparent !important;
        border: none !important;
        margin: 0 !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        color: #94a3b8 !important;
        white-space: nowrap !important;
    }

    .cat-pill i {
        font-size: 1.4rem !important;
        width: auto !important;
        margin: 0 !important;
        color: #64748b !important;
    }

    .cat-pill.active {
        color: #ffffff !important;
    }

    .cat-pill.active i {
        color: var(--pos-primary) !important;
    }

    .cat-pill.action i {
        color: #a78bfa !important;
    }

    .cat-pill.danger i {
        color: #f87171 !important;
    }

    /* Adjust main content and cart bar */
    .pos-items-main {
        padding-bottom: 110px !important;
    }

    .pos-bottom-cart-bar {
        bottom: 85px !important;
        width: 94% !important;
        max-width: 500px !important;
        border-radius: 16px !important;
        padding: 0.8rem 1.2rem !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }

    .pos-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    }
}

@media (max-width: 768px) {
    .pos-container-centered {
        padding: 16px 12px;
        gap: 16px;
    }

    .pos-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding-bottom: 16px;
    }

    .pos-header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .pos-header-info h1 {
        font-size: 1.8rem;
    }

    .pos-grid-controls {
        padding: 8px;
    }

    .pos-grid {
        grid-template-columns: 1fr;
        /* Single column for better touch targets */
        gap: 12px;
    }

    .pos-card-v2 {
        padding: 12px;
        gap: 12px;
        align-items: center;
    }

    .card-icon-wrapper {
        width: 60px;
        height: 60px;
        font-size: 24px;
        border-radius: 12px;
    }

    .card-name {
        font-size: 1rem;
    }

    .card-price-v2 {
        font-size: 1.15rem;
    }

    .pos-bottom-cart-bar {
        width: 95%;
        bottom: 16px;
        padding: 1rem 1.5rem;
        border-radius: 16px;
    }

    .total-value {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    /* ── PAX A910 / Mobile compacto ── */

    /* Header mucho más compacto */
    .pos-container-centered {
        padding: 8px 8px 0 8px !important;
        gap: 8px !important;
    }

    .pos-header {
        padding: 8px 0 8px !important;
        border-bottom: 1px solid rgba(255,255,255,0.06) !important;
    }

    .pos-header-content {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        padding-bottom: 0 !important;
    }

    .pos-header-info h1 {
        font-size: 1rem !important;
        font-weight: 700 !important;
        margin: 0 !important;
    }

    .pos-header-badges {
        gap: 4px !important;
        flex-wrap: nowrap !important;
    }

    .pos-badge {
        font-size: 0.65rem !important;
        padding: 3px 7px !important;
    }

    /* Mostrar badge de usuario abreviado */
    .pos-badge:first-child {
        display: inline-flex !important;
        max-width: 100px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .pos-header-actions {
        gap: 14px !important;
        width: auto !important;
        justify-content: flex-end !important;
    }

    .pos-action-btn-modern {
        width: 36px !important;
        height: 36px !important;
        padding: 0 !important;
        border-radius: 8px !important;
        font-size: 0.9rem !important;
        justify-content: center !important;
    }

    /* Botón toggle búsqueda — solo visible en mobile */
    .pos-search-toggle-btn {
        display: inline-flex !important;
    }

    /* Barra de búsqueda oculta por defecto en mobile, se muestra al hacer toggle */
    .pos-grid-controls {
        display: none !important;
        padding: 6px !important;
        gap: 8px !important;
        border-radius: 10px !important;
        margin-bottom: 4px !important;
    }

    .pos-grid-controls.pos-search-visible {
        display: flex !important;
    }

    .search-input-wrapper-pos input {
        padding: 8px 12px 8px 36px !important;
        font-size: 0.85rem !important;
        border-radius: 8px !important;
    }

    /* Cards cuadradas — 2 por línea */
    .pos-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .pos-card-v2 {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 12px 8px !important;
        gap: 6px !important;
        border-radius: 12px !important;
        aspect-ratio: 1 !important;
        text-align: center !important;
    }

    .card-icon-wrapper {
        width: 44px !important;
        height: 44px !important;
        font-size: 20px !important;
        border-radius: 10px !important;
        flex-shrink: 0 !important;
    }

    .card-details {
        width: 100% !important;
        align-items: center !important;
    }

    .card-name {
        font-size: 0.78rem !important;
        margin-bottom: 2px !important;
        white-space: normal !important;
        line-height: 1.2 !important;
        text-align: center !important;
    }

    .card-meta {
        font-size: 8px !important;
        margin-bottom: 2px !important;
        text-align: center !important;
    }

    .card-footer-row {
        justify-content: center !important;
        gap: 8px !important;
    }

    .card-price-v2 {
        font-size: 0.95rem !important;
    }

    .btn-add-quick {
        width: 26px !important;
        height: 26px !important;
        border-radius: 7px !important;
        font-size: 0.8rem !important;
    }

    /* Barra de categorías inferior más compacta */
    .pos-sidebar-lean {
        height: 58px !important;
    }

    .cat-pill {
        min-width: 62px !important;
        max-width: 76px !important;
        height: 50px !important;
        font-size: 9px !important;
    }

    .cat-pill i {
        font-size: 1.15rem !important;
    }

    /* Ajustar padding inferior del scroll */
    .pos-items-main {
        padding-bottom: 90px !important;
    }

    /* Cart bar ajustado */
    .pos-bottom-cart-bar {
        bottom: 68px !important;
        width: 96% !important;
        padding: 0.65rem 1rem !important;
        border-radius: 12px !important;
    }

    .cart-text {
        font-size: 0.82rem !important;
    }

    .total-value {
        font-size: 0.95rem !important;
    }

    .items-count-badge {
        width: 22px !important;
        height: 22px !important;
        font-size: 0.75rem !important;
    }
}

/* Hiding main app UI in POS */
body.pos-active .sidebar,
body.pos-active .mobile-menu-btn,
body.pos-active .sidebar-overlay,
body.pos-active .quick-actions-bar,
body.pos-active .breadcrumbs {
    display: none !important;
}

body.pos-active .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
}

/* Redesigned Cart Sheet (Ticket) */
.cart-sheet {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: flex;
    justify-content: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-sheet.active {
    opacity: 1;
    visibility: visible;
}

.cart-sheet-content {
    width: 100%;
    max-width: 450px;
    height: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: #1e293b;
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.2);
}

.cart-sheet.active .cart-sheet-content {
    transform: translateX(0);
}

/* Receipt Top */
.cart-receipt-top {
    padding: 2.5rem 2rem 1.5rem;
    background: #f8fafc;
    border-bottom: 2px dashed #e2e8f0;
    position: relative;
}

.receipt-handle {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 6px;
    background: #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
}

.receipt-header {
    text-align: center;
}

.receipt-main-icon {
    font-size: 2.5rem;
    color: var(--pos-primary);
    margin-bottom: 1rem;
}

.receipt-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.receipt-subtitle {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.25rem;
}

/* Actions */
.receipt-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

.btn-clear-all {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-clear-all:hover {
    background: #fecaca;
}

/* Items List */
.cart-sheet-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid #f1f5f9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.item-main {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.item-category-tag {
    font-size: 0.6rem;
    font-weight: 800;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    color: #64748b;
    letter-spacing: 0.5px;
}

.item-name {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 4px 0;
}

.item-meta {
    font-size: 0.8rem;
    color: #8b5cf6;
    font-weight: 600;
}

.item-price-area {
    text-align: right;
}

.item-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
}

.item-unit-price {
    font-size: 0.75rem;
    color: #94a3b8;
}

.item-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px dashed #f1f5f9;
}

.qty-stepper {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border-radius: 8px;
    padding: 4px;
}

.qty-btn-sheet {
    width: 28px;
    height: 28px;
    border: none;
    background: #ffffff;
    border-radius: 6px;
    color: #1e293b;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.qty-display {
    padding: 0 1rem;
    font-weight: 800;
    font-size: 1rem;
}

.btn-remove-item {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.1rem;
}

.btn-remove-item:hover {
    color: #ef4444;
}

/* Summary Box */
.receipt-summary {
    padding: 1.5rem 2rem;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.summary-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 0.5rem 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.summary-row.total {
    font-size: 1.35rem;
    font-weight: 900;
    color: #0f172a;
    margin-top: 0.5rem;
}

/* Payment Section */
.payment-section {
    padding: 1.5rem 2rem 2.5rem;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
}

.section-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.payment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.payment-option {
    background: #ffffff;
    border: 2px solid #f1f5f9;
    border-radius: 12px;
    padding: 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-option i {
    font-size: 1.5rem;
    color: #64748b;
}

.payment-option span {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
}

.payment-option.active {
    border-color: var(--method-color);
    background: rgba(var(--method-color-rgb), 0.05);
    /* We'll use hex for now */
}

.payment-option.active i,
.payment-option.active span {
    color: var(--method-color);
}

.btn-checkout {
    width: 100%;
    background: #10b981;
    color: white;
    border: none;
    padding: 1.25rem;
    border-radius: 16px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
    transition: all 0.3s;
}

.btn-checkout:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.4);
}

.btn-checkout:disabled {
    background: #cbd5e1;
    box-shadow: none;
    cursor: not-allowed;
}

.btn-text {
    font-size: 1rem;
}

.btn-price {
    font-size: 1.15rem;
}

/* Empty State */
.cart-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #94a3b8;
}

.empty-illustration {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.3;
}

.cart-empty-state p {
    font-size: 1.2rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.cart-empty-state span {
    font-size: 0.9rem;
}

@media (max-width: 480px) {
    /* ── Cart sheet (ticket) compacto para PAX/mobile ── */
    .cart-sheet-content {
        max-width: 100%;
    }

    /* Barra Volver / Vaciar */
    .receipt-top-bar {
        padding: 0.4rem 0.75rem !important;
    }

    .btn-back-cart {
        font-size: 0.78rem !important;
        padding: 0.3rem 0.5rem !important;
    }

    /* Cabecera del ticket */
    .cart-receipt-top {
        padding: 0.5rem 1rem 0.5rem !important;
    }

    .receipt-handle {
        top: 0.35rem;
        width: 32px;
        height: 3px;
    }

    .receipt-main-icon {
        font-size: 1.1rem !important;
        margin-bottom: 0.2rem !important;
    }

    .receipt-header h2 {
        font-size: 0.85rem !important;
    }

    .receipt-subtitle {
        font-size: 0.68rem !important;
        margin-top: 0.1rem !important;
    }

    .receipt-actions {
        margin-top: 0.4rem !important;
    }

    .btn-clear-all {
        font-size: 0.68rem !important;
        padding: 0.3rem 0.6rem !important;
    }

    /* Lista de items */
    .cart-sheet-items {
        padding: 0.5rem 0.75rem !important;
    }

    .cart-item-card {
        padding: 0.6rem 0.75rem !important;
        border-radius: 8px !important;
    }

    .item-main {
        margin-bottom: 0.5rem !important;
        gap: 0.5rem !important;
    }

    .item-name {
        font-size: 0.82rem !important;
        margin: 2px 0 !important;
    }

    .item-category-tag {
        font-size: 0.55rem !important;
    }

    .item-meta {
        font-size: 0.7rem !important;
    }

    .item-price {
        font-size: 0.88rem !important;
    }

    .item-unit-price {
        font-size: 0.65rem !important;
    }

    .item-controls {
        padding-top: 0.4rem !important;
    }

    .qty-display {
        padding: 0 0.6rem !important;
        font-size: 0.85rem !important;
    }

    .qty-btn-sheet {
        width: 24px !important;
        height: 24px !important;
    }

    .btn-remove-item {
        font-size: 0.9rem !important;
    }

    /* Resumen subtotal/IVA/total */
    .receipt-summary {
        padding: 0.6rem 0.75rem !important;
        gap: 0.3rem !important;
    }

    .summary-divider {
        margin: 0.3rem 0 !important;
    }

    .summary-row {
        font-size: 0.75rem !important;
    }

    .summary-row.total {
        font-size: 0.95rem !important;
        margin-top: 0.25rem !important;
    }

    /* Sección de pago */
    .payment-section {
        padding: 0.75rem 1rem 1rem !important;
    }

    .section-label {
        font-size: 0.65rem !important;
        margin-bottom: 0.5rem !important;
    }

    .payment-grid {
        gap: 0.4rem !important;
        margin-bottom: 0.75rem !important;
    }

    .payment-option {
        padding: 0.6rem 0.25rem !important;
        border-radius: 8px !important;
        gap: 0.25rem !important;
    }

    .payment-option i {
        font-size: 1.1rem !important;
    }

    .payment-option span {
        font-size: 0.65rem !important;
    }

    /* Botón cobrar */
    .btn-checkout {
        padding: 0.85rem 1rem !important;
        border-radius: 12px !important;
    }

    .btn-text {
        font-size: 0.85rem !important;
    }

    .btn-price {
        font-size: 1rem !important;
    }
}

/* Helper classes */
.text-truncate {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* ===== Modals & Overlays (V3 Premium) ===== */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999 !important;
    padding: 20px;
}

.modal-overlay.active {
    display: flex !important;
}

.modal-content-modern {
    background: #1e293b !important;
    width: 100% !important;
    max-width: 500px !important;
    border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
    overflow: hidden;
    position: relative;
    animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header-modern {
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header-modern h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-close-modal {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.modal-body-modern {
    padding: 24px;
}

.service-display {
    background: rgba(139, 92, 246, 0.15) !important;
    padding: 12px 16px;
    border-radius: 12px;
    color: #a78bfa !important;
    font-weight: 700;
    margin-bottom: 20px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    text-align: center;
    font-size: 1.1rem;
}

.form-group-modern {
    margin-bottom: 20px;
}

.form-group-modern label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.select-modern,
.input-modern {
    width: 100% !important;
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    color: #ffffff !important;
    font-size: 1rem !important;
}

.modal-footer-modern {
    padding: 20px 24px;
    display: flex;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-confirm-modern {
    background: #8b5cf6 !important;
    border: none;
    color: #ffffff;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 12px;
    flex: 1;
    cursor: pointer;
}

.btn-cancel-modern {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 12px;
    flex: 1;
    cursor: pointer;
}

@media (max-width: 480px) {
    /* ── Modales compactos para PAX/mobile ── */
    .modal-overlay {
        padding: 10px !important;
        align-items: flex-end !important;
    }

    .modal-content-modern {
        max-width: 100% !important;
        border-radius: 16px 16px 12px 12px !important;
        max-height: 90vh !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    .modal-header-modern {
        padding: 12px 16px !important;
    }

    .modal-header-modern h3 {
        font-size: 1rem !important;
        gap: 8px !important;
    }

    .modal-body-modern {
        padding: 12px 16px !important;
        overflow-y: auto !important;
        flex: 1 !important;
    }

    .form-group-modern {
        margin-bottom: 12px !important;
    }

    .form-group-modern label {
        font-size: 0.72rem !important;
        margin-bottom: 5px !important;
    }

    .select-modern,
    .input-modern {
        padding: 9px 12px !important;
        font-size: 0.9rem !important;
        border-radius: 8px !important;
    }

    .service-display {
        padding: 8px 12px !important;
        font-size: 0.9rem !important;
        margin-bottom: 12px !important;
        border-radius: 8px !important;
    }

    .modal-footer-modern {
        padding: 10px 16px !important;
        gap: 8px !important;
    }

    .btn-confirm-modern,
    .btn-cancel-modern {
        padding: 10px 16px !important;
        font-size: 0.85rem !important;
        border-radius: 8px !important;
    }

    /* Modal de apertura/cierre de caja */
    .cash-register-modal {
        padding: 1.5rem 1.25rem !important;
        border-radius: 16px !important;
    }

    .cash-register-modal h2 {
        font-size: 1.1rem !important;
    }

    .cash-register-modal p {
        font-size: 0.82rem !important;
    }

    .register-modal-actions {
        gap: 8px !important;
    }

    .register-modal-actions .pos-btn {
        padding: 0.75rem 1rem !important;
        font-size: 0.85rem !important;
        min-width: unset !important;
    }
}

/* ============================================
   POS BUTTON SYSTEM
   ============================================ */
.pos-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.75rem;
    border-radius: 14px;
    border: none;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.pos-btn i {
    font-size: 1rem;
}

.pos-btn-primary {
    background: linear-gradient(135deg, var(--pos-primary) 0%, var(--pos-secondary) 100%);
    color: #ffffff;
    box-shadow: 0 6px 20px var(--pos-primary-glow);
}

.pos-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px var(--pos-primary-glow);
    filter: brightness(1.1);
}

.pos-btn-primary:active {
    transform: translateY(-1px);
}

.pos-btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    color: var(--pos-text-muted);
    border: 1px solid var(--pos-border);
}

.pos-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--pos-text);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.pos-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
}

.pos-btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(239, 68, 68, 0.5);
}

.pos-btn-lg {
    padding: 1.1rem 2.5rem;
    font-size: 1.05rem;
    border-radius: 16px;
    min-width: 220px;
}

/* ============================================
   CASH REGISTER CLOSED SCREEN
   ============================================ */
.cash-register-overlay {
    position: fixed;
    inset: 0;
    background: var(--pos-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    padding: 2rem;
}

.cash-register-modal {
    background: var(--pos-surface);
    border: 1px solid var(--pos-border);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    animation: modalPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.register-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--pos-primary), var(--pos-secondary));
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: white;
    margin: 0 auto 1.75rem;
    box-shadow: 0 12px 30px var(--pos-primary-glow);
}

.cash-register-modal h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--pos-text);
    margin-bottom: 0.75rem;
}

.cash-register-modal p {
    font-size: 0.95rem;
    color: var(--pos-text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.register-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    align-items: center;
}

.register-modal-actions .pos-btn {
    width: 100%;
}

/* ============================================
   SUCCESS MODAL
   ============================================ */
.success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    flex-direction: column;
    gap: 2rem;
}

.success-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.success-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.success-icon-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.3);
        opacity: 1;
    }
}

.success-icon {
    font-size: 5rem;
    color: #10b981;
    position: relative;
    z-index: 1;
    animation: bounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bounceIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.success-text h2 {
    font-size: 2.5rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.success-text p {
    font-size: 1rem;
    color: var(--pos-text-muted);
}

/* input-with-icon-modern */
.input-with-icon-modern {
    position: relative;
}

.input-with-icon-modern i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pos-text-muted);
    pointer-events: none;
}

.input-with-icon-modern input {
    padding-left: 2.5rem !important;
}

/* ============================================
   BRANCH CHANGE BANNER
   ============================================ */
#branchChangeBanner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 24px;
    padding: 2.5rem 3.5rem;
    display: flex;
    align-items: center;
    gap: 1.75rem;
    z-index: 9999;
    box-shadow:
        0 0 0 1px rgba(139, 92, 246, 0.2),
        0 30px 60px rgba(0, 0, 0, 0.6),
        0 0 80px rgba(139, 92, 246, 0.15);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#branchChangeBanner.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.branch-banner-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--pos-primary), var(--pos-secondary));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 8px 24px var(--pos-primary-glow);
}

.branch-banner-text {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.branch-banner-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--pos-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.branch-banner-name {
    font-size: 2rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* --- BRANCH SELECTION & REGISTER OPENING (PREMIUM) --- */
.pos-branch-selection-screen {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 24px;
}

.selection-container {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    animation: fadeInScale 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.selection-header {
    text-align: center;
}

.brand-logo {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.4));
}

.selection-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.selection-header p {
    color: #94a3b8;
    font-size: 1.1rem;
}

.branch-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.branch-card-modern {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.branch-card-modern:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--pos-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.branch-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--pos-primary) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.branch-card-modern:hover::before {
    opacity: 0.05;
}

.card-icon {
    width: 60px;
    height: 60px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pos-primary);
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.branch-card-modern:hover .card-icon {
    transform: scale(1.1) rotate(-5deg);
    background: var(--pos-primary);
    color: #fff;
}

.card-info h3 {
    margin: 0;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
}

.card-info p {
    margin: 4px 0 0;
    color: #94a3b8;
    font-size: 0.85rem;
}

.card-status {
    margin-left: auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s;
}

.branch-card-modern:hover .card-status {
    opacity: 1;
    transform: translateX(0);
}

.selection-footer {
    text-align: center;
    margin-top: 20px;
}

.btn-back-dashboard {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}

.btn-back-dashboard:hover {
    color: #fff;
}

/* Opening Form Styles */
.opening-form-premium {
    margin-top: 32px;
    width: 100%;
}

.premium-field {
    margin-bottom: 24px;
}

.premium-field label {
    display: block;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.premium-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    transition: all 0.3s;
    overflow: hidden;
}

.premium-input-wrapper:focus-within {
    border-color: var(--pos-primary);
    background: rgba(139, 92, 246, 0.05);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.premium-input-wrapper .prefix {
    padding: 0 20px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pos-primary);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.premium-input-wrapper input {
    background: none;
    border: none;
    color: #fff;
    padding: 16px 20px;
    font-size: 1.8rem;
    font-weight: 800;
    width: 100%;
    outline: none;
}

.premium-input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

/* Animations for Step Transitions */
.slide-out {
    animation: slideOut 0.3s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-in {
    animation: slideIn 0.3s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideOut {
    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
}

.cash-register-modal-v2 {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    width: 100%;
    max-width: 450px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.register-icon-v2 {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--pos-primary) 0%, var(--pos-secondary) 100%);
    border-radius: 20px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3);
}

.cash-register-modal-v2 h2 {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.cash-register-modal-v2 p {
    color: #94a3b8;
    margin-bottom: 0;
}

.register-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.pos-btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* Hide number spinners */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: none;
}

/* Service Category Tabs in POS */
.pos-category-tabs {
    display: flex;
    gap: 8px;
    padding: 4px 0;
    margin-top: 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.pos-category-tabs::-webkit-scrollbar {
    display: none;
}

.category-tab {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    transform: translateY(-1px);
}

.category-tab.active {
    background: var(--pos-primary);
    border-color: var(--pos-primary);
    color: white;
    box-shadow: 0 8px 16px var(--pos-primary-glow);
}