﻿:root {
  color-scheme: light;
  --ink: #172024;
  --muted: #58666a;
  --line: #d7dedb;
  --paper: #f6f4ee;
  --white: #ffffff;
  --green: #1f6f62;
  --green-2: #12483f;
  --amber: #c88728;
  --blue: #2f5f8a;
  --danger: #8a332f;
  --shadow: 0 18px 50px rgba(20, 31, 34, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  letter-spacing: 0;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 74px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(246, 244, 238, .93);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 210px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--green-2);
  color: #fff;
  font-weight: 800;
}
.brand strong { display: block; font-size: 18px; }
.brand small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.main-nav { display: flex; align-items: center; justify-content: center; gap: 22px; color: #334044; font-size: 15px; }
.main-nav a:hover { color: var(--green); }
.header-actions { display: flex; gap: 6px; }
.lang-btn {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.lang-btn.is-active { background: var(--green-2); color: #fff; border-color: var(--green-2); }

.hero {
  min-height: calc(100vh - 74px);
  display: grid;
  align-items: end;
  position: relative;
  overflow: hidden;
  background: #1a2328;
  color: #fff;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: .78; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(14,21,24,.86), rgba(14,21,24,.46) 48%, rgba(14,21,24,.15));
}
.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding: 0 clamp(20px, 6vw, 82px) clamp(64px, 12vh, 110px);
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--amber);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 13px;
}
h1, h2, h3, p { overflow-wrap: break-word; }
h1 { margin: 0; font-size: 92px; line-height: .92; font-weight: 820; letter-spacing: 0; white-space: nowrap; overflow-wrap: normal; }
h2 { margin: 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.05; letter-spacing: 0; }
h3 { margin: 14px 0 10px; font-size: 20px; }
.hero-lead { margin: 24px 0 30px; max-width: 660px; font-size: 20px; line-height: 1.55; color: #e2e9e5; }
.hero-actions, .status-form { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
}
.btn.primary { background: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-2); }
.btn.secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { border-color: var(--green); color: var(--green-2); }
.btn.danger {
  background: var(--danger);
  color: #fff;
}
.btn.danger:hover {
  background: #64201d;
}
.btn-icon {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  stroke-width: 2.3;
}

.band, .workflow, .admin-section {
  padding: clamp(46px, 7vw, 86px) clamp(18px, 5vw, 70px);
}
.section-head { max-width: 820px; margin-bottom: 28px; }
.section-head.compact { margin-bottom: 20px; }
.service-band { background: #fff; }
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.service-card {
  min-height: 230px;
  padding: 24px;
  background: #f8faf8;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #e3eee8;
  color: var(--green-2);
  stroke-width: 2.1;
}
.service-card p { color: var(--muted); line-height: 1.55; margin: 0; }

.workflow {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr);
  align-items: start;
  gap: 28px;
  background: var(--paper);
}
.repair-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
label { display: grid; gap: 7px; color: #2d393d; font-weight: 650; }
label.full, .btn.full { grid-column: 1 / -1; }
input, textarea, select {
  width: 100%;
  border: 1px solid #cfd8d3;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}
input:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31,111,98,.14); }
.ticket-panel {
  position: sticky;
  top: 98px;
  display: grid;
  gap: 14px;
}
.ticket-label {
  background: #fff;
  border: 1px solid #bac9c3;
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
  min-height: 250px;
}
.label-kicker { color: var(--muted); font-size: 13px; text-transform: uppercase; font-weight: 800; }
.ticket-label strong { font-size: 28px; }
.label-qr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
}
.qr-card {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.qr-card canvas {
  width: 100%;
  max-width: 112px;
  height: auto;
}
.qr-generated canvas,
.qr-generated img {
  display: block;
  width: 100%;
  max-width: 132px;
  height: auto;
}
.qr-card small,
.qr-card strong,
.qr-card a {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
}
.qr-card a {
  color: var(--green-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.qr-card.large {
  align-content: start;
  min-height: 206px;
}
.qr-card.large canvas {
  max-width: 132px;
}
.qr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.qr-panel {
  display: grid;
  gap: 12px;
}
.client-qr {
  display: block;
  width: 136px;
  height: 136px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.status-result .qr-generated {
  width: 136px;
  margin-top: 12px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.status-band { background: #dde8e1; display: grid; gap: 18px; }
.status-copy { max-width: 760px; }
.status-copy p:last-child { color: var(--muted); line-height: 1.6; }
.status-form input { max-width: 320px; }
.status-result {
  min-height: 48px;
  padding: 14px 16px;
  border: 1px solid rgba(31,111,98,.22);
  border-radius: 8px;
  background: rgba(255,255,255,.7);
}
.status-result strong,
.status-result span,
.status-result small {
  display: block;
}
.status-result span,
.status-result small {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}
.status-result a {
  display: block;
  margin-top: 8px;
  color: var(--green-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-all;
}
.status-result:empty { display: none; }

.admin-section { background: #fff; }
.admin-grid {
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(0, 1.15fr);
  gap: 18px;
}
.admin-list, .admin-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
  min-height: 360px;
}
.admin-toolbar {
  display: flex;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}
.repairs-list { display: grid; }
.repair-row {
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  background: transparent;
  padding: 14px 16px;
  cursor: pointer;
}
.repair-row:hover, .repair-row.is-active { background: #ecf3ef; }
.repair-row strong { display: block; margin-bottom: 4px; }
.repair-row span { color: var(--muted); font-size: 14px; }
.admin-detail { padding: 20px; display: grid; align-content: start; gap: 12px; }
.detail-row { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.detail-row span:first-child { color: var(--muted); }
.status-pill { display: inline-flex; width: fit-content; border-radius: 999px; padding: 6px 10px; background: #e1efe8; color: var(--green-2); font-weight: 750; }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  align-items: center;
  padding: 28px clamp(18px, 5vw, 70px);
  color: #dce5e0;
  background: #172024;
}
.site-footer span { color: #aebbb6; }

@media (max-width: 920px) {
  .site-header { align-items: flex-start; flex-wrap: wrap; }
  .main-nav { order: 3; width: 100%; justify-content: flex-start; overflow-x: auto; padding-bottom: 4px; }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow, .admin-grid { grid-template-columns: 1fr; }
  .ticket-panel { position: static; }
}

@media (max-width: 620px) {
  .brand { min-width: 0; }
  h1 { font-size: 46px; }
  .main-nav { gap: 14px; font-size: 14px; }
  .hero-copy { padding-bottom: 54px; }
  .hero-lead { font-size: 18px; }
  .service-grid, .repair-form { grid-template-columns: 1fr; }
  .status-form { display: grid; }
  .status-form input { max-width: none; }
  .detail-row { grid-template-columns: 1fr; gap: 4px; }
}

@media print {
  body * { visibility: hidden; }
  #ticketLabel, #ticketLabel * { visibility: visible; }
  #ticketLabel { position: fixed; inset: 20px auto auto 20px; width: 340px; box-shadow: none; }
  .label-qr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}




/* Expanded workshop prototype */
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #58666a 50%), linear-gradient(135deg, #58666a 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.admin-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  max-width: none;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.import-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 18px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}
.import-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}
.stat-card {
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
}
.stat-card span { color: var(--muted); font-weight: 700; }
.stat-card strong { font-size: 34px; line-height: 1; color: var(--green-2); }

.admin-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 12px;
  margin-bottom: 16px;
}

.row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.repair-row em {
  flex: none;
  border-radius: 999px;
  padding: 4px 8px;
  background: #e1efe8;
  color: var(--green-2);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}
.repair-row small {
  display: block;
  margin-top: 4px;
  color: #718084;
}
.empty-state {
  padding: 18px;
  color: var(--muted);
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.detail-header h3 {
  margin: 10px 0 6px;
  font-size: 24px;
}
.detail-header p {
  margin: 0;
  color: var(--muted);
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0 8px;
}
.tab {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  padding: 9px 12px;
  font-weight: 800;
  cursor: pointer;
}
.tab.is-active {
  background: var(--green-2);
  border-color: var(--green-2);
  color: #fff;
}
.tab-panel { display: grid; gap: 18px; }
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}
.panel-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.panel-form .full { grid-column: 1 / -1; }
.panel-form button { align-self: end; }
.quote-form {
  border-color: rgba(31,111,98,.22);
  background: #f7fbf8;
}
.customer-update-form {
  border-color: rgba(47,95,138,.28);
  background: #f5f8fb;
}
.quote-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.quote-photo-grid.public {
  margin-top: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 190px));
}
.quote-photo-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.quote-photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  background: #e8eeea;
}
.quote-photo-card span,
.quote-photo-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}
.mini-list {
  display: grid;
  gap: 8px;
}
.mini-item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.mini-item strong { font-size: 14px; }
.mini-item span { color: var(--muted); line-height: 1.45; }
.notice {
  padding: 14px 16px;
  border: 1px solid rgba(31,111,98,.2);
  border-radius: 8px;
  background: #edf5f1;
  color: var(--green-2);
  font-weight: 700;
}
.notice.muted {
  background: #fff;
  color: var(--muted);
  font-weight: 600;
}
.rejection-form {
  border-color: rgba(138, 51, 47, .28);
  background: #fff8f6;
}
.form-help {
  margin: -2px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-weight: 600;
}
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  max-width: min(360px, calc(100vw - 40px));
  padding: 13px 16px;
  border-radius: 8px;
  background: #172024;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: .2s ease;
}
.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 920px) {
  .admin-head { align-items: stretch; flex-direction: column; }
  .admin-actions { justify-content: flex-start; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-tools { grid-template-columns: 1fr; }
  .detail-header { flex-direction: column; }
  .detail-actions { justify-content: flex-start; }
}

@media (max-width: 620px) {
  .stats-grid, .detail-grid, .panel-form, .qr-grid, .label-qr-grid, .quote-photo-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 82px; }
  .detail-header h3 { font-size: 20px; }
  .tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tab { width: 100%; }
}

/* Login and public status */
.login-page {
  min-height: 100vh;
  background: #172024 url("assets/laptop-mainboard-natural.png") center/cover fixed no-repeat;
}
.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(15, 24, 27, .72);
}
.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}
.login-panel {
  width: min(100%, 460px);
  padding: 28px;
  border-radius: 8px;
  background: rgba(246, 244, 238, .96);
  box-shadow: var(--shadow);
}
.login-brand { margin-bottom: 28px; }
.login-panel h1 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 38px;
  white-space: normal;
}
.login-panel p {
  color: var(--muted);
  line-height: 1.55;
}
.login-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}
.login-panel code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #e5ece8;
  color: var(--green-2);
}

/* Public client website */
.client-hero .hero-copy { max-width: 820px; }
.client-services { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pricing-band { background: #eef3ef; }
.pricing-band .section-head p:last-child { color: var(--muted); line-height: 1.6; }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.pricing-grid article {
  min-height: 214px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.price-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 8px;
  color: var(--green-2);
  background: #e3eee8;
  stroke-width: 2.1;
}
.pricing-grid span {
  display: block;
  color: var(--muted);
  font-weight: 800;
}
.pricing-grid strong {
  display: block;
  margin: 10px 0;
  color: var(--green-2);
  font-size: 32px;
}
.pricing-grid p { color: var(--muted); line-height: 1.5; }
.client-booking { align-items: stretch; }
.client-side-panel {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.client-side-panel h3 { margin-top: 0; }
.client-side-panel ol {
  margin: 0;
  padding: 0;
  color: var(--muted);
  line-height: 1.7;
  list-style: none;
}
.process-list {
  counter-reset: process;
  display: grid;
  gap: 12px;
}
.process-list li {
  counter-increment: process;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: start;
  gap: 11px;
}
.process-list li svg {
  width: 34px;
  height: 34px;
  padding: 8px;
  border-radius: 8px;
  background: #e3eee8;
  color: var(--green-2);
  stroke-width: 2.2;
}
@media (max-width: 920px) {
  .client-services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .pricing-grid, .client-services { grid-template-columns: 1fr; }
}

.contact-band { background: #fff; }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.contact-grid article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
}
.contact-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  border-radius: 8px;
  color: var(--green-2);
  background: #e3eee8;
  stroke-width: 2.1;
}
.contact-grid span { display: block; color: var(--muted); font-weight: 800; margin-bottom: 8px; }
.contact-grid strong { font-size: 18px; }
.contact-grid a { color: var(--green-2); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

/* eBay and accounting */
.ebay-accounting {
  background: #f8faf8;
}
.ebay-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: 18px;
  margin-top: 18px;
}
.ebay-config-form .btn {
  min-height: 44px;
}
.btn.is-disabled {
  opacity: .5;
  pointer-events: auto;
}
.stack-actions {
  display: grid;
  gap: 10px;
}
.ledger-grid {
  align-items: start;
}
.ledger-list {
  min-height: 320px;
}
.ledger-row {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.ledger-row .row-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.ledger-row em {
  color: var(--green-2);
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}
.ledger-row span,
.ledger-row small {
  color: var(--muted);
  line-height: 1.45;
}
.empty-state {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
}
@media (max-width: 920px) {
  .ebay-grid { grid-template-columns: 1fr; }
}
