:root {
  --bg: #fbf4e7;
  --panel: #fffaf1;
  --ink: #181512;
  --muted: #6d6256;
  --line: #e6d3b4;
  --orange: #f28c18;
  --amber: #ffc43d;
  --charcoal: #25211d;
  --white: #ffffff;
  --shadow: 0 22px 60px rgba(56, 40, 18, 0.14);
  --font-body: Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
  --font-display: Unbounded, Manrope, ui-sans-serif, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.cabinet-auth-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 15%, rgba(242, 140, 24, 0.16), transparent 30rem),
    linear-gradient(180deg, #fffaf1, #f4ead9);
}

.auth-layout {
  display: grid;
  width: min(1160px, calc(100% - 32px));
  min-height: 100vh;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 48px;
  align-items: center;
  margin: 0 auto;
  padding: 48px 0;
}

.auth-brand img,
.cabinet-brand img {
  width: 150px;
  height: auto;
}

.cabinet-eyebrow {
  margin: 0 0 12px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-copy h1,
.auth-card h2,
.cabinet-header h1,
.inbox-card h2 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.1;
}

.auth-copy h1 {
  max-width: 740px;
  margin-top: 40px;
  font-size: clamp(38px, 6vw, 72px);
}

.auth-copy p:not(.cabinet-eyebrow) {
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.auth-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.auth-points span,
.metric-card,
.message-card,
.status-card,
.inbox-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 12px 32px rgba(56, 40, 18, 0.08);
}

.auth-points span {
  padding: 16px;
  font-weight: 900;
}

.auth-card {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.auth-card h2 {
  font-size: 28px;
}

.auth-card p,
.auth-card small {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

input,
select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  outline: 0;
  padding: 0 14px;
}

input:focus,
select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(242, 140, 24, 0.16);
}

.cabinet-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 900;
}

.cabinet-button.primary {
  background: var(--orange);
  color: var(--ink);
}

.cabinet-button.dark {
  background: var(--charcoal);
  color: var(--white);
}

.cabinet-button.light {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}

.form-error {
  margin: 0;
  border-radius: 8px;
  background: #fee2e2;
  color: #991b1b;
  padding: 12px;
  font-weight: 800;
}

.cabinet-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 241, 0.92);
  backdrop-filter: blur(16px);
}

.cabinet-header h1 {
  font-size: clamp(22px, 3vw, 34px);
}

.cabinet-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.status-grid {
  display: grid;
  grid-template-columns: 0.92fr 1fr;
  gap: 20px;
}

.status-card,
.inbox-summary,
.inbox-card,
.metric-card,
.message-card {
  padding: 24px;
}

.card-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.muted-label {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

.status-card strong,
.inbox-summary strong,
.metric-card strong {
  display: block;
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 900;
}

.badge.orange {
  background: #fff0d3;
  color: #9a4c00;
}

.badge.green {
  background: #dcfce7;
  color: #166534;
}

.badge.dark {
  background: var(--charcoal);
  color: var(--white);
}

.badge.slate {
  background: #f1f5f9;
  color: #475569;
}

.progress-bar {
  height: 12px;
  overflow: hidden;
  margin-top: 24px;
  border-radius: 999px;
  background: #f4ead9;
}

.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--orange);
}

.status-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 18px;
  color: var(--muted);
  font-weight: 800;
}

.status-meta a {
  color: var(--orange-dark);
}

.inbox-summary {
  border-radius: 8px;
  background: var(--charcoal);
  color: var(--white);
}

.inbox-summary span,
.inbox-summary .muted-label {
  color: rgba(255, 255, 255, 0.66);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.metric-card strong {
  font-size: 30px;
}

.inbox-card {
  margin-top: 28px;
}

.inbox-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.filters {
  display: grid;
  grid-template-columns: repeat(2, 180px);
  gap: 10px;
}

.message-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.message-card {
  background: var(--panel);
}

.message-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.message-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.message-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

@media (max-width: 900px) {
  .auth-layout,
  .status-grid {
    grid-template-columns: 1fr;
  }

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

  .inbox-head,
  .message-top {
    align-items: stretch;
    flex-direction: column;
  }

  .filters,
  .message-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .auth-points,
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .cabinet-header {
    grid-template-columns: 1fr auto;
  }

  .cabinet-brand {
    grid-column: 1 / -1;
  }
}
