:root {
  --bg: #fff8f1;
  --surface: #ffffff;
  --surface-soft: #fff2e2;
  --surface-dark: #111111;
  --line: #ffd2a8;
  --line-strong: #ff9f43;
  --text: #171717;
  --muted: #6b5b4d;
  --orange: #f97316;
  --orange-deep: #ea580c;
  --orange-soft: #fff1e6;
  --danger: #b91c1c;
  --success: #166534;
  --shadow: 0 18px 45px rgba(17, 17, 17, 0.08);
}

body {
  margin: 0;
  font-family: Tahoma, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.10), transparent 30%),
    linear-gradient(180deg, #fffaf5 0%, #fff3e8 100%);
  color: var(--text);
}

a {
  color: var(--orange-deep);
  text-decoration: none;
}

.container {
  width: 92%;
  max-width: 1120px;
  margin: 0 auto;
}

img {
  max-width: 100%;
  height: auto;
}

.nav {
  background: rgba(17, 17, 17, 0.96);
  color: #fff;
  border-bottom: 3px solid var(--orange);
  box-shadow: 0 10px 28px rgba(17, 17, 17, 0.18);
}

.nav .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-logo {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  object-fit: contain;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 6px;
  box-sizing: border-box;
}

.brand-logo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111111;
  font-size: 12px;
  font-weight: bold;
}

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

.brand-name {
  font-size: 22px;
  font-weight: bold;
  letter-spacing: 0.4px;
  line-height: 1.05;
}

.brand-address {
  margin-top: 4px;
  color: #fed7aa;
  font-size: 12px;
  line-height: 1.2;
}

.menu a {
  color: #fff7ed;
  margin-right: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.menu a:hover {
  background: rgba(249, 115, 22, 0.18);
  color: #fff;
}

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.subnav a {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  font-weight: bold;
  border: 1px solid var(--line);
}

.subnav a.active {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-deep) 100%);
  color: #fff;
  border-color: transparent;
}

.menu-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: #111111;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
}

.status-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 16px;
}

.status-filters a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  border: 1px solid var(--line);
  font-weight: bold;
}

.status-filters a.active {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-deep) 100%);
  color: #fff;
  border-color: transparent;
}

.status-filters a .menu-badge {
  margin-left: 8px;
}

.hero, .panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.97) 0%, rgba(255,248,241,0.97) 100%);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 26px;
  margin: 24px 0;
  border: 1px solid rgba(255, 159, 67, 0.24);
}

.hero-grid, .grid-2, .grid-3, .grid-4, .stats {
  display: grid;
  gap: 18px;
}

.form-panel form > * + * {
  margin-top: 18px;
}

.hero-grid {
  grid-template-columns: 2fr 1fr;
}

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

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

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

.hero {
  position: relative;
  overflow: hidden;
}

.hero:before {
  content: "";
  position: absolute;
  right: -70px;
  top: -70px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.18) 0%, rgba(249, 115, 22, 0) 70%);
}

.hero h1 {
  margin: 0 0 12px;
  font-size: 40px;
  line-height: 1.12;
  color: #111111;
  max-width: 680px;
}

.hero-kicker {
  display: inline-block;
  margin-bottom: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #111111;
  color: #fff7ed;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1.2px;
}

.card {
  background: linear-gradient(180deg, #ffffff 0%, #fff7ed 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}

.field-note {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

.checkbox-line {
  margin: 12px 0 0;
  line-height: 1.65;
}

.compact-actions {
  margin-top: 10px;
}

.compact-actions .btn {
  padding: 10px 16px;
}

.choice-card {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
}

.choice-card input {
  flex: 0 0 auto;
}

.signature-box {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffaf5;
  overflow: hidden;
}

#signaturePad {
  display: block;
  width: 100%;
  height: 220px;
  touch-action: none;
}

.summary-section {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  background: linear-gradient(180deg, #fffaf5 0%, #fff1e6 100%);
}

.section-title {
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--orange-deep);
}

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

.summary-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 82px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 159, 67, 0.28);
}

.summary-card strong {
  color: var(--orange-deep);
  font-size: 13px;
}

.summary-card span {
  color: var(--text);
  line-height: 1.55;
  word-break: break-word;
}

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

.submit-actions {
  justify-content: flex-end;
}

.compact-grid {
  gap: 14px;
}

.stat-card {
  background: linear-gradient(180deg, #ffffff 0%, #fff3e8 100%);
}

.stat-card strong {
  display: block;
  margin-bottom: 8px;
}

.money {
  font-size: 28px;
  font-weight: bold;
  color: #111111;
}

.stat-card.profit .money {
  color: #166534;
}

.stat-card.loss .money {
  color: #b91c1c;
}

.financial-lines {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-hero-main,
.dashboard-hero-side {
  position: relative;
  overflow: hidden;
}

.dashboard-hero-main {
  background:
    radial-gradient(circle at top right, rgba(251, 146, 60, 0.28), transparent 34%),
    linear-gradient(135deg, #fff7ed 0%, #ffffff 52%, #fff1e6 100%);
}

.dashboard-hero-main:after {
  content: "";
  position: absolute;
  right: -64px;
  bottom: -64px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.10), rgba(15, 23, 42, 0));
}

.dashboard-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--orange-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dashboard-hero-main h2 {
  margin: 14px 0 8px;
  font-size: 32px;
  line-height: 1.15;
}

.dashboard-pill-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.dashboard-pill {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(251, 146, 60, 0.20);
  background: rgba(255, 255, 255, 0.84);
}

.dashboard-pill span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-pill strong {
  display: block;
  margin-top: 6px;
  font-size: 26px;
  color: var(--text);
}

.dashboard-hero-side {
  display: flex;
  align-items: stretch;
  background: linear-gradient(180deg, #111827 0%, #1f2937 100%);
  color: #fff;
}

.dashboard-ring-card {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 24px;
  background:
    radial-gradient(circle at center, rgba(251, 146, 60, 0.28) 0%, rgba(251, 146, 60, 0.10) 34%, transparent 35%),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
}

.ring-label {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
}

.ring-value {
  margin-top: 12px;
  font-size: 42px;
  font-weight: 800;
  color: #fff7ed;
}

.ring-note {
  margin-top: 6px;
  color: rgba(255,255,255,0.72);
  font-size: 13px;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #fff7ef 100%);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.06);
}

.metric-card:after {
  content: "";
  position: absolute;
  right: -24px;
  top: -24px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.18) 0%, rgba(249, 115, 22, 0) 70%);
}

.metric-amber {
  background: linear-gradient(135deg, #fff1e6 0%, #ffffff 100%);
}

.metric-dark {
  background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
  color: #fff;
}

.metric-dark .metric-title,
.metric-dark .metric-foot,
.metric-dark .metric-value {
  color: #fff;
}

.metric-soft {
  background: linear-gradient(180deg, #ffffff 0%, #fffaf5 100%);
}

.metric-title {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 13px;
}

.metric-value {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
}

.metric-foot {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.chart-card {
  padding: 18px;
}

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

.chart-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 16px;
}

.chart-head h3 {
  margin: 0;
}

.chart-stack {
  display: grid;
  gap: 12px;
}

.chart-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 50px;
  gap: 10px;
  align-items: center;
}

.chart-label,
.chart-value {
  font-size: 13px;
}

.chart-value {
  text-align: right;
  font-weight: bold;
}

.chart-bar-wrap {
  height: 12px;
  border-radius: 999px;
  background: #ffe6cf;
  overflow: hidden;
}

.chart-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-deep) 100%);
}

.monthly-chart {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
  min-height: 280px;
  margin-top: 16px;
}

.monthly-col {
  display: grid;
  gap: 10px;
  align-items: end;
  justify-items: center;
}

.monthly-top {
  font-size: 12px;
  font-weight: 700;
  color: var(--orange-deep);
}

.monthly-bar-track {
  width: 100%;
  height: 190px;
  display: flex;
  align-items: flex-end;
  padding: 8px;
  box-sizing: border-box;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff7ef 0%, #ffe7cf 100%);
  border: 1px solid #ffd2ae;
}

.monthly-bar-fill {
  width: 100%;
  min-height: 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fb923c 0%, #ea580c 100%);
  box-shadow: 0 10px 20px rgba(234, 88, 12, 0.24);
}

.monthly-label {
  font-weight: 700;
  color: var(--text);
}

.monthly-sub {
  font-size: 12px;
  color: var(--muted);
}

.status-pending { background: linear-gradient(135deg, #fdba74 0%, #f97316 100%); }
.status-confirmed { background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%); }
.status-repairing { background: linear-gradient(135deg, #f97316 0%, #c2410c 100%); }
.status-completed { background: linear-gradient(135deg, #34d399 0%, #059669 100%); }
.status-delivered { background: linear-gradient(135deg, #78716c 0%, #292524 100%); }
.service-onsite { background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%); }
.service-online { background: linear-gradient(135deg, #1f2937 0%, #111827 100%); }

.mini-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.mini-table table {
  min-width: 100%;
}

.summary-list {
  display: grid;
  gap: 10px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 159, 67, 0.2);
}

.summary-line strong {
  color: var(--orange-deep);
}

.warranty-preview-card {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.warranty-preview-inner {
  width: 170px;
  min-height: 236px;
  border: 1px solid #111111;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdfb 0%, #fff2e2 100%);
  padding: 18px 14px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 16px 30px rgba(17, 17, 17, 0.08);
}

.warranty-preview-title {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  margin-bottom: 10px;
}

.warranty-preview-sub {
  font-size: 13px;
  line-height: 1.3;
}

.warranty-preview-bar {
  width: 100%;
  height: 74px;
  margin: 16px 0 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background:
    repeating-linear-gradient(
      90deg,
      #111111 0,
      #111111 2px,
      #ffffff 2px,
      #ffffff 5px,
      #111111 5px,
      #111111 9px,
      #ffffff 9px,
      #ffffff 12px
    );
}

.warranty-preview-code {
  font-size: 26px;
  font-weight: bold;
  letter-spacing: 3px;
}

.warranty-code-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 128px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 3px;
}

.info-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff7ed 0%, #fff1e6 100%);
}

.input, textarea, select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #e7c39f;
  background: rgba(255, 255, 255, 0.96);
  margin-top: 6px;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
  background: #fff;
}

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

.btn {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-deep) 100%);
  color: #fff;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.22);
}

.btn.secondary {
  background: #111111;
  box-shadow: 0 12px 24px rgba(17, 17, 17, 0.18);
}

.btn.danger {
  background: var(--danger);
  box-shadow: none;
}

.btn.light {
  background: var(--surface-soft);
  color: #111111;
  box-shadow: none;
  border: 1px solid var(--line);
}

.btn.accent {
  background: linear-gradient(135deg, #111111 0%, #2d2d2d 100%);
  box-shadow: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  align-items: center;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th, td {
  padding: 12px;
  border-bottom: 1px solid #f1d3b4;
  text-align: left;
  vertical-align: top;
}

.repair-main {
  display: grid;
  gap: 5px;
  line-height: 1.45;
}

.repair-status-cell {
  display: grid;
  gap: 10px;
  min-width: 180px;
}

.status-panel {
  padding: 12px;
  border-radius: 18px;
  border: 1px solid transparent;
}

.status-panel.pending { background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%); border-color: #fdba74; }
.status-panel.confirmed { background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%); border-color: #93c5fd; }
.status-panel.repairing { background: linear-gradient(180deg, #faf5ff 0%, #ede9fe 100%); border-color: #c4b5fd; }
.status-panel.completed { background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%); border-color: #86efac; }
.status-panel.delivered { background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%); border-color: #cbd5e1; }
.status-panel.cancelled { background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%); border-color: #fda4af; }

.quick-inline-form,
.quick-status-form {
  display: grid;
  gap: 8px;
}

.quick-inline-form .btn,
.quick-status-form .btn,
.quick-status-form .input {
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}

.quick-status-form {
  padding: 10px;
  border-radius: 16px;
  background: #fff7ef;
  border: 1px solid #ffd6b3;
}

.auto-submit-status {
  display: none;
}

th {
  color: #111111;
  background: #fff4ea;
}

.badge {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: bold;
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.pending { background: linear-gradient(135deg, #fff7ed 0%, #fdba74 100%); color: #9a3412; border-color: #fb923c; box-shadow: 0 10px 20px rgba(249, 115, 22, 0.18); }
.confirmed { background: linear-gradient(135deg, #eff6ff 0%, #93c5fd 100%); color: #1d4ed8; border-color: #60a5fa; box-shadow: 0 10px 20px rgba(59, 130, 246, 0.16); }
.repairing { background: linear-gradient(135deg, #faf5ff 0%, #c4b5fd 100%); color: #6d28d9; border-color: #8b5cf6; box-shadow: 0 10px 20px rgba(139, 92, 246, 0.16); }
.completed { background: linear-gradient(135deg, #f0fdf4 0%, #86efac 100%); color: #166534; border-color: #4ade80; box-shadow: 0 10px 20px rgba(34, 197, 94, 0.16); }
.delivered { background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%); color: #0f172a; border-color: #94a3b8; box-shadow: 0 10px 20px rgba(100, 116, 139, 0.18); }
.backup-ok { background: #dcfce7; color: #166534; }
.backup-alert { background: #fee2e2; color: #991b1b; }
.backup-neutral { background: #ffedd5; color: #9a3412; }

.flash {
  padding: 14px 16px;
  border-radius: 16px;
  margin: 18px 0;
  border: 1px solid transparent;
}

.flash.success {
  background: #ecfdf5;
  color: var(--success);
  border-color: #bbf7d0;
}

.flash.error {
  background: #fff1f2;
  color: #991b1b;
  border-color: #fecdd3;
}

.warning-soft {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fdba74;
}

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

.warning {
  background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
  border: 2px solid #ef4444;
  border-radius: 18px;
  padding: 16px;
  color: #9f1239;
  box-shadow: 0 16px 32px rgba(239, 68, 68, 0.14);
}

.warning strong {
  display: inline-block;
  color: #881337;
  font-size: 18px;
  margin-bottom: 6px;
}

.footer {
  text-align: center;
  padding: 24px 0 36px;
  color: var(--muted);
}

.container > .panel:first-of-type .subnav a[href="admin.php"] {
  display: none;
}

.edit-order-panel {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(251, 146, 60, 0.28);
  background:
    radial-gradient(circle at top right, rgba(251, 146, 60, 0.18), transparent 28%),
    linear-gradient(180deg, #fffdf8 0%, #ffffff 100%);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.08);
}

.edit-order-hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 18px;
  padding: 24px 26px 18px;
  border-bottom: 1px solid rgba(251, 146, 60, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 247, 237, 0.98) 0%, rgba(255, 255, 255, 0.98) 58%),
    linear-gradient(120deg, rgba(251, 146, 60, 0.08), rgba(15, 23, 42, 0.04));
}

.edit-order-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(251, 146, 60, 0.24);
  background: rgba(255, 255, 255, 0.9);
  color: var(--orange-deep);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.edit-order-hero h2 {
  margin: 8px 0 10px;
  color: #111827;
  font-size: 30px;
  line-height: 1.15;
}

.edit-order-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.edit-summary-chip {
  padding: 16px 16px 14px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #fff7ed 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.edit-summary-chip span {
  display: block;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.edit-summary-chip strong {
  display: block;
  margin-top: 6px;
  color: #111827;
  font-size: 18px;
  line-height: 1.35;
}

.edit-order-form {
  padding: 22px 26px 26px;
}

.edit-section {
  margin-bottom: 20px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 250, 251, 0.98) 100%);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.05);
}

.edit-section-head {
  margin-bottom: 16px;
}

.edit-section-head h3 {
  margin: 0 0 4px;
  color: #111827;
  font-size: 20px;
}

.edit-section-head p {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.6;
}

.edit-card-grid,
.edit-card-grid-2,
.edit-card-grid-3 {
  display: grid;
  gap: 16px;
}

.edit-card-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.edit-card {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(251, 146, 60, 0.14);
  background: linear-gradient(180deg, #ffffff 0%, #fffbf5 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

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

.edit-card label {
  display: block;
  margin-bottom: 8px;
  color: #1f2937;
  font-size: 13px;
  font-weight: 800;
}

.edit-card .input,
.edit-card textarea,
.edit-card select {
  width: 100%;
  box-sizing: border-box;
}

.edit-card textarea {
  min-height: 104px;
  resize: vertical;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(251, 146, 60, 0.18);
  background: rgba(255, 247, 237, 0.9);
  color: #1f2937;
  font-size: 14px;
  font-weight: 700;
}

.check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #ea580c;
}

.edit-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.edit-card-actions .btn {
  min-width: 132px;
  text-align: center;
}

.edit-order-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
  padding-top: 12px;
}

.edit-order-actions .btn {
  min-width: 160px;
}

@media (max-width: 860px) {
  .container {
    width: min(94%, 100%);
  }

  .nav .container {
    gap: 14px;
    padding: 14px 0;
    align-items: stretch;
  }

  .brand {
    width: 100%;
    text-align: center;
    font-size: 20px;
  }

  .menu {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .menu a {
    margin-right: 0;
    width: 100%;
    padding: 11px 10px;
  }

  .hero-grid, .grid-2, .grid-3, .grid-4, .stats, .info-strip {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-hero,
  .dashboard-metrics,
  .dashboard-pill-row {
    grid-template-columns: 1fr;
  }

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

  .hero,
  .panel {
    padding: 20px 16px;
    margin: 18px 0;
    border-radius: 18px;
  }

  .hero h1 {
    font-size: 30px;
  }

  h1 {
    font-size: 28px;
    line-height: 1.2;
  }

  h2 {
    font-size: 22px;
    line-height: 1.25;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .actions .btn,
  .actions .input,
  .actions input,
  .actions select,
  .actions button {
    width: 100%;
    max-width: 100% !important;
    box-sizing: border-box;
    text-align: center;
  }

  .subnav {
    display: grid;
    grid-template-columns: 1fr;
  }

  .brand {
    align-items: flex-start;
  }

  .brand-logo {
    width: 50px;
    height: 50px;
  }

  .brand-name {
    font-size: 18px;
  }

  .brand-address {
    font-size: 11px;
  }

  .subnav a {
    text-align: center;
  }

  .status-filters {
    display: grid;
    grid-template-columns: 1fr;
  }

  .status-filters a {
    width: 100%;
    box-sizing: border-box;
  }

  .edit-order-hero,
  .edit-order-summary,
  .edit-card-grid-2,
  .edit-card-grid-3 {
    grid-template-columns: 1fr;
  }

  .edit-order-hero {
    padding: 22px 18px 16px;
  }

  .edit-order-form {
    padding: 18px;
  }

  .edit-section {
    padding: 16px;
    border-radius: 20px;
  }

  th,
  td {
    padding: 10px;
    font-size: 14px;
  }

  .badge {
    max-width: 100%;
    text-align: center;
    white-space: normal;
  }

  .money {
    font-size: 24px;
  }

  .financial-lines {
    font-size: 12px;
    line-height: 1.5;
  }

  .table-wrap {
    margin: 0 -4px;
    padding-bottom: 4px;
  }

  table {
    min-width: 620px;
  }

  .warning {
    padding: 14px;
  }

  .choice-card {
    min-height: auto;
  }

  .chart-head,
  .summary-line {
    flex-direction: column;
    align-items: flex-start;
  }

  .chart-row {
    grid-template-columns: 1fr;
  }

  .chart-value {
    text-align: left;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  .brand {
    font-size: 18px;
  }

  .menu {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 25px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  .hero-kicker {
    font-size: 11px;
    letter-spacing: 0.8px;
  }

  .btn {
    padding: 12px 16px;
  }

  .input,
  textarea,
  select {
    padding: 11px 12px;
    border-radius: 12px;
  }

  .card,
  .warning,
  .info-strip,
  .summary-section,
  .signature-box {
    border-radius: 14px;
  }

  th,
  td {
    font-size: 13px;
  }

  table {
    min-width: 560px;
  }

  .dashboard-hero-main h2 {
    font-size: 25px;
  }

  .metric-value,
  .ring-value {
    font-size: 28px;
  }

  .monthly-chart {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .edit-order-kicker {
    font-size: 11px;
    letter-spacing: 0.05em;
  }

  .edit-order-hero h2 {
    font-size: 24px;
  }

  .edit-section-head h3 {
    font-size: 18px;
  }

  .edit-card,
  .edit-summary-chip {
    padding: 14px;
  }

  .edit-order-actions {
    align-items: stretch;
  }

  .edit-card-actions {
    justify-content: stretch;
  }

  .edit-card-actions .btn {
    width: 100%;
  }

  .edit-order-actions .btn {
    width: 100%;
  }

  .monthly-bar-track {
    height: 140px;
  }

  #signaturePad {
    height: 180px;
  }
}
