/**
 * FARZHOM POS ERP - Styles autonomes complets
 * Design sombre avec accents amber/orange
 * Ne nécessite aucune dépendance externe
 */

/* ============================================
   VARIABLES CSS
   ============================================ */
:root {
    /* Couleurs de fond */
    --bg: #0d0e14;
    --bg2: #12141c;
    --bg3: #1a1d28;
    --card: #1e2130;
    --card-hover: #252a3a;
    
    /* Couleurs d'accent */
    --amber: #f5a623;
    --amber2: #ff8c00;
    --amber-light: #ffc107;
    --amber-dark: #d4891a;
    
    /* Couleurs fonctionnelles */
    --green: #00d68f;
    --green-dark: #00b377;
    --red: #ff4d6d;
    --red-dark: #e04460;
    --blue: #4dabf7;
    --purple: #9775fa;
    --cyan: #22b8cf;
    
    /* Texte */
    --text: #f1f3f5;
    --text2: #adb5bd;
    --text3: #868e96;
    
    /* Bordures */
    --border: #2c2f3e;
    --border-light: #3a3f52;
    
    /* Ombres */
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.6);
    
    /* Rayures pour les lignes du ticket */
    --stripe: rgba(255, 255, 255, 0.03);
    
    /* Dimensions */
    --header-height: 60px;
    --sidebar-width: 280px;
    --numpad-height: 320px;
    
    /* Transitions */
    --transition: all 0.2s ease;
    --transition-fast: all 0.1s ease;
}

/* ============================================
   RESET ET BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.farzhom-pos-container {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.farzhom-pos-container button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
    color: inherit;
}

.farzhom-pos-container input, 
.farzhom-pos-container select, 
.farzhom-pos-container textarea {
    font-family: inherit;
    border: none;
    outline: none;
    background: var(--bg3);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
}

.farzhom-pos-container input:focus, 
.farzhom-pos-container select:focus, 
.farzhom-pos-container textarea:focus {
    box-shadow: 0 0 0 2px var(--amber);
}

/* ============================================
   HEADER
   ============================================ */
.pos-header {
    height: var(--header-height);
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    flex-shrink: 0;
}

.pos-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pos-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--amber);
}

.pos-logo i {
    font-size: 24px;
}

.pos-session-info {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 13px;
    color: var(--text2);
}

.pos-session-info span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pos-session-info i {
    color: var(--amber);
}

.pos-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pos-header-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg3);
    color: var(--text2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
}

.pos-header-btn:hover {
    background: var(--card);
    color: var(--text);
}

.pos-header-btn.active {
    background: var(--amber);
    color: var(--bg);
}

.pos-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    background: var(--bg3);
    border-radius: 20px;
    font-size: 13px;
}

.pos-user-info i {
    color: var(--amber);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.pos-main {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* ============================================
   SIDEBAR (PANIER)
   ============================================ */
.pos-sidebar {
    width: var(--sidebar-width);
    background: var(--bg2);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.pos-cart-header {
    padding: 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pos-cart-title {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pos-cart-title i {
    color: var(--amber);
}

.pos-cart-count {
    background: var(--amber);
    color: var(--bg);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

.pos-cart-clear {
    font-size: 12px;
    color: var(--red);
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.pos-cart-clear:hover {
    opacity: 0.8;
}

.pos-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.pos-cart-item {
    background: var(--card);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
    position: relative;
    transition: var(--transition);
}

.pos-cart-item:hover {
    background: var(--card-hover);
}

.pos-cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.pos-cart-item-name {
    font-size: 13px;
    font-weight: 500;
    flex: 1;
    padding-right: 10px;
}

.pos-cart-item-remove {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: rgba(255, 77, 109, 0.2);
    color: var(--red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: var(--transition);
}

.pos-cart-item-remove:hover {
    background: var(--red);
    color: white;
}

.pos-cart-item-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pos-cart-item-price {
    font-size: 12px;
    color: var(--text2);
}

.pos-cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pos-qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: var(--bg3);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: var(--transition);
}

.pos-qty-btn:hover {
    background: var(--amber);
    color: var(--bg);
}

.pos-cart-item-total {
    font-size: 14px;
    font-weight: 600;
    color: var(--amber);
}

.pos-cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text3);
}

.pos-cart-empty i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.pos-cart-empty p {
    font-size: 14px;
}

/* ============================================
   CART FOOTER (TOTALS)
   ============================================ */
.pos-cart-footer {
    border-top: 1px solid var(--border);
    padding: 15px;
    background: var(--bg3);
}

.pos-cart-totals {
    margin-bottom: 15px;
}

.pos-cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
    color: var(--text2);
}

.pos-cart-total-row.discount {
    color: var(--green);
}

.pos-cart-total-row.grand-total {
    font-size: 18px;
    font-weight: 700;
    color: var(--amber);
    border-top: 1px solid var(--border);
    padding-top: 12px;
    margin-top: 8px;
}

.pos-cart-actions {
    display: flex;
    gap: 10px;
}

.pos-btn {
    flex: 1;
    padding: 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.pos-btn-primary {
    background: linear-gradient(135deg, var(--amber), var(--amber2));
    color: var(--bg);
}

.pos-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 166, 35, 0.4);
}

.pos-btn-secondary {
    background: var(--card);
    color: var(--text);
}

.pos-btn-secondary:hover {
    background: var(--card-hover);
}

.pos-btn-danger {
    background: var(--red);
    color: white;
}

.pos-btn-danger:hover {
    background: var(--red-dark);
}

.pos-btn-success {
    background: var(--green);
    color: var(--bg);
}

.pos-btn-success:hover {
    background: var(--green-dark);
}

/* ============================================
   CONTENT AREA
   ============================================ */
.pos-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ============================================
   CATEGORIES
   ============================================ */
.pos-categories {
    padding: 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 10px;
    overflow-x: auto;
    flex-shrink: 0;
}

.pos-category-btn {
    padding: 10px 18px;
    border-radius: 25px;
    background: var(--bg3);
    color: var(--text2);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.pos-category-btn:hover {
    background: var(--card);
    color: var(--text);
}

.pos-category-btn.active {
    background: var(--amber);
    color: var(--bg);
}

.pos-category-btn i {
    font-size: 14px;
}

/* ============================================
   PRODUCTS GRID
   ============================================ */
.pos-products {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.pos-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.pos-product-card {
    background: var(--card);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.pos-product-card:hover {
    background: var(--card-hover);
    border-color: var(--amber);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.pos-product-card:active {
    transform: translateY(0);
}

.pos-product-card.low-stock {
    border-color: var(--red);
}

.pos-product-card.low-stock::after {
    content: 'Stock faible';
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 9px;
    background: var(--red);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
}

.pos-product-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--bg3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 24px;
}

.pos-product-name {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pos-product-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--amber);
}

.pos-product-stock {
    font-size: 11px;
    color: var(--text3);
    margin-top: 4px;
}

/* ============================================
   NUMPAD
   ============================================ */
.pos-numpad-section {
    height: var(--numpad-height);
    border-top: 1px solid var(--border);
    display: flex;
    background: var(--bg2);
}

.pos-numpad {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
}

.pos-numpad-btn {
    background: var(--bg3);
    color: var(--text);
    font-size: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.pos-numpad-btn:hover {
    background: var(--card);
}

.pos-numpad-btn:active {
    background: var(--amber);
    color: var(--bg);
}

.pos-numpad-btn.func {
    background: var(--card);
    color: var(--amber);
    font-size: 16px;
}

.pos-numpad-btn.func:hover {
    background: var(--card-hover);
}

.pos-numpad-btn.enter {
    background: var(--amber);
    color: var(--bg);
    grid-row: span 2;
}

.pos-numpad-btn.enter:hover {
    background: var(--amber2);
}

.pos-quick-actions {
    width: 200px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border);
    padding-left: 1px;
}

.pos-quick-btn {
    flex: 1;
    background: var(--bg3);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.pos-quick-btn:hover {
    background: var(--card);
}

.pos-quick-btn i {
    color: var(--amber);
}

.pos-quick-btn.discount i {
    color: var(--green);
}

/* ============================================
   MODALS
   ============================================ */
.pos-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.pos-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.pos-modal {
    background: var(--bg2);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.pos-modal-overlay.active .pos-modal {
    transform: scale(1) translateY(0);
}

.pos-modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pos-modal-title {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pos-modal-title i {
    color: var(--amber);
}

.pos-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg3);
    color: var(--text2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
}

.pos-modal-close:hover {
    background: var(--red);
    color: white;
}

.pos-modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: 60vh;
}

.pos-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ============================================
   PAYMENT MODAL
   ============================================ */
.pos-payment-amount {
    text-align: center;
    padding: 20px;
    background: var(--bg3);
    border-radius: 12px;
    margin-bottom: 20px;
}

.pos-payment-amount-label {
    font-size: 13px;
    color: var(--text2);
    margin-bottom: 8px;
}

.pos-payment-amount-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--amber);
}

.pos-payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.pos-payment-method {
    padding: 15px;
    border-radius: 12px;
    background: var(--bg3);
    border: 2px solid transparent;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.pos-payment-method:hover {
    background: var(--card);
}

.pos-payment-method.active {
    border-color: var(--amber);
    background: rgba(245, 166, 35, 0.1);
}

.pos-payment-method i {
    font-size: 28px;
    margin-bottom: 8px;
    color: var(--amber);
}

.pos-payment-method span {
    display: block;
    font-size: 13px;
    font-weight: 500;
}

.pos-payment-input-group {
    margin-bottom: 15px;
}

.pos-payment-input-group label {
    display: block;
    font-size: 13px;
    color: var(--text2);
    margin-bottom: 8px;
}

.pos-payment-input-group input {
    width: 100%;
    font-size: 18px;
    text-align: center;
}

.pos-payment-change {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--green);
    color: var(--bg);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
}

.pos-payment-change.hidden {
    display: none;
}

/* ============================================
   SESSION MODAL
   ============================================ */
.pos-session-info-box {
    text-align: center;
    padding: 30px;
    background: var(--bg3);
    border-radius: 12px;
    margin-bottom: 20px;
}

.pos-session-info-box i {
    font-size: 48px;
    color: var(--amber);
    margin-bottom: 15px;
}

.pos-session-info-box h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.pos-session-info-box p {
    color: var(--text2);
    font-size: 14px;
}

.pos-form-group {
    margin-bottom: 15px;
}

.pos-form-group label {
    display: block;
    font-size: 13px;
    color: var(--text2);
    margin-bottom: 8px;
}

.pos-form-group input,
.pos-form-group select,
.pos-form-group textarea {
    width: 100%;
}

.pos-form-group textarea {
    min-height: 80px;
    resize: vertical;
}

/* ============================================
   RECEIPT
   ============================================ */
.pos-receipt {
    background: white;
    color: #333;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    max-width: 300px;
    margin: 0 auto;
}

.pos-receipt-header {
    text-align: center;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.pos-receipt-header h2 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}

.pos-receipt-header p {
    font-size: 11px;
    color: #666;
}

.pos-receipt-items {
    border-bottom: 1px dashed #ccc;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.pos-receipt-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.pos-receipt-item-name {
    flex: 1;
}

.pos-receipt-item-qty {
    width: 40px;
    text-align: center;
}

.pos-receipt-item-price {
    width: 60px;
    text-align: right;
}

.pos-receipt-totals {
    border-bottom: 1px dashed #ccc;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.pos-receipt-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
}

.pos-receipt-total-row.grand-total {
    font-weight: bold;
    font-size: 14px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #ccc;
}

.pos-receipt-footer {
    text-align: center;
}

.pos-receipt-footer p {
    margin-bottom: 5px;
}

.pos-receipt-barcode {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ccc;
}

.pos-receipt-barcode div {
    font-family: 'Libre Barcode 39', monospace;
    font-size: 40px;
    text-align: center;
}

/* ============================================
   HOLD ORDERS
   ============================================ */
.pos-hold-orders {
    display: grid;
    gap: 10px;
}

.pos-hold-order {
    background: var(--card);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.pos-hold-order:hover {
    background: var(--card-hover);
}

.pos-hold-order-info h4 {
    font-size: 14px;
    margin-bottom: 5px;
}

.pos-hold-order-info p {
    font-size: 12px;
    color: var(--text2);
}

.pos-hold-order-amount {
    font-size: 16px;
    font-weight: 600;
    color: var(--amber);
}

/* ============================================
   Z-REPORT
   ============================================ */
.pos-z-report {
    background: var(--bg3);
    border-radius: 12px;
    padding: 20px;
}

.pos-z-report-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.pos-z-report-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.pos-z-report-section h4 {
    font-size: 14px;
    color: var(--text2);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pos-z-report-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.pos-z-report-row.total {
    font-size: 18px;
    font-weight: 700;
    color: var(--amber);
    border-top: 2px solid var(--border);
    padding-top: 12px;
    margin-top: 8px;
}

.pos-z-report-row.difference.positive {
    color: var(--green);
}

.pos-z-report-row.difference.negative {
    color: var(--red);
}

/* ============================================
   DISCOUNT MODAL
   ============================================ */
.pos-discount-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.pos-discount-btn {
    padding: 15px;
    border-radius: 10px;
    background: var(--bg3);
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition);
}

.pos-discount-btn:hover {
    background: var(--card);
}

.pos-discount-btn.active {
    background: var(--amber);
    color: var(--bg);
}

.pos-discount-custom {
    display: flex;
    gap: 10px;
}

.pos-discount-custom input {
    flex: 1;
}

/* ============================================
   SEARCH
   ============================================ */
.pos-search-box {
    position: relative;
    margin-bottom: 20px;
}

.pos-search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text3);
}

.pos-search-box input {
    width: 100%;
    padding-left: 40px;
}

.pos-search-results {
    max-height: 300px;
    overflow-y: auto;
}

.pos-search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg3);
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.pos-search-result-item:hover {
    background: var(--card);
}

.pos-search-result-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.pos-search-result-info {
    flex: 1;
}

.pos-search-result-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
}

.pos-search-result-category {
    font-size: 12px;
    color: var(--text3);
}

.pos-search-result-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--amber);
}

/* ============================================
   ALERTS / TOASTS
   ============================================ */
.pos-toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pos-toast {
    padding: 15px 20px;
    border-radius: 10px;
    background: var(--card);
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    min-width: 280px;
}

.pos-toast.success {
    border-left: 4px solid var(--green);
}

.pos-toast.error {
    border-left: 4px solid var(--red);
}

.pos-toast.warning {
    border-left: 4px solid var(--amber);
}

.pos-toast.info {
    border-left: 4px solid var(--blue);
}

.pos-toast i {
    font-size: 20px;
}

.pos-toast.success i {
    color: var(--green);
}

.pos-toast.error i {
    color: var(--red);
}

.pos-toast.warning i {
    color: var(--amber);
}

.pos-toast.info i {
    color: var(--blue);
}

.pos-toast-message {
    flex: 1;
    font-size: 14px;
}

.pos-toast-close {
    color: var(--text3);
    transition: var(--transition);
}

.pos-toast-close:hover {
    color: var(--text);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.pos-toast.hiding {
    animation: slideOut 0.3s ease forwards;
}

/* ============================================
   LOADING
   ============================================ */
.pos-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 14, 20, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1200;
}

.pos-loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border);
    border-top-color: var(--amber);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.pos-loading-text {
    margin-top: 20px;
    color: var(--text2);
    font-size: 14px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   LOGIN OVERLAY
   ============================================ */
.pos-login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1300;
}

.pos-login-box {
    background: var(--bg2);
    border-radius: 20px;
    padding: 40px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.pos-login-logo {
    font-size: 48px;
    color: var(--amber);
    margin-bottom: 20px;
}

.pos-login-box h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.pos-login-box p {
    color: var(--text2);
    margin-bottom: 30px;
}

.pos-login-form .pos-form-group {
    text-align: left;
}

.pos-login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--amber), var(--amber2));
    color: var(--bg);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 10px;
    transition: var(--transition);
}

.pos-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 166, 35, 0.4);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .pos-sidebar {
        width: 240px;
    }
    
    .pos-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 768px) {
    .pos-main {
        flex-direction: column;
    }
    
    .pos-sidebar {
        width: 100%;
        height: 40%;
        border-right: none;
        border-top: 1px solid var(--border);
        order: 2;
    }
    
    .pos-content {
        order: 1;
        height: 60%;
    }
    
    .pos-numpad-section {
        height: 200px;
    }
    
    .pos-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .pos-header {
        padding: 0 10px;
    }
    
    .pos-session-info {
        display: none;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .pos-header,
    .pos-sidebar,
    .pos-content,
    .pos-numpad-section,
    .pos-modal-overlay,
    .pos-toast-container {
        display: none !important;
    }
    
    .pos-receipt {
        display: block !important;
        position: static;
        width: 100%;
        max-width: none;
    }
}

/* ============================================
   SCROLLBAR STYLES
   ============================================ */
.pos-cart-items::-webkit-scrollbar,
.pos-products::-webkit-scrollbar,
.pos-modal-body::-webkit-scrollbar {
    width: 6px;
}

.pos-cart-items::-webkit-scrollbar-track,
.pos-products::-webkit-scrollbar-track,
.pos-modal-body::-webkit-scrollbar-track {
    background: var(--bg2);
}

.pos-cart-items::-webkit-scrollbar-thumb,
.pos-products::-webkit-scrollbar-thumb,
.pos-modal-body::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.pos-cart-items::-webkit-scrollbar-thumb:hover,
.pos-products::-webkit-scrollbar-thumb:hover,
.pos-modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.bounce {
    animation: bounce 0.5s ease;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-amber { color: var(--amber); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-blue { color: var(--blue); }

.hidden { display: none !important; }
.invisible { visibility: hidden; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }