:root {
  color-scheme: light;
  --ink: #15171d;
  --muted: #5a6170;
  --line: #d9dfeb;
  --panel: #ffffff;
  --paper: #f7f9fd;
  --blue: #0067ff;
  --blue-dark: #004fc4;
  --yellow: #ffd21f;
  --pink: #ff3568;
  --green: #00a77c;
  --shadow: 0 18px 60px rgba(21, 23, 29, 0.18);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(217, 223, 235, 0.82);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--yellow) 0 49%, var(--blue) 50% 100%);
  color: #ffffff;
  font-size: 0.76rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a:hover,
.site-footer a:hover {
  color: var(--blue);
}

.header-action,
.primary-link,
.secondary-link,
.chat-form button,
.profile-form button,
.login-card button,
.admin-button,
.detail-form button,
.reply-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  font-weight: 800;
}

.header-action,
.primary-link,
.chat-form button,
.login-card button,
.admin-button.primary,
.reply-form button {
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(0, 103, 255, 0.22);
}

.header-action {
  padding: 0 18px;
}

.primary-link,
.secondary-link {
  min-width: 148px;
  padding: 0 20px;
}

.secondary-link {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  min-height: 100vh;
  padding: 120px clamp(18px, 5vw, 72px) 56px;
  overflow: hidden;
  background-image:
    linear-gradient(90deg, rgba(247, 249, 253, 0.98) 0%, rgba(247, 249, 253, 0.9) 38%, rgba(247, 249, 253, 0.28) 64%),
    url("/assets/hero-card-desk.png");
  background-position: center;
  background-size: cover;
}

.hero::after {
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 260px;
  height: 260px;
  content: "";
  background: radial-gradient(circle, rgba(255, 210, 31, 0.52), rgba(255, 210, 31, 0));
  pointer-events: none;
}

.hero-copy,
.chat-card {
  position: relative;
  z-index: 1;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow,
.mini-label {
  margin: 0 0 12px;
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(3rem, 5.4vw, 5.5rem);
  line-height: 0.97;
}

.hero-lede {
  max-width: 560px;
  margin: 22px 0 0;
  color: #303641;
  font-size: 1.12rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(21, 23, 29, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #272b33;
  font-size: 0.88rem;
  font-weight: 750;
}

.chat-card {
  display: flex;
  flex-direction: column;
  min-height: 590px;
  max-height: calc(100vh - 160px);
  padding: 20px;
  border: 1px solid rgba(217, 223, 235, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.chat-card-header,
.admin-topbar,
.conversation-head,
.detail-head,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.chat-card h2,
.section-band h2,
.admin-topbar h1,
.conversation-head h2,
.detail-head h2,
.login-card h1 {
  margin: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eaf3ff;
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: capitalize;
}

.starter-row,
.suggestion-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.suggestion-strip {
  align-items: center;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.suggestion-strip span {
  font-weight: 850;
}

.starter-row button,
.suggestion-strip button,
.template-row button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f0f5ff;
  color: var(--muted);
  font-weight: 750;
}

.starter-row button:hover,
.suggestion-strip button:hover,
.template-row button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.chat-messages {
  flex: 1;
  min-height: 250px;
  overflow: auto;
  padding: 4px 2px 12px;
  scrollbar-width: thin;
}

.empty-state {
  display: grid;
  min-height: 220px;
  place-content: center;
  padding: 24px;
  border: 1px dashed #c6d4ec;
  border-radius: 8px;
  background: rgba(245, 248, 255, 0.82);
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

.empty-state strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.message {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0 0 12px;
}

.message.customer {
  align-items: flex-end;
}

.message.operator {
  align-items: flex-start;
}

.message-meta {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.message-bubble {
  max-width: min(82%, 620px);
  margin: 0;
  padding: 11px 13px;
  border-radius: 8px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.message.customer .message-bubble {
  background: var(--blue);
  color: #ffffff;
}

.message.operator .message-bubble {
  background: #eef2f8;
  color: var(--ink);
}

.chat-form,
.reply-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 12px;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
}

textarea {
  resize: vertical;
}

textarea,
input,
select {
  padding: 11px 12px;
}

textarea:focus,
input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 103, 255, 0.14);
}

.chat-form button,
.reply-form button {
  align-self: end;
  min-width: 86px;
  padding: 0 18px;
}

.profile-form {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 10px;
  margin-top: 12px;
}

.profile-form label,
.detail-form label,
.login-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.profile-form button,
.detail-form button,
.admin-button {
  align-self: end;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.profile-form button {
  justify-self: start;
}

.contact-drawer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.contact-drawer summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 850;
}

.contact-drawer[open] summary {
  color: var(--ink);
}

.form-note {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.form-note.is-error,
.error-text {
  color: #c51642;
}

.section-band {
  padding: 78px clamp(18px, 5vw, 72px);
  background: #ffffff;
}

.section-band.compact {
  background: var(--ink);
  color: #ffffff;
}

.section-band.light {
  background: var(--paper);
}

.section-inner {
  width: min(1160px, 100%);
  margin: 0 auto;
}

.section-band h2 {
  max-width: 720px;
  font-size: clamp(2rem, 3.5vw, 3.5rem);
  line-height: 1.05;
}

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

.step-grid article {
  min-height: 210px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.step-grid span {
  color: var(--pink);
  font-weight: 950;
}

.step-grid h3 {
  margin: 30px 0 10px;
  font-size: 1.25rem;
}

.step-grid p,
.info-panel p,
.wide-copy,
.request-list {
  color: var(--muted);
  line-height: 1.65;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 0.7fr);
  gap: 48px;
  align-items: start;
}

.compact .eyebrow {
  color: var(--yellow);
}

.compact .info-panel,
.request-list {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.08);
}

.compact .info-panel p,
.request-list {
  color: rgba(255, 255, 255, 0.78);
}

.request-list {
  display: grid;
  gap: 18px;
  margin: 0;
  padding-left: 42px;
}

.request-list strong {
  display: block;
  margin-bottom: 3px;
  color: #ffffff;
}

.wide-copy {
  max-width: 900px;
  font-size: 1.05rem;
}

.site-footer {
  padding: 24px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
}

.site-footer span {
  color: var(--ink);
  font-weight: 850;
}

.admin-page {
  min-height: 100vh;
  background: #eef2f8;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.login-card p {
  color: var(--muted);
  line-height: 1.55;
}

.login-card form {
  display: grid;
  gap: 12px;
}

.login-card button {
  width: 100%;
}

.admin-shell {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

.admin-topbar {
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.admin-topbar p {
  margin: 4px 0 0;
  color: var(--muted);
}

.admin-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 360px;
  min-height: 0;
}

.inbox,
.details-panel,
.conversation-panel {
  min-height: 0;
}

.inbox {
  border-right: 1px solid var(--line);
  background: #ffffff;
  overflow: auto;
}

.inbox-head,
.details-panel {
  padding: 18px;
}

.inbox-head {
  border-bottom: 1px solid var(--line);
}

.inbox-head h2 {
  margin: 0;
}

.conversation-list {
  display: grid;
  gap: 1px;
}

.conversation-item {
  display: grid;
  width: 100%;
  gap: 6px;
  padding: 14px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  color: inherit;
  text-align: left;
}

.conversation-item:hover,
.conversation-item.active {
  background: #f5f8ff;
}

.conversation-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-item span,
.conversation-item small {
  color: var(--muted);
}

.conversation-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--paper);
}

.conversation-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.conversation-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
}

.admin-messages {
  overflow: auto;
  padding: 22px;
}

.reply-box {
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.template-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.details-panel {
  border-left: 1px solid var(--line);
  background: #ffffff;
  overflow: auto;
}

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

.inline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.clock-note,
.admin-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.hidden {
  display: none !important;
}

@media (max-width: 1120px) {
  .hero,
  .admin-layout,
  .split-section {
    grid-template-columns: 1fr;
  }

  .chat-card {
    max-height: none;
  }

  .admin-layout {
    grid-template-rows: auto auto auto;
  }

  .inbox,
  .details-panel {
    border: 0;
  }
}

@media (max-width: 860px) {
  .site-header {
    position: sticky;
    gap: 12px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding-top: 58px;
    background-image:
      linear-gradient(180deg, rgba(247, 249, 253, 0.96) 0%, rgba(247, 249, 253, 0.72) 48%, rgba(247, 249, 253, 0.96) 100%),
      url("/assets/hero-card-desk.png");
  }

  .hero h1 {
    font-size: clamp(2.7rem, 11vw, 3.5rem);
  }

  .profile-form,
  .chat-form,
  .reply-form,
  .step-grid {
    grid-template-columns: 1fr;
  }

  .step-grid article {
    min-height: auto;
  }

  .admin-topbar,
  .conversation-head,
  .detail-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
