.customer-table {
  margin-top: 1.5rem;
}
.customer-head,
.customer-table > a {
  display: grid;
  grid-template-columns: 1.5fr 1fr 0.8fr 0.6fr 0.7fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
}
.customer-head {
  background: #171717;
  color: white;
}
.customer-table > a:hover {
  background: #f3f1eb;
}
.customer-table span:first-child {
  display: flex;
  flex-direction: column;
}
.customer-table small {
  color: var(--muted);
}
.order-note {
  margin-top: 1rem;
}
.order-note textarea {
  width: 100%;
  margin-top: 0.65rem;
  resize: vertical;
}
.order-instruction {
  margin-top: 1.25rem;
  padding: 1rem;
  background: #f3f1eb;
  border-left: 4px solid var(--accent);
}
.order-instruction p {
  margin-bottom: 0;
  white-space: pre-wrap;
}
.shipping-rates form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: end;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}
.shipping-rates .button {
  margin-bottom: 0;
}
.muted {
  color: var(--muted);
}
.customer-orders > article {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.order-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
  margin-top: 1rem;
}
.order-status-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.order-status-form select {
  min-width: 190px;
}
.order-admin-actions .button {
  margin: 0;
}
.danger-button {
  background: #9f1d1d;
  border-color: #9f1d1d;
}
.danger-button:hover {
  background: #761515;
  border-color: #761515;
}
.file-download {
  display: block;
  width: fit-content;
  margin-top: 0.45rem;
  font-weight: 700;
  text-decoration: underline;
}
.dashboard-orders > article {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}
.dashboard-orders .order-admin-actions {
  margin-top: 0.6rem;
}
.cgv-check {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  margin: 1rem 0;
  font-size: 0.9rem;
}
.cgv-check input {
  width: auto;
  margin-top: 0.2rem;
}
.legal-page {
  max-width: 900px;
}
.legal-page section {
  margin: 2rem 0;
}
.legal-page h2 {
  font-size: 1.2rem;
}
.legal-page p {
  line-height: 1.7;
}
.legal-form {
  max-width: 760px;
}
.order-link {
  text-decoration: underline;
}
.messages-panel {
  margin-top: 1.25rem;
}
.message-thread {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin: 1rem 0 1.5rem;
}
.message {
  max-width: 78%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #f0eee8;
}
.message.from-admin {
  align-self: flex-end;
  background: #171717;
  color: white;
}
.message time {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  opacity: 0.7;
}
.message p {
  margin-bottom: 0;
  white-space: pre-wrap;
}
.message-form textarea {
  width: 100%;
  resize: vertical;
}
.payment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0;
}
.payment-actions form,
.payment-actions .button {
  margin: 0;
}
.notice {
  padding: 0.8rem;
  background: #fff3cd;
  border-left: 4px solid #e1a900;
}
.traffic-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}
.material-price-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
  margin-top: 0.75rem;
}
.material-price-form label {
  margin: 0;
}
.material-price-form .button {
  padding: 13px 16px;
}
.thickness-editor {
  grid-column: 1 / -1;
  margin: 0.75rem 0;
}
.thickness-editor form {
  display: grid;
  grid-template-columns: 70px 1fr 1fr auto auto;
  gap: 0.6rem;
  align-items: end;
  padding: 0.65rem 0;
  border-top: 1px solid var(--line);
}
.thickness-editor label,
.work-time-form label {
  margin: 0;
}
.thickness-editor .button {
  padding: 13px 14px;
}
.thickness-editor .thickness-delete {
  background: #8d2015;
}
.profitability-panel {
  margin: 1rem 0;
}
.profit-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 0.6rem 1.5rem;
  max-width: 620px;
}
.profit-grid b,
.profit-grid strong {
  text-align: right;
}
.profit-grid strong {
  border-top: 2px solid var(--line);
  padding-top: 0.65rem;
}
.work-time-form {
  display: grid;
  grid-template-columns: minmax(200px, 360px) auto;
  gap: 0.75rem;
  align-items: end;
  margin-top: 1.5rem;
  max-width: 600px;
}
.traffic-cards .panel {
  display: flex;
  flex-direction: column;
}
.traffic-cards strong {
  font-size: 2.2rem;
  margin: 0.4rem 0;
}
.traffic-chart-panel {
  margin-bottom: 1rem;
  overflow: hidden;
}
.chart-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}
.chart-heading h2 {
  margin-bottom: 0.25rem;
}
.chart-heading p {
  margin-top: 0;
  color: #707070;
}
.chart-heading > span {
  color: #707070;
  font-size: 0.85rem;
}
.traffic-chart {
  height: 210px;
  display: grid;
  grid-template-columns: repeat(30, minmax(20px, 1fr));
  align-items: end;
  gap: 4px;
  padding: 20px 0 0;
  border-bottom: 1px solid #cfcfcf;
}
.traffic-chart.hourly-chart {
  grid-template-columns: repeat(24, minmax(22px, 1fr));
}
.chart-column {
  height: 190px;
  display: grid;
  grid-template-rows: 20px 150px 20px;
  align-items: end;
  text-align: center;
  min-width: 0;
}
.chart-column b {
  font-size: 0.72rem;
  color: #555;
  align-self: center;
}
.chart-column i {
  width: 100%;
  min-height: 0;
  display: block;
  background: #f05223;
  border-radius: 3px 3px 0 0;
  transition: opacity 0.2s;
}
.chart-column:hover i {
  opacity: 0.72;
}
.chart-column small {
  height: 20px;
  padding-top: 5px;
  font-size: 0.65rem;
  color: #666;
  white-space: nowrap;
}
.recent-visits > div {
  display: grid;
  grid-template-columns: 130px 90px 1fr 1fr;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid #e2e2e2;
  align-items: center;
}
.recent-visits .recent-head {
  color: #666;
  font-size: 0.85rem;
}
.recent-visits > div > * {
  min-width: 0;
  overflow-wrap: anywhere;
}
.account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: start;
}
.account-grid textarea {
  resize: vertical;
}
.forgot-link {
  margin: -0.35rem 0 1rem;
  text-align: right;
}
.stat-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 700px) {
  .traffic-cards,
  .account-grid {
    grid-template-columns: 1fr;
  }
  .message {
    max-width: 92%;
  }
  .thickness-editor form {
    grid-template-columns: 1fr;
  }
  .work-time-form {
    grid-template-columns: 1fr;
  }
  .traffic-chart-panel {
    overflow-x: auto;
  }
  .traffic-chart {
    min-width: 720px;
  }
  .traffic-chart.hourly-chart {
    min-width: 620px;
  }
  .recent-visits {
    overflow-x: auto;
  }
  .recent-visits > div {
    min-width: 650px;
  }
}
.unread-badge {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: #f15a24;
  color: white;
  font-size: 0.72rem;
  font-style: normal;
}
@media (max-width: 600px) {
  .order-admin-actions,
  .order-status-form {
    align-items: stretch;
    flex-direction: column;
  }
  .order-status-form select,
  .order-admin-actions form,
  .order-admin-actions .button {
    width: 100%;
  }
}
@media (max-width: 850px) {
  .customer-head {
    display: none;
  }
  .customer-table > a {
    grid-template-columns: 1fr auto;
  }
  .customer-table > a span:nth-child(2),
  .customer-table > a span:nth-child(3) {
    display: none;
  }
}
.resume-payment{display:flex;align-items:center;justify-content:space-between;gap:24px;border-left:5px solid var(--orange);margin:24px 0}.resume-payment h2,.resume-payment p{margin:.2rem 0}.resume-payment form{flex:0 0 auto}.orders-list .orders>a{position:relative;grid-template-columns:minmax(170px,1.3fr) .7fr 1fr .6fr}.payment-pending{grid-column:1/-1;color:#b74418;font-size:.85rem;font-style:normal;font-weight:800}@media(max-width:720px){.resume-payment{align-items:stretch;flex-direction:column}.resume-payment .button{width:100%}.orders-list .orders>a{grid-template-columns:1fr 1fr}.orders-list .orders>a b,.payment-pending{grid-column:1/-1}}
