:root {
  --pmi-red: #ce1126;
  --pmi-red-dark: #a50e1e;
  --pmi-surface: #ffffff;
  --bg: #f7f9fc;
  --text: #1a2230;
  --muted: #5d687a;
  --line: #e4e8ef;
  --ok: #0f766e;
  --warn: #92400e;
  --blocked: #8b5cf6;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.page {
  width: 97%;
  max-width: 1700px;
  margin: 0 auto;
  padding: 1rem;
}

.hero {
  background: linear-gradient(122deg, #b30d1f 0%, #d81f33 35%, #f06a3f 70%, #f9a63a 100%);
  border-radius: 20px;
  color: #fff;
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: 0 12px 24px rgba(206, 17, 38, 0.25);
}

.hero__left {
  display: flex;
  gap: 1rem;
}

.brand-mark {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #fff;
  color: var(--pmi-red);
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.eyebrow {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.9;
  font-weight: 600;
}

h1 {
  margin: 0.2rem 0;
  font-size: clamp(1.3rem, 2vw + 1rem, 2rem);
}

.subtitle {
  margin: 0;
  opacity: 0.95;
  max-width: 56ch;
}

.hero__right {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.kop-meta {
  text-align: right;
}

.kop-title,
.kop-text {
  margin: 0;
}

.kop-title {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.8px;
}

.kop-text {
  font-size: 0.76rem;
  font-weight: 600;
  opacity: 0.94;
}

.kop-logo {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: #fff;
  position: relative;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.kop-logo .cross-h,
.kop-logo .cross-v {
  position: absolute;
  background: var(--pmi-red);
  border-radius: 3px;
}

.kop-logo .cross-h {
  width: 34px;
  height: 10px;
  left: 12px;
  top: 24px;
}

.kop-logo .cross-v {
  width: 10px;
  height: 34px;
  left: 24px;
  top: 12px;
}

.layout {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1.05fr 1.4fr;
  gap: 1rem;
}

.card {
  background: var(--pmi-surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
}

.controls h2,
.result h2 {
  margin-top: 0;
  margin-bottom: 0.45rem;
}

.section-note {
  color: var(--muted);
  margin-top: 0;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}

.field span,
.field legend {
  font-weight: 600;
  font-size: 0.92rem;
}

input[type="text"],
input[type="number"],
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.68rem 0.74rem;
  font: inherit;
  background: #fff;
  color: inherit;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
button:focus {
  outline: 2px solid #ffc2c9;
  outline-offset: 2px;
  border-color: #f08a96;
}

.field--check {
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.2rem;
}

fieldset.field {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
}

.radio {
  font-weight: 500;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.3rem;
}

.summary {
  background: #f4f6fb;
  border: 1px dashed #d7deea;
  border-radius: 10px;
  padding: 0.6rem 0.72rem;
  color: #334155;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 10px;
  padding: 0.58rem 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

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

.btn--primary {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(160deg, var(--pmi-red), var(--pmi-red-dark));
  padding: 0.82rem 1.2rem;
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(206, 17, 38, 0.28);
}

.btn--soft {
  background: #fff6f7;
  border-color: #f7c9cf;
  color: #8f1121;
}

.btn--warn {
  background: #fff9ec;
  border-color: #f5d8a5;
  color: var(--warn);
}

.result__header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.legend {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.84rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  margin-right: 0.3rem;
}

.dot--filled {
  background: var(--ok);
}

.dot--empty {
  background: #cbd5e1;
}

.dot--blocked {
  background: var(--blocked);
}

.status {
  border-left: 4px solid #fbbf24;
  background: #fffbeb;
  padding: 0.62rem 0.75rem;
  border-radius: 8px;
  color: #6b4f0f;
  margin-bottom: 0.8rem;
}

.seat-grid {
  --seat-cols: 8;
  display: grid;
  grid-template-columns: repeat(var(--seat-cols), minmax(90px, 1fr));
  gap: 0.55rem;
}

.seat-grid--table {
  gap: 0.75rem;
}

.table-unit {
  border: 1px solid #f6ccd1;
  border-radius: 12px;
  padding: 0.55rem;
  background: #fff8f9;
}

.table-unit__title {
  margin: 0 0 0.48rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 800;
  color: #8b1e2d;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.table-unit__seats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.seat {
  min-height: 66px;
  border: 1px solid var(--line);
  background: #fbfdff;
  border-radius: 10px;
  padding: 0.45rem;
  transition: 0.15s ease;
}

.seat:hover {
  border-color: #f5a4ad;
}

.seat__code {
  margin: 0;
  color: #64748b;
  font-size: 0.73rem;
  font-weight: 700;
}

.seat__name {
  margin: 0.2rem 0 0;
  font-weight: 600;
  font-size: 0.9rem;
}

.seat--occupied {
  border-color: #9ad7d1;
  background: #f0fdfa;
}

.seat--blocked {
  border-style: dashed;
  border-color: #c4b5fd;
  background: #f5f3ff;
}

.seat--empty {
  background: #f8fafc;
}

.seat button {
  all: unset;
  display: block;
  width: 100%;
  cursor: pointer;
}

.footer {
  margin: 1rem 0 0.5rem;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .field--check {
    margin-top: 0;
  }

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

  .table-unit__seats {
    grid-template-columns: 1fr;
  }
}
