:root {
  --bs-primary: #335EEA;
  --primary-hover: #2449C8;
  --surface-contrast: #FFFFFF;
  --bs-primary-desat: #6C8AEC;
  --bs-success: #42BA96;
  --bs-success-text: #147a5e;
  --bs-info: #7C69EF;
  --bs-warning: #FAD776;
  --bs-warning-text: rgb(100, 86, 47);
  --bs-danger: #DF4759;
  --bs-dark: #1B2A4E;
  --bs-body: #161C2D;
  --bs-secondary-color: #5A6A85;
  --bs-gray-100: #F7F8FA;
  --bs-gray-200: #F1F4F8;
  --bs-gray-300: #D9E2EF;
  --bs-gray-600: #869AB8;
  --bs-gray-700: #506690;
  --bs-gray-800: #384C74;
  --bs-gray-900: #1B2A4E;

  --bg-canvas: #FFFFFF;
  --bg-surface-1: #FFFFFF;
  --bg-surface-2: #F1F4F8;
  --bg-surface-glass: rgba(255, 255, 255, 0.86);
  --accent-cyan: #335EEA;
  --accent-blue: #335EEA;
  --accent-emerald: #42BA96;
  --accent-purple: #7C69EF;
  --gradient-primary: #335EEA;
  --text-primary: #161C2D;
  --text-secondary: #5A6A85;
  --text-muted: #869AB8;
  --line: #F1F4F8;
  --line-strong: #D9E2EF;
  --shadow-card: 0 .5rem 1.5rem rgba(22, 28, 45, .1);
  --ok: #42BA96;
  --warn: var(--bs-warning);
  --warn-text: var(--bs-warning-text);
  --danger: #DF4759;
  --font: "Plus Jakarta Sans", "PlusJakartaSans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --radius-md: .5rem;
  --radius-lg: var(--radius-md);
  --radius-xl: 1rem;

  --ink: var(--text-primary);
  --muted: var(--text-secondary);
  --blue: var(--bs-primary);
  --navy: var(--bg-canvas);
  --card: var(--bg-surface-1);
  --tis-primary: var(--bs-primary);
  --tis-dark: var(--text-primary);
  --tis-heading-color: var(--text-primary);
  --tis-text-color: var(--text-secondary);
  --tis-light-2: var(--bg-surface-2);
  --tis-light-dark: var(--line);
  --tis-success-dark: var(--bs-success-text);
  --tis-danger: var(--danger);
  --tis-primary-light: var(--bs-primary-desat);
  --font-family: var(--font);
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary-hover: #5B7FF0;
    --surface-contrast: #1A2233;
    --bs-success-text: #5FD3AE;
    --bs-warning-text: #FAD776;
    --bs-secondary-color: #A3B1C9;
    --bs-gray-100: #1A2233;
    --bs-gray-200: #20293B;
    --bs-gray-300: #2E3A52;
    --bg-canvas: #0D121C;
    --bg-surface-1: #141B29;
    --bg-surface-2: #1A2233;
    --bg-surface-glass: rgba(13, 18, 28, .82);
    --text-primary: #E8EDF6;
    --text-secondary: #A3B1C9;
    --text-muted: #7C8BA6;
    --line: #222C40;
    --line-strong: #2E3A52;
    --shadow-card: 0 .5rem 1.5rem rgba(0, 0, 0, .35);
  }
}

*, *:before, *:after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { color-scheme: light dark; }
body {
  font: 400 1.0625rem/1.6 var(--font);
  color: var(--text-primary);
  background: var(--bg-canvas);
}
[hidden] { display: none !important; }
button, input, select { font: inherit; }
a { color: var(--bs-primary); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; }
.pv-nav a:hover, .pv-btn:hover, .home-card a:hover, .home-foot a:hover { text-decoration: none; }
:focus-visible { outline: .25rem solid rgba(51, 94, 234, .25); outline-offset: 2px; }

.pv-nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  min-height: 64px; padding: 0 24px;
  background: var(--bg-surface-glass); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.pv-brand { color: var(--text-primary); font-weight: 800; text-decoration: none; font-size: 18px; margin-right: auto; letter-spacing: -0.02em; }
.pv-brand span { color: var(--bs-primary); }
.pv-nav a:not(.pv-brand):not(.pv-btn) { color: var(--text-secondary); text-decoration: none; font-weight: 500; font-size: 14px; }
.pv-nav a.is-active { color: var(--text-primary); }
.pv-btn, .tis-btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 22px; border-radius: var(--radius-md); border: 0;
  background: var(--bs-primary); color: #fff; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background .15s ease, box-shadow .15s ease;
}
.pv-btn:hover { background: var(--primary-hover); box-shadow: var(--shadow-card); color: #fff; }
.pv-btn-ghost {
  background: var(--surface-contrast); color: var(--text-primary); border: 1px solid var(--line-strong);
}
.pv-btn-ghost:hover { background: var(--bs-gray-100); border-color: var(--bs-primary); color: var(--bs-primary); }
.tis-btn-danger { background: transparent; color: var(--danger); border: 1px solid rgba(223, 71, 89, .4); }
.mdc-button { background: none; }
.mdc-button__label { display: inline-flex; align-items: center; gap: 6px; }

.pv-main { width: min(1200px, calc(100% - 48px)); margin: 0 auto; padding: 32px 0 64px; }
.pv-title { font-size: 32px; font-weight: 700; margin: 0 0 8px; letter-spacing: -0.01em; line-height: 1.25; }
.pv-lead { color: var(--text-secondary); margin: 0 0 20px; line-height: 1.6; }

#sm-steps { display: flex; gap: 0; margin-bottom: 20px; counter-reset: step; }
#sm-steps .tis-pill {
  flex: 1; position: relative; display: flex; align-items: center; gap: 8px;
  border: 0; border-radius: 0; background: none; padding: 14px 4px 0; text-align: left;
  font-size: 12px; letter-spacing: .04em; color: var(--text-muted);
}
#sm-steps .tis-pill::before {
  content: ""; position: absolute; top: 0; left: 0; right: 4px; height: 4px; border-radius: 999px;
  background: var(--line-strong); transition: background .2s ease;
}
#sm-steps .tis-pill.active, #sm-steps .tis-pill.is-done { background: none; color: var(--text-primary); }
#sm-steps .tis-pill.active::before, #sm-steps .tis-pill.is-done::before { background: var(--bs-primary); }
#sm-steps .tis-pill.is-done { color: var(--text-secondary); }
@media (max-width: 600px) { #sm-steps .tis-pill { font-size: 10.5px; letter-spacing: 0; } }
.tis-pill {
  border: 1px solid var(--line-strong); background: var(--bs-gray-100); color: var(--text-secondary);
  border-radius: 999px; padding: 8px 14px; font-weight: 500; font-size: 12px; letter-spacing: .06em;
  text-transform: uppercase; cursor: pointer;
}
.tis-pill.active {
  background: var(--bs-primary); border-color: var(--bs-primary); color: #fff;
}

.tis-section {
  background: var(--bg-surface-1); border: 1px solid var(--line); border-radius: var(--radius-xl);
  padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow-card);
}
.tis-help-box { border-radius: var(--radius-lg); padding: 14px 16px; margin-bottom: 16px; border: 1px solid var(--line); background: var(--bg-surface-2); }
.tis-help-box--blue { border-color: rgba(51, 94, 234, .25); background: rgba(51, 94, 234, .08); }
.tis-help-box--amber { border-color: rgba(250, 215, 118, .6); background: rgba(250, 215, 118, .15); }
.tis-help-box--green { border-color: rgba(66, 186, 150, .35); background: rgba(66, 186, 150, .1); }
.tis-label { font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--bs-primary); margin-bottom: 10px; }
.pv-fields { display: flex; flex-wrap: wrap; gap: 16px; }
.pv-field { flex: 1; min-width: 200px; }
.pv-field label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.pv-field .value, .mat-mdc-input-element {
  background: var(--bs-gray-100); border: 1px solid var(--line-strong); border-radius: var(--radius-md); padding: 10px 12px; color: var(--text-primary); width: 100%;
}
.pv-check { display: flex; gap: 8px; align-items: center; margin-top: 12px; color: var(--text-secondary); }

.sm-screen { display: none; }
.sm-screen.active { display: block; }
.sm-capture-grid { display: grid; gap: 16px; }
@media (min-width: 992px) { .sm-capture-grid { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); } }

.sm-view {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-xl); overflow: hidden;
  background: #05070c; display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(51, 94, 234, .18);
}
.sm-view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: none; background: #05070c; }
.sm-view.is-live video { display: block; }
.sm-view.is-live .sm-view-hint { display: none; }
.sm-view-coach {
  position: absolute; left: 12%; right: 12%; bottom: 16%; z-index: 3; pointer-events: none;
  text-align: center; color: #fff; font-size: 14px; font-weight: 700; display: none;
  text-shadow: 0 1px 4px #000;
}
.sm-view.is-live .sm-view-coach { display: block; }
.sm-view-frame { position: absolute; inset: 12% 10%; z-index: 2; border: 2px solid var(--bs-primary); border-radius: var(--radius-md); box-shadow: 0 0 24px rgba(51, 94, 234, .25); }
.sm-view-frame i { display: none; }
.sm-view-hint { color: rgba(255,255,255,.86); font-size: 13px; text-align: center; padding: 0 24px; z-index: 1; }
.sm-camera-entry { padding: 36px 16px; text-align: center; }
.sm-camera-entry-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.sm-scan-mark {
  width: 72px; height: 72px; margin: 0 auto; border: 2px solid var(--bs-primary); border-radius: var(--radius-xl);
  box-shadow: inset 0 0 0 10px var(--bg-surface-1), 0 0 0 8px rgba(51, 94, 234, .12);
  background:
    linear-gradient(var(--bs-primary), var(--bs-primary)) center / 28px 2px no-repeat,
    linear-gradient(var(--bs-primary), var(--bs-primary)) center / 2px 28px no-repeat;
}
.sm-scanner[hidden], .sm-capture-preview[hidden], .sm-camera-entry[hidden], #sm-crop-editor[hidden] { display: none !important; }
.sm-view-mask { position: absolute; inset: 0; z-index: 1; pointer-events: none; box-shadow: inset 0 0 0 999px rgba(0,0,0,.45); clip-path: polygon(0 0,100% 0,100% 100%,0 100%,0 0,10% 13%,10% 87%,90% 87%,90% 13%,10% 13%); }
.sm-view[data-quality="warning"] .sm-view-frame { border-color: var(--warn); }
.sm-view[data-quality="danger"] .sm-view-frame { border-color: var(--danger); }
.sm-view[data-quality="ready"] .sm-view-frame { border-color: var(--ok); box-shadow: 0 0 0 3px rgba(66,186,150,.24); }
.sm-view-overlay { position: absolute; inset: 0; z-index: 2; pointer-events: none; display: none; }
.sm-view.is-quad .sm-view-overlay { display: block; }
.sm-view.is-quad .sm-view-mask, .sm-view.is-quad .sm-view-frame { display: none; }
.sm-view-overlay .sm-poly { fill: none; stroke-width: 0.012; stroke-linejoin: round; stroke: var(--bs-primary); }
.sm-view[data-quality="warning"] .sm-poly { stroke: var(--warn); }
.sm-view[data-quality="danger"] .sm-poly { stroke: var(--danger); }
.sm-view[data-quality="ready"] .sm-poly { stroke: var(--ok); }
.sm-cam-close {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 36px; height: 36px; border: 0; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; display: none;
}
.sm-view.is-live .sm-cam-close { display: inline-flex; align-items: center; justify-content: center; }
.sm-capture-col { position: relative; min-height: 220px; }
.sm-capture-col.is-busy { pointer-events: none; }
.sm-capture-col.is-busy .sm-capture-processing { pointer-events: auto; }
.sm-capture-processing {
  position: absolute; inset: 0; z-index: 6;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 16px;
  background: rgba(11, 15, 23, .82); color: #fff; text-align: center; padding: 24px;
  border-radius: var(--radius-xl);
}
.sm-capture-processing[hidden] { display: none !important; }
.sm-capture-processing p { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.4; }
.sm-spinner {
  width: 48px; height: 48px; border: 4px solid #333; border-top-color: var(--bs-primary);
  border-radius: 50%; animation: sm-spin 1s linear infinite;
}
@keyframes sm-spin { to { transform: rotate(360deg); } }
.sm-row-snap { gap: 12px; }
@media (max-width: 600px) {
  .sm-row-snap {
    position: sticky; bottom: 0; z-index: 5; margin: 12px -18px 0; padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
    background: var(--bg-surface-glass); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  }
}
.sm-snap {
  flex: 1 1 220px; max-width: 400px; padding: 18px 16px;
  font-size: 20px; font-weight: 700; letter-spacing: .04em;
  color: #fff; background: var(--bs-primary); border: 0; border-radius: var(--radius-xl); cursor: pointer;
  box-shadow: var(--shadow-card);
}
.sm-ocr-pane {
  background: #000; border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 12px; margin-top: 10px; max-height: 180px; overflow: auto;
}
.sm-ocr-pane pre {
  margin: 0; color: var(--accent-emerald); font-family: var(--mono);
  font-size: 13px; white-space: pre-wrap; line-height: 1.45;
}
.sm-ocr-warning {
  margin: 10px 0 0; padding: 12px 14px;
  border: 1px solid rgba(250, 215, 118, .7); background: rgba(250, 215, 118, .18);
  border-radius: var(--radius-md); color: var(--warn-text); font-weight: 600;
}
.sm-ocr-extras { margin-top: 8px; font-size: 13px; color: var(--text-secondary); }
.sm-quality {
  display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 10px;
  border-radius: var(--radius-md); background: var(--bg-surface-2);
  font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: .01em; color: var(--text-secondary);
}
.sm-quality[data-level="ready"] { color: var(--bs-success-text); }
.sm-quality-dot { width: 9px; height: 9px; border-radius: 50%; background: #64748b; }
.sm-quality[data-level="warning"] .sm-quality-dot { background: var(--warn); }
.sm-quality[data-level="danger"] .sm-quality-dot { background: var(--danger); }
.sm-quality[data-level="ready"] .sm-quality-dot { background: var(--ok); }
.sm-preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sm-preview-grid figure { margin: 0; }
.sm-preview-grid img { width: 100%; aspect-ratio: 4/3; object-fit: contain; border-radius: var(--radius-md); background: #000; }
.sm-preview-caption { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.sm-download {
  border: 0; background: none; color: var(--accent-blue); cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 700; padding: 0;
}
.sm-download:hover { text-decoration: underline; }
.sm-hint { margin: -4px 0 12px; font-size: 14px; color: var(--text-secondary); }
.sm-capture-col { border-radius: var(--radius-xl); outline: 2px dashed transparent; outline-offset: 4px; transition: outline-color .15s ease, background .15s ease; }
.sm-capture-col.is-dragover { outline-color: var(--bs-primary); background: rgba(51, 94, 234, .06); }
.sm-session { padding: 12px 18px; }
.sm-session summary { cursor: pointer; font-weight: 600; color: var(--text-secondary); list-style: none; display: flex; align-items: center; gap: 10px; }
.sm-session summary::-webkit-details-marker { display: none; }
.sm-session summary::after { content: "Edit"; margin-left: auto; font-size: 13px; color: var(--bs-primary); }
.sm-session[open] summary { margin-bottom: 14px; }
.sm-session[open] summary::after { content: "Done"; }
.sm-session .tis-label { margin: 0; }
.sm-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin: 12px 0; }

.sm-queue { display: grid; gap: 10px; }
.sm-qcard { display: flex; gap: 11px; align-items: flex-start; cursor: pointer; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px; background: var(--bg-surface-2); transition: border-color .15s ease, transform .15s ease; }
.sm-qcard:hover { border-color: rgba(51, 94, 234, .4); transform: translateY(-3px); }
.sm-qcard.is-review { border-color: rgba(250, 215, 118, .8); }
.sm-qcard.is-error { border-color: rgba(223, 71, 89, .5); }
.sm-thumb { width: 66px; height: 66px; border-radius: var(--radius-md); object-fit: cover; background: #000; }
.sm-qcard-title { font-weight: 600; }
.sm-qcard-meta { font-size: 13px; color: var(--text-secondary); }
.sm-bar { height: 9px; border-radius: 4px; background: var(--bs-gray-300); }

.sm-field { border-left: 3px solid var(--bs-gray-300); padding: 8px 0 8px 11px; }
.sm-field--auto { border-left-color: var(--ok); }
.sm-field--check { border-left-color: var(--warn); }
.sm-field--pick { border-left-color: var(--danger); }
.sm-field-label { font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.sm-field-value { font-size: 15px; font-weight: 700; }
.sm-field-value.is-empty { color: var(--danger); font-weight: 400; }
.sm-chiprow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.sm-choice {
  border: 1px solid var(--line-strong); background: var(--surface-contrast); border-radius: 999px; cursor: pointer;
  min-height: 36px; padding: 0 14px; color: var(--text-primary);
}
.sm-choice:not(.active):not(.is-danger):hover { border-color: var(--bs-primary); color: var(--bs-primary); }
.sm-choice.active { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }
.sm-choice.is-danger { color: var(--danger); border-color: rgba(223, 71, 89, .4); }

.sm-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 40; opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s; }
.sm-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; background: var(--bg-surface-1); color: var(--text-primary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0; max-height: 92vh; overflow: auto; transform: translateY(100%);
  pointer-events: none; border: 1px solid var(--line); box-shadow: var(--shadow-card);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), opacity .2s ease;
}
body.sm-sheet-open .sm-sheet { pointer-events: auto; transform: translateY(0); }
body.sm-sheet-open .sm-scrim { opacity: 1; visibility: visible; }
@media (min-width: 992px) {
  .sm-sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: 560px; max-height: 86vh; border-radius: var(--radius-xl); transform: translate(-50%, -40%); opacity: 0; }
  body.sm-sheet-open .sm-sheet { transform: translate(-50%, -50%); opacity: 1; }
}
.sm-sheet-head, .sm-sheet-foot { padding: 14px 16px; border-color: var(--line); display: flex; align-items: center; gap: 10px; }
.sm-sheet-head { border-bottom: 1px solid var(--line); }
.sm-sheet-foot { border-top: 1px solid var(--line); }
.sm-sheet-body { padding: 12px 16px 16px; }
.sm-sheet-photo-wrap { margin: 0 0 10px; }
.sm-sheet-photo {
  width: 100%; max-height: 280px; object-fit: contain; border-radius: var(--radius-md);
  background: #000; cursor: zoom-in; display: block;
}
.sm-photo-lightbox {
  position: fixed; inset: 0; z-index: 55; background: rgba(0,0,0,.82);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.sm-photo-lightbox[hidden] { display: none !important; }
.sm-photo-lightbox-card {
  width: min(920px, 100%); max-height: 92vh;
  display: flex; flex-direction: column; gap: 10px;
}
.sm-photo-lightbox-card img {
  width: 100%; max-height: calc(92vh - 64px); object-fit: contain;
  border-radius: var(--radius-md); background: #000;
}
.sm-photo-lightbox-actions { display: flex; justify-content: flex-end; gap: 8px; }
.sm-photo-lightbox-actions .pv-btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }

.sm-approve-cards { display: none; }
@media (max-width: 991px) { .sm-approve-table { display: none; } .sm-approve-cards { display: grid; gap: 10px; } }
.sm-actionbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; }
button[disabled] { opacity: .45; pointer-events: none; }
.sm-dialog-wrap { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.55); padding: 16px; }
body.sm-dialog-open .sm-dialog-wrap { display: flex; }
.pv-dialog { background: var(--bg-surface-1); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 24px; width: min(460px, 100%); box-shadow: var(--shadow-card); }
.pv-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 16px; }
.pv-kpi article { background: var(--bg-surface-1); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--shadow-card); }
.pv-kpi b, .pl-kpi-value { font-size: 26px; font-family: var(--font); font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pv-table { width: 100%; border-collapse: collapse; }
.pv-table th, .pv-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: 13px; }
.pv-table th { color: var(--text-muted); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; font-size: 12px; }
.pv-empty { text-align: center; color: var(--text-secondary); padding: 28px 8px; }
.flex { display: flex; } .gap-2 { gap: 8px; } .items-center { align-items: center; }

.tis-badge-sm, .tis-badge-xs, .tis-badge-success, .tis-badge-warning, .tis-badge-danger,
.tis-badge-outline-primary, .tis-badge-outline-success, .tis-badge-outline-warning, .tis-badge-outline-danger,
.tis-badge-sr-so-approved, .tis-badge-sr-so-onhold, .tis-badge-round {
  display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 500;
}
.tis-badge-success, .tis-badge-outline-success, .tis-badge-sr-so-approved {
  background: rgba(66, 186, 150, .1); color: var(--bs-success-text); border: 1px solid rgba(66, 186, 150, .3);
}
.tis-badge-warning, .tis-badge-outline-warning, .tis-badge-sr-so-onhold { background: rgba(250, 215, 118, .2); color: var(--warn-text); }
.tis-badge-danger, .tis-badge-outline-danger { background: rgba(223, 71, 89, .12); color: var(--danger); }
.tis-badge-outline-primary {
  background: rgba(51, 94, 234, .1); color: var(--bs-primary); border: 1px solid rgba(51, 94, 234, .25);
}
.tis-alert { display: flex; gap: 8px; padding: 12px; border-radius: var(--radius-lg); margin: 10px 0; background: var(--bg-surface-2); border: 1px solid var(--line); }
.tis-alert-success { border-color: rgba(66, 186, 150, .4); }
.tis-alert-warning { border-color: rgba(250, 215, 118, .7); }
.tis-alert-danger { border-color: rgba(223, 71, 89, .4); }
.tis-text-gray, .tis-text-light { color: var(--text-muted); }
.tis-text-danger { color: var(--danger); }
.tis-a { color: var(--accent-blue); cursor: pointer; }
.mat-icon { font-size: 18px; width: 18px; height: 18px; vertical-align: middle; }
.tis-page-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.pl-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; margin-bottom: 16px; }
.pl-kpi-card { background: var(--bg-surface-1); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-card); }
.tis-badge-sr-so-completed, .tis-badge-sr-so-closed { background: rgba(156,163,175,.12); color: var(--text-secondary); }
.tis-badge-sr-so-cancelled { background: rgba(223, 71, 89, .12); color: var(--danger); }
.tis-alert-info { border-color: rgba(51, 94, 234, .35); }
.tis-filter-badge { display: none; align-items: center; gap: 6px; color: var(--text-muted); }

.sm-quality-list { margin: 10px 0; display: grid; gap: 6px; font-size: 13px; font-family: var(--mono); }
.sm-quality-list .ok { color: var(--bs-success-text); }
.sm-quality-list .bad { color: var(--danger); }
.pv-table tr.is-review { background: rgba(250, 215, 118, .18); }
.pv-table tr.is-danger { background: rgba(223, 71, 89, .08); }
.pv-table .text-right { text-align: right; }

.pl-kpi-card--accent { border-color: rgba(250, 215, 118, .7); background: rgba(250, 215, 118, .18); }
.pl-kpi-card--danger { border-color: rgba(223, 71, 89, .4); background: rgba(223, 71, 89, .08); }
.pl-kpi-label { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }.pl-filters { display: grid; gap: 16px; margin-bottom: 16px; }
@media (min-width: 760px) { .pl-filters { grid-template-columns: 220px 180px minmax(0, 1fr); } }
.pl-field span { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.pl-field .value, .pl-field select, .pl-field input {
  background: var(--bg-canvas); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 10px 12px; color: var(--text-primary); width: 100%;
}
.pl-toolbar { min-height: 28px; margin-bottom: 8px; }
.pl-hint-actions { margin-left: auto; display: flex; gap: 6px; }
.tis-alert { align-items: center; }
.pl-thumb { width: 52px; height: 40px; object-fit: cover; border-radius: 6px; background: #000; }
.pl-row.is-overdue { background: rgba(250, 215, 118, .18); }
.pl-row.is-cancelled td:not(:first-child):not(:last-child) { color: var(--text-muted); text-decoration: line-through; }
.pl-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.pl-paginator { display: flex; justify-content: space-between; gap: 12px; color: var(--text-muted); font-size: 13px; font-family: var(--mono); padding: 12px 0 0; }
.pl-cards { display: none; }
.pl-card { display: flex; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-surface-2); }
.pl-card + .pl-card { margin-top: 10px; }
.pl-card.is-overdue { border-color: rgba(250, 215, 118, .7); background: rgba(250, 215, 118, .18); }
.pl-card-thumb { width: 66px; height: 66px; border-radius: var(--radius-md); object-fit: cover; flex: 0 0 auto; background: #000; }
.pl-card-body { min-width: 0; flex: 1; }
.pl-card-title { font-weight: 600; font-family: var(--mono); font-size: 13px; }
.pl-card-meta { font-size: 13px; color: var(--text-secondary); }
.pl-card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pl-dialog-wrap { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.55); padding: 16px; }
body.pl-dialog-open .pl-dialog-wrap { display: flex; }
@media (max-width: 991px) {
  .pl-desktop { display: none; }
  .pl-cards { display: block; }
}

.sm-crop-editor {
  position: fixed; inset: 0; z-index: 48; background: rgba(0,0,0,.65);
  display: flex; align-items: flex-start; justify-content: center; padding: 16px;
  overflow: auto;
}
.sm-crop-editor-card {
  background: var(--bg-surface-1); border-radius: var(--radius-xl); padding: 16px;
  width: min(560px, 100%); border: 1px solid var(--line); box-shadow: var(--shadow-card);
  margin: auto 0;
}
.sm-crop-editor-actions {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px;
  position: sticky; bottom: 0; background: var(--bg-surface-1); padding-top: 8px;
}
#sm-crop-canvas {
  display: block;
  margin: 0 auto;
  width: auto;
  height: auto;
  max-width: 100%;
  background: #000;
  border-radius: var(--radius-md);
  touch-action: none;
  cursor: grab;
  user-select: none;
}

.pv-nav .pv-btn { margin-left: 8px; min-height: 36px; padding: 0 16px; }
.home { width: min(1200px, calc(100% - 48px)); margin: 0 auto; padding: 48px 0 96px; }
.home-hero { padding: 32px 0 64px; max-width: 760px; }
body:has(.home-hero) {
  background:
    radial-gradient(50% 600px at 15% 120px, rgba(51, 94, 234, .16), transparent 70%),
    radial-gradient(40% 500px at 65% 0, rgba(124, 105, 239, .14), transparent 70%),
    var(--bg-canvas);
}
.home-kicker {
  display: inline-flex; margin: 0 0 16px; padding: 4px 12px;
  background: rgba(51, 94, 234, .1); border: 1px solid rgba(51, 94, 234, .25);
  color: var(--bs-primary); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; border-radius: 999px;
}
.home-hero h1, .home h2 { margin: 0 0 16px; color: var(--text-primary); }
.home-hero h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.home h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.home-lead { color: var(--text-secondary); font-size: 18px; line-height: 1.6; margin: 0 0 24px; max-width: 640px; }
.home-bullets { margin: 0 0 24px; padding-left: 18px; color: var(--text-primary); }
.home-bullets li { margin: 8px 0; }
.home-cta { display: flex; flex-wrap: wrap; gap: 16px; }
.home-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.home-pill {
  background: rgba(51, 94, 234, .1); border: 1px solid rgba(51, 94, 234, .25);
  color: var(--bs-primary); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  border-radius: 999px; padding: 4px 12px;
}
.home-cert {
  background: rgba(66, 186, 150, .1); border: 1px solid rgba(66, 186, 150, .3);
  color: var(--bs-success-text); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; border-radius: 999px; padding: 4px 12px;
}
.home-section { padding: 96px 0; }
@media (max-width: 800px) { .home-section { padding: 48px 0; } .home-hero { padding: 16px 0 48px; } }
.home-grid-3 { display: grid; gap: 16px; }
@media (min-width: 800px) { .home-grid-3 { grid-template-columns: repeat(3, 1fr); } }
.home-card, .home-step {
  background: var(--bg-surface-1); border: 1px solid var(--line); border-radius: var(--radius-xl);
  padding: 24px; box-shadow: var(--shadow-card); transition: border-color .15s ease, transform .15s ease;
}
.home-card:hover, .home-step:hover { border-color: rgba(51, 94, 234, .4); transform: translateY(-3px); }
.home-card h3, .home-step h3 { margin: 0 0 8px; font-size: 20px; font-weight: 600; line-height: 1.35; }
.home-card p, .home-step p { margin: 0 0 10px; color: var(--text-secondary); font-size: 15px; font-weight: 400; line-height: 1.6; }
.home-pill-purple {
  background: rgba(124, 105, 239, .12); border: 1px solid rgba(124, 105, 239, .3);
  color: var(--bs-info); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  border-radius: 999px; padding: 4px 12px;
}
.home-card a { font-weight: 600; text-decoration: none; color: var(--bs-primary); }
.home-steps { display: grid; gap: 16px; margin-bottom: 24px; }
@media (min-width: 800px) { .home-steps { grid-template-columns: repeat(3, 1fr); } }
.home-step span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 999px; margin-bottom: 12px;
  background: var(--bs-primary); color: #fff; font-weight: 800; font-family: var(--mono); font-size: 13px;
}
.home-band, .home-cta-band {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--bg-surface-1); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 32px;
  margin: 16px 0 48px; box-shadow: var(--shadow-card);
}
.home-band h2, .home-cta-band h2 { margin: 0 0 8px; }
.home-band p, .home-cta-band p { margin: 0; color: var(--text-secondary); max-width: 560px; }
.home-cta-band { flex-direction: column; text-align: center; }
.home-cta-band .home-cta { justify-content: center; }
.home-foot {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  width: min(1200px, calc(100% - 48px)); margin: 0 auto; padding: 32px 0 48px;
  border-top: 1px solid var(--line);
}
.home-foot .pv-brand { margin-right: auto; }
.home-foot a:not(.pv-brand) { color: var(--text-muted); text-decoration: none; font-weight: 600; }

.home-canvas {
  background: var(--bg-surface-1); border: 1px solid var(--line); border-radius: var(--radius-xl);
  overflow: hidden; box-shadow: var(--shadow-card); margin-bottom: 24px;
}
.home-canvas-bar {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  background: var(--bg-surface-2); border-bottom: 1px solid var(--line);
}
.home-canvas-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); }
.home-canvas-bar i:first-child { background: #F87171; }
.home-canvas-bar i:nth-child(2) { background: #FBBF24; }
.home-canvas-bar i:nth-child(3) { background: var(--bs-success); }
.home-canvas-bar span { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--text-muted); letter-spacing: .06em; text-transform: uppercase; }

.home-demo-grid {
  display: grid; grid-template-columns: 1fr; gap: 8px 16px; padding: 20px 16px 28px;
}
.home-demo-col--input { order: 0; }
.home-demo-action { order: 1; }
.home-demo-col--detect { order: 2; }
.home-demo-col--result { order: 4; }
.home-demo.is-idle .home-demo-col--detect,
.home-demo.is-idle .home-demo-col--result { display: none; }
.home-demo-step {
  margin: 0 0 12px; font-size: 13px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-primary);
}
.home-demo.is-idle .home-demo-col--detect .home-demo-step,
.home-demo.is-idle .home-demo-col--result .home-demo-step { display: none; }

.home-carousel {
  position: relative; aspect-ratio: 0.75 / 1; border-radius: var(--radius-xl);
  overflow: hidden; background: #161C2D;
}
.home-carousel-inner {
  display: flex; height: 100%; width: 100%; transition: transform .4s ease;
}
.home-carousel-item { min-width: 100%; height: 100%; }
.home-carousel-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-carousel-dots {
  position: absolute; left: 0; right: 0; bottom: 12px; z-index: 2;
  display: flex; justify-content: center; gap: 6px;
}
.home-carousel-dots button {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.45); cursor: pointer;
}
.home-carousel-dots button.is-active { background: #fff; }
.home-carousel-nav {
  position: absolute; top: 50%; z-index: 2; width: 36px; height: 36px;
  border: 0; border-radius: 50%; background: rgba(22, 28, 45, .45); cursor: pointer;
  transform: translateY(-50%); display: flex; align-items: center; justify-content: center;
}
.home-carousel-prev { left: 8px; }
.home-carousel-next { right: 8px; }
.home-carousel-nav-icon {
  width: 10px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0;
}
.home-carousel-prev .home-carousel-nav-icon { transform: rotate(135deg); margin-left: 3px; }
.home-carousel-next .home-carousel-nav-icon { transform: rotate(-45deg); margin-right: 3px; }

.home-demo-stage {
  position: relative; aspect-ratio: 0.75 / 1; border-radius: var(--radius-xl);
  overflow: hidden; background: #161C2D; box-shadow: var(--shadow-card);
}
.home-demo-stage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-demo-stage--result { background: var(--surface-contrast); border: 1px solid var(--line-strong); }
.home-demo-quad {
  position: absolute; inset: 0; width: 100%; height: 100%;
  fill: rgba(51, 94, 234, .08); stroke: var(--bs-primary); stroke-width: 1.4;
}
.home-demo-spinner {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(22, 28, 45, .35);
}
.home-demo-fields {
  position: absolute; left: 12px; right: 12px; bottom: 12px; margin: 0;
  display: grid; gap: 6px; padding: 10px 12px;
  background: var(--bg-surface-glass); border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
.home-demo-fields div { display: grid; grid-template-columns: 88px 1fr; gap: 8px; font-size: 13px; }
.home-demo-fields dt { margin: 0; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.home-demo-fields dd { margin: 0; font-weight: 700; color: var(--text-primary); font-family: var(--mono); font-size: 12px; }

.home-demo-action { margin-top: 16px; }
.home-demo-scan {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px 20px; border: 0; border-radius: 50rem;
  background: var(--bs-dark); color: #fff; font-weight: 800; cursor: pointer;
  box-shadow: var(--shadow-card); text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  scroll-margin-top: 80px;
}
.home-demo-scan:hover { background: #161C2D; color: #fff; transform: translateY(-2px); }
.home-demo-scan.is-busy, .home-demo-scan[aria-disabled] { opacity: .7; transform: none; pointer-events: none; }
.home-demo-scan-arrow--down { display: inline; }
.home-demo-scan-arrow--right { display: none; }

@media (min-width: 768px) {
  .home-demo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 24px 24px 32px;
  }
  .home-demo-col--input { order: 0; grid-column: 1; grid-row: 1; }
  .home-demo-col--detect { order: 1; grid-column: 2; grid-row: 1; }
  .home-demo-col--result { order: 2; grid-column: 3; grid-row: 1; }
  .home-demo-action { order: 3; grid-column: 1; grid-row: 2; margin-top: 8px; }
  .home-demo.is-idle .home-demo-col--detect,
  .home-demo.is-idle .home-demo-col--result {
    display: block; visibility: hidden; pointer-events: none;
  }
  .home-demo-step { margin-top: 0; }
  .home-demo-scan-arrow--down { display: none; }
  .home-demo-scan-arrow--right { display: inline; }
}
.home-code {
  background: var(--bs-gray-100); border: 1px solid var(--line-strong); border-radius: var(--radius-md);
  padding: 16px 18px; overflow: auto; margin: 0;
  font-family: var(--mono); font-size: 13px; line-height: 1.4; color: var(--text-primary);
}
.home-code .k { color: var(--bs-success-text); }
.home-code .s { color: var(--bs-primary); }
.home-code .m { color: var(--bs-danger); }
.home-code .e { color: var(--bs-info); }

.demo-tabs {
  position: sticky; top: 64px; z-index: 19;
  display: flex; flex-wrap: wrap; gap: 8px;
  width: 100%; margin: 0; padding: 12px max(24px, calc((100% - 1200px) / 2));
  background: var(--bg-surface-glass); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; scroll-behavior: auto !important; }
  .home-card:hover, .home-step:hover, .sm-qcard:hover, .home-demo-scan:hover { transform: none; }
  .sm-spinner { animation: sm-spin 1.6s linear infinite !important; }
}
