:root {
  --bg: #f4efe2;
  --bg-soft: #efe7d5;
  --ink: #0f261b;
  --ink-soft: rgba(15, 38, 27, 0.7);
  --green: #0f5b3b;
  --green-deep: #0a3d28;
  --sand: #d8c49a;
  --gold: #be9555;
  --line: rgba(15, 38, 27, 0.12);
  --card: rgba(255, 250, 241, 0.82);
  --shadow: 0 24px 60px rgba(24, 41, 31, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fbf8f0 0%, var(--bg) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 38, 27, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 38, 27, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(circle at center, black 50%, transparent 100%);
}

.page-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}

.hero-copy h1 {
  margin: 10px 0 14px;
  max-width: 12ch;
  font-family: "Fraunces", serif;
  font-size: clamp(2.6rem, 5vw, 5.2rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.eyebrow,
.section-kicker,
.note-label,
.field-label {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--green);
}

.hero-text,
.hero-note p,
#call-hint,
.ticket-empty,
.empty-state,
.summary-block p,
.tips {
  color: var(--ink-soft);
  line-height: 1.6;
}

.hero-note {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: var(--shadow);
}

.dashboard {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 20px;
}

.phone-panel {
  grid-row: span 2;
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  padding: 24px;
}

.card::after {
  content: none;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.card-header h2 {
  margin: 6px 0 0;
  font-size: 1.4rem;
}

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

.pill-muted {
  background: rgba(15, 38, 27, 0.06);
  color: var(--ink-soft);
}

.pill-live {
  background: rgba(15, 91, 59, 0.12);
  color: var(--green-deep);
}

.pill-alert {
  background: rgba(190, 62, 62, 0.12);
  color: #8b2323;
}

.dial-surface {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 360px;
  margin: 16px 0 22px;
  border-radius: 8px;
  border: 1px solid rgba(15, 38, 27, 0.08);
  background:
    radial-gradient(circle at center, rgba(15, 91, 59, 0.14), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(216, 196, 154, 0.2));
}

.dial-ring {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 1px solid rgba(15, 91, 59, 0.15);
  box-shadow:
    inset 0 0 0 22px rgba(255, 255, 255, 0.45),
    inset 0 0 0 46px rgba(15, 91, 59, 0.06);
  animation: pulse-ring 4.6s ease-in-out infinite;
}

.dial-core {
  position: relative;
  z-index: 1;
  width: min(84%, 340px);
  padding: 30px 24px;
  text-align: center;
  border-radius: 8px;
  background: rgba(250, 247, 239, 0.78);
  border: 1px solid rgba(15, 38, 27, 0.08);
}

.dial-label {
  display: inline-block;
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 91, 59, 0.08);
  color: var(--green-deep);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dial-core strong {
  display: block;
  font-size: 1.45rem;
  line-height: 1.25;
  margin-bottom: 12px;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

button {
  border: 0;
  cursor: pointer;
  font: inherit;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.primary-btn,
.secondary-btn,
.text-btn {
  border-radius: 8px;
}

.primary-btn,
.secondary-btn {
  padding: 14px 18px;
  font-weight: 800;
}

.primary-btn {
  background: linear-gradient(135deg, var(--green), var(--green-deep));
  color: white;
  box-shadow: 0 14px 30px rgba(15, 91, 59, 0.24);
}

.secondary-btn {
  background: rgba(15, 38, 27, 0.08);
  color: var(--ink);
}

.text-btn {
  padding: 10px 14px;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 700;
}

.tips {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px dashed rgba(15, 38, 27, 0.12);
}

.transcript-log {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 360px;
  max-height: 460px;
  overflow: auto;
  padding-right: 6px;
}

.empty-state {
  padding: 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px dashed rgba(15, 38, 27, 0.12);
}

.log-item {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid rgba(15, 38, 27, 0.08);
  background: rgba(255, 255, 255, 0.7);
  animation: rise-in 220ms ease;
}

.log-item.user {
  background: rgba(15, 91, 59, 0.08);
}

.log-item.agent {
  background: rgba(190, 149, 85, 0.14);
}

.log-role {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-deep);
}

.log-text {
  line-height: 1.6;
}

.ticket-empty {
  padding: 20px;
  border: 1px dashed rgba(15, 38, 27, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
}

.ticket-card {
  display: grid;
  gap: 18px;
  padding: 20px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(15, 91, 59, 0.08), rgba(255, 255, 255, 0.82));
  border: 1px solid rgba(15, 38, 27, 0.1);
  animation: rise-in 260ms ease;
}

.ticket-topline {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.ticket-type {
  margin: 0 0 6px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.ticket-topline h3 {
  margin: 0;
  font-size: 1.6rem;
}

.status-chip {
  color: #734c00;
  background: rgba(216, 196, 154, 0.7);
}

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

.ticket-grid strong,
.summary-block p {
  display: block;
  margin-top: 6px;
}

.hidden {
  display: none;
}

@keyframes pulse-ring {
  0%,
  100% {
    transform: scale(0.96);
    opacity: 0.88;
  }

  50% {
    transform: scale(1.02);
    opacity: 1;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .hero,
  .dashboard {
    grid-template-columns: 1fr;
  }

  .phone-panel {
    grid-row: auto;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1200px);
    padding-top: 22px;
  }

  .card {
    padding: 18px;
    border-radius: 8px;
  }

  .dial-surface {
    min-height: 300px;
  }

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