/* Trunked refined surfaces, 2026-11-07. Presentation only.
   Loaded last: retain existing responsive, role and print workflows. */
html body {
  --tk-bg-primary: #0d1422;
  --tk-bg-card: #151f30;
  --tk-bg-input: #111b2b;
  --tk-bg-sidebar: #101929;
  --tk-text-primary: #eef3fc;
  --tk-text-secondary: #bdc9df;
  --tk-text-muted: #97a8c4;
  --tk-border: #2a3850;
  --tk-glass-border: #2a3850;
  --tk-refined-tint: #1b2a40;
  --tk-refined-shadow: 0 2px 4px #00000012, 0 12px 28px #00000014;
  --tk-refined-ring: #7bd5e5;
  --tk-refresh-tint: var(--tk-refined-tint);
  --tk-refresh-ring: var(--tk-refined-ring);
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
}
html.light body {
  --tk-bg-primary: #f2f5fa;
  --tk-bg-card: #ffffff;
  --tk-bg-input: #f8fafd;
  --tk-bg-sidebar: #ffffff;
  --tk-text-primary: #172740;
  --tk-text-secondary: #435674;
  --tk-text-muted: #596d88;
  --tk-border: #dce5f1;
  --tk-glass-border: #dce5f1;
  --tk-refined-tint: #edf2fb;
  --tk-refined-shadow: 0 1px 3px #203e6505, 0 6px 20px #203e6508;
  --tk-refined-ring: #344caf;
  color-scheme: light;
}
html body .tk-shell { background: var(--tk-bg-primary); }
html body .tk-content { background: transparent; }
html body :is(.tk-topbar, .tk-mobile-bar) {
  background: var(--tk-bg-card);
  border-bottom: 1px solid var(--tk-border);
  box-shadow: 0 2px 10px #0b244505;
}
html body .tk-sidebar {
  background: var(--tk-bg-sidebar);
  border-right: 1px solid var(--tk-border);
  box-shadow: none;
}
html body .tk-nav-section-label { color: var(--tk-text-muted); letter-spacing: .13em; }
html body .tk-nav-item {
  border: 1px solid transparent;
  border-radius: 9px;
  margin-bottom: 4px;
  color: var(--tk-text-secondary);
  transition: background-color .16s ease, color .16s ease;
}
html body .tk-nav-item:hover { background: var(--tk-refined-tint); }
html body .tk-nav-item.tk-nav-active {
  background: var(--tk-refined-tint);
  color: var(--tk-accent);
  border-color: var(--tk-border);
  box-shadow: inset 3px 0 0 var(--tk-accent);
  font-weight: 700;
}
html body .tk-nav-item.tk-nav-active::before { display: none; }
html body :is(.tk-user-card, .tk-sidebar-theme-toggle) { box-shadow: none; border-color: var(--tk-border); }

/* Quiet, consistent surfaces instead of floating/glowing dashboard panels. */
html body .tk-content :is(.tk-card, .tk-stat-card, .tk-kpi-hero-card, .rpt-summary-card) {
  background: var(--tk-bg-card);
  border: 1px solid var(--tk-border);
  border-radius: 14px;
  box-shadow: var(--tk-refined-shadow);
  min-width: 0;
  transform: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
html body .tk-content :is(.tk-card, .tk-stat-card, .tk-kpi-hero-card, .rpt-summary-card):hover {
  transform: none;
  border-color: var(--tk-border);
  box-shadow: var(--tk-refined-shadow);
}
html body .tk-content :is(.tk-stat-card, .tk-kpi-hero-card, .rpt-summary-card) {
  position: relative;
  padding: 22px;
  border-top: 1px solid var(--tk-border);
}
html body .tk-kpi-hero-card { --tk-kpi-mark: #7a80ec; }
html body .tk-kpi-hero-card:nth-child(2) { --tk-kpi-mark: #4b8ee9; }
html body .tk-kpi-hero-card:nth-child(3) { --tk-kpi-mark: #1caa85; }
html body .tk-kpi-hero-card:nth-child(4) { --tk-kpi-mark: #d99c30; }
html body .tk-content .tk-kpi-hero-card::after {
  content: '';
  position: absolute;
  left: 0;
  top: 23px;
  width: 3px;
  height: 34px;
  border-radius: 0 3px 3px 0;
  background: var(--tk-kpi-mark);
  pointer-events: none;
}
html body .tk-content :is(.tk-stat-card, .tk-kpi-hero-card)::before { display: none; }
html body .tk-content :is(.tk-stat-value, .tk-kpi-hero-value, .rpt-card-value) {
  color: var(--tk-text-primary);
  -webkit-text-fill-color: var(--tk-text-primary);
  background: none;
  font-size: clamp(1.5rem, 2vw, 2.15rem);
  line-height: 1.2;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
html body .tk-content :is(.tk-stat-label, .tk-kpi-hero-label, .rpt-card-label) {
  font-size: .78rem;
  font-weight: 500;
  color: var(--tk-text-muted);
  line-height: 1.6;
}
html body .tk-content :is(.tk-card-title-text, .tk-card-heading) {
  color: var(--tk-text-primary);
  letter-spacing: -.025em;
  line-height: 1.4;
  font-size: .98rem;
  font-weight: 700;
}
html body .tk-content :is(.tk-card-title-subtitle, .tk-card-title-link) { font-size: .73rem; }
html body .tk-content :is(.tk-card-icon, .tk-kpi-hero-icon) {
  border-radius: 12px;
  box-shadow: none;
  width: 44px;
  height: 44px;
}
html body .tk-kpi-hero-icon::after { display: none; }
html body .tk-chart-container {
  background: transparent;
  border-color: var(--tk-border);
  border-radius: 10px;
}
html body .tk-chart-fallback {
  color: var(--tk-text-muted);
  font: 500 .85rem/1.6 system-ui, sans-serif;
  padding: 16px;
  background: var(--tk-refined-tint);
  border-radius: 8px;
}

html body .tk-content .tk-table-wrap { border: 1px solid var(--tk-border); border-radius: 10px; box-shadow: none; }
html body .tk-content thead th {
  background: var(--tk-refined-tint);
  color: var(--tk-text-secondary);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  padding-top: 13px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--tk-border);
}
html body .tk-content tbody td {
  color: var(--tk-text-secondary);
  padding-top: 14px;
  padding-bottom: 14px;
  font-variant-numeric: tabular-nums;
  border-bottom: 1px solid var(--tk-border);
}
html body .tk-content tbody tr:hover { background: var(--tk-refined-tint); }
html body :is(.tk-input, .tk-select, .tk-textarea) {
  background: var(--tk-bg-input);
  border: 1px solid var(--tk-border);
  border-radius: 9px;
  color: var(--tk-text-primary);
  box-shadow: none;
}
html body :is(.tk-input, .tk-select, .tk-textarea):focus {
  border-color: var(--tk-refined-ring);
  box-shadow: 0 0 0 3px var(--tk-refined-tint);
}
html body .tk-btn { border-radius: 9px; font-weight: 650; text-transform: none; letter-spacing: .01em; box-shadow: none; }
html body .tk-btn:hover { transform: none; }
html body .tk-btn-primary { box-shadow: 0 2px 5px #253d851f; }
html body :is(.tk-btn, .pos-item-card):disabled { opacity: .55; cursor: not-allowed; }
html body :is(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--tk-refined-ring);
  outline-offset: 3px;
}

/* POS: touchable product tiles, visible prices and a calm receipt surface. */
html body.tk-pos-page :is(.pos-cart, .pos-search-bar, .pos-workflow-bar, .pos-context-button) {
  background: var(--tk-bg-card);
  border: 1px solid var(--tk-border);
  border-radius: 12px;
  box-shadow: var(--tk-refined-shadow);
}
html body.tk-pos-page .pos-item-card {
  background: var(--tk-bg-card);
  border: 1px solid var(--tk-border);
  border-radius: 12px;
  box-shadow: 0 1px 3px #0b244506;
  transition: border-color .15s ease, background-color .15s ease;
  transform: none;
}
html body.tk-pos-page .pos-item-card:hover { border-color: var(--tk-accent); background: var(--tk-refined-tint); transform: none; }
html body.tk-pos-page .pos-item-card:active { border-color: var(--tk-accent); transform: none; }
html body.tk-pos-page .pos-item-name { color: var(--tk-text-primary); font-weight: 650; line-height: 1.4; }
html body.tk-pos-page .pos-item-price { font-weight: 750; font-variant-numeric: tabular-nums; }
html body.tk-pos-page :is(.pos-cat-btn, .pos-payment-tab) { border-radius: 8px; box-shadow: none; }
html body.tk-pos-page .cart-item { border: 1px solid var(--tk-border); background: var(--tk-bg-input); border-radius: 9px; }
html body.tk-pos-page .pos-complete-btn { border-radius: 10px; box-shadow: none; min-height: 48px; }
html body.tk-pos-page .pos-cart::before { display: none; }

/* Login: retain existing photography and PIN keypad, improve hierarchy. */
html body .tk-login-form-panel { background: var(--tk-bg-primary); }
html body .tk-login-form-card {
  background: var(--tk-bg-card);
  border: 1px solid var(--tk-border);
  border-radius: 18px;
  box-shadow: var(--tk-refined-shadow);
}
html body .tk-login-title { color: var(--tk-text-primary); letter-spacing: -.035em; }
html body .tk-login-form-card .tk-btn-secondary { background: var(--tk-bg-input); border-color: var(--tk-border); box-shadow: none; font-size: .9rem; }
html body .tk-login-form-card input[name="pin"] { font-size: 1.65rem; letter-spacing: .5em; font-variant-numeric: tabular-nums; }
html body .tk-login-form-card .tk-btn-primary { min-height: 44px; }

@media (max-width: 640px) {
  html body .tk-content :is(.tk-card, .tk-stat-card, .tk-kpi-hero-card, .rpt-summary-card) { border-radius: 12px; }
  html body .tk-content :is(.tk-stat-card, .tk-kpi-hero-card, .rpt-summary-card) { padding: 18px; }
  html body .tk-login-form-card { border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html body *, html body *::before, html body *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
@media print {
  html body { color-scheme: light; }
  html body :is(.tk-card, .tk-stat-card, .tk-kpi-hero-card, .pos-cart, .tk-table-wrap) { box-shadow: none !important; }
}
