:root {
    --pos-bg: #0f172a;
    --pos-panel: #1e293b;
    --pos-text: #f8fafc;
    --pos-text-muted: #94a3b8;
    --pos-border: #334155;
    --pos-primary: #10b981;
    --pos-primary-hover: #059669;
    --pos-secondary: #3b82f6;
    --pos-danger: #ef4444;
    --pos-warning: #f59e0b;
    --pos-card: #2dd4bf;
    --pos-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --pos-shadow-glow: 0 0 20px rgba(16, 185, 129, 0.2);
}

body {
    background-color: var(--pos-bg) !important;
    color: var(--pos-text) !important;
}

.pos-layout {
    display: grid;
    grid-template-columns: 1.3fr 320px 1fr;
    height: calc(100vh - 40px); /* Ajusté pour le padding de 20px en haut et bas */
    gap: 30px;
    width: 100%;
    box-sizing: border-box;
}

/* Main Area */
.pos-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    padding-right: 10px;
}

.pos-main::-webkit-scrollbar {
    width: 6px;
}

.pos-main::-webkit-scrollbar-thumb {
    background: var(--pos-border);
    border-radius: 4px;
}

/* Header & Stats */
.pos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--pos-panel);
    padding: 20px;
    border-radius: 16px;
    box-shadow: var(--pos-shadow);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.pos-title-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.back-btn {
    background: var(--pos-border);
    color: var(--pos-text);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: var(--pos-text);
    color: var(--pos-bg);
    transform: translateX(-3px);
}

.pos-title-area h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.pos-title-area h1 span {
    color: var(--pos-primary);
}

.pos-stats {
    display: flex;
    gap: 15px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-icon {
    font-size: 1.5rem;
    color: var(--pos-card);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--pos-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pos-text);
}

/* Products Section */
.products-section,
.sales-history-section {
    background: var(--pos-panel);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--pos-shadow);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sales-history-section {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.products-section h2,
.sales-history-section h2 {
    margin-top: 0;
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--pos-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sales-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sales-history-header h2 {
    margin-bottom: 0;
}

.export-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.export-select {
    background: rgba(255, 255, 255, 0.05);
    color: var(--pos-text);
    border: 1px solid var(--pos-border);
    padding: 6px 10px;
    border-radius: 6px;
    outline: none;
    font-family: inherit;
    font-size: 0.85rem;
}

.export-select option {
    background: var(--pos-panel);
    color: var(--pos-text);
}

.export-btn {
    background: var(--pos-primary);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

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

.category-block {
    margin-bottom: 25px;
}

.category-title {
    font-size: 1rem;
    color: var(--pos-text-muted);
    border-bottom: 1px solid var(--pos-border);
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.product-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid var(--pos-border);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--pos-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

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

.product-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 1;
}

.product-name {
    font-weight: 600;
    font-size: 1rem;
}

.product-price {
    color: var(--pos-primary);
    font-weight: 700;
}

.add-btn {
    background: var(--pos-primary);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1;
    transition: transform 0.2s ease;
}

.product-card:active .add-btn {
    transform: scale(0.9);
}

/* History */
.sales-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: none;
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.sales-list::-webkit-scrollbar {
    width: 4px;
}

.sales-list::-webkit-scrollbar-thumb {
    background: var(--pos-border);
    border-radius: 4px;
}

.sale-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: background 0.2s ease;
}

.sale-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.sale-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--pos-text-muted);
}

.sale-id {
    font-weight: 600;
    color: var(--pos-text);
}

.sale-body {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.sale-products {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
    color: #cbd5e1;
}

.sale-products li {
    margin-bottom: 2px;
}

.sale-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.sale-total {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pos-primary);
}

.sale-method {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.badge-cb {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.badge-especes {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.badge-mixte {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
}

/* Sidebar Cart */
.pos-sidebar {
    background: var(--pos-panel);
    border-radius: 16px;
    box-shadow: var(--pos-shadow);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.cart-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--pos-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

#clear-cart-btn {
    background: transparent;
    color: var(--pos-text-muted);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.2s ease;
}

#clear-cart-btn:hover {
    color: var(--pos-danger);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cart-items::-webkit-scrollbar {
    width: 4px;
}

.cart-items::-webkit-scrollbar-thumb {
    background: var(--pos-border);
    border-radius: 4px;
}

.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--pos-text-muted);
    opacity: 0.5;
}

.empty-cart i {
    font-size: 3rem;
    margin-bottom: 10px;
}

.empty-cart p {
    font-weight: 600;
    margin: 0 0 5px 0;
}

.empty-cart span {
    font-size: 0.85rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 8px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-item-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.cart-item-price {
    font-size: 0.85rem;
    color: var(--pos-primary);
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    padding: 3px;
}

.qty-btn {
    background: transparent;
    border: none;
    color: var(--pos-text);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

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

.item-qty {
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 20px;
    text-align: center;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--pos-border);
    background: rgba(0, 0, 0, 0.1);
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

#cart-total-display {
    color: var(--pos-primary);
    font-size: 1.5rem;
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.payment-option {
    cursor: pointer;
}

.payment-option input {
    display: none;
}

.option-content {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    color: var(--pos-text-muted);
}

.option-content i {
    font-size: 1.2rem;
}

.option-content span {
    font-size: 0.8rem;
    font-weight: 600;
}

.payment-option input:checked+.option-content {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--pos-primary);
    color: var(--pos-primary);
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--pos-primary) 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.checkout-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.checkout-btn:disabled {
    background: var(--pos-border);
    color: var(--pos-text-muted);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Toast Notification */
.pos-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--pos-panel);
    border: 1px solid var(--pos-primary);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
}

.pos-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.pos-toast i {
    color: var(--pos-primary);
    font-size: 1.2rem;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .pos-layout {
        grid-template-columns: 1fr 350px;
    }

    .sales-history-section {
        grid-column: span 2;
    }
}

@media (max-width: 900px) {
    .pos-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .sales-history-section {
        grid-column: span 1;
    }

    .pos-sidebar {
        position: sticky;
        bottom: 0;
        z-index: 10;
        border-radius: 16px 16px 0 0;
    }
}

/* =========================================================================
   GESTION DES STOCKS (LOGISTIQUE)
   ========================================================================= */

/* Stock Management Button in POS Header */
.stock-manage-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--pos-text);
    border: 1px solid var(--pos-border);
    padding: 10px 18px;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.stock-manage-btn:hover {
    background: var(--pos-secondary);
    border-color: var(--pos-secondary);
    color: white;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.stock-manage-btn i {
    font-size: 1rem;
}

@media (max-width: 600px) {
    .stock-manage-btn span {
        display: none;
    }
}

/* Product Card Stock Styling */
.product-card.out-of-stock {
    opacity: 0.65;
    border-color: rgba(239, 68, 68, 0.3);
    cursor: not-allowed;
}

.product-card.out-of-stock:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}

.product-card.low-stock {
    border-color: rgba(245, 158, 11, 0.4);
}

.stock-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
}

.badge-ok {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
}

.badge-low {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
}

.badge-out {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

/* Stock Management Modal */
#stock-modal .modal-card {
    background: var(--pos-panel);
    border: 1px solid var(--pos-border);
    color: var(--pos-text);
    box-shadow: var(--pos-shadow);
}

#stock-modal .modal-header {
    border-bottom: 1px solid var(--pos-border);
}

#stock-modal .modal-close {
    background: transparent;
    border: none;
    color: var(--pos-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

#stock-modal .modal-close:hover {
    color: var(--pos-danger);
}

.stock-search-bar {
    position: relative;
    margin-bottom: 20px;
}

.stock-search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pos-text-muted);
}

.stock-search-bar input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    padding: 12px 15px 12px 45px;
    color: var(--pos-text);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.stock-search-bar input:focus {
    border-color: var(--pos-secondary);
}

.stock-table-container {
    max-height: 450px;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid var(--pos-border);
}

.stock-table-container::-webkit-scrollbar {
    width: 6px;
}

.stock-table-container::-webkit-scrollbar-thumb {
    background: var(--pos-border);
    border-radius: 4px;
}

.stock-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}

.stock-table th {
    background: rgba(0, 0, 0, 0.25);
    color: var(--pos-text-muted);
    font-weight: 600;
    padding: 12px 15px;
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 1px solid var(--pos-border);
}

.stock-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--pos-border);
    vertical-align: middle;
}

.stock-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.badge-category {
    background: rgba(255, 255, 255, 0.05);
    color: var(--pos-text-muted);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.stock-qty-cell {
    font-size: 1rem;
    font-weight: 700;
}

.stock-qty-val {
    color: var(--pos-text);
}

.stock-status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    display: inline-block;
}

.status-ok {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.status-low {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.status-out {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Stock Update Controls */
.stock-update-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: center;
}

.stock-update-actions input.stock-input {
    width: 60px;
    text-align: center;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--pos-border);
    border-radius: 6px;
    padding: 6px 4px;
    color: var(--pos-text);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

.stock-update-actions input.stock-input::-webkit-outer-spin-button,
.stock-update-actions input.stock-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-change-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--pos-border);
    color: var(--pos-text);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.qty-change-btn:hover {
    background: var(--pos-border);
}

.qty-change-btn.minus:hover {
    color: var(--pos-danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.qty-change-btn.plus:hover {
    color: var(--pos-primary);
    border-color: rgba(16, 185, 129, 0.3);
}

.save-stock-btn {
    background: var(--pos-primary);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
    transition: background 0.2s;
}

.save-stock-btn:hover {
    background: var(--pos-primary-hover);
}

/* =========================================================================
   PAGE DÉDIÉE DE GESTION DES STOCKS
   ========================================================================= */

.pos-stock-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    box-sizing: border-box;
    min-height: calc(100vh - 40px);
}

.pos-stock-main {
    background: var(--pos-panel);
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--pos-shadow);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.stock-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--pos-border);
    padding-bottom: 20px;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.category-tabs .tab-btn {
    background: rgba(255, 255, 255, 0.03);
    color: var(--pos-text-muted);
    border: 1px solid var(--pos-border);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.category-tabs .tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--pos-text);
}

.category-tabs .tab-btn.active {
    background: var(--pos-secondary);
    border-color: var(--pos-secondary);
    color: white;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

/* Stock Grid */
.stock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Stock Cards */
.stock-card-item {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid var(--pos-border);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stock-card-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.4);
}

.stock-card-item.card-ok {
    border-color: rgba(16, 185, 129, 0.15);
}

.stock-card-item.card-low {
    border-color: rgba(245, 158, 11, 0.3);
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.03) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.stock-card-item.card-out {
    border-color: rgba(239, 68, 68, 0.3);
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
}

.stock-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.stock-card-category {
    background: rgba(255, 255, 255, 0.05);
    color: var(--pos-text-muted);
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 500;
}

.stock-card-price {
    color: var(--pos-card);
    font-weight: 700;
}

.stock-card-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pos-text);
}

.stock-card-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.15);
    padding: 10px 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.stock-current-qty {
    font-size: 0.9rem;
    color: var(--pos-text-muted);
}

.stock-current-qty strong {
    color: var(--pos-text);
    font-size: 1.05rem;
    margin-left: 3px;
}

.stock-card-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 5px;
}

.stock-qty-adjust {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid var(--pos-border);
    padding: 2px;
    width: 100%;
}

.stock-qty-adjust .adjust-btn {
    background: transparent;
    border: none;
    color: var(--pos-text-muted);
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border-radius: 6px;
}

.stock-qty-adjust .adjust-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--pos-text);
}

.stock-qty-adjust .adjust-btn.adjust-btn.minus-ten:hover,
.stock-qty-adjust .adjust-btn.adjust-btn.minus-one:hover {
    color: var(--pos-danger);
}

.stock-qty-adjust .adjust-btn.adjust-btn.plus-ten:hover,
.stock-qty-adjust .adjust-btn.adjust-btn.plus-one:hover {
    color: var(--pos-primary);
}

.stock-qty-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    color: var(--pos-text);
    font-family: inherit;
    font-weight: 700;
    text-align: center;
    font-size: 1rem;
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

.stock-qty-input::-webkit-outer-spin-button,
.stock-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.stock-save-btn {
    width: 100%;
    padding: 10px;
    background: var(--pos-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.stock-save-btn:hover:not(:disabled) {
    background: var(--pos-primary-hover);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.stock-save-btn:disabled {
    background: var(--pos-border);
    color: var(--pos-text-muted);
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .stock-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .category-tabs {
        justify-content: center;
    }
}

/* =========================================================================
   GESTION DES PRODUITS (AJOUT / SUPPRESSION)
   ========================================================================= */

/* Add Product Button */
.add-product-btn {
    background: var(--pos-primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.15);
}

.add-product-btn:hover {
    background: var(--pos-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(16, 185, 129, 0.25);
}

/* Delete Product Button inside Card */
.delete-product-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-product-btn:hover {
    color: var(--pos-danger);
    background: rgba(239, 68, 68, 0.1);
    transform: scale(1.1);
}

/* Form Inputs inside Modal */
.form-control {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--pos-border);
    color: var(--pos-text);
    padding: 10px 14px;
    border-radius: 8px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--pos-secondary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

/* POS Alerts */
.pos-alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
}

.pos-alert.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}