:root {
  --bg: #07111e;
  --bg-2: #0a1b2e;
  --surface: #ffffff;
  --surface-soft: #f2f7fb;
  --surface-dark: #10243a;
  --text: #102033;
  --muted: #708196;
  --line: #dce7ef;
  --cyan: #28d5f5;
  --cyan-dark: #0aa8ce;
  --blue: #4979ff;
  --green: #27c28a;
  --orange: #ff9c47;
  --red: #f26464;
  --purple: #8c74ff;
  --shadow: 0 18px 50px rgba(3, 15, 28, .17);
  --radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: linear-gradient(160deg, #07111e 0%, #0a1d31 55%, #091526 100%); color: var(--text); }
body { min-height: 100dvh; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(40,213,245,.36); outline-offset: 2px; }
.app-shell { width: min(100%, 560px); min-height: 100dvh; margin: 0 auto; background: var(--surface-soft); position: relative; overflow-x: hidden; padding-bottom: calc(86px + env(safe-area-inset-bottom)); box-shadow: 0 0 80px rgba(0,0,0,.35); }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: calc(14px + env(safe-area-inset-top)) 18px 12px; background: rgba(7,17,30,.96); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(255,255,255,.08); }
.brand { display: inline-flex; align-items: center; gap: 10px; border: 0; color: white; background: transparent; padding: 0; text-align: left; }
.brand strong { display: block; font-size: 20px; letter-spacing: .12em; line-height: 1; }
.brand small { display: block; margin-top: 4px; color: #86a5bf; font-size: 10px; text-transform: uppercase; letter-spacing: .14em; }
.zeo-mark { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; box-shadow: 0 0 28px rgba(40,213,245,.22); }
.zeo-mark img { width: 42px; height: 42px; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn, .avatar-btn { width: 40px; height: 40px; border-radius: 14px; border: 1px solid rgba(255,255,255,.12); color: white; background: rgba(255,255,255,.08); font-weight: 800; }
.avatar-btn { background: linear-gradient(135deg, var(--cyan), var(--blue)); color: #061321; border: 0; }
.main-view { min-height: calc(100dvh - 150px); }
.hero { color: white; background: radial-gradient(circle at 82% 10%, rgba(40,213,245,.28), transparent 34%), linear-gradient(160deg, #07111e 5%, #0b2138 100%); padding: 22px 18px 32px; border-radius: 0 0 32px 32px; }
.hero-top { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.eyebrow { margin: 0 0 7px; color: var(--cyan-dark); text-transform: uppercase; font-weight: 800; font-size: 10px; letter-spacing: .15em; }
.hero .eyebrow { color: #75eaff; }
h1, h2, h3, p { margin-top: 0; }
.hero h1 { font-size: clamp(27px, 8vw, 38px); line-height: 1.02; margin-bottom: 10px; max-width: 380px; }
.hero-copy { color: #b8cadd; font-size: 14px; line-height: 1.55; max-width: 420px; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; color: #bfefff; background: rgba(40,213,245,.12); border: 1px solid rgba(40,213,245,.25); padding: 7px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.live-pill::before { content: ''; width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 5px rgba(39,194,138,.12); }
.zeo-brief { display: grid; grid-template-columns: 52px 1fr; gap: 13px; margin-top: 20px; padding: 16px; border-radius: 22px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.09); }
.zeo-brief img { width: 52px; height: 52px; border-radius: 18px; }
.zeo-brief h3 { margin-bottom: 6px; font-size: 15px; }
.zeo-brief p { margin: 0; color: #c7d7e5; font-size: 13px; line-height: 1.5; }
.content { padding: 18px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 8px 0 12px; }
.section-head h2 { margin: 0; font-size: 19px; }
.section-head button { border: 0; color: var(--cyan-dark); background: transparent; font-weight: 800; font-size: 12px; }
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px; margin-top: -18px; position: relative; z-index: 2; }
.metric-card { border: 1px solid white; background: rgba(255,255,255,.98); border-radius: 21px; padding: 15px; box-shadow: 0 12px 28px rgba(17,44,70,.10); }
.metric-card span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 8px; }
.metric-card strong { display: block; font-size: 25px; line-height: 1; }
.metric-card small { display: block; margin-top: 7px; font-size: 11px; font-weight: 700; }
.trend-up { color: var(--green); }
.trend-warn { color: var(--orange); }
.stack { display: grid; gap: 10px; }
.action-card, .item-card, .crm-card, .message-card, .calendar-card { width: 100%; text-align: left; border: 1px solid var(--line); background: white; border-radius: 20px; padding: 14px; box-shadow: 0 8px 20px rgba(24,54,84,.05); }
.action-card { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; }
.action-card .action-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 15px; background: #eafaff; color: #0d98bd; font-size: 20px; }
.action-card strong, .item-card strong, .crm-card strong { display: block; font-size: 14px; margin-bottom: 4px; }
.action-card p, .item-card p, .crm-card p { color: var(--muted); font-size: 12px; margin: 0; line-height: 1.42; }
.chevron { color: #97a7b7; font-size: 22px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 7px; }
.status-dot.green { background: var(--green); }
.status-dot.orange { background: var(--orange); }
.status-dot.red { background: var(--red); }
.status-dot.blue { background: var(--blue); }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 999px; background: #edf4f8; color: #557084; font-size: 10px; font-weight: 800; }
.tag.urgent { background: #fff0ed; color: #c94d43; }
.tag.success { background: #eaf9f2; color: #148662; }
.tag.info { background: #eaf7ff; color: #0e7fa4; }
.primary-btn, .secondary-btn, .danger-btn { border: 0; border-radius: 14px; min-height: 44px; padding: 0 15px; font-weight: 800; }
.primary-btn { color: #041521; background: linear-gradient(135deg, var(--cyan), #67e5ff); }
.secondary-btn { color: #18334a; background: #edf4f8; }
.danger-btn { color: #b13535; background: #fff0ef; }
.full { width: 100%; }
.search-wrap { position: relative; margin-bottom: 14px; }
.search-wrap input { width: 100%; border: 1px solid var(--line); background: white; border-radius: 17px; padding: 14px 16px 14px 44px; color: var(--text); }
.search-wrap::before { content: '⌕'; position: absolute; left: 16px; top: 9px; color: #73889a; font-size: 24px; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.filter { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; background: white; color: var(--muted); font-size: 11px; font-weight: 800; }
.filter.active { color: #07344b; background: #dff9ff; border-color: #9beaf7; }
.crm-card { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; }
.client-avatar { width: 44px; height: 44px; border-radius: 15px; background: linear-gradient(145deg,#dff8ff,#eef1ff); display: grid; place-items: center; font-weight: 900; color: #146d8c; }
.crm-meta { color: #789; font-size: 11px; text-align: right; }
.message-card { display: grid; grid-template-columns: 46px 1fr auto; gap: 11px; align-items: center; }
.message-card.unread { border-color: #9eeaf7; background: #f7feff; }
.message-card p { margin: 4px 0 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.message-card time { font-size: 10px; color: #8da0b1; align-self: start; }
.bottom-nav { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 30; width: min(100%, 560px); min-height: calc(72px + env(safe-area-inset-bottom)); padding: 8px 8px env(safe-area-inset-bottom); display: grid; grid-template-columns: 1fr 1fr 74px 1fr 1fr; align-items: end; background: rgba(255,255,255,.98); border-top: 1px solid var(--line); box-shadow: 0 -12px 30px rgba(8,27,45,.08); }
.nav-item { position: relative; border: 0; background: transparent; color: #718294; min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 9px; font-weight: 800; }
.nav-icon { font-size: 20px; line-height: 1; }
.nav-item.active { color: #0a8eaf; }
.nav-item em { position: absolute; right: 13px; top: 3px; min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; border-radius: 999px; background: var(--red); color: white; font-size: 9px; font-style: normal; }
.nav-main { align-self: start; transform: translateY(-23px); width: 64px; height: 64px; min-height: 64px; border-radius: 22px; color: #061526; background: linear-gradient(145deg,var(--cyan),#63e8ff); border: 5px solid var(--surface-soft); box-shadow: 0 10px 25px rgba(16,184,220,.28); font-size: 33px; }
.sheet-dialog, .detail-dialog { padding: 0; border: 0; background: transparent; width: min(100%,560px); max-width: 560px; }
.sheet-dialog { margin: auto auto 0; }
.sheet-dialog::backdrop, .detail-dialog::backdrop { background: rgba(2,10,19,.58); backdrop-filter: blur(4px); }
.sheet-card { border-radius: 28px 28px 0 0; background: white; padding: 10px 18px calc(22px + env(safe-area-inset-bottom)); box-shadow: var(--shadow); }
.sheet-handle { width: 44px; height: 5px; border-radius: 999px; background: #d6e1e8; margin: 0 auto 16px; }
.sheet-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.sheet-title h2 { margin: 0 0 16px; font-size: 21px; }
.close-btn { width: 38px; height: 38px; border-radius: 13px; border: 0; background: #eef4f7; color: #597084; font-size: 24px; }
.role-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.role-option { border: 1px solid var(--line); background: white; border-radius: 19px; padding: 15px; text-align: left; min-height: 116px; }
.role-option.active { border-color: #5dddf3; background: #f2fdff; box-shadow: 0 0 0 3px rgba(40,213,245,.12); }
.role-option span { display: block; font-size: 27px; margin-bottom: 13px; }
.role-option strong { display: block; font-size: 13px; }
.role-option small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.quick-actions { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.quick-action { min-height: 110px; border: 1px solid var(--line); border-radius: 19px; background: white; padding: 15px; text-align: left; }
.quick-action span { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 12px; border-radius: 13px; background: #eafaff; font-size: 19px; }
.quick-action strong { display: block; font-size: 13px; }
.quick-action small { display: block; margin-top: 4px; font-size: 10px; color: var(--muted); line-height: 1.4; }
.detail-dialog { margin: auto; width: calc(100% - 24px); }
.detail-card { max-height: 90dvh; overflow-y: auto; background: white; border-radius: 28px; padding: 19px; box-shadow: var(--shadow); }
.detail-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; margin-bottom: 16px; }
.detail-head h2 { margin: 3px 0 6px; font-size: 21px; }
.detail-head p { margin: 0; font-size: 12px; color: var(--muted); }
.detail-section { border-top: 1px solid var(--line); padding-top: 15px; margin-top: 15px; }
.detail-section h3 { font-size: 13px; margin-bottom: 10px; }
.detail-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-top: 16px; }
.timeline { display: grid; gap: 13px; }
.timeline-row { display: grid; grid-template-columns: 12px 1fr; gap: 10px; }
.timeline-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cyan-dark); margin-top: 4px; box-shadow: 0 0 0 4px #e4f9fd; }
.timeline-row strong { font-size: 12px; }
.timeline-row p { font-size: 11px; color: var(--muted); margin: 3px 0 0; }
.form-field { display: grid; gap: 7px; margin-bottom: 12px; }
.form-field label { font-size: 11px; font-weight: 800; color: #587084; }
.form-field input, .form-field textarea { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fbfdfe; }
.form-field textarea { min-height: 110px; resize: vertical; }
.toast { position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); transform: translate(-50%, 18px); z-index: 90; width: min(calc(100% - 32px), 480px); padding: 13px 15px; border-radius: 16px; background: #071727; color: white; box-shadow: 0 16px 35px rgba(0,0,0,.26); opacity: 0; pointer-events: none; transition: .22s ease; font-size: 12px; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.empty-state { text-align: center; padding: 42px 18px; color: var(--muted); }
.empty-state img { width: 76px; height: 76px; margin-bottom: 12px; }
@media (min-width: 700px) {
  body { padding: 20px 0; }
  .app-shell { min-height: calc(100dvh - 40px); border-radius: 32px; overflow: hidden; }
  .topbar { border-radius: 32px 32px 0 0; }
  .bottom-nav { bottom: 20px; border-radius: 0 0 32px 32px; }
  .sheet-dialog { margin-bottom: 20px; }
  .sheet-card { border-radius: 28px; }
}
