:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #10202a;
  --muted: #60717d;
  --line: #d9e2e8;
  --primary: #0f766e;
  --primary-dark: #0b5f59;
  --danger: #b42318;
  --success: #13795b;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(15, 118, 110, .14), transparent 28%),
    radial-gradient(circle at 88% 4%, rgba(37, 99, 235, .10), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}
a { color: var(--primary); text-decoration: none; }
.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 5;
}
.brand { font-weight: 800; font-size: 20px; color: var(--text); }
nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
nav a { color: var(--text); font-weight: 600; }
.page { width: min(1120px, calc(100% - 32px)); margin: 32px auto; }
.hero { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 28px; align-items: center; min-height: 520px; }
h1 { font-size: clamp(34px, 6vw, 68px); line-height: 1.02; margin: 8px 0 18px; letter-spacing: 0; }
h2 { margin: 0 0 14px; }
.lead { font-size: 20px; color: var(--muted); max-width: 620px; line-height: 1.55; }
.eyebrow { color: var(--primary); text-transform: uppercase; font-size: 13px; font-weight: 800; letter-spacing: .08em; }
.panel, .auth-card, .grid3 article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}
.home-visual {
  position: relative;
  min-height: 430px;
  display: grid;
  place-items: center;
}
.visual-panel {
  width: min(100%, 360px);
  text-align: center;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .12);
}
.floating-card {
  position: absolute;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .12);
  color: var(--muted);
  font-size: 13px;
}
.floating-card strong { color: var(--text); font-size: 18px; }
.call-card-one { top: 34px; left: 0; }
.call-card-two { right: 0; bottom: 44px; }
.narrow, .auth-card { max-width: 520px; margin: 0 auto; }
label { display: block; font-weight: 700; margin: 14px 0 6px; }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
}
textarea { min-height: 120px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}
.button.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.button.primary:hover { background: var(--primary-dark); }
.button.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.button.wide { width: 100%; margin-top: 12px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.big-id { font-size: 36px; font-weight: 900; letter-spacing: 0; margin: 12px 0; }
.muted { color: var(--muted); }
.alert { background: #fff1f0; color: var(--danger); padding: 12px; border-radius: 6px; }
.success { background: #e8f7f1; color: var(--success); padding: 12px; border-radius: 6px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 24px; }
.call-stage {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 420px;
  gap: 46px;
  align-items: center;
  min-height: calc(100vh - 130px);
}
.call-copy {
  max-width: 620px;
}
.mini-stats {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 12px 0 16px;
}
.mini-stats span { color: var(--muted); }
.mini-stats strong { font-size: 22px; }
.phone-shell {
  width: min(100%, 390px);
  min-height: 720px;
  justify-self: center;
  border-radius: 42px;
  padding: 14px;
  background: linear-gradient(145deg, #17212b, #030712);
  box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
  position: relative;
}
.phone-speaker {
  width: 92px;
  height: 6px;
  background: #293548;
  border-radius: 999px;
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.phone-screen {
  min-height: 692px;
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, .16), transparent 36%),
    #ffffff;
  padding: 42px 22px 24px;
  overflow: hidden;
  position: relative;
}
.phone-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 5px rgba(22, 163, 74, .12);
}
.caller-avatar {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: linear-gradient(145deg, #0f766e, #2563eb);
  color: #fff;
  display: grid;
  place-items: center;
  margin: 36px auto 18px;
  font-size: 42px;
  box-shadow: 0 18px 38px rgba(15, 118, 110, .24);
}
.phone-label {
  text-align: center;
  color: var(--muted);
  margin: 0;
  font-weight: 700;
}
.phone-id {
  text-align: center;
  font-size: 34px;
  font-weight: 900;
  margin: 4px 0 28px;
}
.phone-input-label {
  font-size: 13px;
  color: var(--muted);
}
.phone-input {
  min-height: 54px;
  border-radius: 14px;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .04em;
}
.phone-call-button {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 18px;
  margin-top: 14px;
  background: #16a34a;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}
.phone-message {
  min-height: 24px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}
.error-text { color: var(--danger) !important; }
.incoming-phone {
  position: absolute;
  inset: 110px 22px auto;
  z-index: 3;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .18);
}
.phone-active {
  position: absolute;
  inset: 82px 16px 16px;
  background: #fff;
  z-index: 4;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid var(--line);
}
.round-control {
  min-width: 72px;
  min-height: 56px;
  border: 0;
  border-radius: 18px;
  background: #e2e8f0;
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
}
.round-control.accept { background: #16a34a; color: #fff; }
.round-control.reject { background: var(--danger); color: #fff; }
.call-layout { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.hidden { display: none !important; }
.incoming { margin-top: 22px; padding: 18px; border-radius: 8px; background: #ecfeff; border: 1px solid #a5f3fc; }
.active-call { margin-top: 22px; }
.call-controls { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 16px; }
.video-tile, .local-video { min-height: 180px; background: #111827; border-radius: 8px; overflow: hidden; }
.local-video { margin-top: 12px; max-width: 220px; }
.profile-row { display: flex; gap: 18px; align-items: center; margin-bottom: 20px; }
.avatar { width: 96px; height: 96px; border-radius: 8px; object-fit: cover; background: #e2e8f0; }
.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); }
.table th, .table td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.adminbar { border-bottom-color: #b7c6cf; }

@media (max-width: 780px) {
  .topbar { align-items: flex-start; flex-direction: column; padding: 14px 16px; gap: 10px; }
  .hero, .call-layout, .call-stage, .grid3 { grid-template-columns: 1fr; min-height: auto; }
  .inline-form { grid-template-columns: 1fr; }
  h1 { font-size: 42px; }
  .phone-shell { min-height: 660px; }
  .phone-screen { min-height: 632px; }
  .floating-card { position: static; margin: 10px; }
}
