:root {
  --bg:        #f1f5f9;
  --surface:   #ffffff;
  --surface2:  #f8fafc;
  --border:    #e2e8f0;
  --border2:   #cbd5e1;
  --text:      #0f172a;
  --muted:     #64748b;
  --brand:     #4f46e5;
  --brand2:    #7c3aed;
  --brand-bg:  rgba(79,70,229,.08);
  --brand-lt:  #eef2ff;
  --green:     #059669;
  --green-bg:  #ecfdf5;
  --red:       #dc2626;
  --red-bg:    #fef2f2;
  --orange:    #d97706;
  --orange-bg: #fffbeb;
  --shadow:    0 1px 3px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.05);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --font:      'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-head: 'Space Grotesk', -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
a { color: var(--brand); }

/* ══════════════════════════════════════════
   HOME / LANDING
══════════════════════════════════════════ */
.home { min-height: 100vh; display: flex; flex-direction: column; }

.home__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px; background: var(--surface);
  border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm);
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo__text { font-family: var(--font-head); font-size: 19px; font-weight: 800; color: var(--text); letter-spacing: -.04em; }
.logo__dot { color: var(--brand); }
.home__back { font-size: 13px; color: var(--muted); text-decoration: none; transition: color .15s; }
.home__back:hover { color: var(--brand); }

.home__main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px 16px; }

.hero { width: 100%; max-width: 620px; text-align: center; }

.hero__badge {
  display: inline-block; padding: 5px 14px; border-radius: 100px;
  background: var(--brand-bg); border: 1px solid rgba(79,70,229,.2);
  font-size: 11px; font-weight: 700; color: var(--brand);
  letter-spacing: .06em; text-transform: uppercase; margin-bottom: 22px;
}

.hero__title {
  font-family: var(--font-head); font-size: clamp(32px, 5vw, 50px);
  font-weight: 900; letter-spacing: -.04em; line-height: 1.06;
  color: var(--text); margin-bottom: 14px;
}
.hero__title span { color: var(--brand); }
.hero__sub { font-size: 16px; color: var(--muted); margin-bottom: 32px; line-height: 1.65; }

.create-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 28px; margin-bottom: 24px;
  box-shadow: var(--shadow); text-align: left;
}
.create-form { display: flex; flex-direction: column; gap: 16px; }
.create-form__row { display: grid; grid-template-columns: 1fr 160px; gap: 14px; }
.create-form__field { display: flex; flex-direction: column; gap: 6px; }
.create-form__label { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .03em; text-transform: uppercase; }

.f-input {
  padding: 10px 13px; border-radius: 10px;
  border: 1.5px solid var(--border); background: var(--surface2);
  color: var(--text); font-family: var(--font); font-size: 14px;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.f-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.f-input::placeholder { color: var(--border2); }
textarea.f-input { resize: vertical; min-height: 68px; }

.create-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 11px; border: none;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff; font-family: var(--font-head); font-size: 15px; font-weight: 700;
  cursor: pointer; transition: opacity .15s, transform .1s;
  box-shadow: 0 4px 14px rgba(79,70,229,.35);
}
.create-btn:hover { opacity: .92; transform: translateY(-1px); }
.create-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.features { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-top: 4px; }
.feature { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.feature svg { color: var(--brand); flex-shrink: 0; }

/* ══════════════════════════════════════════
   ROOM PAGE — persistent meeting workspace
══════════════════════════════════════════ */
.rp {
  display: flex; flex-direction: column;
  height: 100vh; max-width: 800px;
  margin: 0 auto; background: var(--surface);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

/* Header */
.rp-header {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  position: sticky; top: 0; z-index: 10;
}

.rp-logo {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-head); font-size: 14px; font-weight: 800;
  color: var(--brand); text-decoration: none; flex-shrink: 0;
}

.rp-title {
  flex: 1; font-size: 15px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.rp-status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 100px;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.rp-status--waiting   { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.rp-status--scheduled { background: var(--brand-lt); color: var(--brand); }
.rp-status--active    { background: var(--green-bg); color: var(--green); }
.rp-status--ended     { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.rp-status--cancelled { background: var(--red-bg); color: var(--red); }
.rp-status__dot {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.rp-status--active .rp-status__dot { animation: blink 1.5s ease-in-out infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

.rp-header__actions { display: flex; gap: 8px; margin-left: auto; }

.rp-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 9px; border: 1.5px solid var(--border);
  background: var(--surface2); color: var(--text);
  font-family: var(--font); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: background .15s, border-color .15s; white-space: nowrap;
}
.rp-btn:hover { background: var(--bg); }
.rp-btn--call { border-color: rgba(79,70,229,.3); background: var(--brand-lt); color: var(--brand); }
.rp-btn--call:hover { background: rgba(79,70,229,.15); }
.rp-btn--call-active { background: rgba(5,150,105,.1); border-color: rgba(5,150,105,.3); color: var(--green); }
.rp-btn--end { border-color: rgba(220,38,38,.3); background: var(--red-bg); color: var(--red); }
.rp-btn--end:hover { background: rgba(220,38,38,.12); }

/* Pinned notice bar */
.rp-notice {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 20px; background: var(--brand-lt);
  border-bottom: 1px solid rgba(79,70,229,.15);
  font-size: 13px; color: var(--brand); line-height: 1.5;
  flex-shrink: 0;
}
.rp-notice__icon { flex-shrink: 0; font-size: 14px; margin-top: 1px; }
.rp-notice__text { flex: 1; }

/* Call panel */
.rp-call {
  background: #1e2130; flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  display: none;
}
.rp-call.open { display: flex; flex-direction: column; }
.rp-call__screens {
  position: relative; height: 240px; display: flex;
  align-items: center; justify-content: center; overflow: hidden;
}
.rp-call__remote { width: 100%; height: 100%; object-fit: contain; }
.rp-call__local {
  position: absolute; bottom: 10px; right: 10px;
  width: 96px; height: 72px; border-radius: 8px; overflow: hidden;
  border: 2px solid rgba(255,255,255,.3); background: #000;
}
.rp-call__local video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.rp-call__ph {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: rgba(255,255,255,.4); font-size: 14px; text-align: center;
}
.rp-call__ph svg { opacity: .3; }
.rp-call__controls {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px;
}
.rp-ctrl {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 14px; border-radius: 9px;
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.85); font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: var(--font); transition: background .15s;
}
.rp-ctrl:hover { background: rgba(255,255,255,.13); }
.rp-ctrl--off { border-color: rgba(220,38,38,.4); background: rgba(220,38,38,.15); color: #fca5a5; }
.rp-ctrl--screen-on { border-color: rgba(79,70,229,.5); background: rgba(79,70,229,.2); color: #a5b4fc; }
.rp-ctrl--end { border-color: rgba(220,38,38,.4); background: rgba(220,38,38,.2); color: #fca5a5; }

/* Scheduled info */
.rp-scheduled {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 28px 20px; text-align: center;
  background: linear-gradient(to bottom, var(--brand-lt), transparent);
  border-bottom: 1px solid rgba(79,70,229,.1); flex-shrink: 0;
}
.rp-scheduled__date {
  font-size: 17px; font-weight: 800; color: var(--brand); font-family: var(--font-head);
}
.rp-scheduled__label { font-size: 12px; color: var(--muted); }

/* Timeline */
.rp-timeline {
  flex: 1; overflow-y: auto; padding: 16px 20px;
  display: flex; flex-direction: column; gap: 2px;
  scroll-behavior: smooth;
}

/* System message */
.tl-system {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; color: var(--muted); font-size: 12px; text-align: center;
}
.tl-system::before, .tl-system::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.tl-system__text { white-space: nowrap; padding: 0 4px; }

/* Admin notice (pinned-style inside timeline) */
.tl-notice {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--brand-lt); border: 1px solid rgba(79,70,229,.2);
  border-radius: 12px; padding: 12px 14px;
  margin: 8px 0; font-size: 13px; line-height: 1.55;
}
.tl-notice__pin { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.tl-notice__body {}
.tl-notice__author { font-size: 10px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.tl-notice__text { color: var(--text); }
.tl-notice__text a { color: var(--brand); word-break: break-all; }

/* Regular messages */
.tl-msg { display: flex; gap: 8px; padding: 4px 0; }
.tl-msg--me { flex-direction: row-reverse; }
.tl-msg--them { flex-direction: row; }

.tl-msg__ava {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff; margin-top: 2px;
}
.tl-msg--me .tl-msg__ava   { background: var(--brand); }
.tl-msg--them .tl-msg__ava { background: var(--muted); }

.tl-msg__body { max-width: 70%; display: flex; flex-direction: column; gap: 3px; }
.tl-msg--me .tl-msg__body { align-items: flex-end; }

.tl-msg__meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--muted);
}
.tl-msg--me .tl-msg__meta { flex-direction: row-reverse; }
.tl-msg__name { font-weight: 700; }

.tl-msg__bubble {
  padding: 9px 13px; border-radius: 14px;
  font-size: 14px; line-height: 1.55; word-break: break-word;
}
.tl-msg--me .tl-msg__bubble {
  background: var(--brand); color: #fff;
  border-bottom-right-radius: 4px;
}
.tl-msg--them .tl-msg__bubble {
  background: var(--surface2); color: var(--text);
  border: 1px solid var(--border); border-bottom-left-radius: 4px;
}
.tl-msg__bubble a { color: inherit; text-decoration: underline; word-break: break-all; }
.tl-msg--me .tl-msg__bubble a { color: rgba(255,255,255,.85); }

/* Link card */
.tl-msg__link {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 13px; border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface2); text-decoration: none; color: var(--text);
  font-size: 13px; transition: background .15s;
}
.tl-msg--me .tl-msg__link { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.3); color: #fff; }
.tl-msg__link:hover { background: var(--bg); }
.tl-msg--me .tl-msg__link:hover { background: rgba(255,255,255,.2); }
.tl-msg__link-icon { font-size: 18px; flex-shrink: 0; }
.tl-msg__link-body { overflow: hidden; }
.tl-msg__link-url { font-size: 11px; opacity: .6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-msg__link-text { font-weight: 600; margin-bottom: 2px; }

/* Contact card */
.tl-msg__contact {
  padding: 10px 13px; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--surface2);
  font-size: 13px; min-width: 160px;
}
.tl-msg--me .tl-msg__contact { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.3); color: #fff; }
.tl-msg__contact-title { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; opacity: .6; margin-bottom: 8px; }
.tl-msg__contact-row { display: flex; align-items: center; gap: 7px; font-size: 13px; margin-bottom: 4px; }
.tl-msg__contact-row:last-child { margin-bottom: 0; }
.tl-msg__contact-row a { color: inherit; text-decoration: none; font-weight: 600; }
.tl-msg__contact-row a:hover { text-decoration: underline; }

/* File attachment */
.tl-msg__file {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 13px; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--surface2);
  text-decoration: none; color: var(--text); font-size: 13px;
  transition: background .15s;
}
.tl-msg--me .tl-msg__file { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.3); color: #fff; }
.tl-msg__file:hover { background: var(--bg); }
.tl-msg__file-info { overflow: hidden; }
.tl-msg__file-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; display: block; }
.tl-msg__file-size { font-size: 11px; opacity: .6; }

/* Input area */
.rp-input { flex-shrink: 0; background: var(--surface); border-top: 1px solid var(--border); }

.rp-input__types {
  display: flex; gap: 2px; padding: 10px 12px 0;
}
.rp-type-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 7px;
  border: 1px solid transparent; background: transparent;
  font-size: 12px; font-weight: 600; color: var(--muted);
  cursor: pointer; font-family: var(--font); transition: background .15s, color .15s;
}
.rp-type-btn:hover { background: var(--bg); color: var(--text); }
.rp-type-btn.active { background: var(--brand-lt); color: var(--brand); border-color: rgba(79,70,229,.2); }

.rp-input__fields { padding: 8px 12px 10px; }

.rp-input__row { display: flex; gap: 8px; align-items: flex-end; }

.rp-textarea {
  flex: 1; padding: 10px 13px; border-radius: 11px;
  border: 1.5px solid var(--border); background: var(--surface2);
  color: var(--text); font-family: var(--font); font-size: 14px;
  resize: none; max-height: 120px; line-height: 1.45; outline: none;
  transition: border-color .15s;
}
.rp-textarea:focus { border-color: var(--brand); }
.rp-textarea::placeholder { color: var(--border2); }

.rp-send {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 11px; border: none;
  background: var(--brand); color: #fff;
  cursor: pointer; flex-shrink: 0; transition: opacity .15s;
}
.rp-send:hover { opacity: .88; }
.rp-send:disabled { opacity: .4; cursor: not-allowed; }

.rp-attach {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 9px;
  border: 1.5px solid var(--border); background: var(--surface2);
  color: var(--muted); cursor: pointer; flex-shrink: 0; transition: color .15s, border-color .15s;
}
.rp-attach:hover { color: var(--brand); border-color: rgba(79,70,229,.3); }

/* Contact sub-form */
.rp-contact-form {
  display: flex; flex-direction: column; gap: 8px; padding: 6px 0 2px;
}
.rp-contact-form .rp-input__row { gap: 6px; flex-wrap: wrap; }
.rp-contact-input {
  flex: 1; min-width: 120px; padding: 8px 11px; border-radius: 9px;
  border: 1.5px solid var(--border); background: var(--surface2);
  color: var(--text); font-size: 13px; font-family: var(--font); outline: none;
  transition: border-color .15s;
}
.rp-contact-input:focus { border-color: var(--brand); }
.rp-contact-input::placeholder { color: var(--border2); }

/* Link sub-form */
.rp-link-form { display: flex; gap: 8px; align-items: flex-end; }

/* Upload hint */
.rp-upload-hint {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; background: var(--brand-lt); border-radius: 9px;
  font-size: 12px; color: var(--brand); margin-bottom: 6px;
}

.rp-input__hint {
  font-size: 11px; color: var(--muted); padding: 0 2px 6px; text-align: center;
}

/* Subscribe bar */
.rp-subscribe {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface2);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.rp-subscribe__text { font-size: 13px; color: var(--muted); flex: 1; display: flex; align-items: center; gap: 6px; }
.rp-subscribe__form { display: flex; gap: 6px; }
.rp-subscribe__input {
  padding: 7px 11px; border-radius: 8px;
  border: 1.5px solid var(--border); background: var(--surface);
  font-size: 13px; font-family: var(--font); color: var(--text); outline: none;
  width: 200px; transition: border-color .15s;
}
.rp-subscribe__input:focus { border-color: var(--brand); }
.rp-subscribe__btn {
  padding: 7px 14px; border-radius: 8px; border: none;
  background: var(--brand); color: #fff; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: var(--font); white-space: nowrap;
  transition: opacity .15s;
}
.rp-subscribe__btn:hover { opacity: .88; }

/* Post-meeting CTA */
.rp-post-meet {
  padding: 16px 20px; background: var(--surface2);
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  flex-shrink: 0;
}
.rp-post-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 10px; border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 13px;
  font-weight: 600; cursor: pointer; text-decoration: none; font-family: var(--font);
  transition: background .15s, border-color .15s;
}
.rp-post-btn:hover { background: var(--bg); border-color: var(--border2); }
.rp-post-btn--primary {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff; border-color: transparent;
  box-shadow: 0 3px 10px rgba(79,70,229,.3);
}
.rp-post-btn--primary:hover { opacity: .9; background: linear-gradient(135deg, var(--brand), var(--brand2)); }

/* Share block inline */
.rp-share {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 11px;
  background: var(--surface2); border: 1px solid var(--border);
  margin: 8px 20px;
}
.rp-share__label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.rp-share__url { flex: 1; font-size: 12px; color: var(--brand); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-share__copy {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 7px; border: 1px solid var(--border2);
  background: var(--surface); color: var(--text); font-size: 11px; font-weight: 600;
  cursor: pointer; flex-shrink: 0; font-family: var(--font); transition: background .15s;
}
.rp-share__copy:hover { background: var(--bg); }

/* ══════════════════════════════════════════
   MANAGE PAGE
══════════════════════════════════════════ */
.manage-wrap { min-height: 100vh; background: var(--bg); display: flex; flex-direction: column; align-items: center; padding: 36px 16px 64px; }
.manage-header { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 640px; margin-bottom: 24px; }
.manage-logo { display: flex; align-items: center; gap: 8px; font-family: var(--font-head); font-size: 15px; font-weight: 800; color: var(--text); text-decoration: none; }
.manage-card { width: 100%; max-width: 640px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.manage-card__head { padding: 20px 28px; border-bottom: 1px solid var(--border); background: linear-gradient(135deg, var(--brand), var(--brand2)); }
.manage-card__head-title { font-family: var(--font-head); font-size: 19px; font-weight: 800; color: #fff; }
.manage-card__head-sub { font-size: 12px; color: rgba(255,255,255,.65); margin-top: 3px; }
.manage-card__body { padding: 24px 28px; display: flex; flex-direction: column; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.form-input { padding: 10px 13px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface2); color: var(--text); font-family: var(--font); font-size: 14px; outline: none; transition: border-color .15s; }
.form-input:focus { border-color: var(--brand); }
textarea.form-input { resize: vertical; min-height: 76px; }
.form-hint { font-size: 12px; color: var(--muted); line-height: 1.5; }
.manage-links { display: flex; flex-direction: column; gap: 8px; }
.link-row { display: flex; align-items: center; gap: 8px; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; }
.link-row__label { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; white-space: nowrap; }
.link-row__url { flex: 1; font-size: 12px; color: var(--brand); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-row__copy { display: flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 11px; font-weight: 600; cursor: pointer; flex-shrink: 0; font-family: var(--font); transition: background .15s; }
.link-row__copy:hover { background: var(--bg); }
.manage-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 100px; font-size: 12px; font-weight: 700; }
.status--waiting   { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.status--active    { background: var(--green-bg); color: var(--green); }
.status--ended     { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.status--scheduled { background: var(--brand-lt); color: var(--brand); }
.save-btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 10px; border: none; background: linear-gradient(135deg,var(--brand),var(--brand2)); color: #fff; font-family: var(--font); font-size: 14px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 12px rgba(79,70,229,.3); transition: opacity .15s; }
.save-btn:hover { opacity: .9; }
.cancel-btn { display: flex; align-items: center; justify-content: center; padding: 11px; border-radius: 10px; border: 1.5px solid rgba(220,38,38,.3); background: var(--red-bg); color: var(--red); font-family: var(--font); font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s; }
.cancel-btn:hover { background: rgba(220,38,38,.1); }

/* Toast */
.toast { position: fixed; bottom: 24px; right: 24px; padding: 12px 20px; border-radius: 10px; background: var(--text); color: var(--surface); font-size: 13px; font-weight: 600; box-shadow: 0 4px 20px rgba(0,0,0,.15); transform: translateY(80px); opacity: 0; transition: transform .25s, opacity .25s; z-index: 100; }
.toast--show { transform: translateY(0); opacity: 1; }
.toast--green { background: var(--green); }

/* Pulse ring */
.pulse-ring { position: absolute; inset: -8px; border-radius: 50%; border: 2px solid rgba(79,70,229,.3); animation: pulse-ring 2s ease-out infinite; }
@keyframes pulse-ring { 0%{transform:scale(.9);opacity:1} 100%{transform:scale(1.25);opacity:0} }

/* ══════════════════════════════════════════
   HOME HEADER — nav + login btn
══════════════════════════════════════════ */
.home__nav { display: flex; align-items: center; gap: 6px; }
.home__nav-link {
  font-size: 13px; font-weight: 600; color: var(--muted);
  text-decoration: none; padding: 6px 10px; border-radius: 7px;
  transition: color .15s, background .15s;
}
.home__nav-link:hover { color: var(--text); background: var(--bg); }
.home__login-btn {
  font-size: 13px; font-weight: 700; color: var(--brand);
  text-decoration: none; padding: 7px 16px; border-radius: 9px;
  background: var(--brand-lt); border: 1.5px solid rgba(79,70,229,.2);
  transition: background .15s;
}
.home__login-btn:hover { background: rgba(79,70,229,.15); }

/* ══════════════════════════════════════════
   HOME — sections
══════════════════════════════════════════ */
.how-section {
  background: var(--surface2); border-top: 1px solid var(--border);
  padding: 56px 16px;
}
.how-section__inner { max-width: 800px; margin: 0 auto; }
.how-section__title {
  font-family: var(--font-head); font-size: 24px; font-weight: 800;
  text-align: center; margin-bottom: 36px; color: var(--text);
}
.how-steps { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.how-step { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 200px; text-align: center; }
.how-step__num {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff; font-size: 18px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}
.how-step__text { font-size: 14px; color: var(--muted); line-height: 1.55; }
.how-step__text strong { color: var(--text); display: block; margin-bottom: 3px; }
.how-step__arrow { font-size: 24px; color: var(--border2); flex-shrink: 0; }

.api-teaser { background: var(--text); color: #fff; padding: 56px 16px; }
.api-teaser__inner { max-width: 680px; margin: 0 auto; }
.api-teaser__badge {
  display: inline-block; padding: 4px 12px; border-radius: 100px;
  background: rgba(79,70,229,.4); color: #a5b4fc;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 16px;
}
.api-teaser__title { font-family: var(--font-head); font-size: clamp(20px,3.5vw,32px); font-weight: 800; margin-bottom: 12px; }
.api-teaser__sub { font-size: 15px; opacity: .65; margin-bottom: 24px; line-height: 1.6; }
.api-teaser__code {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px; padding: 16px 20px; margin-bottom: 24px;
  overflow-x: auto;
}
.api-teaser__code pre { margin: 0; font-size: 13px; line-height: 1.6; color: #e2e8f0; }
.api-teaser__actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.api-teaser__link { color: rgba(255,255,255,.6); font-size: 14px; font-weight: 600; text-decoration: none; }
.api-teaser__link:hover { color: #fff; }

.home__footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 32px; background: var(--surface);
  border-top: 1px solid var(--border); font-size: 13px; color: var(--muted);
}
.home__footer-link { color: var(--muted); text-decoration: none; }
.home__footer-link:hover { color: var(--brand); }

/* ══════════════════════════════════════════
   PRICING PAGE
══════════════════════════════════════════ */
.pricing-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 680px; margin: 0 auto; }
.pricing-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 4px;
}
.pricing-card--featured { border-color: rgba(79,70,229,.4); box-shadow: 0 0 0 4px rgba(79,70,229,.06); }
.pricing-card__badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--muted); margin-bottom: 8px;
}
.pricing-card--featured .pricing-card__badge { color: var(--brand); }
.pricing-card__name { font-size: 17px; font-weight: 800; color: var(--text); margin-bottom: 12px; }
.pricing-card__price { font-size: 38px; font-weight: 900; color: var(--text); font-family: var(--font-head); }
.pricing-card--featured .pricing-card__price { color: var(--brand); }
.pricing-card__period { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.pricing-card__features { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--muted); flex: 1; }
.pricing-card__btn {
  display: block; text-align: center; padding: 11px 20px; border-radius: 11px;
  border: 1.5px solid var(--border); color: var(--text); font-size: 14px; font-weight: 700;
  text-decoration: none; transition: background .15s;
}
.pricing-card__btn:hover { background: var(--bg); }
.pricing-card__btn--primary {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff; border-color: transparent;
  box-shadow: 0 4px 12px rgba(79,70,229,.3);
}
.pricing-card__btn--primary:hover { opacity: .9; background: linear-gradient(135deg, var(--brand), var(--brand2)); }

.faq-list { display: flex; flex-direction: column; gap: 2px; max-width: 680px; margin: 0 auto; }
.faq-item { padding: 16px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.faq-item__q { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.faq-item__a { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ══════════════════════════════════════════
   API DOCS PAGE
══════════════════════════════════════════ */
.docs-page { display: flex; max-width: 1100px; margin: 0 auto; padding: 40px 16px; gap: 40px; }
.docs-nav {
  width: 200px; flex-shrink: 0; position: sticky; top: 80px;
  align-self: flex-start; height: fit-content;
}
.docs-nav__title { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: .06em; margin-bottom: 10px; }
.docs-nav__link { display: block; font-size: 14px; color: var(--muted); text-decoration: none; padding: 5px 0; transition: color .15s; }
.docs-nav__link:hover { color: var(--brand); }
.docs-content { flex: 1; min-width: 0; }
.docs-h1 { font-family: var(--font-head); font-size: 32px; font-weight: 900; margin-bottom: 12px; color: var(--text); }
.docs-lead { font-size: 16px; color: var(--muted); margin-bottom: 40px; line-height: 1.6; }
.docs-section { margin-bottom: 48px; }
.docs-h2 { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.docs-h3 { font-size: 15px; font-weight: 700; color: var(--text); margin: 20px 0 8px; }
.docs-method { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.docs-badge { display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 800; }
.docs-badge--post { background: rgba(79,70,229,.12); color: var(--brand); }
.docs-badge--get { background: rgba(5,150,105,.12); color: var(--green); }
.docs-endpoint { font-size: 15px; font-weight: 600; color: var(--text); }
.docs-code {
  background: var(--text); border-radius: 12px; padding: 16px 20px;
  overflow-x: auto; margin: 8px 0;
}
.docs-code pre { margin: 0; font-size: 13px; line-height: 1.65; color: #e2e8f0; }
.docs-code code { font-size: 13px; }
.docs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.docs-table th { text-align: left; padding: 8px 12px; background: var(--surface2); border: 1px solid var(--border); font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.docs-table td { padding: 10px 12px; border: 1px solid var(--border); color: var(--text); vertical-align: top; }
.docs-info { background: var(--brand-lt); border: 1px solid rgba(79,70,229,.2); border-radius: 10px; padding: 12px 16px; font-size: 13px; color: var(--brand); margin: 12px 0; line-height: 1.55; }
p code, li code, td code { background: var(--surface2); padding: 2px 6px; border-radius: 4px; font-size: 12.5px; color: var(--brand); }

/* ══════════════════════════════════════════
   AUTH PAGES
══════════════════════════════════════════ */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 36px 32px; box-shadow: var(--shadow); }
.auth-logo { display: flex; align-items: center; gap: 8px; font-family: var(--font-head); font-size: 15px; font-weight: 800; color: var(--text); text-decoration: none; margin-bottom: 28px; }
.auth-card__title { font-family: var(--font-head); font-size: 22px; font-weight: 900; color: var(--text); margin-bottom: 8px; }
.auth-card__sub { font-size: 14px; color: var(--muted); line-height: 1.55; margin-bottom: 24px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.auth-input {
  padding: 11px 14px; border-radius: 10px;
  border: 1.5px solid var(--border); background: var(--surface2);
  color: var(--text); font-family: var(--font); font-size: 15px;
  outline: none; transition: border-color .15s;
}
.auth-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.auth-input--code { font-size: 24px; font-weight: 900; letter-spacing: 8px; text-align: center; font-family: monospace; }
.auth-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 20px; border-radius: 11px; border: none;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff; font-family: var(--font); font-size: 15px; font-weight: 700;
  cursor: pointer; transition: opacity .15s;
  box-shadow: 0 4px 12px rgba(79,70,229,.3);
}
.auth-btn:hover { opacity: .9; }
.auth-error {
  padding: 10px 14px; background: var(--red-bg); border: 1px solid rgba(220,38,38,.2);
  border-radius: 9px; font-size: 13px; color: var(--red); margin-bottom: 16px;
}
.auth-note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 16px; line-height: 1.55; }

/* ══════════════════════════════════════════
   CABINET
══════════════════════════════════════════ */
.cab-page { min-height: 100vh; background: var(--bg); display: flex; flex-direction: column; }
.cab-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; background: var(--surface);
  border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.cab-logo { display: flex; align-items: center; gap: 8px; font-family: var(--font-head); font-size: 15px; font-weight: 800; color: var(--text); text-decoration: none; }
.cab-logout { font-size: 13px; color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 7px; border: 1px solid var(--border); transition: color .15s; }
.cab-logout:hover { color: var(--red); border-color: rgba(220,38,38,.3); }
.cab-main { flex: 1; padding: 32px 24px; max-width: 1100px; width: 100%; margin: 0 auto; }
.cab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.cab-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 24px; }
.cab-card--full { grid-column: 1 / -1; }
.cab-card__title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 16px; }
.cab-card__hint { font-size: 12px; color: var(--muted); line-height: 1.5; }
.cab-key-wrap { display: flex; align-items: center; gap: 8px; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.cab-key { flex: 1; font-size: 13px; color: var(--text); word-break: break-all; font-family: monospace; }
.cab-key-copy { flex-shrink: 0; padding: 5px 12px; border-radius: 7px; border: 1px solid var(--border2); background: var(--surface); color: var(--text); font-size: 12px; font-weight: 600; cursor: pointer; font-family: var(--font); transition: background .15s; }
.cab-key-copy:hover { background: var(--bg); }
.cab-balance { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.cab-balance__amount { font-size: 32px; font-weight: 900; color: var(--text); font-family: var(--font-head); }
.cab-balance__label { font-size: 13px; color: var(--muted); }
.cab-btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 9px; border: none;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff; font-size: 13px; font-weight: 700; cursor: pointer;
  font-family: var(--font); transition: opacity .15s;
  box-shadow: 0 3px 10px rgba(79,70,229,.25);
}
.cab-btn-primary:hover { opacity: .9; }
.cab-btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 9px; border: 1.5px solid var(--border);
  background: var(--surface2); color: var(--text); font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: var(--font); transition: background .15s;
}
.cab-btn-secondary:hover { background: var(--bg); }
.cab-code-block { background: var(--text); border-radius: 11px; padding: 14px 18px; overflow-x: auto; }
.cab-code-block pre { margin: 0; font-size: 12.5px; line-height: 1.6; color: #e2e8f0; }
.cab-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cab-table th { text-align: left; padding: 8px 12px; background: var(--surface2); border-bottom: 2px solid var(--border); font-weight: 700; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.cab-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--text); }
.cab-table tr:last-child td { border-bottom: none; }
.cab-flash { background: var(--green-bg); border: 1px solid rgba(5,150,105,.2); border-radius: 10px; padding: 10px 16px; font-size: 13px; font-weight: 600; color: var(--green); margin-bottom: 20px; }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 680px) {
  .rp { max-width: 100%; border-left: none; border-right: none; }
  .create-form__row { grid-template-columns: 1fr; }
  .home__header { padding: 14px 16px; }
  .tl-msg__body { max-width: 85%; }
  .rp-subscribe__input { width: 150px; }
  .pricing-cards { grid-template-columns: 1fr; }
  .docs-page { flex-direction: column; }
  .docs-nav { width: 100%; position: static; }
  .how-step__arrow { display: none; }
  .auth-card { padding: 28px 20px; }
  .cab-main { padding: 20px 16px; }
  .home__footer { padding: 16px; flex-direction: column; gap: 12px; }
}
