/* ============================================================
   Vende, Cobra y Factura — CSS Principal
   Mobile-first, tema claro/oscuro, CSS custom properties
   ============================================================ */

/* ── Variables (tema claro por defecto) ──────────────────── */
:root {
    --color-primary:      #1e40af;
    --color-primary-dark: #1e3a8a;
    --color-primary-light:#3b82f6;
    --color-accent:       #0ea5e9;
    --color-success:      #16a34a;
    --color-warning:      #d97706;
    --color-danger:       #dc2626;
    --color-info:         #0891b2;

    --color-bg:           #f8fafc;
    --color-bg-card:      #ffffff;
    --color-bg-sidebar:   #1e293b;
    --color-bg-nav:       #1e40af;
    --color-bg-input:     #ffffff;
    --color-bg-hover:     #f1f5f9;
    --color-bg-code:      #f1f5f9;

    --color-text:         #1e293b;
    --color-text-muted:   #64748b;
    --color-text-light:   #94a3b8;
    --color-text-nav:     #e2e8f0;
    --color-text-on-primary: #ffffff;

    --color-border:       #e2e8f0;
    --color-border-focus: #3b82f6;

    --color-shadow:       rgba(0, 0, 0, 0.08);
    --color-shadow-md:    rgba(0, 0, 0, 0.12);

    --radius-sm:  4px;
    --radius:     8px;
    --radius-lg:  12px;
    --radius-xl:  16px;
    --radius-full:9999px;

    --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:   'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

    --transition: 0.2s ease;
    --nav-width:  260px;
    --nav-collapsed: 64px;
    --header-h:   60px;
}

/* ── Tema oscuro automático ──────────────────────────────── */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --color-bg:          #0f172a;
        --color-bg-card:     #1e293b;
        --color-bg-sidebar:  #0f172a;
        --color-bg-input:    #1e293b;
        --color-bg-hover:    #334155;
        --color-bg-code:     #0f172a;
        --color-text:        #e2e8f0;
        --color-text-muted:  #94a3b8;
        --color-text-light:  #64748b;
        --color-border:      #334155;
        --color-shadow:      rgba(0, 0, 0, 0.3);
        --color-shadow-md:   rgba(0, 0, 0, 0.4);
    }
}

/* ── Tema oscuro manual ──────────────────────────────────── */
[data-theme="dark"] {
    --color-bg:          #0f172a;
    --color-bg-card:     #1e293b;
    --color-bg-sidebar:  #0f172a;
    --color-bg-input:    #1e293b;
    --color-bg-hover:    #334155;
    --color-bg-code:     #0f172a;
    --color-text:        #e2e8f0;
    --color-text-muted:  #94a3b8;
    --color-text-light:  #64748b;
    --color-border:      #334155;
    --color-shadow:      rgba(0, 0, 0, 0.3);
    --color-shadow-md:   rgba(0, 0, 0, 0.4);
}

/* ── Reset y base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; height: 100%; }

body {
    font-family:      var(--font-family);
    background-color: var(--color-bg);
    color:            var(--color-text);
    line-height:      1.6;
    min-height:       100vh;
    display:          flex;
    flex-direction:   column;
    transition:       background-color var(--transition), color var(--transition);
}

a { color: var(--color-primary-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: 2px; border-radius: var(--radius-sm); }

img { max-width: 100%; height: auto; }

/* ── Layout principal ────────────────────────────────────── */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar / Nav ───────────────────────────────────────── */
.sidebar {
    width: var(--nav-width);
    min-height: 100vh;
    background: var(--color-bg-sidebar);
    color: var(--color-text-nav);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 200;
    transition: width var(--transition), transform var(--transition);
    overflow-x: hidden;
}

.sidebar.collapsed { width: var(--nav-collapsed); }

.sidebar-brand {
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: var(--header-h);
}

.sidebar-brand-icon {
    width: 36px; height: 36px;
    background: var(--color-primary-light);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.sidebar-brand-text {
    font-size: 14px;
    font-weight: 700;
    color: white;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-brand-text span {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: rgba(255,255,255,0.6);
}

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

.nav-section-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.4);
    padding: 12px 16px 4px;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.collapsed .nav-section-title { opacity: 0; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    border-radius: 0;
    transition: background var(--transition), color var(--transition);
    position: relative;
    white-space: nowrap;
    cursor: pointer;
}

.nav-item:hover, .nav-item.active {
    background: rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--color-primary-light);
    border-radius: 0 2px 2px 0;
}

.nav-item-icon {
    width: 20px; height: 20px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
}

.nav-item-text { font-size: 14px; overflow: hidden; }
.sidebar.collapsed .nav-item-text { width: 0; opacity: 0; }

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

/* ── Main content ────────────────────────────────────────── */
.main-content {
    margin-left: var(--nav-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition);
    min-width: 0;
}

.sidebar.collapsed ~ .main-content { margin-left: var(--nav-collapsed); }

/* ── Header / Topbar ────────────────────────────────────── */
.topbar {
    background: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border);
    height: var(--header-h);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px var(--color-shadow);
}

.topbar-toggle {
    background: none; border: none; cursor: pointer;
    color: var(--color-text-muted);
    padding: 8px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    transition: background var(--transition);
}
.topbar-toggle:hover { background: var(--color-bg-hover); color: var(--color-text); }

.topbar-breadcrumb {
    flex: 1;
    font-size: 14px;
    color: var(--color-text-muted);
}

.topbar-breadcrumb h1 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle {
    background: none; border: none; cursor: pointer;
    color: var(--color-text-muted);
    padding: 8px; border-radius: var(--radius-sm);
    font-size: 18px;
    transition: background var(--transition);
}
.theme-toggle:hover { background: var(--color-bg-hover); color: var(--color-text); }

/* ── Page content ────────────────────────────────────────── */
.page-content {
    flex: 1;
    padding: 24px;
    max-width: 1400px;
    width: 100%;
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 3px var(--color-shadow);
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    flex: 1;
}

.card-body { padding: 20px; }

/* ── KPI Cards ───────────────────────────────────────────── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: 0 1px 3px var(--color-shadow);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kpi-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    font-weight: 500;
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
}

.kpi-value.primary { color: var(--color-primary); }
.kpi-value.success { color: var(--color-success); }
.kpi-value.warning { color: var(--color-warning); }

.kpi-sub {
    font-size: 12px;
    color: var(--color-text-muted);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
    user-select: none;
}

.btn:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: 2px; }

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

.btn-secondary {
    background: var(--color-bg-card);
    color: var(--color-text);
    border-color: var(--color-border);
}
.btn-secondary:hover { background: var(--color-bg-hover); text-decoration: none; }

.btn-success { background: var(--color-success); color: white; border-color: var(--color-success); }
.btn-success:hover { opacity: 0.9; color: white; text-decoration: none; }

.btn-danger  { background: var(--color-danger);  color: white; border-color: var(--color-danger); }
.btn-danger:hover  { opacity: 0.9; color: white; text-decoration: none; }

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

.btn-outline {
    background: transparent;
    border-color: var(--color-border);
    color: var(--color-text);
}
.btn-outline:hover { background: var(--color-bg-hover); text-decoration: none; }

.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 16px; }
.btn-icon { padding: 8px; aspect-ratio: 1; }

.btn:disabled, .btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 6px;
}

.form-label .required { color: var(--color-danger); margin-left: 2px; }

.form-control {
    width: 100%;
    padding: 8px 12px;
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text);
    font-size: 14px;
    font-family: var(--font-family);
    transition: border-color var(--transition), box-shadow var(--transition);
    appearance: none;
}

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

.form-control.is-invalid {
    border-color: var(--color-danger);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

textarea.form-control { resize: vertical; min-height: 80px; }

.form-error {
    font-size: 12px;
    color: var(--color-danger);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.form-hint {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-check input { width: 16px; height: 16px; cursor: pointer; }

/* ── Select ──────────────────────────────────────────────── */
select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
}

/* ── Tables ──────────────────────────────────────────────── */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    background: var(--color-bg-card);
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table thead th {
    background: var(--color-bg-hover);
    padding: 10px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--color-border);
    transition: background var(--transition);
}

.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--color-bg-hover); }

.data-table td {
    padding: 10px 14px;
    vertical-align: middle;
    color: var(--color-text);
}

/* ── Badges ──────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success  { background: rgba(22, 163, 74, 0.1);  color: var(--color-success); }
.badge-warning  { background: rgba(217, 119, 6, 0.1);  color: var(--color-warning); }
.badge-danger   { background: rgba(220, 38, 38, 0.1);  color: var(--color-danger); }
.badge-info     { background: rgba(8, 145, 178, 0.1);  color: var(--color-info); }
.badge-primary  { background: rgba(30, 64, 175, 0.1);  color: var(--color-primary); }
.badge-muted    { background: var(--color-bg-hover);   color: var(--color-text-muted); }

/* ── Alerts / Flash messages ─────────────────────────────── */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
    animation: slideDown 0.3s ease;
}

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

.alert-success { background: rgba(22, 163, 74, 0.1); color: var(--color-success); border: 1px solid rgba(22, 163, 74, 0.3); }
.alert-error   { background: rgba(220, 38, 38, 0.1); color: var(--color-danger);  border: 1px solid rgba(220, 38, 38, 0.3); }
.alert-warning { background: rgba(217, 119, 6, 0.1); color: var(--color-warning); border: 1px solid rgba(217, 119, 6, 0.3); }
.alert-info    { background: rgba(8, 145, 178, 0.1); color: var(--color-info);    border: 1px solid rgba(8, 145, 178, 0.3); }

.alert-close {
    margin-left: auto;
    background: none; border: none; cursor: pointer;
    color: inherit; font-size: 18px; line-height: 1;
    opacity: 0.7;
    transition: opacity var(--transition);
    flex-shrink: 0;
}
.alert-close:hover { opacity: 1; }

/* ── Toasts ──────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    top: 20px; right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 360px;
}

.toast {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 12px 16px;
    box-shadow: 0 4px 12px var(--color-shadow-md);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    animation: slideIn 0.3s ease;
    cursor: pointer;
}

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

.toast.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    to { opacity: 0; transform: translateX(100%); }
}

.toast-success { border-left: 4px solid var(--color-success); }
.toast-error   { border-left: 4px solid var(--color-danger);  }
.toast-warning { border-left: 4px solid var(--color-warning); }
.toast-info    { border-left: 4px solid var(--color-info);    }

/* ── Modals ──────────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 40px var(--color-shadow-md);
    width: 100%; max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.2s ease;
}

@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--color-border);
    display: flex; align-items: center; gap: 12px;
}

.modal-title { font-size: 18px; font-weight: 600; flex: 1; }

.modal-close {
    background: none; border: none; cursor: pointer;
    color: var(--color-text-muted);
    font-size: 24px; line-height: 1;
    padding: 4px; border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.modal-close:hover { background: var(--color-bg-hover); color: var(--color-text); }

.modal-body    { padding: 20px; }
.modal-footer  { padding: 16px 20px; border-top: 1px solid var(--color-border); display: flex; gap: 8px; justify-content: flex-end; }

/* ── Pagination ──────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
    padding: 16px 0;
}

.pagination-btn {
    padding: 6px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    background: var(--color-bg-card);
    color: var(--color-text);
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    min-width: 36px;
    text-align: center;
}

.pagination-btn:hover      { background: var(--color-bg-hover); text-decoration: none; }
.pagination-btn.active     { background: var(--color-primary); color: white; border-color: var(--color-primary); }
.pagination-btn:disabled   { opacity: 0.4; cursor: not-allowed; }

/* ── Search bar ──────────────────────────────────────────── */
.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 6px 12px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.search-bar:focus-within {
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.search-bar input {
    border: none; background: transparent;
    color: var(--color-text); font-size: 14px;
    outline: none; flex: 1; min-width: 0;
}

/* ── Utility classes ────────────────────────────────────── */
.flex     { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2    { gap: 8px; }
.gap-3    { gap: 12px; }
.gap-4    { gap: 16px; }
.w-full   { width: 100%; }
.mt-4     { margin-top: 16px; }
.mb-4     { margin-bottom: 16px; }
.p-4      { padding: 16px; }
.text-sm  { font-size: 13px; }
.text-muted { color: var(--color-text-muted); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.font-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }
.truncate  { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Currency */
.currency::before { content: '$'; }

/* ── Grid helpers ────────────────────────────────────────── */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Loading ─────────────────────────────────────────────── */
.spinner {
    width: 20px; height: 20px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 9998;
    display: flex; align-items: center; justify-content: center;
}

/* ── Footer ──────────────────────────────────────────────── */
.app-footer {
    background: var(--color-bg-card);
    border-top: 1px solid var(--color-border);
    padding: 12px 24px;
    font-size: 12px;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    :root { --nav-width: 280px; }

    .sidebar {
        transform: translateX(-100%);
        width: var(--nav-width) !important;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0,0,0,0.3);
    }

    .main-content { margin-left: 0 !important; }

    .mobile-overlay {
        display: none;
        position: fixed; inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 199;
    }

    .mobile-overlay.active { display: block; }

    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .page-content { padding: 16px; }
}

@media (max-width: 480px) {
    .kpi-grid { grid-template-columns: 1fr; }
    .modal { margin: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
    .modal-overlay { align-items: flex-end; padding: 0; }
}

/* ── Autocomplete dropdown ──────────────────────────────── */
.autocomplete-dropdown {
    position: absolute;
    z-index: 500;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: 0 4px 12px var(--color-shadow-md);
    max-height: 240px;
    overflow-y: auto;
    width: 100%;
    top: 100%;
    left: 0;
}

.autocomplete-item {
    padding: 10px 14px;
    cursor: pointer;
    transition: background var(--transition);
    font-size: 14px;
}

.autocomplete-item:hover, .autocomplete-item.focused {
    background: var(--color-bg-hover);
}

.autocomplete-item strong { color: var(--color-primary-light); }

/* ── Sale items table ────────────────────────────────────── */
.sale-items-table { font-size: 13px; }
.sale-items-table td { padding: 6px 10px; }
.sale-items-table input.form-control { padding: 4px 8px; font-size: 13px; }

/* ── Print styles ────────────────────────────────────────── */
@media print {
    .sidebar, .topbar, .app-footer, .btn, .topbar-actions { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .page-content { padding: 0; }
    .card { box-shadow: none; border: 1px solid #ccc; }
}
