:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --panel: #ffffff;
  --text: #15171a;
  --muted: #626a73;
  --line: #d8dde3;
  --accent: #0d7a5f;
  --accent-strong: #075f49;
  --danger: #a83232;
  --warning: #9a6500;
  --shadow: 0 12px 30px rgba(22, 29, 37, 0.08);
}

* {
  box-sizing: border-box;
}

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

body.modal-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  min-height: 40px;
  padding: 0 14px;
}

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

button.secondary {
  background: #e9edf1;
  color: var(--text);
}

button.secondary:hover {
  background: #dce2e8;
}

button.danger {
  background: #ffffff;
  color: var(--danger);
  border: 1px solid var(--danger);
}

button.danger:hover {
  background: var(--danger);
  color: #fff;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  min-height: 40px;
  padding: 8px 10px;
}

label {
  color: var(--muted);
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.15;
}

h2 {
  font-size: 18px;
  line-height: 1.2;
}

p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.hidden {
  display: none !important;
}

.app-shell {
  margin: 0;
  padding: 0;
  width: 100%;
}

.app-shell > .dashboard {
  margin: 32px auto;
  width: min(1180px, calc(100vw - 32px));
}

.admin-topbar {
  align-items: center;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 14px 24px;
}

.admin-topbar h1 {
  font-size: 20px;
  font-weight: 700;
}

.admin-topbar p {
  font-size: 13px;
  margin-top: 2px;
}

.admin-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-nav a {
  border-radius: 6px;
  color: #2c5282;
  font-size: 13px;
  font-weight: 700;
  min-height: 32px;
  padding: 7px 10px;
  text-decoration: none;
}

.admin-nav a:hover,
.admin-nav a[aria-current="page"] {
  background: #eef2f7;
  color: var(--text);
}

.admin-nav button {
  font-size: 13px;
  min-height: 32px;
  padding: 0 10px;
}

.admin-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  justify-content: flex-end;
}

.admin-actions button {
  font-size: 13px;
  min-height: 34px;
  padding: 0 12px;
}

.dashboard-page {
  background: #f7f8fa;
}

.dashboard-page .admin-topbar {
  padding: 12px 22px;
}

.dashboard-page .admin-shell {
  margin: 14px auto;
  padding: 0 20px;
}

.admin-shell {
  margin: 24px auto;
  max-width: 1180px;
  padding: 0 24px;
}

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

.money {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  white-space: nowrap;
}

.payments-status {
  margin: 0;
  min-height: 20px;
  padding: 12px 14px 0;
}

.balance-cell {
  cursor: text;
}

.balance-cell:hover,
.balance-cell:focus {
  background: rgba(13, 122, 95, 0.05);
  outline: 2px solid rgba(13, 122, 95, 0.18);
  outline-offset: -2px;
}

.balance-edit-form {
  align-items: center;
  display: flex;
  gap: 6px;
}

.balance-edit-form input {
  min-height: 32px;
  padding: 4px 8px;
  width: 110px;
}

.balance-edit-form button {
  font-size: 12px;
  min-height: 32px;
  padding: 0 10px;
}

.auth-view {
  display: grid;
}

.landing-page {
  background:
    linear-gradient(115deg, rgba(13, 122, 95, 0.12), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(14, 165, 233, 0.22), transparent 30%),
    radial-gradient(circle at 16% 72%, rgba(245, 158, 11, 0.18), transparent 26%),
    linear-gradient(180deg, #f8fffc 0%, #ffffff 42%, #f6f9ff 100%);
  min-height: 100vh;
  overflow-x: hidden;
  padding: 14px clamp(14px, 3vw, 34px) 34px;
}

.site-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(13, 122, 95, 0.15);
  border-radius: 8px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 14px;
  grid-template-columns: auto minmax(360px, 1fr) auto;
  margin: 0 auto;
  max-width: 1240px;
  padding: 10px;
  position: sticky;
  top: 10px;
  width: 100%;
  z-index: 20;
}

.brand-lockup {
  align-items: center;
  color: var(--text);
  display: inline-flex;
  flex: 0 0 auto;
  gap: 10px;
  font-size: 17px;
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, #0d7a5f, #0ea5e9 58%, #f59e0b);
  border-radius: 8px;
  box-shadow: 0 14px 28px rgba(13, 122, 95, 0.18);
  color: #fff;
  display: inline-flex;
  font-size: 18px;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.site-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.site-nav a {
  border-radius: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  min-height: 34px;
  padding: 8px 10px;
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav a:hover {
  background: rgba(13, 122, 95, 0.08);
  color: #075f49;
}

.site-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.landing-hero {
  display: grid;
  gap: 16px;
  margin: 16px auto 0;
  max-width: 1240px;
  width: 100%;
}

.hero-carousel {
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.18);
  display: grid;
  min-height: min(660px, calc(100vh - 132px));
  overflow: hidden;
  position: relative;
  width: 100%;
}

.hero-slide {
  animation: heroSlide 25s infinite;
  background: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.12);
  display: grid;
  grid-area: 1 / 1;
  min-height: inherit;
  opacity: 0;
  position: relative;
  transform: translateX(24px) scale(0.98);
}

.hero-slide.active,
.hero-slide:nth-child(1) {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.hero-slide:nth-child(2) {
  animation-delay: 5s;
}

.hero-slide:nth-child(3) {
  animation-delay: 10s;
}

.hero-slide:nth-child(4) {
  animation-delay: 15s;
}

.hero-slide:nth-child(5) {
  animation-delay: 20s;
}

.hero-slide img {
  height: 100%;
  grid-area: 1 / 1;
  filter: saturate(1.08) contrast(1.04) brightness(0.86);
  object-fit: cover;
  position: relative;
  width: 100%;
  z-index: 0;
}

.hero-slide::after {
  background:
    linear-gradient(90deg, rgba(3, 11, 23, 0.9) 0%, rgba(5, 15, 28, 0.74) 46%, rgba(5, 15, 28, 0.18) 78%, rgba(5, 15, 28, 0.02) 100%),
    linear-gradient(180deg, rgba(13, 122, 95, 0.16), rgba(14, 165, 233, 0.12));
  content: "";
  inset: 0;
  position: absolute;
  z-index: 1;
}

.hero-slide-content {
  align-content: center;
  display: grid;
  gap: 18px;
  inset: 0 auto 0 0;
  max-width: 700px;
  padding: clamp(28px, 6vw, 76px);
  position: absolute;
  z-index: 2;
}

.hero-slide h1,
.hero-slide h2 {
  color: #ffffff;
  font-size: clamp(44px, 6vw, 82px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.96;
  text-shadow: 0 3px 24px rgba(3, 11, 23, 0.42);
}

.hero-slide p {
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.45;
  max-width: 620px;
  text-shadow: 0 2px 18px rgba(3, 11, 23, 0.35);
}

@keyframes heroSlide {
  0%,
  16% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  20%,
  96% {
    opacity: 0;
    transform: translateX(-24px) scale(0.98);
  }
  100% {
    opacity: 0;
    transform: translateX(24px) scale(0.98);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    animation: none;
  }

  .hero-slide:not(:first-child) {
    display: none;
  }
}

.hero-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button-link {
  align-items: center;
  border: 0;
  border-radius: 6px;
  display: inline-flex;
  font-size: 14px;
  font-weight: 900;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  text-decoration: none;
}

button.button-link {
  cursor: pointer;
}

.button-link.primary {
  background: #0d7a5f;
  box-shadow: 0 14px 26px rgba(13, 122, 95, 0.2);
  color: #fff;
}

.button-link.primary:hover {
  background: #075f49;
}

.button-link.secondary {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.14);
  color: #0f172a;
}

.button-link.secondary:hover {
  border-color: rgba(13, 122, 95, 0.4);
  color: #075f49;
}

.hero-copy {
  align-items: stretch;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 1fr) auto minmax(320px, 1fr);
}

.trial-banner {
  align-content: center;
  background: linear-gradient(135deg, #fff3c4 0%, #a7f3d0 48%, #bae6fd 100%);
  border: 1px solid rgba(13, 122, 95, 0.22);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
  display: grid;
  gap: 6px;
  padding: 16px 18px;
}

.trial-banner strong {
  color: #075f49;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.trial-banner span {
  color: #263241;
  font-size: 14px;
  font-weight: 800;
}

.hero-proof {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.hero-proof div {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(13, 122, 95, 0.16);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
  padding: 12px;
}

.hero-proof dt {
  color: #0d7a5f;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.hero-proof dd {
  color: #4b5563;
  font-size: 12px;
  font-weight: 800;
  margin: 6px 0 0;
  text-transform: uppercase;
}

.auth-legal {
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
  margin: 24px auto 0;
  max-width: 820px;
  text-align: center;
}

.auth-legal a {
  color: #0369a1;
  font-weight: 800;
}

.site-footer {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  box-shadow: 0 20px 54px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 22px;
  margin: 34px auto 0;
  max-width: 1240px;
  padding: clamp(20px, 3vw, 30px);
  width: 100%;
}

.footer-brand {
  display: grid;
  gap: 10px;
  max-width: 760px;
}

.footer-brand p,
.footer-bottom {
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
}

.footer-brand a,
.site-footer a,
.site-footer button {
  color: #0b6f59;
  font-weight: 800;
}

.footer-grid {
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 20px;
}

.footer-grid section {
  display: grid;
  gap: 8px;
}

.footer-grid h2 {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.footer-grid a,
.footer-grid button {
  background: transparent;
  border: 0;
  color: #475569;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  padding: 0;
  text-align: left;
  text-decoration: none;
}

.footer-grid a:hover,
.footer-grid button:hover {
  color: #0d7a5f;
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
  padding-top: 16px;
}

.public-page {
  background:
    radial-gradient(circle at 8% 0%, rgba(16, 185, 129, 0.16), transparent 32%),
    radial-gradient(circle at 88% 4%, rgba(14, 165, 233, 0.14), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #f3fff9 48%, #f4fbff 100%);
  min-height: 100vh;
  padding: 14px clamp(14px, 3vw, 34px) 34px;
}

.public-main {
  display: grid;
  gap: 28px;
  margin: 18px auto 0;
  max-width: 1240px;
  width: 100%;
}

.public-hero {
  background:
    linear-gradient(125deg, rgba(13, 122, 95, 0.96), rgba(14, 165, 233, 0.86)),
    #0d7a5f;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
  color: #fff;
  display: grid;
  gap: 16px;
  overflow: hidden;
  padding: clamp(28px, 5vw, 58px);
  position: relative;
}

.public-hero h1 {
  color: #fff;
  font-size: clamp(42px, 6vw, 76px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.98;
  max-width: 860px;
}

.public-hero p {
  color: #e7fff8;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.5;
  max-width: 760px;
}

.public-content-grid,
.public-card-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.public-card,
.public-panel {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.06);
  display: grid;
  gap: 10px;
  padding: 20px;
}

.public-card span {
  color: #0ea5e9;
  font-size: 12px;
  font-weight: 900;
}

.public-card h2,
.public-panel h2 {
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
}

.public-card p,
.public-panel p,
.public-panel li {
  color: #475569;
  font-size: 15px;
  line-height: 1.55;
}

.public-panel ul,
.public-panel ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.public-split {
  align-items: stretch;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
}

.contact-panel a {
  color: #0d7a5f;
  font-weight: 900;
}

.auth-modal {
  align-items: center;
  display: grid;
  inset: 0;
  justify-items: center;
  padding: 20px;
  position: fixed;
  z-index: 60;
}

.auth-modal-backdrop {
  background: rgba(15, 23, 42, 0.56);
  inset: 0;
  position: absolute;
}

.auth-modal-card {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.28);
  display: grid;
  gap: 14px;
  max-height: min(92vh, 760px);
  max-width: 560px;
  overflow-y: auto;
  padding: 16px;
  position: relative;
  width: min(560px, 100%);
  z-index: 1;
}

.auth-modal-card header {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.auth-modal-card header h2 {
  color: #0f172a;
  font-size: 24px;
  font-weight: 900;
}

.auth-modal-card header p {
  margin-top: 6px;
}

.auth-modal-close {
  flex: 0 0 auto;
}

.auth-tabs {
  background: #eef6f5;
  border: 1px solid rgba(13, 122, 95, 0.12);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 5px;
}

.auth-tabs button {
  background: transparent;
  color: #475569;
  min-height: 38px;
}

.auth-tabs button[aria-selected="true"] {
  background: #0d7a5f;
  color: #ffffff;
}

.auth-panel {
  align-content: start;
  display: grid;
  gap: 12px;
}

.auth-panel.hidden {
  display: none;
}

.auth-panel h2 {
  color: #0f172a;
  font-size: 20px;
  font-weight: 900;
}

.auth-panel p {
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
  margin-top: 6px;
}

.stack {
  display: grid;
  gap: 10px;
}

.auth-panel input {
  min-height: 36px;
  padding: 7px 9px;
}

.consent-checkbox {
  align-items: start;
  color: var(--text);
  display: grid;
  gap: 10px;
  grid-template-columns: 18px 1fr;
  font-size: 12px;
  line-height: 1.32;
}

.consent-checkbox input {
  height: 18px;
  margin: 2px 0 0;
  min-height: 0;
  padding: 0;
  width: 18px;
}

.home-visual-card {
  --float-y: 0px;
  --tilt: 0deg;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  box-shadow: 0 26px 54px rgba(15, 23, 42, 0.15);
  display: grid;
  gap: 12px;
  margin: 0;
  overflow: hidden;
  transform: translateY(var(--float-y)) rotate(var(--tilt));
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.home-visual-card:hover {
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.18);
  transform: translateY(calc(var(--float-y) - 5px)) rotate(var(--tilt));
}

.home-visual-card img {
  aspect-ratio: 4 / 3;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.home-visual-card figcaption {
  display: grid;
  gap: 4px;
  padding: 0 14px 14px;
}

.home-visual-card strong {
  color: #0f172a;
  font-size: 14px;
  line-height: 1.2;
}

.home-visual-card span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.home-visual-card.featured {
  --float-y: -6px;
  --tilt: -1.5deg;
  grid-row: span 2;
}

.home-visual-card.featured img {
  aspect-ratio: 1 / 1;
}

.home-visual-card[data-visual="transcription"] {
  --float-y: 16px;
  --tilt: 1.25deg;
}

.home-visual-card[data-visual="translation"] {
  --float-y: -10px;
  --tilt: -1deg;
}

.home-visual-card[data-visual="ai-agent"] {
  --float-y: 20px;
  --tilt: 1.5deg;
}

.home-visual-card[data-visual="wallet"] {
  --float-y: 2px;
  --tilt: -0.75deg;
}

.section-intro {
  display: grid;
  gap: 8px;
  max-width: 760px;
}

.section-intro h2 {
  color: #0f172a;
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 900;
  letter-spacing: 0;
}

.section-intro p {
  color: #475569;
  font-size: 17px;
  line-height: 1.55;
}

.value-section,
.use-case-section,
.pricing-section {
  margin: 34px auto 0;
  max-width: 1240px;
  width: 100%;
}

.value-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.value-grid article {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
  padding: 18px;
}

.value-grid span {
  color: #0ea5e9;
  font-size: 12px;
  font-weight: 900;
}

.value-grid h3 {
  color: #0f172a;
  font-size: 17px;
  font-weight: 900;
  margin: 8px 0 0;
}

.value-grid p {
  color: #64748b;
  font-size: 13px;
  margin-top: 8px;
}

.flow-section {
  align-items: center;
  background: #0f172a;
  border-radius: 8px;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1fr);
  margin: 34px auto 0;
  max-width: 1240px;
  padding: 24px;
  width: 100%;
}

.flow-section h2 {
  color: #ffffff;
  font-size: 28px;
  font-weight: 900;
}

.flow-section p {
  color: #cbd5e1;
  margin-top: 8px;
}

.flow-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.flow-list li {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #ffffff;
  display: flex;
  gap: 12px;
  font-size: 14px;
  font-weight: 700;
  padding: 12px;
}

.flow-list span {
  align-items: center;
  background: #38bdf8;
  border-radius: 6px;
  color: #082f49;
  display: inline-flex;
  flex: 0 0 30px;
  font-weight: 900;
  height: 30px;
  justify-content: center;
}

.visual-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 18px;
  perspective: 1200px;
}

.pricing-section {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(13, 122, 95, 0.96), rgba(14, 165, 233, 0.9)),
    #0d7a5f;
  border-radius: 8px;
  box-shadow: 0 22px 64px rgba(13, 122, 95, 0.22);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: clamp(22px, 4vw, 34px);
}

.pricing-section h2 {
  color: #ffffff;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
}

.pricing-section p {
  color: #e2fff6;
  font-size: 16px;
  margin-top: 8px;
  max-width: 720px;
}

.pricing-panel {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.18);
  display: grid;
  gap: 8px;
  min-width: 250px;
  padding: 18px;
}

.pricing-panel strong {
  color: #0d7a5f;
  font-size: 36px;
  font-weight: 900;
}

.pricing-panel span {
  color: #475569;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

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

  .site-nav,
  .site-actions {
    justify-content: flex-start;
    text-align: left;
  }

  .hero-copy {
    grid-template-columns: 1fr;
  }

  .value-grid,
  .visual-grid,
  .public-content-grid,
  .public-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-visual-card.featured {
    grid-column: span 2;
    grid-row: auto;
  }

  .home-visual-card.featured img {
    aspect-ratio: 16 / 7;
  }

  .pricing-section {
    grid-template-columns: 1fr;
  }

  .public-split,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .landing-page {
    padding: 16px 14px 28px;
  }

  .landing-hero {
    margin-top: 16px;
  }

  .hero-carousel {
    min-height: 560px;
  }

  .hero-slide::after {
    background: linear-gradient(180deg, rgba(5, 15, 28, 0.22), rgba(5, 15, 28, 0.92));
  }

  .hero-slide-content {
    align-content: end;
    padding: 22px;
  }

  .hero-slide h1,
  .hero-slide h2 {
    font-size: clamp(38px, 12vw, 58px);
    line-height: 1;
  }

  .hero-slide p {
    font-size: 16px;
  }

  .value-grid,
  .visual-grid,
  .flow-section,
  .public-content-grid,
  .public-card-grid {
    grid-template-columns: 1fr;
  }

  .hero-proof {
    grid-template-columns: 1fr;
  }

  .home-visual-card.featured {
    grid-column: auto;
  }

  .home-visual-card.featured img,
  .home-visual-card img {
    aspect-ratio: 16 / 10;
  }

  .auth-modal {
    padding: 10px;
  }

  .auth-modal-card {
    max-height: calc(100vh - 20px);
  }
}

.dashboard {
  display: grid;
  gap: 18px;
}

.topbar {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
  padding: 20px;
}

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

.account-form {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: 1.2fr 1fr 1.4fr auto;
}

.checkbox {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  display: flex;
  min-height: 40px;
  padding: 8px 10px;
}

.checkbox input {
  height: 16px;
  width: 16px;
}

.account-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.account-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.account-card header {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.status {
  align-self: start;
  background: transparent;
  border-radius: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  padding: 2px 0 0;
  text-transform: uppercase;
}

.status.connected {
  background: transparent;
  color: var(--accent-strong);
}

.status.qr,
.status.authenticated {
  background: transparent;
  color: var(--warning);
}

.status.auth_failed,
.status.disconnected {
  background: transparent;
  color: var(--danger);
}

.qr {
  border: 1px solid var(--line);
  border-radius: 6px;
  width: 180px;
}

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

.account-form-compact {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.account-form-compact button {
  padding: 10px 22px;
}

/* Admin-only columns/rows: hidden by default, revealed when body has .is-admin */
.admin-only {
  display: none;
}

body.is-admin .admin-only {
  display: revert;
}

.panel-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.panel-controls input[type="search"] {
  width: 240px;
  padding: 8px 12px;
}

.muted {
  color: var(--muted);
  font-size: 11px;
}

.thread-link {
  cursor: pointer;
}

.thread-link:hover {
  background: rgba(13, 122, 95, 0.04);
}

.view-as-banner {
  background: #fff3d6;
  color: var(--warning);
  border: 1px solid #f0d68a;
  border-radius: 6px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-weight: 600;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 19, 25, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal.hidden {
  display: none;
}

.modal-card {
  background: var(--panel);
  border-radius: 10px;
  width: min(720px, 92vw);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.modal-card header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.system-message-card {
  width: min(520px, 92vw);
}

.system-message-body {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.5;
}

.thread-body {
  padding: 16px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.bubble {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 10px;
  background: #eef1f4;
}

.bubble.mine {
  align-self: flex-end;
  background: #d1ead7;
}

.bubble-meta {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}

.bubble-body {
  font-size: 14px;
  white-space: pre-wrap;
}

.cost-card {
  background: linear-gradient(120deg, #e6f4ee 0%, #d1ead7 100%);
  color: var(--accent-strong);
  border: 1px solid #b9dfc8;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 14px;
}

.billing-header {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.wallet-balance {
  min-width: 170px;
  text-align: center;
}

.wallet-balance span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.wallet-balance strong {
  color: var(--accent-strong);
  display: block;
  font-size: 28px;
  line-height: 1.1;
}

.billing-alert {
  background: #fff3d9;
  border: 1px solid #e3c884;
  border-radius: 6px;
  color: var(--warning);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 12px;
}

.add-money-card {
  max-width: 480px;
}

#paypal-button-container {
  min-height: 48px;
}

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

.info-grid > div {
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 96px;
  padding: 12px;
  background: #fbfcfd;
}

.info-grid dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.info-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.account-section-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.account-view-grid {
  align-items: stretch;
}

.account-edit-form {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

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

.account-password-field {
  grid-column: 1 / -1;
}

.account-edit-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.account-profile-form > .success,
.account-profile-form > .error {
  grid-column: 1 / -1;
  margin: 0;
}

#employee-phone {
  white-space: pre-line;
}

.language-summary {
  display: grid;
  gap: 8px;
}

.language-summary label {
  margin: 0;
}

.language-summary .language-select {
  width: min(100%, 360px);
  max-width: 360px;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.language-summary .form-status p {
  margin: 0;
  min-height: 0;
}

.language-summary .form-status p:empty {
  display: none;
}

.cost-cell {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}

.tab {
  background: transparent;
  color: var(--muted);
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.tab:hover {
  background: rgba(13, 122, 95, 0.05);
  color: var(--text);
}

.tab.active {
  color: var(--accent-strong);
  border-bottom-color: var(--accent-strong);
  background: transparent;
}

.chat-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  text-align: left;
  width: 100%;
  cursor: pointer;
  color: var(--text);
}

.chat-row:hover {
  background: rgba(13, 122, 95, 0.04);
  border-color: rgba(13, 122, 95, 0.15);
}

.chat-avatar {
  flex: 0 0 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d7a5f, #075f49);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
}

.chat-avatar.group {
  background: linear-gradient(135deg, #5a3da8, #3c2873);
}

.chat-main {
  flex: 1 1 auto;
  min-width: 0;
}

.chat-row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.chat-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-time {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--muted);
}

.chat-row-bottom {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-top: 2px;
}

.chat-preview {
  flex: 1 1 auto;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-meta {
  flex: 0 0 auto;
  font-size: 11px;
  white-space: nowrap;
}

.audio-icon {
  font-size: 12px;
}

.badge {
  display: inline-block;
  background: rgba(90, 61, 168, 0.12);
  color: #5a3da8;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.empty {
  color: var(--muted);
  padding: 16px 14px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.transcript-text {
  max-width: 520px;
  white-space: pre-wrap;
}

.error {
  color: var(--danger);
  min-height: 20px;
}

.success {
  color: var(--accent-strong);
  min-height: 20px;
}

@media (max-width: 800px) {
  .app-shell > .dashboard {
    width: min(100vw - 20px, 1180px);
    margin: 16px auto;
  }

  .admin-topbar {
    align-items: stretch;
    flex-direction: column;
    padding: 14px 16px;
  }

  .admin-nav {
    justify-content: flex-start;
  }

  .admin-shell {
    margin: 16px auto;
    padding: 0 16px;
  }

  .topbar,
  .panel-header {
    align-items: stretch;
    flex-direction: column;
  }

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

  .account-form {
    grid-template-columns: 1fr;
  }

  .account-profile-form {
    grid-template-columns: 1fr;
  }

  .billing-header {
    align-items: stretch;
  }

  .wallet-balance {
    text-align: left;
  }
}

/* Setup wizard banner — Portal v1 (2026-05-09) */
.setup-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  margin: 0 0 16px;
  background: #fef9e7;
  border: 1px solid #f4d35e;
  border-radius: 8px;
  font-size: 14px;
  color: #5b4500;
}
.setup-banner button {
  flex-shrink: 0;
  padding: 6px 14px;
  background: #b58900;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.setup-banner button:hover {
  background: #94700a;
}

/* Setup Wizard — Phase 3 (2026-05-09) */
.setup-wizard {
  max-width: 720px;
  margin: 32px auto;
  padding: 24px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}
.setup-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}
.setup-topbar h1 {
  margin: 0;
  font-size: 22px;
}
.setup-topbar p {
  margin: 4px 0 0;
  color: #666;
  font-size: 14px;
}
.setup-steps {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  gap: 8px;
  font-size: 12px;
}
.setup-steps li {
  flex: 1;
  padding: 8px 12px;
  background: #f5f5f7;
  border-radius: 6px;
  color: #999;
  text-align: center;
  font-weight: 500;
}
.setup-steps li.active {
  background: #2c5282;
  color: #fff;
}
.setup-steps li.complete {
  background: #68d391;
  color: #1a4d2e;
}
.setup-screen h2 {
  margin: 0 0 12px;
  font-size: 18px;
}
.setup-screen p {
  margin: 0 0 12px;
  line-height: 1.5;
  color: #333;
}
.setup-screen button {
  margin-top: 16px;
  padding: 10px 20px;
  background: #2c5282;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.setup-screen button:hover { background: #1e3a5f; }
.setup-screen button:disabled { opacity: 0.5; cursor: wait; }
.setup-policy {
  margin: 8px 0 16px 20px;
  padding: 0;
  color: #444;
  font-size: 14px;
  line-height: 1.7;
}
.setup-qr-container {
  margin: 16px 0;
  padding: 24px;
  background: #fafafa;
  border: 1px dashed #ccc;
  border-radius: 8px;
  text-align: center;
}
.setup-qr {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.setup-status {
  margin-top: 12px;
  color: #666;
  font-size: 13px;
}
.setup-watch {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  margin-top: 16px;
  color: #0c4a6e;
}
.setup-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #bae6fd;
  border-top-color: #0c4a6e;
  border-radius: 50%;
  display: inline-block;
  animation: setup-spin 1s linear infinite;
  flex-shrink: 0;
}
@keyframes setup-spin {
  to { transform: rotate(360deg); }
}
