/* ================================================================
   LOSANDY TATTOO — Stylesheet Principal
   Diseño gótico moderno | Fondo blanco + acentos oscuros
   ================================================================ */

/* ── Variables ──────────────────────────────────────────────── */
:root {
    --bg:          #ffffff;
    --bg-secondary:#f6f5f3;
    --bg-card:     #ffffff;
    --bg-sidebar:  #0d0d0d;
    --bg-dark:     #111111;
    --text:        #1a1a1a;
    --text-muted:  #6b6b6b;
    --text-light:  #999;
    --border:      #e0ddd8;
    --border-dark: #2a2a2a;
    --primary:     #8B0000;
    --primary-dark:#6a0000;
    --primary-light:#c41e3a;
    --gold:        #C9A227;
    --gold-light:  #e2ba3f;
    --success:     #2d6a4f;
    --warning:     #c77b0b;
    --danger:      #8B0000;
    --info:        #1a4a6b;
    --sidebar-w:   260px;
    --topbar-h:    64px;
    --radius:      8px;
    --shadow:      0 2px 12px rgba(0,0,0,.08);
    --shadow-lg:   0 8px 32px rgba(0,0,0,.14);
    --font-gothic: 'Cinzel', serif;
    --font-dec:    'Cinzel Decorative', cursive;
    --font-body:   'Inter', sans-serif;
    --transition:  all .2s ease;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text);
    background: var(--bg-secondary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-light); }

img { max-width: 100%; display: block; }

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

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--bg-sidebar);
    position: fixed;
    top: 0; left: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    border-right: 1px solid #1e1e1e;
    overflow: hidden;
}

.sidebar-brand {
    padding: 1.5rem 1.2rem 1rem;
    border-bottom: 1px solid #1e1e1e;
    text-align: center;
    position: relative;
}

.sidebar-brand::after {
    content: '';
    display: block;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--gold), var(--primary), transparent);
    margin-top: 1rem;
}

.sidebar-logo {
    max-height: 120px;
    margin: 0 auto 0.5rem;
    border-radius: 6px;
}

.sidebar-brand-name {
    font-family: var(--font-dec);
    font-size: 0.85rem;
    color: #fff;
    letter-spacing: 0.05em;
    line-height: 1.3;
}

.sidebar-brand-sub {
    font-family: var(--font-gothic);
    font-size: 0.6rem;
    color: var(--gold);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    display: block;
    margin-top: 2px;
}

/* Sidebar navigation */
.sidebar-nav { flex: 1; padding: 1rem 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #333 transparent; }

.nav-section {
    padding: 0.8rem 1rem 0.3rem;
    font-family: var(--font-gothic);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #F00;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.2rem;
    color: #aaa;
    font-size: 0.82rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    cursor: pointer;
    white-space: nowrap;
}

.nav-item:hover { color: #fff; background: rgba(139,0,0,.15); }

.nav-item.active {
    color: #fff;
    background: rgba(139,0,0,.2);
}

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

.nav-item .nav-icon { font-size: 1.1rem; width: 20px; text-align: center; flex-shrink: 0; }

.sidebar-footer {
    padding: 1rem 1.2rem;
    border-top: 1px solid #1e1e1e;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
}

.sidebar-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-gothic);
    font-weight: 700;
    color: #fff;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { color: #ccc; font-size: 0.8rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { color: #555; font-size: 0.68rem; font-family: var(--font-gothic); letter-spacing: 0.1em; }

/* ── Top Bar ────────────────────────────────────────────────── */
.topbar {
    height: var(--topbar-h);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-title {
    font-family: var(--font-gothic);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.topbar-right { display: flex; align-items: center; gap: 1rem; }

/* ── Main Content ───────────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-content { flex: 1; padding: 1.5rem; }

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

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.card-title {
    font-family: var(--font-gothic);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-title-accent { color: var(--primary); }

.card-body { padding: 1.25rem; }

/* Gothic card variant */
.card-gothic {
    border-color: #1a1a1a;
    background: #0d0d0d;
    color: #ccc;
}

.card-gothic .card-header {
    border-color: #222;
    background: #0a0a0a;
}

.card-gothic .card-title { color: #fff; }

/* ── Stat Widgets ───────────────────────────────────────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
}

.stat-card.primary::before { background: var(--primary); }
.stat-card.gold::before    { background: var(--gold); }
.stat-card.success::before { background: #2d6a4f; }
.stat-card.info::before    { background: #1a4a6b; }
.stat-card.danger::before  { background: #8B0000; }

.stat-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.stat-icon.primary { background: rgba(139,0,0,.1); color: var(--primary); }
.stat-icon.gold    { background: rgba(201,162,39,.1); color: var(--gold); }
.stat-icon.success { background: rgba(45,106,79,.1); color: #2d6a4f; }
.stat-icon.info    { background: rgba(26,74,107,.1); color: #1a4a6b; }

.stat-value {
    font-family: var(--font-gothic);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
    margin-bottom: 0.3rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: var(--font-gothic);
}

.stat-sub { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.5rem; }
.stat-sub .up   { color: #2d6a4f; }
.stat-sub .down { color: var(--primary); }

/* ── Tables ─────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.data-table thead th {
    padding: 0.75rem 1rem;
    font-family: var(--font-gothic);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
    text-align: left;
}

.data-table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

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

.data-table tbody tr:hover { background: #faf9f7; }

.data-table tfoot td {
    padding: 0.75rem 1rem;
    border-top: 2px solid var(--border);
    font-weight: 600;
    background: var(--bg-secondary);
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 1.1rem;
    border-radius: 6px;
    border: 1px solid transparent;
    font-family: var(--font-gothic);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
}

.btn:disabled { opacity: 0.55; cursor: not-allowed; }

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

.btn-gold {
    background: var(--gold);
    color: #1a1a1a;
    border-color: #b89020;
}
.btn-gold:hover:not(:disabled) { background: var(--gold-light); color: #1a1a1a; }

.btn-outline {
    background: transparent;
    color: #fe0505;
    border-color: var(--border);
}
.btn-outline:hover:not(:disabled) { background: var(--bg-secondary); }

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline-primary:hover:not(:disabled) { background: var(--primary); color: #fff; }

.btn-danger {
    background: #8B0000;
    color: #fff;
    border-color: #6a0000;
}
.btn-danger:hover:not(:disabled) { background: #6a0000; color: #fff; }

.btn-success {
    background: #2d6a4f;
    color: #fff;
    border-color: #1e4d38;
}
.btn-success:hover:not(:disabled) { background: #1e4d38; color: #fff; }

.btn-sm { padding: 0.3rem 0.75rem; font-size: 0.7rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 0.85rem; }
.btn-icon { padding: 0.4rem; aspect-ratio: 1; }
.btn-block { width: 100%; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }

.form-label {
    display: block;
    font-family: var(--font-gothic);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

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

.form-control {
    display: block;
    width: 100%;
    padding: 0.55rem 0.9rem;
    font-size: 0.88rem;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: var(--transition);
    line-height: 1.5;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139,0,0,.12);
}

.form-control::placeholder { color: var(--text-light); }

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

select.form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 2.2rem; appearance: none; }

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

.form-text { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.25rem; }
.form-error { font-size: 0.72rem; color: var(--primary); margin-top: 0.25rem; }

.form-row { display: grid; gap: 1rem; }
.form-row.cols-2 { grid-template-columns: repeat(2, 1fr); }
.form-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.form-row.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Checkbox / Radio */
.check-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
}

.check-label input[type=checkbox],
.check-label input[type=radio] {
    width: 16px; height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-family: var(--font-gothic);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.badge-success { background: rgba(45,106,79,.12); color: #2d6a4f; }
.badge-warning { background: rgba(199,123,11,.12); color: #c77b0b; }
.badge-danger         { background: rgba(139,0,0,.12);   color: #8B0000; }
.badge-info           { background: rgba(26,74,107,.12);  color: #1a4a6b; }
.badge-secondary      { background: #f0eee9; color: #666; }
.badge-gold           { background: rgba(201,162,39,.12); color: #8a6c10; }
.badge-refund         { background: rgba(90,30,120,.14);  color: #7b2fbe; }
.badge-refund-partial { background: rgba(90,30,120,.08);  color: #9b59b6; }

/* ── Alerts ──────────────────────────────────────────────────── */
.alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    border-left: 4px solid transparent;
    font-size: 0.85rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-success { background: rgba(45,106,79,.08); border-color: #2d6a4f; color: #1e4d38; }
.alert-danger  { background: rgba(139,0,0,.08);   border-color: #8B0000; color: #6a0000; }
.alert-warning { background: rgba(199,123,11,.08); border-color: #c77b0b; color: #a06000; }
.alert-info    { background: rgba(26,74,107,.08);  border-color: #1a4a6b; color: #133659; }

/* ── Dividers & Ornaments ────────────────────────────────────── */
.gothic-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-light);
    font-family: var(--font-gothic);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
}
.gothic-divider::before, .gothic-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ── Page Header ─────────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-header-left h1 {
    font-family: var(--font-gothic);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-header-left h1 .page-icon { color: var(--primary); }
.breadcrumb { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; display: flex; gap: 0.4rem; align-items: center; }
.breadcrumb a { color: var(--primary); }
.breadcrumb span { color: var(--border); }

.page-actions { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }

/* ── Pagination ──────────────────────────────────────────────── */
.pagination {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    justify-content: center;
    margin-top: 1.25rem;
}

.page-btn {
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-family: var(--font-gothic);
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-card);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.page-btn:hover   { border-color: var(--primary); color: var(--primary); }
.page-btn.active  { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn.disabled{ opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(3px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
}

.modal-overlay.show { opacity: 1; pointer-events: all; }

.modal-box {
    background: var(--bg-card);
    border-radius: 12px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform .25s;
    border: 1px solid var(--border);
}

.modal-overlay.show .modal-box { transform: translateY(0); }

.modal-header {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 1;
}

.modal-title {
    font-family: var(--font-gothic);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text);
}

.modal-close {
    width: 32px; height: 32px;
    border: none;
    background: var(--bg-secondary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover { background: var(--border); }

.modal-body { padding: 1.25rem; }
.modal-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 0.75rem; }

/* ── Tabs ────────────────────────────────────────────────────── */
.tabs { border-bottom: 1px solid var(--border); display: flex; gap: 0; margin-bottom: 1.25rem; }

.tab-btn {
    padding: 0.65rem 1.2rem;
    font-family: var(--font-gothic);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    transition: var(--transition);
    white-space: nowrap;
}

.tab-btn:hover  { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Gallery Grid ────────────────────────────────────────────── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
}

.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.6);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity .2s;
}

.gallery-item:hover .gallery-item-overlay { opacity: 1; }

/* ── Currency Display ────────────────────────────────────────── */
.currency-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--border);
    font-size: 0.82rem;
}

.currency-row:last-child { border-bottom: none; }
.currency-code { font-family: var(--font-gothic); font-weight: 700; color: var(--text); }
.currency-amount { color: var(--primary); font-weight: 600; }

/* ── Summary Box ─────────────────────────────────────────────── */
.summary-box {
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 100%);
    border: 1px solid #2a2a2a;
    border-radius: var(--radius);
    padding: 1.25rem;
    color: #fff;
}

.summary-box .summary-total {
    font-family: var(--font-dec);
    font-size: 2rem;
    color: var(--gold);
    text-align: center;
    padding: 0.5rem 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    font-size: 0.83rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    color: #aaa;
}

.summary-row:last-child { border-bottom: none; }
.summary-row .label { color: #777; }
.summary-row .value { font-weight: 600; color: #ddd; }
.summary-row.total-row { color: #fff; font-size: 1rem; margin-top: 0.5rem; padding-top: 0.75rem; border-top: 1px solid #333; }
.summary-row.total-row .value { color: var(--gold); font-family: var(--font-gothic); font-size: 1.1rem; }

/* ── Signature Pad ────────────────────────────────────────────── */
#signature-canvas {
    border: 2px dashed var(--border);
    border-radius: 8px;
    cursor: crosshair;
    background: #fff;
    touch-action: none;
    display: block;
}

/* ── Toasts ──────────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--bg-dark);
    color: #fff;
    border-radius: 8px;
    padding: 0.85rem 1.2rem;
    font-size: 0.85rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 260px;
    max-width: 360px;
    border-left: 4px solid var(--primary);
    animation: toastIn .3s ease;
}

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

/* ── POS Layout ──────────────────────────────────────────────── */
.pos-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 1.25rem;
    align-items: start;
}

.pos-products { max-height: calc(100vh - 200px); overflow-y: auto; }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.product-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    background: var(--bg-card);
}

.product-card:hover { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(139,0,0,.1); }

.product-name { font-weight: 600; font-size: 0.82rem; margin-bottom: 0.3rem; }
.product-price { font-family: var(--font-gothic); color: var(--primary); font-size: 0.9rem; font-weight: 700; }

/* ── Cart ────────────────────────────────────────────────────── */
.cart-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.83rem;
}

.cart-item:last-child { border-bottom: none; }
.cart-item-name { flex: 1; font-weight: 500; }
.cart-item-qty  { display: flex; align-items: center; gap: 0.3rem; }
.cart-qty-btn   { width: 24px; height: 24px; border: 1px solid var(--border); border-radius: 4px; background: none; cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.cart-qty-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.cart-item-price { font-weight: 600; color: var(--primary); white-space: nowrap; }

/* ── Charts container ─────────────────────────────────────────── */
.chart-container { position: relative; height: 280px; }

/* ── Utilities ────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-muted); }
.text-primary{ color: var(--primary); }
.text-gold   { color: var(--gold); }
.text-success{ color: #2d6a4f; }
.text-danger { color: #8B0000; }
.text-sm     { font-size: 0.8rem; }
.text-xs     { font-size: 0.72rem; }
.text-gothic { font-family: var(--font-gothic); }
.fw-600      { font-weight: 600; }
.fw-700      { font-weight: 700; }

.d-flex  { display: flex; }
.d-grid  { display: grid; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }

.w-100 { width: 100%; }

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 3rem; opacity: 0.3; margin-bottom: 1rem; display: block; }
.empty-state p { font-size: 0.9rem; }

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #999; }

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

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); transition: transform .3s; }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .form-row.cols-2, .form-row.cols-3, .form-row.cols-4 { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .pos-layout { grid-template-columns: 1fr; }
}
