/* Engage Calls organizer home (/app): sign in, start or schedule a meeting, and the account page
   with plans. Same tokens, header and light/dark themes as the landing page (landing.css).
   The meeting room keeps its own stylesheet (app.css). */
@import url("/fonts/tajawal.css");

:root {
  --bg: #0a0a0c;
  --bg-2: #121116;
  --surface: #17151b;
  --surface-2: #211e26;
  --border: #2a2630;
  --text: #f6f3f7;
  --muted: #a39ca8;
  --accent: #e82a72;
  --accent-2: #ff4f8f;
  --accent-soft: rgba(232, 42, 114, .14);
  --ok: #5fd39b;
  --ok-soft: rgba(95, 211, 155, .12);
  --warn: #f2b25c;
  --bad: #f28b82;
  --header: rgba(10, 10, 12, .86);
  --shadow: 0 30px 80px rgba(0, 0, 0, .45);
  --google-bg: #ffffff;
  --google-ink: #1f1f1f;
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #fbf9fb;
  --bg-2: #f3eff4;
  --surface: #ffffff;
  --surface-2: #f4f0f5;
  --border: #e4dde7;
  --text: #16131a;
  --muted: #6c6572;
  --accent-soft: rgba(232, 42, 114, .09);
  --ok: #1d9b5f;
  --ok-soft: rgba(29, 155, 95, .10);
  --warn: #a8640a;
  --bad: #c5362b;
  --header: rgba(251, 249, 251, .88);
  --shadow: 0 24px 60px rgba(40, 10, 30, .10);
  --google-bg: #ffffff;
  --google-ink: #1f1f1f;
  color-scheme: light;
}
html[data-theme="light"] .on-dark, html:not([data-theme="light"]) .on-light { display: none !important; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: radial-gradient(900px 480px at 85% -120px, var(--accent-soft), transparent 70%), var(--bg);
  color: var(--text); font-family: Tajawal, system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; }
.hidden { display: none !important; }
.shell { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 24px; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ── header ── */
header.top { position: sticky; top: 0; z-index: 20; background: var(--header); backdrop-filter: blur(14px); }
header.top::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 42, 114, .7), transparent);
}
header.top .shell { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.lockup img { height: 26px; width: auto; }
.head-end { display: flex; align-items: center; gap: 10px; }
.round {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: none; color: var(--muted);
  display: grid; place-items: center; cursor: pointer; padding: 0; text-decoration: none;
}
.round:hover { color: var(--text); border-color: var(--muted); }
.round svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html[data-theme="light"] .theme .moon, html:not([data-theme="light"]) .theme .sun { display: none; }
.me {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 14px; font-weight: 700;
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 4px 3px 12px; color: var(--text);
}
.me { padding: 3px; } /* avatar only since 2026-10-05; the name lives in the menu */
.me:hover, .me.on { border-color: var(--accent); }
/* language menu, the same shape as the landing page's and byengage.com's */
.lang { position: relative; display: inline-flex; }
.lang > button {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; font: inherit; font-size: 13px; font-weight: 700;
  color: var(--muted); background: none; border: 1px solid var(--border); border-radius: 999px; cursor: pointer;
}
.lang > button:hover, .lang[data-open="true"] > button { color: var(--text); border-color: var(--muted); }
.lang > button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.lang menu {
  position: absolute; top: 100%; inset-inline-end: 0; margin: 8px 0 0; padding: 4px; min-width: 10rem; list-style: none;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .35);
  display: none; z-index: 50;
}
.lang[data-open="true"] menu { display: block; }
.lang menu button {
  display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 12px; border: 0; border-radius: 8px; background: none;
  color: var(--text); font: inherit; font-size: 14px; text-align: start; cursor: pointer;
}
.lang menu button:hover { background: var(--bg-2); }
.lang menu button[aria-checked="true"] { color: var(--accent); font-weight: 700; }
.lang menu .code { font-size: 11.5px; color: var(--muted); min-width: 1.6em; }
.lang menu .name { flex: 1; }
@media (max-width: 640px) { .lang > button svg { display: none; } .lang > button { height: 32px; padding: 0 10px; } }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 14px; text-transform: uppercase;
}

main { flex: 1; padding: 40px 0 56px; }

/* ── shared pieces ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer;
  border-radius: 12px; padding: 12px 20px; border: 1px solid transparent;
  background: var(--accent); color: #fff; transition: transform .1s, background .15s, border-color .15s, opacity .15s;
}
.btn:hover { background: var(--accent-2); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.ghost:hover { border-color: var(--muted); background: var(--surface-2); }
.btn.google { background: var(--google-bg); color: var(--google-ink); border-color: var(--border); }
.btn.google:hover { background: #f4f4f4; }
.btn small { font-weight: 500; color: var(--muted); font-size: 13px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 24px; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 14px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.input {
  width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 12px; padding: 11px 14px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
html[data-theme="light"] .input { background: var(--surface); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder { color: var(--muted); opacity: .7; }
select.input { cursor: pointer; }
.error { color: var(--bad); font-size: 14px; margin: 12px 0 0; }
.note { color: var(--muted); font-size: 14px; margin: 14px 0 0; }
.linkish { font: inherit; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; font-weight: 700; }
.linkish:hover { text-decoration: underline; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px 14px;
}
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
h1 { font-size: clamp(28px, 4.2vw, 40px); line-height: 1.25; font-weight: 800; margin: 0 0 8px; }
h1 em { font-style: normal; color: var(--accent); }
h2 { font-size: 20px; line-height: 1.4; margin: 0 0 6px; }
.lede { color: var(--muted); margin: 0; font-size: 17px; max-width: 34em; }

/* ── signed out ── */
.auth { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; min-height: calc(100dvh - 64px - 140px); }
.auth h1 { font-size: clamp(32px, 4.6vw, 48px); margin: 18px 0 14px; }
.perks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.perks li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); }
.perks li b { color: var(--text); display: block; }
.perks .ic { width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.auth-card { padding: 30px; box-shadow: var(--shadow); }
.auth-card h2 { font-size: 22px; }
.auth-card > p { color: var(--muted); font-size: 14.5px; margin: 0 0 22px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 20px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.switch { text-align: center; color: var(--muted); font-size: 14.5px; margin: 16px 0 0; }

/* ── signed in: home ── */
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.usage-chip {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 8px 6px 16px;
}
[dir="rtl"] .usage-chip { padding: 6px 16px 6px 8px; }
.usage-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.usage-chip.low .dot { background: var(--warn); }
.usage-chip.out .dot { background: var(--bad); }
.usage-chip a {
  color: #fff; background: var(--accent); text-decoration: none; font-weight: 700; font-size: 13px;
  border-radius: 999px; padding: 3px 12px;
}
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tile {
  font: inherit; color: var(--text); text-align: start; cursor: pointer; display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 24px;
  transition: border-color .15s, transform .1s, box-shadow .15s;
}
.tile:hover { border-color: var(--accent); box-shadow: 0 16px 40px rgba(232, 42, 114, .12); }
.tile:active { transform: scale(.99); }
.tile:disabled { opacity: .6; cursor: default; }
.tile .ic { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); }
.tile.primary .ic { background: var(--accent); color: #fff; box-shadow: 0 10px 30px rgba(232, 42, 114, .35); }
.tile .ic svg { width: 24px; height: 24px; }
.tile b { display: block; font-size: 19px; margin-bottom: 2px; }
.tile span { color: var(--muted); font-size: 14.5px; }
.tile.on { border-color: var(--accent); }
.code-box { grid-column: 1 / -1; }

.panel { margin-top: 16px; }
.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.panel-head .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.panel-head h2 { margin: 0; }
.panel-head p { margin: 0; color: var(--muted); font-size: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.zone-pick { display: grid; gap: 8px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 20px; }
.compare:empty { display: none; }
.when-box { background: var(--surface-2); border-radius: 14px; padding: 12px 16px; }
.when-box small { display: block; color: var(--muted); font-size: 13px; }
.when-box div { font-weight: 700; font-size: 15.5px; }
.when-box.theirs { background: var(--accent-soft); }
.form-foot { display: flex; justify-content: flex-end; }
.form-foot .btn { width: auto; min-width: 200px; }

/* booked */
.booked-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.booked-head .ok { width: 44px; height: 44px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; flex: none; }
.booked-head .ok svg { width: 22px; height: 22px; stroke-width: 2.6; }
.booked-head h2 { margin: 0; }
.booked-head p { margin: 0; color: var(--muted); font-size: 14px; }
.booked-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.booked-actions .wide { grid-column: 1 / -1; }
.warn-note {
  display: flex; gap: 10px; align-items: flex-start; background: rgba(242, 178, 92, .10); color: var(--muted);
  border-radius: 12px; padding: 10px 14px; font-size: 13.5px; margin-top: 16px;
}
.warn-note svg { color: var(--warn); margin-top: 3px; width: 18px; height: 18px; }

/* ── account page ── */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: 14.5px; font-weight: 500; margin-bottom: 18px; }
.back:hover { color: var(--text); }
[dir="rtl"] .back svg { transform: scaleX(-1); }
.profile { display: grid; grid-template-columns: 1fr 1.3fr; gap: 16px; margin-bottom: 40px; }
.who-card { display: flex; flex-direction: column; gap: 16px; }
.who-row { display: flex; align-items: center; gap: 14px; min-width: 0; }
.who-row .avatar { width: 52px; height: 52px; font-size: 22px; }
.who-row .email { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: start; }
[dir="rtl"] .who-row .email { text-align: end; }
.badge { display: inline-block; font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 1px 10px; background: var(--accent-soft); color: var(--accent); }
.who-card .btn { width: auto; align-self: flex-start; padding: 8px 18px; font-size: 14.5px; margin-top: auto; }
.meter-card h3 { font-size: 15px; color: var(--muted); font-weight: 500; margin: 0 0 6px; }
.meter-num { font-size: 30px; font-weight: 800; line-height: 1.3; }
.meter-num small { font-size: 15px; color: var(--muted); font-weight: 500; }
.meter { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 14px 0 10px; }
.meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .4s; }
.meter-card p { margin: 0; color: var(--muted); font-size: 14px; }
.plans-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.plans-head h2 { margin: 0; font-size: 24px; }
.cycle { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px; }
.cycle button { font: inherit; font-size: 14px; font-weight: 700; color: var(--muted); background: none; border: 0; border-radius: 999px; padding: 5px 18px; cursor: pointer; }
.cycle button.on { background: var(--accent); color: #fff; }
.plan-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.plan { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 24px 22px; display: flex; flex-direction: column; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan.current { border-color: var(--ok); box-shadow: 0 0 0 1px var(--ok); }
.plan .tag { position: absolute; top: -12px; inset-inline-start: 20px; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 12px; background: var(--ok); color: #06140d; }
.plan-name { font-weight: 800; font-size: 19px; }
.plan-price { display: flex; align-items: baseline; gap: 4px; margin: 6px 0 2px; }
.plan-price b { font-size: 36px; font-weight: 800; line-height: 1.25; }
.plan-price span { color: var(--muted); font-size: 14px; }
.plan-hours { color: var(--accent); font-weight: 700; font-size: 14.5px; margin-bottom: 14px; }
.plan ul { list-style: none; margin: 0 0 20px; padding: 0; flex: 1; }
.plan li { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: 14.5px; margin-bottom: 8px; }
.plan li svg { width: 17px; height: 17px; margin-top: 4px; color: var(--accent); stroke-width: 2.4; }
.plans-note { color: var(--muted); font-size: 13.5px; margin: 16px 0 0; }
.paid-note { display: flex; gap: 10px; align-items: center; background: var(--ok-soft); color: var(--ok); border-radius: 14px; padding: 12px 16px; margin-bottom: 20px; font-weight: 500; }

/* ── footer: the same rules as landing.css, so /app and / end alike ── */
footer { border-top: 1px solid var(--border); background: var(--bg-2); padding: 36px 0 28px; color: var(--muted); font-size: 14px; }
.foot-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 28px; align-items: center; }
.foot-brand img { height: auto; width: min(100%, 300px); margin-bottom: 8px; }
.foot-brand p { margin: 0; font-size: 13.5px; max-width: 24em; }
.social { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.social a { color: var(--muted); display: grid; place-items: center; }
.social a:hover { color: var(--text); }
.social svg { width: 17px; height: 17px; fill: currentColor; }
.social svg.stroke { fill: none; stroke: currentColor; stroke-width: 2; }
.family { justify-self: end; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.family .label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.family a { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.family a:hover { color: var(--text); }
.family a.here { color: var(--text); font-weight: 700; }
.family svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; }
.foot-legal { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; border-top: 1px solid var(--border); margin-top: 26px; padding-top: 20px; font-size: 13px; }
.partner {
  color: var(--accent); font-weight: 700; text-decoration: none; border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 14px; display: inline-flex; align-items: center; gap: 6px;
}
.partner svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; }
@media (max-width: 820px) {
  .foot-row { grid-template-columns: 1fr; text-align: start; }
  .social { justify-content: flex-start; }
  .family { justify-self: start; }
}

/* ── smaller screens ── */
@media (max-width: 880px) {
  .auth { grid-template-columns: 1fr; gap: 32px; min-height: 0; }
  .auth .perks { display: none; }
  .profile { grid-template-columns: 1fr; }
  .plan-cards { grid-template-columns: 1fr; max-width: 460px; }
}
@media (max-width: 640px) {
  .shell { padding: 0 16px; }
  main { padding: 24px 0 40px; }
  .lockup img { height: 20px; }
  .tiles, .form-grid, .compare, .booked-actions { grid-template-columns: 1fr; }
  .tile { padding: 18px; }
  .card, .auth-card { padding: 20px; }
  .form-foot .btn { width: 100%; }
  .me .label { display: none; }
  [dir="rtl"] .me, .me { padding: 3px; }
  .hello { margin-bottom: 20px; }
}
@media (max-width: 360px) { .lockup img { height: 16px; } }
@media (prefers-reduced-motion: reduce) { .meter i { transition: none; } }

/* grid children may shrink below their content (a long email must not widen the page) */
.profile > *, .tiles > *, .form-grid > *, .compare > * { min-width: 0; }
a:focus-visible, button:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.me:focus:not(:focus-visible) { outline: none; }

/* ── user menu ── */
.menu-wrap { position: relative; }
.me { font: inherit; cursor: pointer; background: none; }
.user-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 30; width: 270px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35); display: flex; flex-direction: column;
}
html[data-theme="light"] .user-menu { box-shadow: 0 18px 40px rgba(40, 10, 30, .14); }
.um-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 4px; min-width: 0; }
.um-head .avatar { width: 38px; height: 38px; font-size: 16px; }
.um-who { min-width: 0; display: flex; flex-direction: column; }
.um-who b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-who small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start; }
[dir="rtl"] .um-who small { text-align: end; }
.um-plan { align-self: flex-start; margin: 4px 8px 8px; }
.user-menu hr { border: 0; border-top: 1px solid var(--border); margin: 6px 4px; width: auto; }
.user-menu [role=menuitem] {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 10px;
  font: inherit; font-size: 14.5px; color: var(--text); text-decoration: none; text-align: start; background: none; border: 0; cursor: pointer;
}
.user-menu [role=menuitem]:hover, .user-menu [role=menuitem]:focus-visible { background: var(--surface-2); outline: none; }
.user-menu [role=menuitem] svg { width: 18px; height: 18px; color: var(--muted); }
#menu-signout { color: var(--bad); }
#menu-signout svg { color: var(--bad); }
[dir="rtl"] #menu-signout svg { transform: scaleX(-1); }

/* ── profile and settings ── */
.page-title { margin-bottom: 20px; }
.settings-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; align-items: start; }
.settings-grid > * { min-width: 0; }
.settings-grid h2 { font-size: 17px; margin: 0 0 16px; }
.hint { display: block; color: var(--muted); font-size: 13px; margin-top: 6px; }
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 3px; gap: 2px; }
html[data-theme="light"] .seg { background: var(--surface-2); }
.seg button { font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); background: none; border: 0; border-radius: 9px; padding: 6px 14px; cursor: pointer; }
.seg button.on { background: var(--accent); color: #fff; }
.saved { color: var(--ok); font-size: 13.5px; min-height: 1.4em; margin: 4px 0 0; }
.settings-grid .who-row { margin-bottom: 12px; }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.row-btns .btn { width: auto; padding: 9px 16px; font-size: 14.5px; }
@media (max-width: 880px) { .settings-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .user-menu { position: fixed; top: 64px; inset-inline: 12px; width: auto; } }
