/* ==========================================
   POS NEGOCIOS INTELIGENTES 360 - Modern UI Theme
   ========================================== */

/* CSS Variables - Color Palette */
:root {
    /* Primary Colors - Deep Teal & Warm Orange */
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --primary-light: #14b8a6;
    --primary-50: #f0fdfa;
    --primary-100: #ccfbf1;
    
    /* Accent - Warm Amber */
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --accent-light: #fbbf24;
    
    /* Neutrals */
    --dark: #1e293b;
    --dark-light: #334155;
    --gray-900: #0f172a;
    --gray-800: #1e293b;
    --gray-700: #334155;
    --gray-600: #475569;
    --gray-500: #64748b;
    --gray-400: #94a3b8;
    --gray-300: #cbd5e1;
    --gray-200: #e2e8f0;
    --gray-100: #f1f5f9;
    --gray-50: #f8fafc;
    
    /* Semantic */
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;
    
    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --header-height: 60px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Typography */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #F9FAFB;
    min-height: 100vh;
    color: var(--gray-800);
    font-size: 14px;
    line-height: 1.6;
}

/* ==========================================
   SIDEBAR
   ========================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--gray-900) 0%, var(--gray-800) 100%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-slow), width var(--transition-slow);
    box-shadow: var(--shadow-xl);
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.sidebar-brand {
    flex: 1;
    min-width: 0;
}

.sidebar-brand h1 {
    font-size: 16px;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.sidebar-brand span {
    font-size: 11px;
    color: var(--gray-400);
    display: block;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-500);
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--gray-400);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition);
    font-weight: 500;
    font-size: 13px;
    margin-bottom: 4px;
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.nav-link:hover {
    background: rgba(255,255,255,0.08);
    color: white;
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.4);
    border-left: 3px solid rgba(255,255,255,0.5);
}

.nav-link .badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--border-radius-sm);
    margin-bottom: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    color: white;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 11px;
    color: var(--gray-500);
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    background: rgba(239, 68, 68, 0.15);
    border: none;
    border-radius: var(--border-radius-sm);
    color: #f87171;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.logout-btn:hover {
    background: var(--danger);
    color: white;
}

/* ==========================================
   MAIN CONTENT
   ========================================== */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left var(--transition-slow);
}

.main-header {
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--gray-600);
    transition: all var(--transition);
}

.menu-toggle:hover {
    background: var(--gray-200);
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
}

.page-title small {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: var(--gray-500);
}

.page-title + .breadcrumb-nav,
.breadcrumb-nav + .page-title {
    margin-top: 2px;
}

.page-title {
    line-height: 1.3;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--gray-600);
    transition: all var(--transition);
    position: relative;
}

.header-btn:hover {
    background: var(--primary-50);
    color: var(--primary);
}

.header-btn .badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.main-content {
    padding: 28px 32px;
}

@media (max-width: 768px) {
    .main-content {
        padding: 20px 16px;
    }
}

/* ==========================================
   CARDS
   ========================================== */
.card {
    background: white;
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h5, .card-header h4 {
    margin: 0;
    font-weight: 600;
    color: var(--gray-800);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 16px 20px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
}

/* ==========================================
   STAT CARDS
   ========================================== */
.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all var(--transition);
}

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

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

.stat-icon.primary {
    background: var(--primary-100);
    color: var(--primary);
}

.stat-icon.success {
    background: var(--success-light);
    color: var(--success);
}

.stat-icon.warning {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-icon.danger {
    background: var(--danger-light);
    color: var(--danger);
}

.stat-icon.info {
    background: var(--info-light);
    color: var(--info);
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
    padding: 2px 6px;
    border-radius: 4px;
}

.stat-change.up {
    background: var(--success-light);
    color: var(--success);
}

.stat-change.down {
    background: var(--danger-light);
    color: var(--danger);
}

/* ==========================================
   QUICK ACTION CARDS
   ========================================== */
.action-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all var(--transition);
    text-decoration: none;
    display: block;
    border: 2px solid transparent;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.action-card .icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 16px;
    transition: all var(--transition);
}

.action-card:hover .icon {
    transform: scale(1.1);
}

.action-card.primary .icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.action-card.success .icon {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
}

.action-card.warning .icon {
    background: linear-gradient(135deg, var(--warning) 0%, var(--accent-dark) 100%);
    color: white;
}

.action-card.info .icon {
    background: linear-gradient(135deg, var(--info) 0%, #2563eb 100%);
    color: white;
}

.action-card.danger .icon {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
}

.action-card h5 {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.action-card p {
    font-size: 12px;
    color: var(--gray-500);
    margin: 0;
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
    padding: 11px 20px;
    min-height: 44px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 13px;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(13, 148, 136, 0.4);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #34d399 0%, var(--success) 100%);
    transform: translateY(-1px);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #f87171 0%, var(--danger) 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, var(--accent-dark) 100%);
    color: white;
}

.btn-warning:hover {
    color: white;
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

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

.btn-lg {
    padding: 14px 28px;
    font-size: 15px;
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--border-radius-sm);
}

.btn-icon.sm {
    width: 30px;
    height: 30px;
}

/* ==========================================
   FORMS
   ========================================== */
.form-control, .form-select {
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    transition: all var(--transition);
    background: white;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
    outline: none;
}

.form-control:hover, .form-select:hover {
    border-color: var(--gray-400);
}

.form-control-lg {
    padding: 14px 18px;
    font-size: 16px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.input-group {
    position: relative;
}

.input-group-text {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    color: var(--gray-500);
    padding: 10px 14px;
}

.input-group:focus-within .input-group-text {
    border-color: var(--primary);
    background: var(--primary-50);
    color: var(--primary);
}

/* ==========================================
   TABLES
   ========================================== */
.table {
    margin-bottom: 0;
}

.table thead th {
    background: var(--gray-50);
    color: var(--gray-600);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-200);
}

.table tbody td {
    padding: 14px 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ==========================================
   BADGES
   ========================================== */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge.bg-success {
    background: var(--success-light) !important;
    color: var(--success) !important;
}

.badge.bg-danger {
    background: var(--danger-light) !important;
    color: var(--danger) !important;
}

.badge.bg-warning {
    background: var(--warning-light) !important;
    color: var(--accent-dark) !important;
}

.badge.bg-primary {
    background: var(--primary-100) !important;
    color: var(--primary) !important;
}

.badge.bg-info {
    background: var(--info-light) !important;
    color: var(--info) !important;
}

/* ==========================================
   ALERTS
   ========================================== */
.alert {
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 14px 18px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: var(--success-light);
    color: #065f46;
}

.alert-danger {
    background: var(--danger-light);
    color: #991b1b;
}

.alert-warning {
    background: var(--warning-light);
    color: #92400e;
}

.alert-info {
    background: var(--info-light);
    color: #1e40af;
}

/* ==========================================
   MODALS
   ========================================== */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
}

.modal-header.bg-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
}

.modal-header.bg-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%) !important;
}

.modal-title {
    font-weight: 600;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
}

.btn-close {
    opacity: 0.7;
}

.btn-close:hover {
    opacity: 1;
}

.modal-backdrop {
    backdrop-filter: blur(2px);
}

/* ==========================================
   POS SPECIFIC
   ========================================== */
.pos-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
    height: calc(100vh - var(--header-height) - 48px);
}

.pos-products {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pos-search {
    margin-bottom: 16px;
}

.pos-search .form-control {
    padding: 14px 18px 14px 48px;
    font-size: 15px;
    background: white;
}

.pos-search .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 18px;
}

.pos-product-grid {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    padding: 4px;
}

.product-tile {
    background: white;
    border-radius: var(--border-radius-sm);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    border: 2px solid transparent;
    box-shadow: var(--shadow-sm);
}

.product-tile:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.product-tile .product-code {
    font-size: 10px;
    color: var(--gray-400);
    margin-bottom: 6px;
}

.product-tile .product-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 8px;
    height: 36px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-tile .product-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.product-tile .product-stock {
    font-size: 10px;
    color: var(--gray-500);
    margin-top: 4px;
}

.pos-cart {
    background: white;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: var(--shadow);
    border: 2px solid var(--primary);
}

.cart-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.cart-header h5 {
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    gap: 12px;
}

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

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    font-size: 12px;
    color: var(--gray-500);
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cart-item-qty input {
    width: 50px;
    text-align: center;
    padding: 6px;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    font-weight: 600;
}

.cart-item-subtotal {
    font-weight: 700;
    color: var(--primary);
    width: 70px;
    text-align: right;
}

.cart-footer {
    padding: 16px 20px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.cart-total-label {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-700);
}

.cart-total-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
}

.cart-pay-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
}

/* ==========================================
   LOGIN PAGE
   ========================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 50%, var(--primary-dark) 100%);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 32px;
    text-align: center;
    color: white;
}

.login-logo {
    width: 70px;
    height: 70px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 32px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px;
}

.login-header p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

.login-body {
    padding: 32px;
}

.login-body .form-control {
    padding: 14px 16px;
    font-size: 15px;
}

.login-body .btn {
    padding: 14px;
    font-size: 15px;
}

/* ==========================================
   EMPTY STATES
   ========================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--gray-300);
}

.empty-state h5 {
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 13px;
    max-width: 300px;
    margin: 0 auto;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1200px) {
    .pos-container {
        grid-template-columns: 1fr 340px;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .pos-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .pos-products {
        min-height: 400px;
    }
    
    .pos-cart {
        min-height: 400px;
    }
    
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition);
    }
    
    .sidebar-overlay.open {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 16px;
    }
    
    .page-title {
        font-size: 16px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .pos-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .cart-total-value {
        font-size: 24px;
    }
}

@media (max-width: 576px) {
    .main-header {
        padding: 0 16px;
    }
    
    .header-right .header-btn:not(:last-child) {
        display: none;
    }
    
    .pos-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cart-item {
        padding: 10px 12px;
    }
}

/* ==========================================
   UTILITIES
   ========================================== */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-muted { color: var(--gray-500) !important; }

.bg-primary-light { background: var(--primary-100) !important; }
.bg-success-light { background: var(--success-light) !important; }
.bg-danger-light { background: var(--danger-light) !important; }

.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* Print Styles */
@media print {
    .sidebar, .main-header, .no-print {
        display: none !important;
    }
    
    .main-wrapper {
        margin-left: 0 !important;
    }
}

/* ==========================================
   UX ENHANCEMENTS
   ========================================== */

/* Page entrance animation */
.main-content {
    animation: pageEnter 0.35s ease-out;
}

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


/* Refined cards with subtle border */
.card {
    border: 1px solid rgba(0,0,0,0.04);
}

.card-header {
    font-weight: 600;
}

/* Dashboard welcome hero */
.dashboard-hero {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 70%);
    border-radius: var(--border-radius-lg);
    padding: 28px 32px;
    margin-bottom: 28px;
    color: white;
    position: relative;
    overflow: hidden;
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.dashboard-hero h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.dashboard-hero .hero-date {
    opacity: 0.85;
    font-size: 0.9rem;
}

.dashboard-hero .hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Stat cards enhanced */
.stat-card {
    border: 1px solid rgba(0,0,0,0.04);
}

.stat-card .stat-icon {
    transition: transform var(--transition);
}

.stat-card:hover .stat-icon {
    transform: scale(1.05);
}

/* Action cards refined */
.action-card {
    border: 1px solid rgba(0,0,0,0.04);
}

.action-card .icon {
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

/* Empty state improved */
.empty-state {
    padding: 48px 24px;
}

.empty-state i {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    background: var(--gray-100);
    border-radius: 50%;
    font-size: 28px;
    color: var(--gray-400);
}

.empty-state.success i {
    background: var(--success-light);
    color: var(--success);
}

/* List group items refined */
.list-group-item {
    transition: background var(--transition-fast);
}

/* Header clock */
.header-clock {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray-500);
    font-variant-numeric: tabular-nums;
}

.header-clock i {
    color: var(--gray-400);
}

/* Breadcrumb */
.breadcrumb-nav {
    font-size: 12px;
    color: var(--gray-500);
}

.breadcrumb-nav a {
    color: var(--gray-500);
    text-decoration: none;
}

.breadcrumb-nav a:hover {
    color: var(--primary);
}

.breadcrumb-nav .separator {
    margin: 0 6px;
    opacity: 0.5;
}

/* Toast notification enhanced */
.toast-ux {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    min-width: 320px;
    max-width: 420px;
    padding: 16px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 14px;
    animation: toastIn 0.35s ease-out;
    border-left: 4px solid;
}

.toast-ux.success { border-color: var(--success); background: white; }
.toast-ux.danger { border-color: var(--danger); background: white; }
.toast-ux.warning { border-color: var(--warning); background: white; }
.toast-ux.info { border-color: var(--info); background: white; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

/* Skeleton loader */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Table row transition */
.table tbody tr {
    transition: background var(--transition-fast);
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

button:focus-visible, a:focus-visible, .btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Caja abierta badge */
.caja-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--border-radius-sm);
    color: var(--success);
    font-weight: 600;
    font-size: 13px;
}

/* ==========================================
   FLOATING ACTION BUTTON (Quick Actions)
   ========================================== */
.fab-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1050;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 0;
}

.fab-main {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 10;
}

.fab-main:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 28px rgba(13, 148, 136, 0.5);
}

.fab-main:active {
    transform: scale(0.95);
}

.fab-main .fab-icon-plus {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fab-container.open .fab-main .fab-icon-plus {
    transform: rotate(45deg);
}

.fab-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.fab-container.open .fab-menu {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.fab-action {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    white-space: nowrap;
    flex-direction: row-reverse;
}

.fab-action-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
    transition: all 0.2s;
    flex-shrink: 0;
}

.fab-action-btn:hover {
    transform: scale(1.1);
}

.fab-action-label {
    background: var(--gray-900);
    color: white;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.2s;
}

.fab-container.open .fab-action-label {
    opacity: 1;
    transform: translateX(0);
}

.fab-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.2);
    z-index: 1049;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s;
    backdrop-filter: blur(2px);
}

.fab-overlay.open {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 576px) {
    .fab-container {
        bottom: 16px;
        right: 16px;
    }
    .fab-main {
        width: 52px;
        height: 52px;
        font-size: 20px;
    }
}

/* ==========================================
   SMART EMPTY STATES (Dashboard)
   ========================================== */
.smart-insight {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
    transition: background var(--transition-fast);
}

.smart-insight:last-child {
    border-bottom: none;
}

.smart-insight:hover {
    background: var(--gray-50);
}

.smart-insight-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.smart-insight-icon.tip { background: var(--primary-100); color: var(--primary); }
.smart-insight-icon.alert { background: var(--warning-light); color: var(--accent-dark); }
.smart-insight-icon.success { background: var(--success-light); color: var(--success); }
.smart-insight-icon.danger { background: var(--danger-light); color: var(--danger); }

.smart-insight-content {
    flex: 1;
    min-width: 0;
}

.smart-insight-content h6 {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0 0 2px;
}

.smart-insight-content p {
    font-size: 12px;
    color: var(--gray-500);
    margin: 0;
}

.smart-insight-action {
    flex-shrink: 0;
}

.smart-cta {
    background: var(--primary-50);
    border: 1px dashed var(--primary);
    border-radius: var(--border-radius);
    padding: 24px;
    text-align: center;
    transition: all var(--transition);
}

.smart-cta:hover {
    background: var(--primary-100);
    border-style: solid;
}

.smart-cta h5 {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0 0 6px;
}

.smart-cta p {
    font-size: 13px;
    color: var(--gray-500);
    margin: 0 0 16px;
}

/* ==========================================
   SaaS REFINEMENTS
   ========================================== */

/* Tables with #F9FAFB background */
.table thead th {
    background: #F9FAFB;
}

/* Cards softer border */
.card {
    border: 1px solid var(--gray-200);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.card:hover {
    box-shadow: var(--shadow);
}

/* Stat cards cleaner */
.stat-card {
    border: 1px solid var(--gray-200);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

/* Forms cleaner on #F9FAFB bg */
.form-control, .form-select {
    border-color: var(--gray-200);
}

/* Action cards cleaner */
.action-card {
    border: 1px solid var(--gray-200);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.action-card:hover {
    box-shadow: var(--shadow-md);
}

/* Sidebar cleaner separator */
.nav-section {
    margin-bottom: 20px;
}

.nav-link {
    padding: 10px 16px;
    font-size: 13px;
    margin-bottom: 2px;
}

