:root {
  --navy: #0c1d34;
  --navy-2: #142a47;
  --blue: #1677ff;
  --blue-dark: #075fd6;
  --ink: #142033;
  --muted: #6d7b90;
  --line: #e4e9f0;
  --soft: #f5f7fb;
  --white: #fff;
  --green: #16a36a;
  --danger: #c43f49;
  --shadow: 0 18px 45px rgba(19, 33, 58, .09);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--soft); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 0%, rgba(22,119,255,.08), transparent 27rem),
    var(--soft);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 64px);
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid rgba(220,226,235,.9);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--navy); text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--blue), #44a0ff); color: white; font-weight: 800; font-size: 20px;
  box-shadow: 0 8px 22px rgba(22,119,255,.24);
}
.brand strong { display: block; font-size: 16px; letter-spacing: .08em; }
.brand small { display: block; color: var(--muted); margin-top: 1px; font-size: 12px; }
.topbar-right { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(22,163,106,.10); }

.page-wrap { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 46px 0 34px; }
.hero { display: flex; justify-content: space-between; gap: 30px; align-items: end; margin-bottom: 28px; }
.hero h1 { margin: 8px 0 10px; color: var(--navy); font-size: clamp(30px, 4vw, 46px); letter-spacing: -.04em; line-height: 1.08; }
.hero p { margin: 0; max-width: 700px; color: var(--muted); font-size: 16px; line-height: 1.65; }
.eyebrow { color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .14em; }

.layout-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(315px, .85fr); gap: 22px; align-items: stretch; }
.panel { background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.form-panel { padding: 28px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.panel-head h2 { margin: 0 0 5px; font-size: 20px; color: var(--navy); letter-spacing: -.015em; }
.panel-head p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.badge { border: 1px solid #d7e5f7; background: #f3f8ff; color: #3970aa; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .08em; }

.field-grid { display: grid; gap: 16px; }
.two-col { grid-template-columns: 1fr 1fr; }
.date-grid { grid-template-columns: 1fr 1fr 1.15fr; }
.field { display: block; margin-bottom: 18px; }
.field > span { display: block; margin-bottom: 7px; color: #314057; font-size: 12px; font-weight: 700; }
.field em { color: #9aa5b5; font-weight: 500; font-style: normal; }
.field small { display: block; margin-top: 6px; color: #929dac; font-size: 11px; }
input, select, textarea {
  width: 100%; border: 1px solid #d9e0e9; background: #fff; color: var(--ink);
  border-radius: 10px; outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
input, select { height: 44px; padding: 0 12px; }
textarea { resize: vertical; min-height: 84px; padding: 11px 12px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: #78aef7; box-shadow: 0 0 0 4px rgba(22,119,255,.09); }
input::placeholder, textarea::placeholder { color: #a7b0bd; }
.input-action { display: flex; }
.input-action input { border-radius: 10px 0 0 10px; }
.icon-btn { width: 46px; border: 1px solid #d9e0e9; border-left: 0; border-radius: 0 10px 10px 0; background: #f8fafc; color: #526178; cursor: pointer; font-size: 18px; }
.icon-btn:hover { color: var(--blue); background: #f1f7ff; }

.recipient-box {
  min-height: 48px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 6px 8px;
  background: #fff; border: 1px solid #d9e0e9; border-radius: 10px; cursor: text;
  transition: border-color .15s, box-shadow .15s;
}
.recipient-box:focus-within { border-color: #78aef7; box-shadow: 0 0 0 4px rgba(22,119,255,.09); }
.recipient-box input { flex: 1; min-width: 220px; height: 33px; border: 0; padding: 0 4px; box-shadow: none !important; }
.recipient-tags { display: contents; }
.recipient-tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px 6px 10px; background: #eef5ff; color: #285e9b; border: 1px solid #d7e7fb; border-radius: 999px; font-size: 12px; max-width: 100%; }
.recipient-tag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 210px; }
.recipient-tag button { border: 0; background: transparent; color: #7290b1; cursor: pointer; padding: 0; font-size: 15px; line-height: 1; }

.form-status { display: none; margin: 2px 0 14px; padding: 11px 13px; border-radius: 10px; font-size: 12px; line-height: 1.45; }
.form-status.show { display: block; }
.form-status.success { color: #0b7a4c; background: #edf9f4; border: 1px solid #cdeedf; }
.form-status.error { color: #a8323b; background: #fff1f2; border: 1px solid #f6d2d6; }
.form-status.info { color: #285e9b; background: #f0f6ff; border: 1px solid #d7e6fb; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 2px; }
.btn { min-height: 44px; border: 0; border-radius: 10px; padding: 0 18px; font-weight: 700; font-size: 13px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .12s, background .15s, box-shadow .15s, opacity .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: white; box-shadow: 0 8px 18px rgba(22,119,255,.2); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-primary:disabled { opacity: .58; cursor: wait; }
.btn-secondary { background: #edf1f6; color: #415069; }
.btn-secondary:hover { background: #e4eaf1; }
.btn-light { background: white; color: #38516f; border: 1px solid var(--line); box-shadow: 0 8px 20px rgba(19,33,58,.06); }
.btn-light:hover { border-color: #cdd6e2; }
.send-icon { font-size: 15px; }

.preview-panel { padding: 24px; background: linear-gradient(160deg, #102640 0%, #0c1d34 100%); border-color: #173352; color: white; display: flex; flex-direction: column; min-height: 100%; }
.preview-topline { display: flex; justify-content: space-between; align-items: center; color: #93a9c2; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; color: #b9f5d9; background: rgba(20,165,106,.12); border: 1px solid rgba(88,220,164,.18); padding: 5px 8px; border-radius: 999px; }
.live-pill i { width: 6px; height: 6px; border-radius: 50%; background: #42d594; }
.preview-icon { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 18px; margin: 31px 0 18px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); font-size: 30px; color: #8fc1ff; }
.preview-panel h3 { margin: 0 0 7px; font-size: 25px; letter-spacing: -.03em; }
.preview-when { margin: 0 0 24px; color: #a8b8ca; font-size: 13px; }
.link-card { padding: 13px; border-radius: 12px; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.08); }
.link-card > span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .09em; color: #849bb5; margin-bottom: 7px; }
.link-row { display: flex; gap: 7px; }
.link-row input { height: 38px; min-width: 0; background: rgba(5,14,26,.38); border-color: rgba(255,255,255,.09); color: #d8e6f6; font-size: 11px; }
.copy-btn { width: 58px; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; background: rgba(255,255,255,.08); color: #d8e6f6; cursor: pointer; font-size: 11px; font-weight: 700; }
.copy-btn:hover { background: rgba(255,255,255,.13); }
.preview-stats { display: grid; grid-template-columns: 1fr 1fr; margin: 20px 0; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; overflow: hidden; }
.preview-stats div { padding: 13px; }
.preview-stats div + div { border-left: 1px solid rgba(255,255,255,.08); }
.preview-stats strong { display: block; font-size: 18px; }
.preview-stats span { color: #8fa5bd; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.btn-join { width: 100%; margin-top: auto; background: #fff; color: #173453; }
.btn-join:hover { background: #eff6ff; }
.btn-join.disabled { pointer-events: none; opacity: .42; }
.fine-print { margin: 12px 2px 0; color: #7890aa; font-size: 10px; line-height: 1.5; }

.history-panel { margin-top: 22px; padding: 26px 28px; }
.history-head { align-items: center; margin-bottom: 14px; }
.text-btn { border: 0; background: transparent; color: #77869a; cursor: pointer; font-size: 12px; padding: 8px; }
.text-btn:hover { color: var(--danger); }
.empty-state { min-height: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #99a4b3; border: 1px dashed #dce2ea; border-radius: 12px; background: #fafbfd; }
.empty-icon { font-size: 26px; color: #adb7c4; margin-bottom: 8px; }
.empty-state strong { color: #647187; font-size: 13px; }
.empty-state span { font-size: 11px; margin-top: 3px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th { padding: 11px 10px; color: #8290a3; border-bottom: 1px solid #e8ecf2; text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
td { padding: 14px 10px; border-bottom: 1px solid #eef1f5; color: #4a5a70; font-size: 12px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
.meeting-name strong { display: block; color: #23324a; font-size: 13px; margin-bottom: 3px; }
.meeting-name small { color: #8b98a9; font-size: 10px; }
.actions-col { text-align: right; }
.row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.mini-btn { height: 30px; padding: 0 9px; border-radius: 7px; border: 1px solid #dfe5ed; background: white; color: #53647a; cursor: pointer; font-size: 10px; font-weight: 700; }
.mini-btn:hover { border-color: #bfcbd9; background: #f8fafc; }
.mini-btn.primary { color: #0f69d7; border-color: #cfe2fa; background: #f5f9ff; }
.mini-btn.danger:hover { color: #b83b44; border-color: #f0cbd0; background: #fff6f7; }

footer { text-align: center; color: #98a2b1; font-size: 10px; padding: 0 0 30px; }

.toast { position: fixed; right: 24px; bottom: 24px; background: #14243a; color: white; border-radius: 10px; padding: 11px 14px; box-shadow: 0 16px 40px rgba(0,0,0,.2); font-size: 12px; z-index: 99; opacity: 0; transform: translateY(8px); pointer-events: none; transition: .18s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 920px) {
  .layout-grid { grid-template-columns: 1fr; }
  .preview-panel { min-height: 455px; }
  .hero { align-items: flex-start; }
}
@media (max-width: 650px) {
  .topbar { height: 66px; padding: 0 16px; }
  .topbar-right { display: none; }
  .page-wrap { width: min(100% - 22px, 1180px); padding-top: 26px; }
  .hero { display: block; }
  .hero .btn { margin-top: 18px; width: 100%; }
  .hero h1 { font-size: 31px; }
  .form-panel, .history-panel { padding: 20px 16px; }
  .two-col, .date-grid { grid-template-columns: 1fr; gap: 0; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
  .preview-panel { padding: 20px; }
}
