/* ==========================================================================
   components.css — Heritage Business Suite  ·  "Indigo & Crimson" variant
   ========================================================================== */

/* --------------------------------------------------------------------------
   Buttons — crimson CTA, indigo secondary
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: var(--r-md);
  font-size: .82rem; font-weight: 700; border: 1px solid transparent;
  cursor: pointer; white-space: nowrap; letter-spacing: .01em;
  transition: background var(--ease), box-shadow var(--ease), transform var(--ease), border-color var(--ease);
}
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Primary — crimson, logo energy colour */
.btn-primary {
  background: var(--crimson);
  color: #fff; border-color: var(--crimson);
  box-shadow: 0 2px 8px var(--crimson-glow);
}
.btn-primary:hover {
  background: var(--crimson-lt); border-color: var(--crimson-lt);
  box-shadow: 0 4px 16px var(--crimson-glow);
  transform: translateY(-1px);
}

/* Secondary — indigo toned */
.btn-secondary {
  background: var(--indigo-800); color: var(--indigo-100);
  border-color: var(--bdr-md);
}
.btn-secondary:hover { background: var(--indigo-750); border-color: var(--bdr-hi); }

.btn-danger  { background: rgba(239,68,68,.10); color: var(--err); border-color: rgba(239,68,68,.22); }
.btn-danger:hover { background: rgba(239,68,68,.20); }
.btn-ghost   { color: var(--txt-2); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--txt-1); }
.btn-success { background: rgba(34,197,94,.10); color: var(--ok); border-color: rgba(34,197,94,.22); }
.btn-success:hover { background: rgba(34,197,94,.20); }

.btn-sm   { padding: 5px 12px; font-size: .76rem; }
.btn-lg   { padding: 9px 22px; font-size: .88rem; }
.btn-icon { padding: 6px; }
.btn:disabled { opacity: .38; cursor: not-allowed; transform: none !important; }

/* --------------------------------------------------------------------------
   Card — indigo-tinted, crimson header rail
   -------------------------------------------------------------------------- */
.card {
  background: var(--bg-2);
  border: 1px solid var(--bdr-lo);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--bdr-lo);
  background: var(--bg-3);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  border-left: 3px solid var(--crimson-rule);
}
.card-header h3 { font-size: .88rem; font-weight: 700; }
.card-header p  { font-size: .70rem; color: var(--txt-2); margin-top: 2px; }
.card-body   { padding: 18px; }
.card-footer {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-top: 1px solid var(--bdr-lo);
  background: var(--bg-3); border-radius: 0 0 var(--r-lg) var(--r-lg);
}

/* --------------------------------------------------------------------------
   Stat card — crimson accent, indigo glow
   -------------------------------------------------------------------------- */
.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--bdr-lo);
  border-radius: var(--r-lg); padding: 18px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
  border-top: 3px solid var(--stripe-color, var(--bdr-lo));
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--bdr-md); }

.stat-card-glow {
  position: absolute; top: -24px; right: -24px;
  width: 90px; height: 90px; border-radius: 50%;
  filter: blur(30px); opacity: .08;
}
.stat-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }

.stat-icon {
  width: 40px; height: 40px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid transparent;
}
.stat-icon svg { width: 19px; height: 19px; }

.stat-trend {
  display: flex; align-items: center; gap: 3px;
  padding: 3px 7px; border-radius: var(--r-sm);
  font-size: .67rem; font-weight: 700; font-family: var(--f-num);
}
.trend-up   { background: rgba(34,197,94,.12); color: var(--ok);  border: 1px solid rgba(34,197,94,.22); }
.trend-down { background: rgba(239,68,68,.12); color: var(--err); border: 1px solid rgba(239,68,68,.22); }
.trend-up svg, .trend-down svg { width: 10px; height: 10px; }

.stat-value {
  font-size: clamp(1.05rem, 2.2vw, 1.60rem);
  font-weight: 800; font-family: var(--f-num);
  letter-spacing: -.02em; line-height: 1.1; margin-bottom: 3px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat-label { font-size: .76rem; color: var(--txt-2); font-weight: 600; }
.stat-sub   { font-size: .70rem; color: var(--txt-3); margin-top: 8px; font-family: var(--f-num); }

/* Colour variants — crimson is "gold" primary */
.stat-gold   { --stripe-color: var(--crimson); }
.stat-gold   .stat-icon { background: var(--crimson-dim); color: var(--crimson-lt); border-color: var(--crimson-glow); }
.stat-gold   .stat-card-glow { background: var(--crimson); }
.stat-gold   .stat-value { color: var(--crimson-lt); }

.stat-teal   { --stripe-color: var(--info); }
.stat-teal   .stat-icon { background: rgba(56,189,248,.10); color: var(--info); border-color: rgba(56,189,248,.20); }
.stat-teal   .stat-card-glow { background: var(--info); }

.stat-rose   { --stripe-color: var(--magenta); }
.stat-rose   .stat-icon { background: var(--magenta-dim); color: var(--magenta); border-color: rgba(214,51,132,.22); }
.stat-rose   .stat-card-glow { background: var(--magenta); }

.stat-violet { --stripe-color: #A78BFA; }
.stat-violet .stat-icon { background: rgba(167,139,250,.10); color: #A78BFA; border-color: rgba(167,139,250,.20); }
.stat-violet .stat-card-glow { background: #A78BFA; }

/* --------------------------------------------------------------------------
   Progress bar
   -------------------------------------------------------------------------- */
.progress-bar  { background: var(--indigo-800); border-radius: var(--r-pill); height: 5px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: var(--r-pill); background: var(--crimson); transition: width .55s cubic-bezier(.16,1,.3,1); }
.progress-fill.teal   { background: var(--info); }
.progress-fill.rose   { background: var(--magenta); }
.progress-fill.violet { background: #A78BFA; }
.progress-fill.success{ background: var(--ok); }

/* --------------------------------------------------------------------------
   Data table
   -------------------------------------------------------------------------- */
.table-container {
  background: var(--bg-2); border: 1px solid var(--bdr-lo);
  border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden;
}
.table-toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--bdr-lo);
  flex-wrap: wrap; background: var(--bg-3);
  border-left: 3px solid var(--crimson-rule);
}
.table-toolbar-title h3 { font-size: .88rem; font-weight: 700; }
.table-toolbar-title p  { font-size: .70rem; color: var(--txt-3); }
.table-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }

.table-search {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-0); border: 1px solid var(--bdr-lo);
  border-radius: var(--r-md); padding: 6px 10px;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.table-search:focus-within { border-color: var(--crimson); box-shadow: 0 0 0 3px var(--crimson-dim); }
.table-search svg   { width: 13px; height: 13px; color: var(--txt-3); }
.table-search input { font-size: .80rem; width: 170px; background: transparent; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table thead th {
  padding: 9px 14px; text-align: left;
  font-size: .67rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--indigo-400);
  background: var(--indigo-950);
  border-bottom: 1px solid var(--bdr-lo);
  white-space: nowrap; cursor: pointer; user-select: none;
  transition: color var(--ease);
}
.data-table thead th:hover { color: var(--indigo-200); }
.data-table thead th.sorted { color: var(--crimson-lt); }

.data-table tbody tr { border-bottom: 1px solid var(--bdr-lo); transition: background var(--ease); }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg-hover); }
.data-table tbody td { padding: 11px 14px; font-size: .82rem; vertical-align: middle; }

.cell-name { display: flex; align-items: center; gap: 9px; }
.cell-name .name { font-weight: 600; }
.cell-name .sub  { font-size: .70rem; color: var(--txt-3); font-family: var(--f-num); }

.row-actions { display: flex; gap: 3px; opacity: 0; transition: opacity var(--ease); }
.data-table tbody tr:hover .row-actions { opacity: 1; }

.table-pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px; border-top: 1px solid var(--bdr-lo);
  flex-wrap: wrap; gap: 8px; background: var(--bg-3);
}
.pagination-info     { font-size: .75rem; color: var(--txt-2); font-family: var(--f-num); }
.pagination-controls { display: flex; gap: 3px; }

.page-btn {
  width: 28px; height: 28px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: .76rem; font-weight: 700; font-family: var(--f-num);
  background: var(--bg-2); border: 1px solid var(--bdr-lo);
  color: var(--txt-2); cursor: pointer;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}
.page-btn:hover  { border-color: var(--crimson); color: var(--crimson-lt); }
.page-btn.active { background: var(--crimson); color: #fff; border-color: var(--crimson); box-shadow: 0 2px 6px var(--crimson-glow); }

/* --------------------------------------------------------------------------
   Form elements
   -------------------------------------------------------------------------- */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: .76rem; font-weight: 700;
  color: var(--indigo-300); margin-bottom: 6px;
  letter-spacing: .02em;
}
.form-label .required { color: var(--crimson); margin-left: 2px; }

.form-control {
  width: 100%; background: var(--indigo-950);
  border: 1px solid var(--bdr-md); border-radius: var(--r-md);
  padding: 8px 12px; font-size: .83rem; color: var(--indigo-100);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.form-control::placeholder { color: var(--indigo-500); }
.form-control:focus {
  border-color: var(--crimson);
  box-shadow: 0 0 0 3px var(--crimson-dim);
}
.form-control.error   { border-color: var(--err); }
.form-control:disabled{ opacity: .38; cursor: not-allowed; }

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%236260C8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px;
}
textarea.form-control { resize: vertical; min-height: 90px; }

.form-hint  { font-size: .70rem; color: var(--txt-3); margin-top: 4px; }
.form-error { font-size: .70rem; color: var(--err);   margin-top: 4px; display: none; }
.form-group.has-error .form-error   { display: block; }
.form-group.has-error .form-control { border-color: var(--err); }

.form-row   { display: grid; grid-template-columns: 1fr 1fr;        gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.input-group               { position: relative; }
.input-group .form-control { padding-left: 36px; }
.input-group .input-icon {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; color: var(--indigo-400); pointer-events: none;
}

/* Toggle — crimson active */
.toggle-switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.toggle-switch input { display: none; }
.toggle-track {
  width: 38px; height: 20px; border-radius: var(--r-pill);
  background: var(--indigo-800); border: 1px solid var(--bdr-md);
  position: relative; transition: background var(--ease), border-color var(--ease);
}
.toggle-track::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--indigo-400);
  transition: transform var(--ease), background var(--ease);
}
.toggle-switch input:checked + .toggle-track { background: var(--crimson-dim); border-color: var(--crimson); }
.toggle-switch input:checked + .toggle-track::after { transform: translateX(18px); background: var(--crimson); }
.toggle-label { font-size: .82rem; font-weight: 500; }

/* File upload */
.file-upload {
  border: 1px dashed var(--bdr-md); border-radius: var(--r-lg);
  padding: 24px; text-align: center; cursor: pointer;
  background: var(--bg-0); transition: border-color var(--ease), background var(--ease);
}
.file-upload:hover, .file-upload.drag-over { border-color: var(--crimson); background: var(--crimson-dim); }
.file-upload input         { display: none; }
.file-upload-text          { font-size: .82rem; color: var(--txt-2); }
.file-upload-text strong   { color: var(--crimson-lt); }
.file-upload-hint          { font-size: .70rem; color: var(--txt-3); margin-top: 3px; }

/* --------------------------------------------------------------------------
   Modal — crimson top rule
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(10,9,48,.70); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: fadeIn .18s ease both;
}
.modal {
  background: var(--indigo-850);
  border: 1px solid var(--bdr-md);
  border-top: 3px solid var(--crimson);
  border-radius: var(--r-xl); box-shadow: var(--shadow-modal);
  width: 100%; max-width: 520px; max-height: 90vh;
  overflow: hidden; display: flex; flex-direction: column;
  animation: fadeInUp .28s cubic-bezier(.16,1,.3,1) both;
}
.modal.modal-lg { max-width: 680px; }
.modal.modal-xl { max-width: 860px; }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 14px; border-bottom: 1px solid var(--bdr-lo);
  background: var(--indigo-800);
}
.modal-header h3 { font-size: .96rem; font-weight: 800; }

.modal-close {
  width: 28px; height: 28px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--indigo-400); cursor: pointer;
  transition: background var(--ease), color var(--ease);
}
.modal-close:hover { background: var(--indigo-750); color: var(--indigo-100); }
.modal-close svg   { width: 15px; height: 15px; }

.modal-body   { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 8px; padding: 14px 20px; border-top: 1px solid var(--bdr-lo);
  background: var(--indigo-800);
}

/* --------------------------------------------------------------------------
   Tabs — crimson underline
   -------------------------------------------------------------------------- */
.tabs {
  display: flex; gap: 0; background: transparent;
  border-bottom: 1px solid var(--bdr-lo); padding: 0;
}
.tab-btn {
  padding: 8px 16px; border-radius: 0;
  font-size: .80rem; font-weight: 700;
  color: var(--txt-3); cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color var(--ease), border-color var(--ease);
}
.tab-btn.active { color: var(--crimson-lt); border-bottom-color: var(--crimson); }
.tab-btn:hover:not(.active) { color: var(--txt-1); }

/* --------------------------------------------------------------------------
   Alert
   -------------------------------------------------------------------------- */
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--r-md);
  border: 1px solid transparent; border-left-width: 3px;
}
.alert svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }
.alert-content h5 { font-size: .82rem; font-weight: 700; }
.alert-content p  { font-size: .76rem; margin-top: 2px; }
.alert-success { background: rgba(34,197, 94,.08); border-color: rgba(34,197, 94,.18); color: var(--ok);   border-left-color: var(--ok); }
.alert-warning { background: rgba(245,158, 11,.08); border-color: rgba(245,158, 11,.18); color: var(--warn); border-left-color: var(--warn); }
.alert-danger  { background: rgba(239, 68, 68,.08); border-color: rgba(239, 68, 68,.18); color: var(--err);  border-left-color: var(--err); }
.alert-info    { background: rgba( 56,189,248,.08); border-color: rgba( 56,189,248,.18); color: var(--info); border-left-color: var(--info); }

/* --------------------------------------------------------------------------
   Toast — crimson left rail
   -------------------------------------------------------------------------- */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 1000; display: flex; flex-direction: column; gap: 6px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  min-width: 260px; max-width: 340px;
  padding: 12px 16px;
  background: var(--indigo-850);
  border: 1px solid var(--bdr-md); border-left: 3px solid var(--crimson);
  border-radius: var(--r-lg); box-shadow: var(--shadow-modal);
  animation: slideDown .22s ease both;
}
.toast-icon { width: 26px; height: 26px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.toast-icon svg { width: 13px; height: 13px; }
.toast-text  { flex: 1; }
.toast-title { font-size: .82rem; font-weight: 700; }
.toast-msg   { font-size: .73rem; color: var(--txt-2); }
.toast-close { color: var(--txt-3); cursor: pointer; transition: color var(--ease); }
.toast-close:hover { color: var(--txt-1); }
.toast.success { border-left-color: var(--ok);   }
.toast.warning { border-left-color: var(--warn); }
.toast.error   { border-left-color: var(--err);  }
.toast.info    { border-left-color: var(--info); }
.toast.success .toast-icon { background: rgba(34,197, 94,.14); color: var(--ok);   }
.toast.warning .toast-icon { background: rgba(245,158, 11,.14); color: var(--warn); }
.toast.error   .toast-icon { background: rgba(239, 68, 68,.14); color: var(--err);  }
.toast.info    .toast-icon { background: rgba( 56,189,248,.14); color: var(--info); }

/* --------------------------------------------------------------------------
   Filter bar
   -------------------------------------------------------------------------- */
.filter-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-select {
  background: var(--bg-2); border: 1px solid var(--bdr-lo);
  border-radius: var(--r-md); padding: 6px 28px 6px 10px;
  font-size: .80rem; color: var(--txt-1); appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236260C8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
  cursor: pointer; transition: border-color var(--ease);
}
.filter-select:focus { border-color: var(--crimson); outline: none; }

/* --------------------------------------------------------------------------
   Mini bar chart — crimson bars
   -------------------------------------------------------------------------- */
.mini-chart { display: flex; align-items: flex-end; gap: 4px; height: 48px; }
.mini-bar   { flex: 1; min-width: 5px; background: var(--crimson); opacity: .28; border-radius: 2px 2px 0 0; transition: opacity var(--ease); }
.mini-bar.active, .mini-bar:hover { opacity: .90; }

/* --------------------------------------------------------------------------
   POS layout
   -------------------------------------------------------------------------- */
.pos-layout { display: grid; grid-template-columns: 1fr 320px; gap: 12px; height: calc(100vh - 20px); min-height: 0; }

.pos-products {
  background: var(--bg-2); border: 1px solid var(--bdr-lo);
  border-radius: var(--r-lg); display: flex; flex-direction: column;
  overflow: hidden; min-height: 0;
}
.pos-search     { padding: 12px 14px; border-bottom: 1px solid var(--bdr-lo); background: var(--bg-3); }
.pos-categories {
  display: flex; gap: 5px; padding: 10px 14px;
  border-bottom: 1px solid var(--bdr-lo); overflow-x: auto; background: var(--bg-3);
}
.pos-cat-btn {
  padding: 4px 12px; border-radius: var(--r-sm); font-size: .74rem; font-weight: 600;
  background: var(--bg-2); border: 1px solid var(--bdr-lo); color: var(--txt-2);
  white-space: nowrap; cursor: pointer;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}
.pos-cat-btn.active { background: var(--crimson-dim); border-color: var(--crimson); color: var(--crimson-lt); }

.pos-grid {
  flex: 1; overflow-y: auto;
  display: grid; grid-template-columns: repeat(auto-fill, 130px);
  grid-auto-rows: 140px; align-content: start;
  gap: 10px; padding: 12px; justify-content: start;
}
.pos-item {
  background: var(--bg-3); border: 1px solid var(--bdr-lo);
  border-radius: var(--r-lg); padding: 12px; text-align: center;
  cursor: pointer; width: 130px; height: 140px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden; transition: border-color var(--ease), background var(--ease), transform var(--ease);
}
.pos-item:hover { border-color: var(--crimson); background: var(--crimson-dim); transform: translateY(-2px); }
.pos-item-icon  { width: 40px; height: 40px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; margin: 0 auto 7px; font-size: 1.2rem; flex-shrink: 0; }
.pos-item-name  { font-size: .76rem; font-weight: 600; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pos-item-price { font-size: .84rem; font-weight: 700; color: var(--crimson-lt); font-family: var(--f-num); }

.pos-item-img { background-size: cover; background-position: center; background-repeat: no-repeat; position: relative; overflow: hidden; width: 130px; height: 140px; padding: 0; display: flex; align-items: flex-end; justify-content: stretch; }
.pos-item-img .pos-item-img-overlay { width: 100%; padding: 22px 8px 8px; background: linear-gradient(to top, rgba(10,9,48,.90) 0%, transparent 100%); text-align: left; }
.pos-item-img .pos-item-name  { color: #fff; font-size: .74rem; font-weight: 700; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-item-img .pos-item-price { color: var(--crimson-lt); font-size: .80rem; font-weight: 700; }

.pos-cart {
  background: var(--bg-2); border: 1px solid var(--bdr-lo);
  border-radius: var(--r-lg); display: flex; flex-direction: column;
  overflow: hidden; min-height: 0; height: 100%;
}
.pos-cart-top     { flex-shrink: 0; }
.pos-cart-header  { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--bdr-lo); background: var(--bg-3); border-left: 3px solid var(--crimson-rule); }
.pos-cart-items   { flex: 1; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 3px; }

.cart-item { display: flex; align-items: center; gap: 5px; padding: 6px 8px; border-radius: var(--r-sm); background: var(--bg-3); border: 1px solid var(--bdr-lo); transition: border-color var(--ease); flex-shrink: 0; }
.cart-item:hover     { border-color: var(--bdr-md); }
.cart-item-name      { font-size: .73rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-sub       { font-size: .62rem; color: var(--txt-3); margin-top: 1px; }
.cart-item-price     { font-weight: 700; font-size: .76rem; color: var(--crimson-lt); white-space: nowrap; flex-shrink: 0; font-family: var(--f-num); }
.cart-remove         { color: var(--txt-3); cursor: pointer; padding: 2px; border-radius: 3px; transition: color var(--ease); flex-shrink: 0; line-height: 0; }
.cart-remove:hover   { color: var(--err); }

.qty-control { display: flex; align-items: center; gap: 2px; background: var(--bg-0); border-radius: var(--r-sm); padding: 1px 2px; flex-shrink: 0; border: 1px solid var(--bdr-lo); }
.qty-btn     { width: 16px; height: 16px; border-radius: 2px; display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; color: var(--txt-2); cursor: pointer; transition: background var(--ease), color var(--ease); user-select: none; }
.qty-btn:hover  { background: var(--crimson); color: #fff; }
.qty-value      { font-size: .70rem; font-weight: 700; min-width: 14px; text-align: center; font-family: var(--f-num); }

.pos-summary  { padding: 10px 12px; border-top: 1px solid var(--bdr-lo); background: var(--bg-3); flex-shrink: 0; }
.summary-row  { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: .76rem; }
.summary-row.total { font-weight: 700; font-size: .88rem; border-top: 1px solid var(--bdr-md); padding-top: 6px; margin-top: 2px; }
.summary-row .label    { color: var(--txt-2); }
.summary-row.total .value { color: var(--crimson-lt); font-family: var(--f-num); }

.pos-payment-methods { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; }
.pay-method { padding: 5px 3px; border-radius: var(--r-sm); border: 1px solid var(--bdr-lo); font-size: .67rem; font-weight: 600; text-align: center; cursor: pointer; background: var(--bg-2); color: var(--txt-2); letter-spacing: .02em; transition: border-color var(--ease), color var(--ease), background var(--ease); }
.pay-method.active { border-color: var(--crimson); color: var(--crimson-lt); background: var(--crimson-dim); }

/* --------------------------------------------------------------------------
   Project cards
   -------------------------------------------------------------------------- */
.project-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px,1fr)); gap: 14px; }
.project-card {
  background: var(--bg-2); border: 1px solid var(--bdr-lo);
  border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow);
  border-left: 3px solid var(--crimson-rule);
  transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease);
}
.project-card:hover { border-color: var(--bdr-md); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.project-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.project-thumb    { width: 46px; height: 46px; border-radius: var(--r-md); background: var(--bg-3); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; border: 1px solid var(--bdr-lo); }
.project-client   { font-size: .94rem; font-weight: 800; margin-bottom: 2px; }
.project-type     { font-size: .70rem; color: var(--txt-2); }
.project-meta     { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.project-meta-row { display: flex; align-items: center; gap: 7px; font-size: .78rem; color: var(--txt-2); }
.project-meta-row svg { width: 12px; height: 12px; color: var(--txt-3); flex-shrink: 0; }
.project-footer   { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--bdr-lo); }
.project-progress-label { font-size: .70rem; color: var(--txt-3); margin-bottom: 4px; }

/* --------------------------------------------------------------------------
   Empty state
   -------------------------------------------------------------------------- */
.empty-state { text-align: center; padding: 44px 20px; }
.empty-state svg { width: 44px; height: 44px; color: var(--indigo-600); margin: 0 auto 14px; }
.empty-state h4  { font-size: .94rem; margin-bottom: 5px; }
.empty-state p   { font-size: .80rem; color: var(--txt-2); }

/* --------------------------------------------------------------------------
   Timeline — crimson dots
   -------------------------------------------------------------------------- */
.timeline { display: flex; flex-direction: column; }
.timeline-item { display: flex; gap: 12px; padding-bottom: 16px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot-col { display: flex; flex-direction: column; align-items: center; }
.timeline-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--crimson); flex-shrink: 0; margin-top: 5px; box-shadow: 0 0 0 3px var(--crimson-dim); }
.timeline-dot.teal   { background: var(--info);    box-shadow: 0 0 0 3px rgba(56,189,248,.12); }
.timeline-dot.rose   { background: var(--magenta); box-shadow: 0 0 0 3px var(--magenta-dim); }
.timeline-dot.violet { background: #A78BFA;        box-shadow: 0 0 0 3px rgba(167,139,250,.12); }
.timeline-line { width: 1px; flex: 1; background: var(--bdr-lo); margin-top: 4px; }
.timeline-item:last-child .timeline-line { display: none; }
.timeline-content        { flex: 1; min-width: 0; }
.timeline-content .title { font-size: .82rem; font-weight: 600; }
.timeline-content .meta  { font-size: .70rem; color: var(--txt-3); margin-top: 2px; font-family: var(--f-num); }
