:root {
  --bg: #f7f2e8;
  --surface: rgba(255, 252, 246, 0.9);
  --surface-strong: #fffdf9;
  --surface-soft: rgba(198, 165, 85, 0.11);
  --line: rgba(125, 99, 54, 0.18);
  --text: #211a12;
  --muted: #6d604d;
  --accent: #b88a1d;
  --accent-deep: #866212;
  --ok: #23553f;
  --warn: #9b640e;
  --bad: #aa2e1d;
  --shadow: 0 20px 60px rgba(66, 45, 18, 0.1);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background:
    linear-gradient(180deg, #fbf7ef 0%, #f2ebdf 100%);
  position: relative;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

p {
  margin: 0;
}

button,
input,
textarea {
  font: inherit;
}

.background-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.5;
  pointer-events: none;
}

.orb-one {
  width: 340px;
  height: 340px;
  top: -80px;
  right: -100px;
  background: rgba(212, 177, 91, 0.25);
}

.orb-two {
  width: 260px;
  height: 260px;
  left: -90px;
  bottom: 80px;
  background: rgba(184, 138, 29, 0.18);
}

.page-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 340px 1fr;
}

.brand-panel {
  padding: 32px 28px;
  border-right: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.8);
  backdrop-filter: blur(18px);
}

.brand-logo {
  width: 230px;
  max-width: 100%;
  display: block;
  margin-bottom: 26px;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--accent-deep);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  font-weight: 700;
}

.intro {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.7;
}

.panel-card,
.hero-card,
.form-card,
.table-card,
.summary-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel-card {
  margin-top: 22px;
  padding: 20px;
}

.panel-card h2 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.panel-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.contact-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-deep);
}

.contact-card p:last-child {
  color: var(--muted);
  line-height: 1.6;
}

.main-content {
  padding: 28px;
}

.hero-card {
  padding: 24px;
  display: grid;
  grid-template-columns: 1.6fr 0.8fr;
  gap: 20px;
  align-items: stretch;
}

.hero-copy h2 {
  font-size: clamp(2rem, 3vw, 3rem);
  max-width: 12ch;
}

.hero-copy p:last-child {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 62ch;
}

.hero-status-card {
  display: grid;
  gap: 8px;
  align-content: center;
  padding: 18px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(184, 138, 29, 0.12) 0%, rgba(255, 255, 255, 0.55) 100%);
  border: 1px solid rgba(184, 138, 29, 0.18);
}

.status-label {
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-status-card strong {
  font-size: 1.2rem;
  color: var(--accent-deep);
}

.hero-status-card span:last-child {
  color: var(--muted);
}

.form-card,
.table-card,
.summary-card {
  margin-top: 18px;
  padding: 22px;
}

.confirmation-card {
  margin-top: 18px;
  padding: 22px;
  background: linear-gradient(135deg, rgba(184, 138, 29, 0.14) 0%, rgba(255, 255, 255, 0.92) 100%);
  border: 1px solid rgba(184, 138, 29, 0.2);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hidden {
  display: none;
}

.section-head,
.table-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
}

.controls-grid,
.summary-grid {
  display: grid;
  gap: 16px;
}

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

.summary-grid {
  grid-template-columns: 0.95fr 1.05fr;
}

.full-width {
  grid-column: 1 / -1;
}

label {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

input,
textarea {
  width: 100%;
  margin-top: 6px;
  border: 1px solid rgba(125, 99, 54, 0.16);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(184, 138, 29, 0.55);
  box-shadow: 0 0 0 4px rgba(184, 138, 29, 0.12);
}

.table-actions {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}

.search-label {
  min-width: 260px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(125, 99, 54, 0.12);
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 700;
}

tbody tr {
  transition: background 140ms ease, transform 140ms ease;
}

tbody tr:hover {
  background: rgba(184, 138, 29, 0.08);
}

.product-title {
  display: grid;
  gap: 4px;
}

.product-title strong {
  font-size: 0.98rem;
}

.product-title span {
  color: var(--muted);
  font-size: 0.84rem;
}

.category-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.category-pill {
  padding: 8px 12px;
  color: var(--accent-deep);
  background: rgba(184, 138, 29, 0.12);
}

.status-pill {
  padding: 8px 12px;
}

.status-ok {
  color: var(--ok);
  background: rgba(35, 85, 63, 0.12);
}

.status-warn {
  color: var(--warn);
  background: rgba(155, 100, 14, 0.13);
}

.status-bad {
  color: var(--bad);
  background: rgba(170, 46, 29, 0.12);
}

.qty-input {
  min-width: 110px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.stat-box {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(184, 138, 29, 0.1);
}

.stat-box strong {
  display: block;
  margin-top: 6px;
  font-size: 1.5rem;
  color: var(--accent-deep);
}

.note,
.mail-note {
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.6;
}

textarea {
  min-height: 280px;
  resize: vertical;
  line-height: 1.55;
}

.action-row {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.left-align {
  justify-content: flex-start;
}

.primary-btn,
.secondary-btn {
  width: auto;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-1px);
}

.primary-btn {
  color: white;
  background: linear-gradient(135deg, #cda233 0%, #8a6514 100%);
  box-shadow: 0 10px 24px rgba(138, 101, 20, 0.22);
}

.primary-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.secondary-btn {
  color: var(--text);
  background: rgba(184, 138, 29, 0.14);
  border: 1px solid rgba(184, 138, 29, 0.18);
}

@media (max-width: 1180px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

@media (max-width: 760px) {
  .main-content,
  .brand-panel {
    padding: 18px;
  }

  .controls-grid,
  .stats {
    grid-template-columns: 1fr;
  }

  .table-head,
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-label {
    min-width: 0;
    width: 100%;
  }

  th,
  td {
    padding: 12px 10px;
  }
}
