:root {
  --bg: #fbf9fc;
  --surface: #ffffff;
  --surface-soft: #f7f1fb;
  --text: #20152a;
  --muted: #766c7f;
  --line: #e9e1ee;
  --purple: #7c3aed;
  --purple-dark: #5b21b6;
  --orange: #f97316;
  --green: #15803d;
  --danger: #b91c1c;
  --shadow: 0 24px 70px rgba(74, 44, 91, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 0%, rgba(168, 85, 247, .09), transparent 28%),
    radial-gradient(circle at 100% 18%, rgba(249, 115, 22, .08), transparent 25%),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { border: 0; }
img, video { max-width: 100%; }
.container { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(232, 224, 239, .78);
  background: rgba(251, 249, 252, .86);
  backdrop-filter: blur(16px);
}
.nav { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 900; letter-spacing: 0; flex: 0 0 auto; }
.brand img { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; }
.brand span { display: grid; line-height: 1.05; }
.brand small { margin-top: 5px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 0; }
.nav-links { display: flex; align-items: center; justify-content: center; gap: 18px; color: var(--muted); font-size: 13px; font-weight: 800; }
.nav-links a:hover, .footer-links a:hover { color: var(--purple); }

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 17px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 900;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary { color: #fff; background: linear-gradient(135deg, var(--purple), var(--orange)); box-shadow: 0 10px 24px rgba(124, 58, 237, .2); }
.button.secondary { color: var(--purple-dark); background: #fff; border: 1px solid var(--line); }
.button.ghost { color: var(--muted); background: #fff; border: 1px solid var(--line); }
.button.danger { color: var(--danger); background: #fff; border: 1px solid #fecaca; }
.button.small { min-height: 34px; padding: 7px 11px; font-size: 12px; }
.button:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.hero { padding: 92px 0 66px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 54px; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; border: 1px solid #e9d5ff; background: #faf5ff; color: var(--purple); padding: 7px 11px; border-radius: 999px; font-weight: 900; font-size: 13px; }
h1 { font-size: clamp(44px, 7vw, 76px); line-height: 1.02; letter-spacing: 0; margin: 20px 0; }
.gradient-text { background: linear-gradient(135deg, var(--purple), var(--orange)); -webkit-background-clip: text; color: transparent; }
.hero p { font-size: 19px; color: var(--muted); max-width: 690px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.trust-row { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); margin-top: 24px; font-size: 13px; font-weight: 800; }
.mock-window { background: rgba(255, 255, 255, .88); border: 1px solid rgba(255, 255, 255, .9); border-radius: 28px; box-shadow: var(--shadow); padding: 18px; transform: rotate(1deg); }
.window-bar { display: flex; align-items: center; gap: 7px; padding: 2px 4px 16px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #d8d1de; }
.composer { display: grid; grid-template-columns: 160px 1fr; gap: 16px; }
.video-placeholder { min-height: 315px; border-radius: 22px; background: linear-gradient(160deg, #241535, #7c3aed 55%, #fb923c); color: #fff; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; position: relative; overflow: hidden; }
.video-placeholder::before, .video-placeholder::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.video-placeholder::before { width: 130px; height: 130px; top: -35px; right: -35px; }
.video-placeholder::after { width: 90px; height: 90px; bottom: -20px; left: -20px; }
.video-emoji { font-size: 72px; line-height: 1; }
.field-mini { min-height: 42px; border: 1px solid var(--line); border-radius: 11px; background: #fff; margin-bottom: 10px; display: flex; align-items: center; padding: 8px 12px; color: #9a91a4; font-size: 12px; }

.section { padding: 78px 0; }
.section-title { max-width: 760px; margin-bottom: 38px; }
.section-title h2, .info-panel h2 { margin: 0 0 10px; font-size: clamp(32px, 5vw, 50px); letter-spacing: -.045em; line-height: 1.08; }
.section-title p, .info-panel p { margin: 0; color: var(--muted); font-size: 17px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid rgba(232, 224, 239, .9); border-radius: 22px; padding: 24px; box-shadow: 0 12px 32px rgba(64, 42, 79, .06); }
.card-icon { width: 48px; height: 48px; border-radius: 15px; display: flex; align-items: center; justify-content: center; font-size: 23px; background: #f3e8ff; }
.card h3 { margin: 16px 0 8px; font-size: 20px; }
.card p { color: var(--muted); margin: 0; }
.steps { counter-reset: item; display: grid; gap: 14px; }
.step { display: grid; grid-template-columns: 64px 1fr; gap: 18px; align-items: start; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 20px; }
.step::before { counter-increment: item; content: counter(item); width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(135deg, var(--purple), var(--orange)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 20px; }
.step h3 { margin: 0 0 4px; }
.step p { margin: 0; color: var(--muted); }
.split-info { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.info-panel { min-height: 300px; padding: 36px; border-radius: 26px; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.info-panel:nth-child(2) { background: linear-gradient(150deg, #2d1740, #56249a); color: #fff; }
.info-panel:nth-child(2) p { color: rgba(255, 255, 255, .75); }
.info-panel:nth-child(2) .eyebrow { color: #fff; border-color: rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .1); align-self: flex-start; }
.cta { border-radius: 30px; padding: 48px; color: #fff; background: linear-gradient(125deg, #4c1d95, #7c3aed 55%, #f97316); display: flex; align-items: center; justify-content: space-between; gap: 24px; box-shadow: var(--shadow); }
.cta h2 { margin: 0 0 8px; font-size: 36px; letter-spacing: -.04em; }
.cta p { margin: 0; color: rgba(255, 255, 255, .8); }

.site-footer { margin-top: 70px; padding: 36px 0; border-top: 1px solid var(--line); color: var(--muted); }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }

.page-hero { padding: 70px 0 34px; }
.page-hero > h1 { font-size: clamp(38px, 6vw, 58px); }
.legal { max-width: 900px; background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 38px; box-shadow: 0 12px 36px rgba(70, 50, 80, .07); }
.legal h2 { margin: 34px 0 8px; font-size: 22px; }
.legal p, .legal li { color: #514858; }
.legal a { color: var(--purple-dark); text-decoration: underline; }
.contact-email { font-size: 22px; }

.dashboard-shell { min-height: 100vh; display: grid; grid-template-columns: 252px 1fr; background: #f8f5fb; }
.sidebar { padding: 26px 20px; background: #21182e; color: #fff; position: sticky; top: 0; height: 100vh; }
.sidebar .brand { margin-bottom: 36px; }
.sidebar .brand small { color: #bdb0ca; }
.sidebar-nav { display: grid; gap: 8px; }
.sidebar-nav a { padding: 12px 14px; border-radius: 12px; color: #cfc4da; font-weight: 800; }
.sidebar-nav a.active, .sidebar-nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.dashboard-main { padding: 32px; min-width: 0; }
.dash-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 26px; }
.dash-top h1 { font-size: 34px; margin: 0; letter-spacing: -.04em; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 999px; font-size: 12px; font-weight: 900; background: #fef3c7; color: #92400e; }
.status-pill.connected { background: #dcfce7; color: #166534; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(330px, .82fr); gap: 20px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: 0 8px 30px rgba(53, 34, 66, .06); }
.panel h2 { margin: 0 0 5px; font-size: 21px; }
.panel-subtitle { color: var(--muted); margin: 0 0 20px; font-size: 14px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: grid; gap: 7px; }
.form-group.full { grid-column: 1 / -1; }
label { font-weight: 800; font-size: 13px; }
input[type="text"], input[type="email"], input[type="datetime-local"], select, textarea { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 11px 12px; color: var(--text); outline: none; }
textarea { min-height: 108px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(124, 58, 237, .12); }
.file-picker { width: 100%; min-height: 52px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 6px; overflow: hidden; }
.file-picker-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-picker-button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; padding: 8px 14px; border-radius: 8px; background: var(--purple); color: #fff; cursor: pointer; font-size: 13px; font-weight: 900; }
.file-picker-button:hover { background: var(--purple-dark); }
.file-picker-input:focus-visible + .file-picker-button { outline: 3px solid rgba(124, 58, 237, .2); outline-offset: 2px; }
.file-picker-name { min-width: 0; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.helper { color: var(--muted); font-size: 12px; }
.error-text { color: var(--danger) !important; font-weight: 800; }
.control-group { margin: 22px 0 0; padding: 0; border: 0; }
.control-group legend { padding: 0; font-size: 15px; font-weight: 900; }
.mode-group { margin-top: 0; margin-bottom: 20px; }
.segmented-control { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin-top: 9px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: #f5f3f7; }
.segmented-control label { min-width: 0; cursor: pointer; }
.segmented-control input { position: absolute; opacity: 0; pointer-events: none; }
.segmented-control span { min-height: 38px; display: flex; align-items: center; justify-content: center; padding: 8px 10px; border-radius: 6px; color: var(--muted); font-size: 13px; font-weight: 900; text-align: center; }
.segmented-control input:checked + span { background: #fff; color: var(--purple-dark); box-shadow: 0 1px 4px rgba(32, 22, 48, .12); }
.segmented-control input:focus-visible + span { outline: 3px solid rgba(124, 58, 237, .2); }
.direct-only[hidden] { display: none; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid #f1edf4; }
.switch-row:last-child { border-bottom: 0; }
.switch { appearance: none; width: 42px; height: 24px; background: #d8d1df; border-radius: 999px; position: relative; cursor: pointer; transition: .2s; flex: 0 0 auto; }
.switch::after { content: ""; position: absolute; width: 18px; height: 18px; background: #fff; border-radius: 50%; top: 3px; left: 3px; box-shadow: 0 2px 5px rgba(0, 0, 0, .18); transition: .2s; }
.switch:checked { background: var(--purple); }
.switch:checked::after { transform: translateX(18px); }
.switch:disabled { cursor: not-allowed; opacity: .55; }
.disabled-row { opacity: .58; }
.nested-options { display: grid; gap: 12px; padding: 15px; margin: 8px 0; border: 1px solid #eadcf6; border-radius: 14px; background: #fcf9ff; }
.nested-options[hidden] { display: none; }
.check-row { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 13px; }
.check-row input { margin-top: 4px; flex: 0 0 auto; }
.inline-warning { color: #9a3412; background: #fff7ed; border: 1px solid #fed7aa; padding: 10px 12px; border-radius: 10px; font-size: 12px; font-weight: 800; }
.consent-box { margin-top: 20px; border: 1px solid #ddd0e9; background: #faf7fc; padding: 15px; border-radius: 14px; }
.preview-box { border-radius: 18px; min-height: 390px; padding: 16px; background: linear-gradient(160deg, #2e1a42, #6d28d9 58%, #f97316); color: #fff; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; overflow: hidden; }
.preview-box video { width: 100%; max-height: 500px; flex: 1; border-radius: 13px; background: #0b0710; object-fit: contain; }
.preview-placeholder { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: rgba(255, 255, 255, .86); }
.preview-placeholder[hidden] { display: none; }
.preview-placeholder .big { font-size: 64px; }
.preview-caption { background: rgba(0, 0, 0, .26); backdrop-filter: blur(10px); padding: 12px; border-radius: 12px; word-break: break-word; }
.preview-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 10px; color: var(--muted); font-size: 12px; font-weight: 800; }
.account-card { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; }
.avatar { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 50%; overflow: hidden; background: linear-gradient(135deg, var(--purple), var(--orange)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 900; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-meta { flex: 1; min-width: 0; }
.account-meta strong { display: block; }
.account-meta small { color: var(--muted); }
.history-list { display: grid; gap: 10px; }
.history-item { padding: 13px; border: 1px solid var(--line); border-radius: 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.history-item strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-item small { color: var(--muted); display: block; }
.history-side { text-align: right; }
.history-status { color: var(--green); font-size: 11px; font-weight: 900; }
.status-refresh { margin-top: 5px; padding: 0; color: var(--purple-dark); background: transparent; cursor: pointer; font-size: 11px; font-weight: 900; text-decoration: underline; }
.alert { display: none; margin-bottom: 16px; padding: 12px 14px; border-radius: 12px; font-weight: 800; font-size: 14px; }
.alert.show { display: block; }
.alert.success { background: #dcfce7; color: #166534; }
.alert.error { background: #fee2e2; color: #991b1b; }
.alert.info { background: #ede9fe; color: #5b21b6; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1050px) {
  .nav-links { display: none; }
}
@media (max-width: 900px) {
  .hero-grid, .dashboard-grid, .split-info { grid-template-columns: 1fr; }
  .hero { padding-top: 64px; }
  .mock-window { max-width: 620px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .dashboard-shell { grid-template-columns: 1fr; }
  .sidebar { height: auto; position: static; padding: 14px 18px; }
  .sidebar .brand { margin: 0; }
  .sidebar-nav { display: none; }
  .dashboard-main { padding: 20px; }
  .cta { padding: 34px; align-items: flex-start; flex-direction: column; }
}
@media (max-width: 680px) {
  .container { width: min(100% - 24px, 1160px); }
  .nav > .button { display: none; }
  h1 { font-size: 44px; }
  .composer { grid-template-columns: 120px 1fr; }
  .video-placeholder { min-height: 250px; }
  .cards { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: auto; }
  .segmented-control { grid-template-columns: 1fr; }
  .dash-top { align-items: flex-start; flex-direction: column; }
  .legal { padding: 24px; }
  .preview-box { min-height: 330px; }
}
