/* Custom CSS for POS System */

:root {
    /* Main Color Palette */
    --primary-color: #9f7aea;     /* Soft Purple */
    --primary-hover: #805ad5;     /* Slightly darker purple for hover */
    --secondary-color: #63b3ed;   /* Soft Blue */
    --accent-color: #68d391;      /* Mint Green */
    
    /* Neutral Colors */
    --background-color: #f7fafc;  /* Very light gray */
    --card-bg: #ffffff;          /* White */
    --nav-bg: #4a5568;           /* Gray for navigation */
    --border-color: #e2e8f0;     /* Light gray border */
    
    /* Text Colors */
    --text-color: #2d3748;       /* Dark gray for main text */
    --text-muted: #718096;       /* Medium gray for secondary text */
    --text-light: #f7fafc;       /* Light text for dark backgrounds */
    
    /* Form Elements */
    --input-bg: #ffffff;         /* White input background */
    --input-border: #cbd5e0;     /* Light gray border for inputs */
    
    /* Hover States */
    --card-hover: #f0f5ff;       /* Very light blue for card hover */
    --nav-hover: #2d3748;        /* Darker gray for nav hover */
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

main {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    main,
    main .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem !important;
    }

    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-footer {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .modal-footer .btn {
        flex: 1 1 45%;
    }

    .product-card {
        width: 100%;
    }

    .table-responsive {
        overflow-x: auto;
    }

    .btn-group-sm > .btn {
        padding: 0.35rem 0.55rem;
    }

    #productSearch {
        margin-top: 0.5rem;
    }
}

/* Navbar Styles */
.navbar {
    background-color: var(--nav-bg) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 2rem;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-light) !important;
    letter-spacing: 0.5px;
}

.navbar-nav .nav-link {
    color: var(--text-light) !important;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    margin: 0 0.25rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background-color: var(--nav-hover);
    color: white !important;
}

/* Form Controls */
.form-control, .form-select, input[type="text"], input[type="search"], input[type="number"], textarea, select {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #2d3748 !important;
    border-radius: 0.5rem !important;
    padding: 0.5rem 1rem !important;
    transition: all 0.2s ease !important;
    width: 100% !important;
}

.form-control:focus, .form-select:focus, 
input[type="text"]:focus, input[type="search"]:focus, 
input[type="number"]:focus, textarea:focus, select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(159, 122, 234, 0.2) !important;
    outline: none !important;
}

/* Search Box */
#productSearch {
    height: 48px !important;
    font-size: 1.05rem !important;
    padding: 0.6rem 1rem 0.6rem 2.25rem !important; /* space for icon */
    border-radius: 4px !important;
    border: 1px solid #e2e8f0 !important;
    background-color: #f8fafc !important;
    transition: all 0.2s ease !important;
    width: 100% !important;
    font-weight: 400;
    color: #1e293b !important;
}

#productSearch:focus {
    border-color: #9f7aea !important;
    box-shadow: 0 0 0 2px rgba(159, 122, 234, 0.2) !important;
    background-color: #ffffff !important;
    outline: none !important;
}

/* Search box container */
.input-group {
    max-width: 100%;
    margin: 0;
    border-radius: 4px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
}

.input-group-text {
    height: 48px !important;
    padding: 0 1rem !important;
    background-color: transparent !important;
    border: none !important;
    color: #64748b !important;
}

.input-group-text i {
    font-size: 1.1rem !important;
}

/* Placeholder text */
#productSearch::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
    font-weight: 400;
}

/* Remove default input group styling */
.input-group > .form-control {
    border: none !important;
    background: transparent !important;
    padding-left: 0.5rem !important;
    height: 100% !important;
}

/* Adjust the input when it's inside an input group */
.input-group:focus-within {
    border-color: #9f7aea !important;
    box-shadow: 0 0 0 2px rgba(159, 122, 234, 0.2) !important;
    background-color: #ffffff !important;
}

.search-box .form-control {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0.25rem 0.5rem !important;
    color: #2d3748 !important;
}

.search-box:focus-within {
    box-shadow: 0 0 0 2px var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

/* Form Labels & Required Fields */
.form-label {
    color: #374151 !important; /* Darker gray for better visibility */
    font-weight: 500 !important;
    margin-bottom: 0.5rem !important;
    display: block;
    font-size: 0.9375rem;
}

/* Style for required field indicators */
.form-label.required::after,
label.required::after,
.form-required::after,
.form-label:has(+ input:required)::after,
.form-label:has(+ div > input:required)::after {
    content: " *";
    color: #ef4444;
    font-weight: bold;
    margin-left: 2px;
}

/* Make required field labels darker */
.form-label.required,
label.required,
.form-required,
.form-label:has(+ input:required),
.form-label:has(+ div > input:required) {
    color: #1f2937 !important; /* Very dark gray, almost black */
    font-weight: 600 !important;
}

/* Form help text and validation */
.form-text,
.invalid-feedback,
.text-muted {
    color: #4b5563 !important; /* Dark gray for better visibility */
    font-size: 0.8125rem;
    margin-top: 0.25rem;
    display: block;
    font-weight: 400;
}

/* Make invalid feedback more prominent */
.invalid-feedback {
    color: #dc2626 !important; /* Darker red for errors */
    font-weight: 500;
}

/* Product Cards */
.product-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-img-container {
    position: relative;
    height: 200px;
    overflow: hidden;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-img-top {
    max-height: 100%;
    width: auto;
    object-fit: contain;
    padding: 1rem;
}

.price-info {
    margin-top: 0.5rem;
}

/* Position badges */
.position-absolute {
    z-index: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .product-card {
        margin-bottom: 1.5rem;
    }
    
    .card-img-container {
        height: 160px;
    }
}

/* Specific styles for the Formato Requerido card */
.card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
}

.card-header {
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.25rem;
}

.card-header h5 {
    color: #1e293b;
    font-weight: 600;
    margin: 0;
    font-size: 1.1rem;
}

.card-body {
    padding: 1.25rem;
    color: #334155;
    background-color: #ffffff;
}

.card-body p, 
.card-body ul, 
.card-body li {
    color: #334155 !important;
}

.card-body strong {
    color: #1e293b;
}

.card-body .text-muted {
    color: #64748b !important;
}

/* Required input field styling */
input:required + .form-label::after,
select:required + .form-label::after,
textarea:required + .form-label::after {
    content: " *";
    color: #ef4444;
    font-weight: bold;
}

/* Make sure all form controls have good contrast */
.form-control, .form-select, input, textarea, select {
    color: #1f2937 !important;
    background-color: #ffffff !important;
}

/* Focus states for better accessibility */
.form-control:focus, .form-select:focus, input:focus, textarea:focus, select:focus {
    border-color: #9f7aea !important;
    box-shadow: 0 0 0 0.25rem rgba(159, 122, 234, 0.25) !important;
}

/* Placeholder text color */
::placeholder {
    color: #9ca3af !important; /* Lighter gray for placeholders */
    opacity: 1 !important;
}

/* Fix for autofill backgrounds */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active  {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: #2d3748 !important;
}

/* Tables */
.table {
    color: var(--text-color);
}

.table th {
    border-color: var(--border-color);
    background-color: rgba(255, 255, 255, 0.05);
}

.table td {
    border-color: var(--border-color);
    vertical-align: middle;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

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

::-webkit-scrollbar-track {
    background: var(--card-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Card Styles */
.card {
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    background-color: var(--card-bg);
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: none;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
    background-color: var(--card-hover);
}

/* Specific styles for cash register view */
.reports .card-header {
    background-color: #f8f9fa;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    padding: 0.75rem 1.25rem;
}

.reports .card-header h5 {
    color: #343a40;
    margin-bottom: 0;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Ensure export button is visible */
.reports .card-header .btn-outline-success {
    border-color: #198754;
    color: #198754;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.reports .card-header .btn-outline-success:hover {
    background-color: #198754;
    color: white;
    box-shadow: 0 2px 4px rgba(25, 135, 84, 0.2);
}

/* Add some spacing between icon and text in buttons */
.reports .card-header .btn i {
    margin-right: 0.25rem;
}

/* Product Cards */
.product-card {
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    background-color: var(--card-bg);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.product-card .card-title {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-card .card-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.product-card .price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0.5rem 0;
}

.product-card .stock {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.product-card .stock.low {
    color: #e53e3e;
    font-weight: 500;
}

/* Buttons */
.btn {
    border-radius: 0.5rem;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

/* Badges */
.badge {
    padding: 0.4em 0.8em;
    font-weight: 500;
    border-radius: 0.375rem;
}

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

/* Tables */
.table {
    color: var(--text-color);
    border-color: var(--border-color);
}

.table th {
    background-color: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom-width: 1px;
    padding: 0.75rem 1.5rem;
}

.table td {
    padding: 1rem 1.5rem;
    vertical-align: middle;
    border-color: var(--border-color);
}

.table-hover tbody tr:hover {
    background-color: rgba(159, 122, 234, 0.05);
}

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

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Product Cards */
.product-card {
    transition: all 0.3s ease;
    cursor: pointer;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card .card-body {
    padding: 1rem;
    background-color: #fff;
    color: #212529;
}

.product-card .card-title {
    color: #212529;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* POS Specific Styles */
.product-card-pos {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 0.5rem;
    overflow: hidden;
}

.product-card-pos .card-body {
    padding: 0.75rem;
    background-color: #fff;
    color: #212529;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card-pos .card-title {
    color: #212529;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    white-space: normal; /* Allow text to wrap */
    overflow: hidden;    /* Hide overflow */
    text-overflow: ellipsis; /* Show ellipsis for overflow */
    height: auto;        /* Allow height to grow */
    min-height: 1.2em;   /* Minimum height for one line */
    max-height: 4.2em;   /* Maximum height for 3 lines (1.4em per line) */
    line-height: 1.4;    /* Improve line spacing */
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limit to 3 lines */
    line-clamp: 3;       /* Standard property */
    -webkit-box-orient: vertical;
    box-orient: vertical;
}

.product-card-pos .text-muted {
    color: #6c757d !important;
    font-size: 0.8rem;
}

.product-card-pos .text-primary {
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* Price styles */
.product-card-pos .price-info {
    margin: 0.5rem 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.product-card-pos .price-info > div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

.product-card-pos .price-info .text-success {
    color: #10b981 !important;
}

.product-card-pos .price-info .text-info {
    color: #3b82f6 !important;
}

.product-card-pos .price-info .text-danger {
    color: #ef4444 !important;
}

.product-card-pos:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Text and Typography */
.card {
    color: var(--text-color);
}

.card-body {
    background-color: var(--card-bg);
    padding: 1.25rem;
}

/* Text Colors */
.text-primary {
    color: var(--primary-color) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-dark {
    color: var(--dark-color) !important;
}

/* Backgrounds */
.bg-light {
    background-color: var(--light-color) !important;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: darken(var(--primary-color), 10%);
    border-color: darken(var(--primary-color), 10%);
}

.cart-item {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease;
}

.cart-item:hover {
    background-color: #e9ecef;
}

/* Table Styles */
.table {
    background-color: white;
}

.table th {
    border-top: none;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.025);
}

/* Badge Styles */
.badge {
    font-size: 0.75em;
    font-weight: 500;
}

/* Button Styles */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-group .btn {
    transform: none;
}

.btn-group .btn:hover {
    transform: none;
}

/* Form Styles */
.form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.input-group-text {
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
}

.alert-dismissible .btn-close {
    padding: 0.75rem 1rem;
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    border-radius: 0.5rem 0.5rem 0 0;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 0.5rem 0.5rem;
}

/* Loading Spinner */
.spinner-border {
    width: 2rem;
    height: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .card-img-container {
        height: 150px;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .btn-group .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .card-img-container {
        height: 120px;
    }
    
    .product-card .card-body {
        padding: 0.75rem;
    }
    
    .btn-sm {
        padding: 0.125rem 0.25rem;
        font-size: 0.75rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .modal,
    .alert {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
    
    .table {
        font-size: 0.75rem;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #ffffff;
    }
    
    .card {
        background-color: #2d2d2d;
        color: #ffffff;
    }
    
    .table {
        background-color: #2d2d2d;
        color: #ffffff;
    }
    
    .form-control {
        background-color: #2d2d2d;
        border-color: #495057;
        color: #ffffff;
    }
    
    .input-group-text {
        background-color: #495057;
        border-color: #495057;
        color: #ffffff;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Utility Classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Product modal: keep footer visible and form scrollable */
.product-modal-content {
    max-height: 92vh;
    display: flex;
    flex-direction: column;
}

.product-modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.product-modal-footer {
    position: sticky;
    bottom: 0;
    background: #fff;
    z-index: 2;
    border-top: 1px solid #dee2e6;
}

@media (max-height: 800px) {
    .product-modal-body {
        max-height: calc(85vh - 120px);
    }
}

/* Toggle switch for user active state */
.form-switch .form-check-input {
    width: 2.8em;
    height: 1.4em;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
    background-position: left center;
    background-repeat: no-repeat;
    background-size: 16px 16px;
}
.form-switch .form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.25);
    background-position: right center;
}
.form-switch .form-check-input:not(:checked) {
    background-color: #f1f3f5;
    border-color: #adb5bd;
    box-shadow: inset 0 0 0 1px rgba(173, 181, 189, 0.6);
    background-position: left center;
}
.form-switch .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Toolbar: buscador + acción */
.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    max-width: 820px;
    width: 100%;
}

.search-pill {
    flex: 1;
    min-width: 240px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 48px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid transparent;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.search-pill:focus-within {
    border-color: transparent;
    background: #ffffff;
    box-shadow: 0 16px 42px rgba(92, 124, 250, 0.14);
}

.search-pill input {
    border: none !important;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    flex: 1;
    height: 100%;
    font-size: 0.95rem;
}

.search-pill .bi {
    color: #94a3b8;
    font-size: 1.1rem;
    margin-right: 10px;
}

.btn-import {
    height: 48px;
    padding: 0 20px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #12b886, #0b8c6b);
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 12px 28px rgba(12, 166, 120, 0.3);
}

.btn-import:hover {
    color: #fff;
    filter: brightness(1.04);
}

.btn-import .bi {
    font-size: 1.1rem;
}

/* Public catalog styles */
.public-topbar {
    background: #f8fafc;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    border: 1px solid #e2e8f0;
}
.public-topbar .icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    background: #fff;
    transition: all 0.2s ease;
}
.public-topbar .icon-btn:hover {
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}
.public-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
}
.public-wrap {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}
.public-catalog {
    padding-top: 1rem;
    flex: 1 1 auto;
}
.public-title {
    font-weight: 700;
}
.public-header .public-logo {
    font-size: 1.6rem;
    color: #0ea5e9;
}
.public-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 320px;
}
.public-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}
.public-card-col {
    display: flex;
    justify-content: center;
    max-width: 320px;
}
@media (min-width: 768px) {
    .public-card-col { max-width: 300px; }
}
@media (min-width: 1200px) {
    .public-card-col { max-width: 320px; }
}
.public-card-img {
    position: relative;
    height: 140px;
    background: linear-gradient(145deg, #f5f7fb, #eef2f7);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.public-card-img img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    width: 100%;
    height: 100%;
    padding: 10px;
}
.stock-chip {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}
.stock-chip.success { background: linear-gradient(135deg, #16a34a, #0f9d58); }
.stock-chip.warning { background: linear-gradient(135deg, #f59e0b, #f97316); }
.stock-chip.danger { background: linear-gradient(135deg, #ef4444, #dc2626); }

.public-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.public-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: #111827;
}
.public-card-desc {
    font-size: 0.92rem;
    color: #6b7280;
    margin: 0;
}
.public-card-priceblock {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f8fbff, #f1f5f9);
    border: 1px solid #e2e8f0;
}
.public-card-priceblock .label {
    font-size: 0.85rem;
    color: #6b7280;
}
.public-card-priceblock .price-main {
    font-weight: 800;
    font-size: 1.05rem;
    color: #0ea5e9;
}
.public-toolbar {
    max-width: 1100px;
    width: 100%;
}

.public-footer {
    width: 100%;
    padding: 18px 0 20px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.9rem;
    border-top: 1px solid #e2e8f0;
    margin-top: auto;
}
