:root {
  color-scheme: dark light;
  --brand-color: #d97706;
  --brand-gold: #facc15;
  --brand-purple: #9333ea;
  --brand-green: #16a34a;
  --bg-primary: #0f1015;
  --bg-secondary: #181a22;
  --bg-card: #1f222d;
  --bg-elevated: #282c3a;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #33384b;
  --border-focus: #facc15;
  --danger: #ef4444;
  --danger-bg: #3b181c;
  --success: #22c55e;
  --success-bg: #123524;
  --info: #38bdf8;
  --warning: #f59e0b;
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.35);
  --radius-sm: 0.5rem;
  --radius-md: 0.85rem;
  --radius-lg: 1.15rem;
}

[data-theme="light"] {
  color-scheme: light;
  --brand-color: #b45309;
  --brand-gold: #ca8a04;
  --brand-purple: #7e22ce;
  --brand-green: #15803d;
  --bg-primary: #f1f5f9;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-elevated: #f8fafc;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --border-color: #cbd5e1;
  --border-focus: #b45309;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --success: #15803d;
  --success-bg: #f0fdf4;
  --info: #0284c7;
  --warning: #d97706;
  --shadow-card: 0 4px 16px rgba(15, 23, 42, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  padding-block-end: 5.5rem;
  font-family: 'Sarabun', 'Prompt', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  accent-color: var(--brand-color);
  -webkit-font-smoothing: antialiased;
}

/* Canonical accessible visually-hidden utility */
.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

/* Fallback for older browsers without accent-color */
@supports not (accent-color: var(--brand-color)) {
  form input[type="checkbox"].visually-hidden {
    position: absolute !important;
    clip-path: inset(50%) !important;
    overflow: hidden !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    white-space: nowrap !important;
  }

  .check-chip {
    position: relative;
    padding-inline-start: 2rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
  }

  .check-chip input[type="checkbox"] + span::before {
    content: "";
    position: absolute;
    inset-inline-start: 0.5rem;
    inset-block-start: 50%;
    transform: translateY(-50%);
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: 4px;
    box-sizing: border-box;
  }

  .check-chip input[type="checkbox"]:focus-visible + span::before {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
  }

  .check-chip input[type="checkbox"]:checked + span::before {
    background-color: var(--brand-color);
    border-color: var(--brand-color);
  }

  .check-chip input[type="checkbox"]:checked + span::after {
    content: "✓";
    position: absolute;
    inset-inline-start: 0.72rem;
    inset-block-start: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
  }
}

/* App Header & Shop Banner */
.app-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 40;
  background: linear-gradient(135deg, #111116 0%, #1c1b29 100%);
  border-block-end: 2px solid #eab308;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.header-inner {
  max-width: 960px;
  margin-inline: auto;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-logo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid #facc15;
  object-fit: cover;
  flex-shrink: 0;
  background: #000;
}

.brand-titles {
  min-width: 0;
}

.brand-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #facc15;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.brand-badge {
  font-size: 0.75rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #9333ea;
  color: #fff;
  font-weight: 600;
}

.brand-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Container & Layout */
.app-container {
  max-width: 960px;
  margin-inline: auto;
  padding: 1rem;
}

/* Shop Promo Banner Card */
.shop-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-block-end: 1rem;
  box-shadow: var(--shadow-card);
}

.shop-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  align-items: center;
}

@media (min-width: 640px) {
  .shop-hero-grid {
    grid-template-columns: 220px 1fr;
  }
}

.shop-banner-img {
  width: 100%;
  max-height: 130px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--border-color);
}

.shop-hero-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.shop-slogan-primary {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--brand-gold);
}

.shop-slogan-sub {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.shop-phone-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  align-self: flex-start;
  background: #16a34a;
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  margin-block-start: 0.2rem;
}

/* Stats Summary Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin-block-end: 1rem;
}

@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  cursor: pointer;
  text-align: start;
  color: var(--text-primary);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.stat-card:hover,
.stat-card.active {
  border-color: var(--brand-gold);
  transform: translateY(-1px);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.stat-value {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.1;
}

/* Search & Filter Section */
.search-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  margin-block-end: 1rem;
}

.search-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.search-input-wrap {
  flex: 1 1 220px;
  position: relative;
}

.status-chips-scroll {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding-block: 0.6rem 0.15rem;
  scrollbar-width: thin;
}

.filter-chip {
  flex-shrink: 0;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.filter-chip[aria-pressed="true"] {
  background: var(--brand-gold);
  color: #0f172a;
  border-color: var(--brand-gold);
  font-weight: 800;
}

/* Forms & Inputs (Following modern-web-guidance forms & validate-input-after-interaction) */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  margin-block-end: 1.25rem;
  box-shadow: var(--shadow-card);
}

.form-section-fieldset {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin: 0 0 1.25rem 0;
  background: var(--bg-secondary);
}

.form-section-legend {
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--brand-gold);
  padding-inline: 0.5rem;
}

.field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
  margin-block-end: 1.25rem;
}

.field:last-child {
  margin-block-end: 0;
}

.field-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-block-end: 1.25rem;
}

@media (min-width: 600px) {
  .field-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.field-grid-2 .field {
  margin-block-end: 0;
}

label {
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--text-primary);
  display: inline-block;
  padding: 6px 0;
  margin: -6px 0;
}

.req-star {
  color: var(--danger);
  margin-inline-start: 0.2rem;
}

.hint {
  display: block;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-block-end: 0.15rem;
}

input[type="text"],
input[type="tel"],
input[type="search"],
input[type="number"],
input[type="date"],
select,
textarea {
  font: inherit;
  font-size: max(1rem, 1em);
  padding: 0.75rem 0.85rem;
  min-height: 48px;
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1.5px solid #767676;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  box-sizing: border-box;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

@media (pointer: coarse) {
  input[type="text"],
  input[type="tel"],
  input[type="search"],
  input[type="number"],
  input[type="date"],
  select,
  button,
  .btn {
    min-height: 52px;
  }
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--border-focus);
  outline-offset: 2px;
}

/* Validation states after interaction (:user-invalid with fallback) */
.error-msg {
  display: none;
  color: var(--danger);
  font-size: 0.86rem;
  font-weight: 600;
  margin-block-start: 0.25rem;
}

:is(:user-invalid, .user-invalid-fallback) {
  border-color: var(--danger) !important;
  background-color: var(--danger-bg) !important;
}

:is(:user-invalid, .user-invalid-fallback) + .error-msg {
  display: block;
}

input:user-valid {
  border-color: var(--success);
}

/* Quick Select Tags (TV Brand, Size, Common Symptoms) */
.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-block-start: 0.35rem;
}

.quick-tag-btn {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  min-height: 36px !important;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
}

.quick-tag-btn:hover,
.quick-tag-btn:active {
  border-color: var(--brand-gold);
  color: var(--brand-gold);
}

/* Checkbox & Radio Group Grids */
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 0.55rem;
  margin-block-start: 0.35rem;
}

.check-chip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  min-height: 48px;
}

.check-chip input[type="checkbox"],
.check-chip input[type="radio"] {
  width: 1.2rem;
  height: 1.2rem;
  margin: 0;
  flex-shrink: 0;
}

/* GPS Box */
.gps-card {
  background: var(--bg-primary);
  border: 1.5px dashed var(--brand-gold);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  margin-block-end: 1rem;
}

.gps-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.gps-coords-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  font-family: monospace;
  font-size: 0.88rem;
  color: var(--brand-gold);
}

.mini-map-preview {
  width: 100%;
  height: 210px;
  border-radius: var(--radius-sm);
  margin-block-start: 0.75rem;
  border: 1px solid var(--border-color);
  background: var(--bg-elevated);
  overflow: hidden;
}

/* Camera & Photo Gallery */
.camera-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-block-end: 0.85rem;
}

.photo-category-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-block-end: 0.75rem;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 0.75rem;
}

.photo-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  aspect-ratio: 4 / 3;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.photo-tag-badge {
  position: absolute;
  inset-block-end: 0;
  inset-inline: 0;
  background: rgba(15, 16, 21, 0.82);
  color: #facc15;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.45rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-remove-btn {
  position: absolute;
  inset-block-start: 0.35rem;
  inset-inline-end: 0.35rem;
  width: 32px;
  height: 32px;
  min-height: 32px !important;
  border-radius: 50%;
  border: none;
  background: rgba(220, 38, 38, 0.92);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Buttons */
.btn {
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.7rem 1.1rem;
  min-height: 48px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-decoration: none;
  transition: transform 0.1s ease, opacity 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
  color: #0f172a;
  font-weight: 800;
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-gps {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
}

.btn-camera {
  background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
  color: #ffffff;
}

.btn-success {
  background: #16a34a;
  color: #ffffff;
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger);
}

.btn-sm {
  padding: 0.45rem 0.75rem;
  font-size: 0.84rem;
  min-height: 40px !important;
}

.btn-block {
  width: 100%;
}

/* Job List & Job Card */
.jobs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.job-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.job-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.job-ticket-id {
  font-family: monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-gold);
  background: var(--bg-elevated);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
}

.status-badge {
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.status-received { background: rgba(56, 189, 248, 0.18); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.4); }
.status-quoted { background: rgba(168, 85, 247, 0.18); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); }
.status-repairing { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.status-ready { background: rgba(34, 197, 94, 0.2); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.5); }
.status-delivered { background: rgba(148, 163, 184, 0.18); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.4); }
.status-cancelled { background: rgba(239, 68, 68, 0.18); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }

.job-card-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 520px) {
  .job-card-body.has-thumb {
    grid-template-columns: 120px 1fr;
  }
}

.job-thumb-wrap {
  position: relative;
  width: 100%;
  height: 150px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
}

@media (min-width: 520px) {
  .job-thumb-wrap {
    height: 105px;
  }
}

.job-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.job-photo-count {
  position: absolute;
  inset-block-end: 0.3rem;
  inset-inline-end: 0.3rem;
  background: rgba(0, 0, 0, 0.78);
  color: #facc15;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

.job-customer-name {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
}

.job-tv-spec {
  font-weight: 700;
  color: var(--brand-gold);
  font-size: 0.95rem;
  margin-block: 0.15rem;
}

.job-symptom {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0.15rem 0;
}

.job-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-block-start: 0.35rem;
}

.job-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding-block-start: 0.65rem;
  border-block-start: 1px solid var(--border-color);
}

.job-card-actions .btn {
  flex: 1 1 auto;
}

/* Full Overview Map Tab */
.overview-map-box {
  width: 100%;
  height: 430px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-elevated);
  overflow: hidden;
  margin-block-end: 1rem;
}

/* Bottom Navigation Bar for Mobile Field Use */
.bottom-nav {
  position: fixed;
  inset-block-end: 0;
  inset-inline: 0;
  z-index: 45;
  background: rgba(15, 16, 21, 0.96);
  backdrop-filter: blur(10px);
  border-block-start: 1px solid var(--border-color);
}

[data-theme="light"] .bottom-nav {
  background: rgba(255, 255, 255, 0.96);
}

.bottom-nav-inner {
  max-width: 960px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.nav-tab-btn {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.55rem 0.25rem;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.nav-tab-btn[aria-current="page"] {
  color: var(--brand-gold);
}

.nav-tab-icon {
  font-size: 1.25rem;
  line-height: 1;
}

/* Native Modal Dialogs (Following modern-web-guidance dialog & prevent-page-scroll-under-modal-dialog) */
dialog {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0;
  width: min(94vw, 640px);
  max-height: 90vh;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

/* MANDATORY: Prevent scroll gestures inside modal or over backdrop from chaining to page */
dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background-color: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(3px);
}

.dialog-inner {
  padding: 1.25rem;
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block-end: 0.75rem;
  border-block-end: 1px solid var(--border-color);
  margin-block-end: 1rem;
}

.dialog-header h1 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--brand-gold);
}

/* Digital Repair Receipt Slip */
.receipt-paper {
  background: #ffffff;
  color: #0f172a;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  border: 2px solid #eab308;
}

.receipt-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-block-end: 2px solid #0f172a;
  padding-block-end: 0.75rem;
  margin-block-end: 0.85rem;
}

.receipt-logo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.receipt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin-block-end: 0.85rem;
}

.receipt-table th,
.receipt-table td {
  padding: 0.45rem 0.35rem;
  border-block-end: 1px dashed #cbd5e1;
  text-align: start;
  vertical-align: top;
}

.receipt-table th {
  width: 36%;
  color: #475569;
  font-weight: 700;
}

.receipt-notice {
  background: #fef9c3;
  color: #713f12;
  padding: 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
}

/* Toast Notification */
.toast-status {
  position: fixed;
  inset-block-end: 4.5rem;
  inset-inline: 1rem;
  max-width: 460px;
  margin-inline: auto;
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid #facc15;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 60;
  font-weight: 700;
  text-align: center;
}

.toast-status[hidden] {
  display: none;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}

/* Print Styles for Repair Receipt */
@media print {
  body * {
    visibility: hidden;
  }
  #receipt-dialog,
  #receipt-dialog * {
    visibility: visible;
  }
  #receipt-dialog {
    position: absolute;
    inset: 0;
    width: 100%;
    max-height: none;
    border: none;
    box-shadow: none;
    background: #fff;
  }
  .no-print {
    display: none !important;
  }
}
