/* Stitch a36e8bfd999d4fa3ac9c17181a78d8c2 / ea9287904d584f65b46e39f5f17ea9f2.
   Preserve authoritative note lifecycle and separate posting/availability. */
.tv-stitch-notes {padding:24px;background:var(--tv-surface-muted,#f3f7fb);color:var(--tv-text,#122c46);}
.tv-stitch-notes .workspace-hero {display:flex;justify-content:space-between;align-items:flex-start;gap:24px;padding-bottom:24px;border-bottom:1px solid var(--tv-border,#c7d4e2);}
.tv-stitch-notes .workspace-hero h2 {font-size:28px;letter-spacing:-.03em;margin:0 0 8px;}
.tv-stitch-notes .workspace-hero p {line-height:1.6;color:var(--tv-text-muted,#4d6178);margin:0;max-width:90ch;}
.tv-stitch-notes .workspace-hero-actions {display:flex;gap:8px;flex-wrap:wrap;}
.tv-stitch-notes .workspace-stats {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:20px 0;}
.tv-stitch-notes .workspace-stat {padding:20px;display:grid;gap:10px;background:white;border:1px solid var(--tv-border,#c7d4e2);border-radius:12px;}
.tv-stitch-notes .workspace-stat > span {font-size:13px;color:var(--tv-text-muted,#4d6178);}
.tv-stitch-notes .workspace-stat > strong {font-size:25px;font-variant-numeric:tabular-nums;}
.tv-stitch-notes .workspace-stat > small {font-size:12px;color:var(--tv-text-muted,#4d6178);line-height:1.5;}
.tv-stitch-notes .adjustment-note-register {background:white;border:1px solid var(--tv-border,#c7d4e2);border-radius:12px;overflow-x:auto;margin-top:20px;}
.tv-stitch-notes .adjustment-note-filters {display:grid;grid-template-columns:minmax(200px,1fr) minmax(150px,220px) auto auto;gap:12px;align-items:end;padding:20px;border-bottom:1px solid var(--tv-border,#c7d4e2);}
.tv-stitch-notes .adjustment-note-filters label {display:grid;gap:8px;}
.tv-stitch-notes .adjustment-note-filters :is(input,select) {width:100%;}
.tv-stitch-notes table {min-width:820px;}
.tv-stitch-notes td > div {display:grid;gap:6px;}
.tv-stitch-notes tbody tr:hover {background:var(--tv-brand-soft,#e8f3fc);}
.tv-stitch-notes .ledger-pagination {display:flex;justify-content:space-between;align-items:center;padding:16px 20px;gap:16px;}
.tv-stitch-notes .ledger-pagination-actions {display:flex;gap:8px;}
.tv-stitch-notes .tv-register-empty-state {padding:28px;}
.tv-stitch-notes .tv-stitch-note-inspection {margin:20px;border:1px solid var(--tv-border,#c7d4e2);border-radius:12px;background:#fff;}
.tv-stitch-note-inspection > header {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px;background:var(--tv-brand-soft,#e8f3fc);border-bottom:1px solid var(--tv-border,#c7d4e2);}
.tv-stitch-note-inspection h3 {font-size:18px;margin:0;}
.tv-stitch-note-inspection h4 {font-size:13px;text-transform:uppercase;letter-spacing:.04em;color:var(--tv-text-muted,#4d6178);margin:0 0 16px;}
.tv-stitch-note-inspection-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));}
.tv-stitch-note-inspection-grid > section {padding:20px;min-width:0;border-right:1px solid var(--tv-border,#c7d4e2);overflow-wrap:anywhere;}
.tv-stitch-note-inspection-grid > section:last-child {border-right:0;}
.tv-stitch-note-inspection-grid p {line-height:1.6;color:var(--tv-text-muted,#4d6178);}
@media(max-width:800px){.tv-stitch-note-inspection-grid {grid-template-columns:1fr;}.tv-stitch-note-inspection-grid > section {border-right:0;border-bottom:1px solid var(--tv-border,#c7d4e2);}}
.tv-stitch-notes .tv-route-context {display:flex;gap:8px;flex-wrap:wrap;color:var(--tv-text-muted,#4d6178);font-size:12px;margin-top:12px;}
@media(max-width:900px){.tv-stitch-notes .workspace-stats {grid-template-columns:repeat(2,minmax(0,1fr));}.tv-stitch-notes .workspace-hero {flex-direction:column;}}
@media(max-width:540px){.tv-stitch-notes {padding:12px;}.tv-stitch-notes .adjustment-note-filters {grid-template-columns:1fr;}.tv-stitch-notes .ledger-pagination {align-items:flex-start;flex-direction:column;}.tv-stitch-notes .workspace-stat {padding:12px;}}

/* Credit/Debit Notes: the saved Stitch screen IDs own a shared note register,
   while note-specific lifecycle and eligibility remain with the server. */
:is(
  .tv-stitch-notes[data-stitch-screen="a36e8bfd999d4fa3ac9c17181a78d8c2"],
  .tv-stitch-notes[data-stitch-screen="ea9287904d584f65b46e39f5f17ea9f2"]
) {
  display:block;min-width:0;padding:22px;border:0;border-radius:0;
  background:var(--tv-surface-muted,#f3f7fb);color:var(--tv-text,#122c46);
}
:is(
  .tv-stitch-notes[data-stitch-screen="a36e8bfd999d4fa3ac9c17181a78d8c2"],
  .tv-stitch-notes[data-stitch-screen="ea9287904d584f65b46e39f5f17ea9f2"]
) > .tv-route-frame {
  display:grid;gap:18px;max-width:1600px;margin:0 auto;
}
:is(
  .tv-stitch-notes[data-stitch-screen="a36e8bfd999d4fa3ac9c17181a78d8c2"],
  .tv-stitch-notes[data-stitch-screen="ea9287904d584f65b46e39f5f17ea9f2"]
) .workspace-hero {
  align-items:center;margin:0;padding:20px 22px;border:1px solid var(--tv-border,#c7d4e2);
  border-radius:10px;background:var(--tv-surface,#fff);box-shadow:none;
}
:is(
  .tv-stitch-notes[data-stitch-screen="a36e8bfd999d4fa3ac9c17181a78d8c2"],
  .tv-stitch-notes[data-stitch-screen="ea9287904d584f65b46e39f5f17ea9f2"]
) .workspace-stats {gap:10px;margin:0;}
:is(
  .tv-stitch-notes[data-stitch-screen="a36e8bfd999d4fa3ac9c17181a78d8c2"],
  .tv-stitch-notes[data-stitch-screen="ea9287904d584f65b46e39f5f17ea9f2"]
) .workspace-stat {
  min-height:94px;padding:14px 16px;border-radius:8px;box-shadow:none;
}
:is(
  .tv-stitch-notes[data-stitch-screen="a36e8bfd999d4fa3ac9c17181a78d8c2"],
  .tv-stitch-notes[data-stitch-screen="ea9287904d584f65b46e39f5f17ea9f2"]
) .adjustment-note-register {
  margin:0;border:1px solid var(--tv-border,#c7d4e2);border-radius:10px;
  background:var(--tv-surface,#fff);box-shadow:none;
}
:is(
  .tv-stitch-notes[data-stitch-screen="a36e8bfd999d4fa3ac9c17181a78d8c2"],
  .tv-stitch-notes[data-stitch-screen="ea9287904d584f65b46e39f5f17ea9f2"]
) .adjustment-note-filters {
  grid-template-columns:minmax(220px,1.5fr) minmax(150px,.8fr) auto auto;
  gap:10px;padding:14px 16px;background:var(--tv-surface-muted,#f3f7fb);
}
:is(
  .tv-stitch-notes[data-stitch-screen="a36e8bfd999d4fa3ac9c17181a78d8c2"],
  .tv-stitch-notes[data-stitch-screen="ea9287904d584f65b46e39f5f17ea9f2"]
) .adjustment-note-register table {min-width:860px;}
:is(
  .tv-stitch-notes[data-stitch-screen="a36e8bfd999d4fa3ac9c17181a78d8c2"],
  .tv-stitch-notes[data-stitch-screen="ea9287904d584f65b46e39f5f17ea9f2"]
) .adjustment-note-register th {
  background:var(--tv-surface-muted,#f3f7fb);color:var(--tv-text-muted,#4d6178);
  font-size:11px;letter-spacing:.04em;text-transform:uppercase;
}
:is(
  .tv-stitch-notes[data-stitch-screen="a36e8bfd999d4fa3ac9c17181a78d8c2"],
  .tv-stitch-notes[data-stitch-screen="ea9287904d584f65b46e39f5f17ea9f2"]
) .adjustment-note-register td {vertical-align:middle;}
:is(
  .tv-stitch-notes[data-stitch-screen="a36e8bfd999d4fa3ac9c17181a78d8c2"],
  .tv-stitch-notes[data-stitch-screen="ea9287904d584f65b46e39f5f17ea9f2"]
) .tv-stitch-note-inspection {margin:14px;border-radius:8px;box-shadow:none;}
@media(max-width:900px) {
  :is(
    .tv-stitch-notes[data-stitch-screen="a36e8bfd999d4fa3ac9c17181a78d8c2"],
    .tv-stitch-notes[data-stitch-screen="ea9287904d584f65b46e39f5f17ea9f2"]
  ) .workspace-stats {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:560px) {
  :is(
    .tv-stitch-notes[data-stitch-screen="a36e8bfd999d4fa3ac9c17181a78d8c2"],
    .tv-stitch-notes[data-stitch-screen="ea9287904d584f65b46e39f5f17ea9f2"]
  ) {padding:10px;}
  :is(
    .tv-stitch-notes[data-stitch-screen="a36e8bfd999d4fa3ac9c17181a78d8c2"],
    .tv-stitch-notes[data-stitch-screen="ea9287904d584f65b46e39f5f17ea9f2"]
  ) .adjustment-note-filters {grid-template-columns:minmax(0,1fr);}
}
