:root {
  color-scheme: light;
  --bg: #f4f5f1;
  --ink: #20241f;
  --muted: #687066;
  --line: #d9ddd2;
  --panel: #ffffff;
  --accent: #b7352f;
  --accent-dark: #892720;
  --green: #1f7a58;
  --yellow: #9a6b00;
  --blue: #286a8d;
  --shadow: 0 12px 32px rgba(32, 36, 31, 0.08);
}

* {
  box-sizing: border-box;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: #fbfbf8;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  width: clamp(56px, 8vw, 86px);
  height: clamp(56px, 8vw, 86px);
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.brand-title {
  display: block;
  color: #0142aa;
  font-size: clamp(2rem, 4vw, 3.8rem);
  font-weight: 900;
  line-height: 1;
}

.brand-title span {
  color: #c7192a;
}

.brand-copy .eyebrow {
  color: var(--ink);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
}

h2 {
  margin-bottom: 0;
  font-size: 1.2rem;
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-strip span,
.badge,
.source {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  gap: 5px;
}

.status-strip strong {
  color: var(--ink);
}

.layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 20px;
  padding: 24px clamp(16px, 4vw, 48px) 48px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.composer {
  grid-row: span 2;
  padding: 18px;
}

.sms-panel {
  padding: 18px;
}

.sms-help-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-left: 5px solid var(--green);
}

.section-head,
.requests-head,
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfcfa;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  padding: 11px 12px;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(183, 53, 47, 0.15);
}

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

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 700;
}

dl {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

dl div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: center;
}

dt {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

dd {
  margin: 0;
}

code {
  padding: 3px 6px;
  border-radius: 6px;
  background: #eef0e9;
  color: #353a32;
  font-size: 0.86rem;
}

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

.sms-number-row {
  display: grid;
  gap: 3px;
}

.sms-number {
  margin: 0;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  font-weight: 950;
  line-height: 1.05;
}

.sms-number a {
  color: var(--ink);
  text-decoration: none;
}

.sms-number a:hover {
  color: var(--green);
}

.sms-carriers {
  margin: 0;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.3;
}

.sms-copy {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.4;
}

.requests {
  min-width: 0;
}

.requests-head {
  margin-bottom: 14px;
}

.requests-head select {
  max-width: 220px;
  background: #fff;
}

.request-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.request-list.opened-ticket {
  grid-template-columns: 1fr;
}

.request-card {
  display: grid;
  gap: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.request-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #e5e7df;
}

.request-body {
  display: grid;
  gap: 12px;
  padding: 16px;
  align-content: start;
}

.category {
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 900;
}

.urgency {
  color: var(--yellow);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.urgency.critical,
.urgency.high {
  color: var(--accent);
}

.request-card h3 {
  margin-bottom: 0;
  font-size: 1.05rem;
  line-height: 1.25;
}

.request-card p {
  margin-bottom: 0;
  color: #454b42;
  line-height: 1.45;
}

.summary-block,
.exact-block {
  display: grid;
  gap: 6px;
}

.summary-block span,
.exact-block summary,
.exact-block span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.exact-block summary {
  cursor: pointer;
}

.exact-block p {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f9f5;
  color: #30362f;
  white-space: pre-wrap;
}

.meta {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
}

.post-link {
  justify-self: start;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 900;
  text-decoration: none;
}

.post-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.request-detail {
  display: grid;
  gap: 16px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 18px;
}

.request-detail img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 8px;
  background: #e5e7df;
}

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.detail-head h3 {
  margin: 4px 0 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.15;
}

.detail-block p {
  margin: 0;
  color: #454b42;
  line-height: 1.5;
}

.detail-meta {
  padding-top: 4px;
}

.empty {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 700;
}

.site-footer {
  display: grid;
  gap: 6px;
  padding: 22px clamp(16px, 4vw, 48px) 28px;
  border-top: 1px solid var(--line);
  background: #fbfbf8;
  color: var(--muted);
}

.site-footer p {
  max-width: 100%;
  margin: 0;
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.5;
}

.site-footer p:last-child {
  color: var(--ink);
  font-weight: 400;
}

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

  .composer {
    grid-row: auto;
  }
}

@media (max-width: 640px) {
  .topbar,
  .section-head,
  .requests-head,
  .card-head,
  .detail-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .grid-two,
  dl div {
    grid-template-columns: 1fr;
  }

  .requests-head select {
    max-width: none;
  }
}
