/* Claude Accounting System - base theme */
:root {
  --ca-sidebar: #1e1b4b;
  --ca-sidebar-2: #312e81;
  --ca-accent: #6d28d9;
  --ca-bg: #f5f6fa;
}
body.app { background: var(--ca-bg); font-size: .9rem; }
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar { width: 250px; flex: 0 0 250px; background: var(--ca-sidebar); color: #e0e7ff; position: sticky; top: 0; height: 100vh; overflow-y: auto; transition: margin .2s; }
.app-sidebar .brand { padding: 1rem; font-weight: 600; font-size: 1.05rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.app-sidebar .brand a { color: #fff; text-decoration: none; }
.app-nav { padding: .5rem 0 2rem; }
.app-nav .nav-link { color: #c7d2fe; padding: .45rem 1rem; display: flex; align-items: center; gap: .5rem; border-left: 3px solid transparent; }
.app-nav .nav-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.app-nav .nav-link.active { color: #fff; background: var(--ca-sidebar-2); border-left-color: #a78bfa; }
.app-nav .sub .nav-link { padding-left: 2.4rem; font-size: .85rem; }
.app-nav .nav-group .bi-chevron-down { transition: transform .2s; }
.app-nav .nav-group:not(.collapsed) .bi-chevron-down { transform: rotate(180deg); }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar { background: #fff; border-bottom: 1px solid #e5e7eb; padding: .5rem 1rem; display: flex; align-items: center; gap: .75rem; position: sticky; top: 0; z-index: 1020; }
.topbar-info { display: flex; gap: .5rem; flex-wrap: wrap; }
.app-content { padding: 1rem; }
.page-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { font-size: 1.25rem; margin: 0; font-weight: 600; }
.page-head .actions { margin-left: auto; display: flex; gap: .4rem; flex-wrap: wrap; }
.card { border: 1px solid #e5e7eb; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.table thead th { background: #eef0ff; white-space: nowrap; font-weight: 600; }
.table td, .table th { vertical-align: middle; }
.table-lines input.form-control, .table-lines select.form-select { min-width: 70px; padding: .2rem .35rem; font-size: .85rem; }
.table-lines td { padding: .25rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.form-label { font-weight: 500; margin-bottom: .2rem; font-size: .85rem; }
.autocomplete-suggestions { border: 1px solid #ccc; background: #fff; overflow: auto; z-index: 2000 !important; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.autocomplete-suggestion { padding: 4px 8px; white-space: nowrap; overflow: hidden; cursor: pointer; }
.autocomplete-selected { background: #ede9fe; }
.autocomplete-suggestions strong { color: var(--ca-accent); }
.autocomplete-no-suggestion { padding: 4px 8px; color: #888; }
.locked-banner { background: #fff3cd; border: 1px solid #ffe69c; padding: .5rem; text-align: center; font-weight: 600; }
.stat-card .value { font-size: 1.5rem; font-weight: 600; }
.stat-card .label { color: #6b7280; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1e1b4b, #6d28d9); }
.login-card { width: 100%; max-width: 400px; }
.badge-official { background: #16a34a; }
.badge-nonofficial { background: #6b7280; }
.totals-box .form-control[readonly] { background: #f8f9fa; font-weight: 600; text-align: right; }
.dt-container .dt-search input { min-width: 220px; }
@media (max-width: 991.98px) {
  .app-sidebar { position: fixed; z-index: 1040; margin-left: -250px; }
  .app-sidebar.open { margin-left: 0; }
}
@media print {
  .app-sidebar, .app-topbar, .no-print, .page-head .actions { display: none !important; }
  .app-content { padding: 0; }
}

/* ---- POS ---- */
.pos-wrap .pos-lines { max-height: calc(100vh - 330px); min-height: 240px; overflow: auto; }
.pos-items { max-height: calc(100vh - 260px); overflow: auto; align-content: flex-start; }
.pos-cats { max-height: calc(100vh - 220px); overflow: auto; }
.pos-card { border: 1px solid var(--bs-border-color); border-radius: .5rem; background: var(--bs-body-bg); padding: .5rem; text-align: left; min-height: 86px; }
.pos-card:hover { border-color: #6d28d9; box-shadow: 0 2px 8px rgba(109, 40, 217, .15); }
.pos-card.official { border-left: 4px solid #6d28d9; }

/* ---- dashboard ---- */
.stat-card .stat-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.35rem; flex: 0 0 46px; }
