:root {
  color-scheme: light;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #020617;
  color: #0f172a;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, rgba(59, 130, 246, 0.2), rgba(15, 23, 42, 0.95)),
    #020617;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.page {
  width: min(1100px, 100%);
  background: #f8fafc;
  border-radius: 36px;
  padding: 32px;
  box-shadow: 0 25px 80px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.logo img {
  max-width: 100%;
  max-height: 100%;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.75rem;
  color: #64748b;
  margin: 0;
}

.hero h1 {
  margin: 6px 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: #0f172a;
}

.subtitle {
  margin: 0;
  color: #475569;
  max-width: 480px;
}

.status-block {
  background: #fff;
  border-radius: 20px;
  padding: 16px 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  min-width: 220px;
}

.status-block .label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #94a3b8;
}

.status-pill {
  margin-top: 8px;
  display: inline-block;
  background: #fbbf24;
  color: #78350f;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}

.status-details {
  margin: 8px 0 0;
  color: #475569;
  font-size: 0.9rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: #fff;
  border-radius: 28px;
  padding: 24px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.card-header h2 {
  margin: 0 0 4px;
  font-size: 1.3rem;
  color: #0f172a;
}

.card-header p {
  margin: 0;
  color: #64748b;
  font-size: 0.95rem;
}

.proposal-meta {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.proposal-meta div {
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 12px;
}

.proposal-meta span {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.proposal-meta strong {
  display: block;
  margin-top: 6px;
  font-size: 1.1rem;
  color: #0f172a;
}

.attachments {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.attachment {
  border-radius: 16px;
  border: 1px dashed rgba(15, 23, 42, 0.15);
  padding: 14px;
  display: flex;
  justify-content: center;
  font-weight: 600;
}

.attachment:disabled {
  opacity: 0.5;
}

.contacts {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contacts li {
  background: #f8fafc;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 12px 16px;
  font-size: 0.95rem;
  color: #0f172a;
}

.hint {
  font-size: 0.85rem;
  color: #64748b;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

thead {
  background: #e2e8f0;
}

th,
td {
  padding: 12px;
  font-size: 0.95rem;
}

th {
  text-align: left;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: #475569;
}

tbody td {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.total-row td {
  font-weight: 600;
  font-size: 1.05rem;
}

.actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.success-banner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(34, 197, 94, 0.4);
  background: rgba(187, 247, 208, 0.5);
  color: #065f46;
  font-size: 0.95rem;
}

.tracking-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.order-meta,
.printer-info {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.order-meta div,
.printer-info div {
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 12px;
}

.order-meta span,
.printer-info span {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.1em;
}

.order-meta strong,
.printer-info strong {
  display: block;
  margin-top: 4px;
  font-size: 1.1rem;
  color: #0f172a;
}

.progress-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.progress-value {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.progress-value strong {
  font-size: 2rem;
}

.progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0ea5e9, #22d3ee);
  width: 0%;
  transition: width 0.3s ease;
}

.timeline {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.timeline-entry {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.timeline-entry.timeline-client {
  background: rgba(14, 165, 233, 0.08);
  border-radius: 18px;
  padding: 12px;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #0ea5e9;
  margin-top: 6px;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

.timeline-time {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 0 0 2px;
}

.timeline-entry h3 {
  margin: 0;
  font-size: 1rem;
  color: #0f172a;
}

.timeline-entry p {
  margin: 4px 0 0;
  color: #475569;
}

.order-notes {
  font-size: 1rem;
  color: #0f172a;
}

.feedback-form {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feedback-form label {
  font-size: 0.9rem;
  color: #0f172a;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feedback-form label span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #94a3b8;
}

.feedback-form textarea,
.feedback-form input,
.feedback-form select {
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  padding: 12px;
  font: inherit;
}

.item-completed {
  opacity: 0.7;
}

.item-completed td {
  text-decoration: line-through;
}

button {
  cursor: pointer;
  border: none;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button:active {
  transform: translateY(1px);
}

.primary {
  background: #0f172a;
  color: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.3);
}

.ghost {
  background: transparent;
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.2);
}

.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

footer {
  text-align: center;
  color: #94a3b8;
  font-size: 0.85rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-backdrop.active {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: 24px;
  padding: 24px;
  width: min(420px, 90%);
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.4);
}

.modal h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.modal textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  padding: 12px;
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
}

.modal-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

@media (max-width: 720px) {
  body {
    padding: 12px;
  }

  .page {
    padding: 20px;
    border-radius: 24px;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  table {
    border-radius: 16px;
  }

  thead {
    display: none;
  }

  tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  }

  tbody td {
    border: none;
    padding: 4px 0;
    font-size: 0.9rem;
  }

  tbody td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 2px;
  }

  .total-row {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .total-row td {
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
  }

  .order-meta,
  .printer-info {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  thead {
    display: none;
  }

  tbody tr {
    margin-bottom: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    background: #fff;
    padding: 10px;
  }

  tbody td {
    display: flex;
    justify-content: space-between;
    padding: 8px 4px;
  }

  .actions {
    flex-direction: column;
  }
}
