:root {
  color-scheme: light;
  --ink: #172026;
  --muted: #5c6872;
  --line: #dbe2e8;
  --paper: #f7f9fb;
  --white: #ffffff;
  --cyan: #14a5c7;
  --magenta: #d43d86;
  --yellow: #f4b83f;
  --green: #2f9d62;
  --danger: #be3d3d;
  --shadow: 0 18px 50px rgba(23, 32, 38, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

input[type="file"] {
  padding: 8px;
}

.app-shell {
  width: min(1120px, calc(100% - 24px));
  margin: 0 auto;
  padding: 16px 0 32px;
}

.hero-panel {
  min-height: 280px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.55fr);
  align-items: end;
  gap: 24px;
  padding: 26px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(8, 19, 26, 0.86), rgba(8, 19, 26, 0.5), rgba(8, 19, 26, 0.08)),
    url("./assets/print-hub-banner.png") center / cover;
  color: var(--white);
  box-shadow: var(--shadow);
}

.customer-hero {
  margin-bottom: 24px;
}

.hero-copy {
  max-width: 720px;
}

.language-switcher {
  width: min(220px, 100%);
  margin: 12px 0 14px;
}

.language-switcher label {
  color: rgba(255, 255, 255, 0.86);
}

.language-switcher select {
  min-height: 40px;
  border-color: rgba(255, 255, 255, 0.44);
  background: rgba(255, 255, 255, 0.92);
}

.brand-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.brand-line img {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--white);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-copy h1,
.admin-topbar h1,
.section-heading h2,
.toolbar h2 {
  margin: 0;
  line-height: 1.05;
}

.hero-copy h1 {
  max-width: 700px;
  font-size: clamp(1.9rem, 4.8vw, 3.4rem);
}

.hero-copy p:last-child {
  max-width: 680px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.98rem;
  line-height: 1.65;
}

.service-showcase {
  display: grid;
  gap: 10px;
  align-self: end;
}

.service-kicker {
  margin: 0 0 2px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.service-chip {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(12px);
  color: var(--white);
  cursor: pointer;
  font-weight: 850;
  text-align: left;
}

.service-chip:hover,
.service-chip:focus-visible {
  background: rgba(255, 255, 255, 0.25);
}

.view-tabs {
  display: flex;
  gap: 8px;
  margin: 24px 0;
  padding: 6px;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.ghost-button,
.primary-button,
.outline-button,
.danger-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 750;
}

.tab-button {
  background: transparent;
  color: var(--muted);
}

.tab-button.active,
.primary-button {
  background: var(--ink);
  color: var(--white);
}

.ghost-button,
.outline-button {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}

.danger-button {
  background: #fff0f0;
  color: var(--danger);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
  gap: 18px;
  align-items: start;
}

.panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(23, 32, 38, 0.06);
}

.customer-jobs-panel {
  margin-top: 18px;
}

.section-heading,
.toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-heading.compact {
  margin-bottom: 14px;
}

.section-heading h2,
.toolbar h2 {
  font-size: 1.55rem;
}

.job-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.job-form.single,
.lookup-form {
  grid-template-columns: 1fr;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfdff;
  color: var(--ink);
}

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

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: 3px solid rgba(20, 165, 199, 0.24);
  outline-offset: 2px;
}

.wide {
  grid-column: 1 / -1;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-line input {
  width: 18px;
  min-height: 18px;
}

.lookup-form {
  display: grid;
  gap: 12px;
}

.helper-text,
.success-text {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.success-text {
  color: var(--green);
  font-weight: 800;
}

.toolbar-actions {
  display: grid;
  grid-template-columns: max-content minmax(220px, 1fr) 190px;
  gap: 10px;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.pipeline div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
}

.pipeline strong {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--yellow);
  color: #402b00;
  font-size: 0.8rem;
}

.jobs-list {
  display: grid;
  gap: 12px;
}

.job-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(23, 32, 38, 0.05);
}

.job-main {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.job-id {
  margin: 0 0 4px;
  color: var(--cyan);
  font-weight: 850;
  font-size: 0.82rem;
}

.job-card h3 {
  margin: 0;
  font-size: 1.18rem;
}

.job-meta,
.notes,
.update-time {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.update-time {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
}

.status-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 7px 10px;
  background: #e9f7fb;
  color: #08758f;
  font-size: 0.78rem;
  font-weight: 850;
}

.status-pill.confirmed,
.status-pill.completed {
  background: #e8f6ee;
  color: var(--green);
}

.status-pill.printing {
  background: #fff5df;
  color: #8a5a00;
}

.status-pill.customer-approved,
.status-pill.customer-artwork-confirmed,
.status-pill.trust-proceed,
.status-pill.artwork-sent,
.status-pill.receipt-uploaded,
.status-pill.amount-accepted,
.status-pill.estimate-sent {
  background: #e8f6ee;
  color: var(--green);
}

.job-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.job-details div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.job-details dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.job-details dd {
  margin: 4px 0 0;
  font-weight: 850;
}

.status-timeline {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.timeline-step {
  position: relative;
  display: grid;
  gap: 6px;
  min-height: 76px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  color: var(--muted);
}

.timeline-step span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #edf2f5;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.timeline-step strong {
  font-size: 0.78rem;
  line-height: 1.25;
}

.timeline-step small {
  color: inherit;
  font-size: 0.68rem;
  line-height: 1.25;
  opacity: 0.78;
}

.timeline-step.done {
  border-color: rgba(47, 157, 98, 0.32);
  background: #eef8f2;
  color: var(--green);
}

.timeline-step.done span {
  background: var(--green);
  color: var(--white);
}

.timeline-step.current {
  border-color: rgba(20, 165, 199, 0.6);
  background: #e9f7fb;
  color: #08758f;
  box-shadow: inset 0 0 0 1px rgba(20, 165, 199, 0.16);
}

.timeline-step.current span {
  background: var(--cyan);
  color: var(--white);
}

.card-actions {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(3, max-content);
  gap: 10px;
}

.customer-actions {
  display: flex;
  justify-content: flex-end;
}

.receipt-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 10px;
  align-items: end;
  padding-top: 4px;
}

.sample-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  overflow: hidden;
}

.sample-version {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.sample-version:last-child {
  border-bottom: 0;
}

.sample-version > strong {
  color: var(--muted);
  font-size: 0.82rem;
}

.sample-box img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: #eef3f6;
}

.watermark-frame {
  position: relative;
  overflow: hidden;
  background: #eef3f6;
}

.watermark-frame.with-watermark::before {
  content: "";
  position: absolute;
  inset: -40%;
  z-index: 2;
  background-image: repeating-linear-gradient(
    -32deg,
    rgba(23, 32, 38, 0) 0 72px,
    rgba(23, 32, 38, 0.14) 73px 75px,
    rgba(23, 32, 38, 0) 76px 148px
  );
  pointer-events: none;
}

.watermark-frame span {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 8px;
  color: rgba(23, 32, 38, 0.24);
  font-size: clamp(2rem, 9vw, 6rem);
  font-weight: 900;
  text-align: center;
  transform: rotate(-20deg);
  pointer-events: none;
}

.watermark-frame span img {
  width: clamp(82px, 18vw, 180px);
  border-radius: 50%;
  opacity: 0.34;
}

.locked-sample {
  padding: 16px;
  color: var(--muted);
  line-height: 1.55;
}

.locked-sample strong {
  display: block;
  color: var(--ink);
  margin-bottom: 6px;
}

.file-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin: 10px;
  color: #08758f;
  font-weight: 850;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
  padding: 24px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
}

.admin-topbar h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.admin-topbar p:last-child {
  max-width: 420px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
}

.login-panel {
  max-width: 460px;
}

.hidden {
  display: none !important;
}

.admin-dashboard {
  display: grid;
  gap: 18px;
}

.admin-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-stats div {
  border-color: var(--line);
  background: var(--white);
}

.admin-stats span {
  color: var(--ink);
}

.admin-stats small {
  color: var(--muted);
}

.admin-job-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-job-grid textarea {
  min-height: 76px;
}

.account-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px minmax(180px, 1fr) max-content;
  gap: 10px;
  align-items: end;
}

.job-type-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) max-content;
  gap: 10px;
  align-items: end;
}

.accounts-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.job-types-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.account-chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f1f5f8;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.84rem;
}

.role-badge {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-size: 0.72rem;
}

.role-badge.coordinator {
  background: #08758f;
}

.role-badge.designer {
  background: var(--green);
}

.job-type-chip {
  border-radius: 8px;
}

.mini-button {
  min-height: 28px;
  border: 0;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 850;
}

.admin-check {
  align-self: end;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.admin-files {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted);
}

.history-log {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.history-log strong {
  font-size: 0.86rem;
}

.history-log p {
  margin: 0;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.45;
}

.history-log span {
  color: var(--ink);
  font-weight: 850;
}

.admin-files .file-link,
.file-group,
.approval-state {
  min-height: 38px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #e9f7fb;
}

.file-group {
  display: grid;
  gap: 4px;
  background: #eef7ee;
}

.file-group strong {
  color: var(--green);
  font-size: 0.78rem;
}

.file-group .file-link {
  margin: 0;
  padding: 0;
  min-height: auto;
}

.approval-state {
  color: var(--green);
  font-weight: 850;
}

.admin-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  align-items: stretch;
}

.action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.action-group strong {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.action-group button {
  flex: 1 1 135px;
}

.danger-zone {
  background: #fff8f8;
}

.empty-state {
  padding: 28px;
  border: 1px dashed #b8c4cc;
  border-radius: 8px;
  background: var(--white);
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

.designer-box {
  padding: 10px 12px;
  border-radius: 8px;
  background: #f1f7f9;
  color: var(--ink);
  line-height: 1.45;
}

.designer-box.muted {
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(360px, calc(100vw - 36px));
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 18px, 1120px);
    padding-top: 10px;
  }

  .hero-panel {
    grid-template-columns: 1fr;
    min-height: 390px;
    padding: 20px;
    background-position: 62% center;
  }

  .hero-copy h1 {
    font-size: 2rem;
  }

  .view-tabs,
  .section-heading,
  .toolbar,
  .job-main,
  .admin-topbar {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .tab-button {
    width: 100%;
  }

  .job-form,
  .section-grid,
  .account-form,
  .job-type-form,
  .toolbar-actions,
  .pipeline,
  .job-details,
  .status-timeline,
  .card-actions,
  .receipt-form,
  .admin-job-grid,
  .admin-actions,
  .admin-stats {
    grid-template-columns: 1fr;
  }

  .customer-actions {
    justify-content: stretch;
  }

  .customer-actions button,
  .receipt-form button,
  .admin-actions button {
    width: 100%;
  }
}
