:root {
  color-scheme: light;
  --ui-font-scale: 1;
  --ink: #172033;
  --muted: #778096;
  --muted-2: #a4abbb;
  --line: #e9ebf2;
  --surface: #ffffff;
  --canvas: #f6f7fb;
  --brand: #ff6b35;
  --brand-dark: #e94e23;
  --brand-soft: #fff0e9;
  --navy: #17243f;
  --green: #1ba97f;
  --green-soft: #e9f8f3;
  --blue: #4f7cff;
  --blue-soft: #edf2ff;
  --purple: #8c63da;
  --purple-soft: #f2edfb;
  --warning: #e79a2d;
  --danger: #e34e5d;
  --shadow-sm: 0 6px 20px rgba(32, 39, 55, 0.055);
  --shadow-lg: 0 24px 70px rgba(31, 38, 55, 0.16);
  --radius: 20px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

:root[data-interface-scale="large"] { --ui-font-scale: 1.15; }
:root[data-interface-scale="extra-large"] { --ui-font-scale: 1.3; }
:root[data-interface-scale="huge"] { --ui-font-scale: 1.45; }
:root[data-interface-scale="accessibility"] { --ui-font-scale: 1.6; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { min-height: 100%; scroll-behavior: smooth; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font);
  font-size: calc(16px * var(--ui-font-scale));
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { display: block; }

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 248px;
  flex-direction: column;
  padding: 28px 20px 24px;
  border-right: 1px solid var(--line);
  background: rgba(255,255,255,.96);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #ff844d, #f25227);
  box-shadow: 0 8px 22px rgba(255,107,53,.28);
}
.brand-mark svg { width: 30px; fill: currentColor; }
.brand > span:last-child { display: grid; gap: 1px; }
.brand strong { font-size: calc(20px * var(--ui-font-scale)); letter-spacing: .08em; }
.brand small { color: var(--muted-2); font-size: calc(10px * var(--ui-font-scale)); font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }

.nav-list { display: grid; gap: 6px; margin-top: 48px; }

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 15px;
  border: 0;
  border-radius: 13px;
  color: #6f788c;
  background: transparent;
  font-weight: 650;
  cursor: pointer;
  transition: .2s ease;
}
.nav-item:hover { color: var(--ink); background: #f7f7fa; }
.nav-item.is-active { color: var(--brand); background: var(--brand-soft); }
.nav-item.is-active::before { position: absolute; left: -20px; width: 4px; height: 24px; border-radius: 0 4px 4px 0; background: var(--brand); content: ""; }
.nav-item svg { width: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.nav-badge { min-width: 22px; margin-left: auto; padding: 2px 7px; border-radius: 10px; color: var(--brand); background: #fff; font-size: calc(11px * var(--ui-font-scale)); text-align: center; }
.pulse-dot { width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(255,107,53,.12); }

.sidebar-card {
  margin-top: auto;
  padding: 17px;
  border: 1px solid #ffe4d9;
  border-radius: 17px;
  background: linear-gradient(150deg, #fff8f4, #fff);
}
.sidebar-card-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; color: var(--brand); background: var(--brand-soft); }
.sidebar-card-icon svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.sidebar-card strong { display: block; margin-top: 11px; font-size: calc(13px * var(--ui-font-scale)); }
.sidebar-card p { margin: 5px 0 8px; color: var(--muted); font-size: calc(11px * var(--ui-font-scale)); line-height: 1.6; }

.profile-chip { display: flex; width: 100%; align-items: center; gap: 10px; margin-top: 18px; padding: 13px 8px 0; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.profile-chip:hover strong { color: var(--brand); }
.avatar { display: block; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px; box-shadow: 0 5px 14px rgba(255,107,53,.2); }
.profile-chip > span:nth-child(2) { display: grid; gap: 2px; }
.profile-chip strong { font-size: calc(12px * var(--ui-font-scale)); }
.profile-chip small { color: var(--muted-2); font-size: calc(9px * var(--ui-font-scale)); }
.status-dot { width: 8px; height: 8px; margin-left: auto; border: 2px solid #c7f0e3; border-radius: 50%; background: var(--green); }

.main-content { min-height: 100vh; margin-left: 248px; padding: 30px clamp(24px, 4vw, 64px) 70px; }
.topbar { display: flex; min-height: 62px; align-items: center; justify-content: space-between; margin-bottom: 25px; }
.eyebrow, .section-kicker { margin: 0 0 4px; color: var(--brand); font-size: calc(9px * var(--ui-font-scale)); font-weight: 800; letter-spacing: .18em; }
.topbar h1 { margin: 0; font-size: calc(24px * var(--ui-font-scale)); letter-spacing: -.03em; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.icon-button, .dialog-close {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition: .2s ease;
}
.icon-button:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.icon-button svg { width: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.8; }
.notification-button { position: relative; }
.notification-button span { position: absolute; top: 8px; right: 9px; width: 6px; height: 6px; border: 1.5px solid white; border-radius: 50%; background: var(--brand); }

.primary-button, .secondary-button, .danger-button, .light-button, .ghost-light-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.primary-button { border: 1px solid var(--brand); color: white; background: linear-gradient(135deg, #ff7844, #f25a2b); box-shadow: 0 8px 19px rgba(242,90,43,.18); }
.primary-button:hover, .light-button:hover { transform: translateY(-1px); box-shadow: 0 10px 25px rgba(242,90,43,.27); }
.primary-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
.primary-button.compact { min-height: 40px; padding: 0 16px; font-size: calc(12px * var(--ui-font-scale)); }
.secondary-button { border: 1px solid var(--line); background: #fff; }
.secondary-button:hover { border-color: #d7d9e2; background: #fafafa; }
.danger-button { border: 1px solid var(--danger); color: #fff; background: var(--danger); }
.full-width { width: 100%; }
.text-button { padding: 0; border: 0; color: var(--brand); background: none; font-size: calc(11px * var(--ui-font-scale)); font-weight: 700; cursor: pointer; }
.text-button:hover { color: var(--brand-dark); }
.mini-button { min-height: 29px; padding: 0 11px; border: 1px solid #ffd8ca; border-radius: 9px; color: var(--brand); background: #fff8f5; font-size: calc(10px * var(--ui-font-scale)); font-weight: 700; cursor: pointer; }

.view { display: none; animation: view-in .3s ease; }
.view.is-visible { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.hero-card {
  position: relative;
  display: flex;
  min-height: 292px;
  overflow: hidden;
  padding: 36px 40px;
  border-radius: 24px;
  color: white;
  background: radial-gradient(circle at 76% 42%, #324465 0 9%, transparent 37%), linear-gradient(118deg, #17243f 0%, #233554 62%, #1c2b48 100%);
  box-shadow: 0 18px 40px rgba(25,37,62,.16);
}
.hero-card::after { position: absolute; inset: 0; opacity: .09; background-image: linear-gradient(rgba(255,255,255,.3) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.3) 1px, transparent 1px); background-size: 38px 38px; content: ""; mask-image: linear-gradient(90deg, transparent 20%, #000); }
.hero-copy { position: relative; z-index: 3; width: 68%; }
.live-label { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; color: #ffb092; font-size: calc(9px * var(--ui-font-scale)); font-weight: 800; letter-spacing: .15em; }
.live-label span { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 5px rgba(255,107,53,.16); animation: breathe 2s infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 8px rgba(255,107,53,.04); } }
.hero-kicker { margin: 0 0 3px; color: #b7c0d2; font-size: calc(11px * var(--ui-font-scale)); }
.hero-card h2 { overflow: hidden; margin: 0 0 16px; font-size: clamp(calc(20px * var(--ui-font-scale)), 2.5vw, calc(28px * var(--ui-font-scale))); letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.countdown { display: flex; align-items: flex-start; gap: 7px; }
.countdown span { display: flex; align-items: baseline; gap: 3px; }
.countdown strong { min-width: 35px; font-size: clamp(calc(27px * var(--ui-font-scale)), 3.5vw, calc(39px * var(--ui-font-scale))); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.countdown small { color: #98a6bd; font-size: calc(9px * var(--ui-font-scale)); }
.countdown i { margin-top: 4px; color: #697891; font-style: normal; font-size: calc(22px * var(--ui-font-scale)); }
.hero-meta { display: flex; gap: 15px; margin-top: 14px; color: #aeb9cd; font-size: calc(10px * var(--ui-font-scale)); }
.hero-meta span { display: inline-flex; align-items: center; gap: 5px; }
.hero-meta span + span::before { width: 3px; height: 3px; margin-right: 8px; border-radius: 50%; background: #697891; content: ""; }
.hero-actions { display: flex; gap: 10px; margin-top: 19px; }
.light-button { min-height: 38px; border: 1px solid #fff; color: var(--navy); background: #fff; font-size: calc(11px * var(--ui-font-scale)); }
.ghost-light-button { min-height: 38px; border: 1px solid rgba(255,255,255,.2); color: #fff; background: rgba(255,255,255,.07); font-size: calc(11px * var(--ui-font-scale)); }
.ghost-light-button:hover { background: rgba(255,255,255,.13); }
.ghost-light-button svg { width: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.hero-visual { position: absolute; z-index: 2; top: 0; right: 0; width: 42%; height: 100%; }
.orbit { position: absolute; border: 1px solid rgba(255,255,255,.11); border-radius: 50%; }
.orbit-one { top: 28px; right: 56px; width: 230px; height: 230px; }
.orbit-two { top: 62px; right: 90px; width: 162px; height: 162px; }
.compass { position: absolute; top: 91px; right: 120px; display: grid; width: 103px; height: 103px; place-items: center; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; background: rgba(255,255,255,.07); backdrop-filter: blur(2px); }
.compass-ring { position: absolute; inset: 8px; border: 1px dashed rgba(255,255,255,.25); border-radius: 50%; }
.compass-needle { width: 4px; height: 62px; transform: rotate(35deg); border-radius: 10px 10px 50% 50%; background: linear-gradient(var(--brand) 0 48%, #d7ddec 48%); box-shadow: 0 0 12px rgba(255,107,53,.25); }
.compass strong { position: absolute; color: white; font-size: calc(13px * var(--ui-font-scale)); }
.wave { position: absolute; right: -80px; bottom: -90px; width: 370px; height: 180px; transform: rotate(-8deg); border: 1px solid rgba(255,255,255,.09); border-radius: 50%; }
.wave-two { right: -30px; bottom: -110px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 17px 0; }
.metric-card { display: flex; min-width: 0; align-items: center; gap: 13px; padding: 18px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: var(--shadow-sm); }
.metric-icon { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border-radius: 12px; }
.metric-icon svg, .setting-icon svg { width: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.orange { color: var(--brand); background: var(--brand-soft); }
.blue { color: var(--blue); background: var(--blue-soft); }
.green { color: var(--green); background: var(--green-soft); }
.purple { color: var(--purple); background: var(--purple-soft); }
.metric-card div { min-width: 0; }
.metric-card p { margin: 0 0 2px; color: var(--muted); font-size: calc(10px * var(--ui-font-scale)); }
.metric-card strong { display: inline-block; margin-right: 6px; font-size: calc(20px * var(--ui-font-scale)); font-variant-numeric: tabular-nums; }
.metric-card small { color: var(--muted-2); font-size: calc(8px * var(--ui-font-scale)); white-space: nowrap; }
.metric-card small.good { color: var(--green); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); gap: 17px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.upcoming-panel, .readiness-panel, .notification-settings, .notification-log-panel { padding: 22px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.panel-heading h2 { margin: 0; font-size: calc(16px * var(--ui-font-scale)); }

.task-preview-list { display: grid; gap: 9px; margin-top: 16px; }
.task-preview { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid #f0f1f5; border-radius: 14px; transition: .2s ease; }
.task-preview:hover { border-color: #e4e5ec; transform: translateY(-1px); }
.date-chip { display: grid; width: 45px; height: 48px; flex: 0 0 auto; place-items: center; align-content: center; border-radius: 11px; color: var(--brand); background: var(--brand-soft); line-height: 1; }
.date-chip strong { font-size: calc(17px * var(--ui-font-scale)); }
.date-chip small { margin-top: 3px; font-size: calc(8px * var(--ui-font-scale)); }
.task-preview-copy { min-width: 0; }
.task-preview-copy strong { display: block; overflow: hidden; font-size: calc(12px * var(--ui-font-scale)); text-overflow: ellipsis; white-space: nowrap; }
.task-preview-copy small { display: block; margin-top: 5px; color: var(--muted); font-size: calc(9px * var(--ui-font-scale)); }
.task-platform-mark, .platform-logo { display: grid; place-items: center; border-radius: 11px; color: #fff; font-weight: 900; }
.task-platform-mark { width: 30px; height: 30px; margin-left: auto; flex: 0 0 auto; font-size: calc(11px * var(--ui-font-scale)); }
.damai-bg { background: linear-gradient(145deg, #ff607a, #ef3658); }
.fliggy-bg { background: linear-gradient(145deg, #ff9a38, #ff6a2f); }
.generic-bg { background: linear-gradient(145deg, #718096, #3f4c63); }
.task-preview-status { min-width: 55px; color: var(--green); font-size: calc(9px * var(--ui-font-scale)); font-weight: 700; text-align: right; }
.mini-empty { padding: 30px 10px; color: var(--muted); font-size: calc(11px * var(--ui-font-scale)); text-align: center; }

.score-ring { display: flex; width: 47px; height: 47px; align-items: baseline; justify-content: center; padding-top: 13px; border: 4px solid var(--green-soft); border-top-color: var(--green); border-right-color: var(--green); border-radius: 50%; transform: rotate(20deg); }
.score-ring strong, .score-ring small { transform: rotate(-20deg); }
.score-ring strong { font-size: calc(14px * var(--ui-font-scale)); }
.score-ring small { color: var(--muted); font-size: calc(8px * var(--ui-font-scale)); }
.check-list { display: grid; gap: 2px; margin-top: 12px; }
.check-row { display: flex; min-height: 42px; align-items: center; gap: 10px; border-bottom: 1px solid #f3f3f6; }
.check-row > span { display: grid; width: 17px; height: 17px; flex: 0 0 auto; place-items: center; border: 1.5px solid #d5d9e2; border-radius: 50%; }
.check-row.is-done > span { border-color: var(--green); background: var(--green); }
.check-row.is-done > span::after { width: 6px; height: 3px; transform: translateY(-1px) rotate(-45deg); border-bottom: 1.5px solid #fff; border-left: 1.5px solid #fff; content: ""; }
.check-row div { display: grid; flex: 1; gap: 1px; }
.check-row strong { font-size: calc(10px * var(--ui-font-scale)); }
.check-row small { color: var(--muted); font-size: calc(8px * var(--ui-font-scale)); }
.check-row b { color: var(--green); font-size: calc(8px * var(--ui-font-scale)); }
.panel-note { display: flex; align-items: center; gap: 7px; margin: 12px 0 0; color: var(--muted); font-size: calc(8px * var(--ui-font-scale)); line-height: 1.5; }
.panel-note svg { width: 14px; flex: 0 0 auto; fill: none; stroke: var(--green); stroke-width: 1.8; }

.flow-panel { margin-top: 17px; padding: 21px 24px 25px; }
.policy-chip, .channel-state, .safe-badge, .info-tag, .coming-tag { padding: 5px 10px; border-radius: 15px; color: var(--green); background: var(--green-soft); font-size: calc(8px * var(--ui-font-scale)); font-weight: 800; }
.flow-track { display: flex; align-items: center; margin-top: 20px; }
.flow-step { display: flex; min-width: 133px; align-items: center; gap: 10px; }
.flow-step > span { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--muted-2); font-size: calc(9px * var(--ui-font-scale)); font-weight: 800; }
.flow-step.is-active > span { border-color: var(--brand); color: #fff; background: var(--brand); box-shadow: 0 0 0 5px var(--brand-soft); }
.flow-step div { display: grid; gap: 3px; }
.flow-step strong { font-size: calc(10px * var(--ui-font-scale)); }
.flow-step small { color: var(--muted); font-size: calc(8px * var(--ui-font-scale)); }
.flow-track > i { height: 1px; flex: 1; margin: 0 12px; background: repeating-linear-gradient(90deg, #dde0e7 0 5px, transparent 5px 9px); }

.section-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.segmented-control { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.segmented-control button { min-height: 34px; padding: 0 14px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-size: calc(10px * var(--ui-font-scale)); font-weight: 700; cursor: pointer; }
.segmented-control button.is-active { color: var(--brand); background: var(--brand-soft); }
.segmented-control span { margin-left: 3px; }
.task-list-full { display: grid; gap: 13px; }
.task-card { display: grid; grid-template-columns: auto minmax(160px, 1.7fr) minmax(135px, .7fr) minmax(125px, .7fr) auto; align-items: center; gap: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm); transition: .2s ease; }
.task-card:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(32,39,55,.08); }
.platform-logo { width: 48px; height: 48px; font-size: calc(15px * var(--ui-font-scale)); }
.task-main { min-width: 0; }
.task-main > span { display: inline-block; margin-bottom: 5px; color: var(--muted); font-size: calc(8px * var(--ui-font-scale)); font-weight: 700; }
.task-main h3 { overflow: hidden; margin: 0; font-size: calc(14px * var(--ui-font-scale)); text-overflow: ellipsis; white-space: nowrap; }
.task-main p { overflow: hidden; margin: 5px 0 0; color: var(--muted); font-size: calc(9px * var(--ui-font-scale)); text-overflow: ellipsis; white-space: nowrap; }
.task-data { display: grid; gap: 4px; }
.task-data small { color: var(--muted); font-size: calc(8px * var(--ui-font-scale)); }
.task-data strong { font-size: calc(11px * var(--ui-font-scale)); font-variant-numeric: tabular-nums; }
.task-status { justify-items: start; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 12px; color: var(--green); background: var(--green-soft); font-size: calc(8px * var(--ui-font-scale)); font-weight: 800; }
.status-pill::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; }
.status-pill.paused { color: var(--muted); background: #f1f2f5; }
.status-pill.action { color: var(--brand); background: var(--brand-soft); animation: breathe 2s infinite; }
.status-pill.completed { color: var(--green); background: var(--green-soft); }
.status-pill.failed { color: var(--danger); background: #fff0f2; }
.task-actions { display: flex; align-items: center; gap: 7px; }
.task-action { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.task-action:hover { color: var(--brand); border-color: #ffd6c7; }
.task-action svg { width: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.task-action.open-official { width: auto; padding: 0 12px; color: #fff; border-color: var(--brand); background: var(--brand); font-size: calc(9px * var(--ui-font-scale)); font-weight: 700; }
.empty-state { padding: 80px 20px; color: var(--muted); text-align: center; }
.empty-boat { display: grid; width: 72px; height: 72px; margin: 0 auto 15px; place-items: center; border-radius: 24px; color: var(--brand); background: var(--brand-soft); }
.empty-boat svg { width: 46px; fill: currentColor; }
.empty-state h2 { margin: 0; color: var(--ink); font-size: calc(17px * var(--ui-font-scale)); }
.empty-state p { margin: 8px 0 20px; font-size: calc(11px * var(--ui-font-scale)); }

.platform-intro { display: flex; align-items: flex-end; justify-content: space-between; padding: 8px 4px 23px; }
.platform-intro h2 { margin: 0; font-size: calc(24px * var(--ui-font-scale)); }
.platform-intro p:not(.section-kicker) { margin: 8px 0 0; color: var(--muted); font-size: calc(11px * var(--ui-font-scale)); }
.adapter-count { color: var(--muted); font-size: calc(10px * var(--ui-font-scale)); }
.adapter-count strong { color: var(--brand); font-size: calc(21px * var(--ui-font-scale)); }
.platform-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.platform-card { position: relative; overflow: hidden; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow-sm); }
.platform-card::after { position: absolute; top: -50px; right: -40px; width: 140px; height: 140px; border-radius: 50%; background: var(--platform-soft, #f7f7f8); content: ""; }
.platform-card.platform-damai { --platform-soft: #fff0f3; }
.platform-card.platform-fliggy { --platform-soft: #fff4e9; }
.platform-card-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.platform-card .platform-logo { width: 48px; height: 48px; }
.platform-card h3 { margin: 0; font-size: calc(15px * var(--ui-font-scale)); }
.platform-card-top small { display: flex; align-items: center; gap: 5px; margin-top: 4px; color: var(--green); font-size: calc(8px * var(--ui-font-scale)); }
.platform-card-top small::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; }
.platform-card > p { min-height: 38px; margin: 18px 0; color: var(--muted); font-size: calc(10px * var(--ui-font-scale)); line-height: 1.7; }
.capability-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.capability-tags span { padding: 5px 8px; border-radius: 10px; color: #646d80; background: #f5f6f8; font-size: calc(8px * var(--ui-font-scale)); }
.platform-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 19px; padding-top: 14px; border-top: 1px solid var(--line); }
.platform-card-footer small { color: var(--muted); font-size: calc(8px * var(--ui-font-scale)); }
.platform-card-footer a { color: var(--brand); font-size: calc(9px * var(--ui-font-scale)); font-weight: 700; text-decoration: none; }
.platform-card.coming { border-style: dashed; background: transparent; box-shadow: none; }
.platform-card.coming .platform-logo { color: var(--muted); background: #eceef2; }
.platform-card.coming .platform-card-top small { color: var(--warning); }
.capability-panel { margin-top: 17px; padding: 22px; }
.extension-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 17px; padding: 22px; }
.extension-panel h2 { margin: 0; font-size: calc(16px * var(--ui-font-scale)); }
.extension-panel p:not(.section-kicker) { max-width: 720px; margin: 8px 0 0; color: var(--muted); font-size: calc(10px * var(--ui-font-scale)); line-height: 1.7; }
.extension-panel .secondary-button { flex: 0 0 auto; text-decoration: none; }
.capability-table { overflow: hidden; margin-top: 18px; border: 1px solid var(--line); border-radius: 13px; }
.cap-row { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); padding: 12px 15px; border-bottom: 1px solid var(--line); font-size: calc(9px * var(--ui-font-scale)); }
.cap-row:last-child { border-bottom: 0; }
.cap-row.cap-head { color: var(--muted); background: #fafafd; font-weight: 700; }
.cap-row strong { font-size: calc(9px * var(--ui-font-scale)); }
.cap-row .yes { color: var(--green); }
.cap-row .warn { color: var(--warning); }
.cap-row .no { color: var(--muted-2); }

.notification-layout { display: grid; grid-template-columns: minmax(340px, .85fr) minmax(0, 1.15fr); gap: 17px; }
.channel-state { color: var(--warning); background: #fff7e9; }
.channel-state[data-state="all"] { color: var(--green); background: var(--green-soft); }
.channel-state[data-state="off"] { color: var(--muted); background: #f1f2f5; }
.check-row b.is-offline { color: var(--warning); }
.setting-row { display: flex; align-items: center; gap: 13px; min-height: 72px; border-bottom: 1px solid var(--line); }
.setting-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 12px; }
.setting-row > div { display: grid; flex: 1; gap: 4px; }
.setting-row strong { font-size: calc(11px * var(--ui-font-scale)); }
.setting-row small { color: var(--muted); font-size: calc(8px * var(--ui-font-scale)); line-height: 1.4; }
.switch { display: flex; width: 38px; height: 22px; align-items: center; padding: 2px; border: 0; border-radius: 15px; background: #dcdfe5; cursor: pointer; }
.switch span { width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.15); transition: .2s; }
.switch.is-on { background: var(--green); }
.switch.is-on span { transform: translateX(16px); }
.notification-settings .full-width { margin-top: 18px; }
.activity-log { display: grid; margin-top: 17px; }
.activity-item { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; min-height: 64px; }
.activity-item:not(:last-child)::after { position: absolute; top: 31px; bottom: 0; left: 14px; width: 1px; background: var(--line); content: ""; }
.activity-icon { position: relative; z-index: 1; display: grid; width: 29px; height: 29px; place-items: center; border: 4px solid #fff; border-radius: 50%; color: var(--brand); background: var(--brand-soft); font-size: calc(9px * var(--ui-font-scale)); font-weight: 900; box-sizing: content-box; }
.activity-copy strong { display: block; font-size: calc(10px * var(--ui-font-scale)); }
.activity-copy p { margin: 4px 0 0; color: var(--muted); font-size: calc(8px * var(--ui-font-scale)); line-height: 1.5; }
.activity-item time { color: var(--muted-2); font-size: calc(8px * var(--ui-font-scale)); }
.activity-empty { padding: 58px 10px; color: var(--muted); font-size: calc(10px * var(--ui-font-scale)); text-align: center; }

.settings-layout { display: grid; grid-template-columns: 1fr; gap: 17px; }
.display-settings-panel { padding: 20px 24px; }
.settings-value { padding: 7px 11px; border-radius: 14px; color: var(--brand); background: var(--brand-soft); font-size: calc(9px * var(--ui-font-scale)); font-weight: 800; }
.font-setting-row { display: grid; grid-template-columns: minmax(190px, .42fr) minmax(0, 1.58fr); align-items: center; gap: 20px; margin-top: 16px; }
.font-setting-copy { min-width: 0; }
.font-setting-copy strong { font-size: calc(13px * var(--ui-font-scale)); }
.font-setting-copy p { margin: 5px 0 0; color: var(--muted); font-size: calc(9px * var(--ui-font-scale)); line-height: 1.55; }
.font-scale-options { display: grid; min-width: 0; grid-template-columns: repeat(5, minmax(86px, 1fr)); gap: 8px; }
.font-scale-options button { display: grid; min-height: 54px; place-items: center; gap: 1px; padding: 8px 6px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: #fbfbfd; cursor: pointer; transition: .2s ease; }
.font-scale-options button:hover { border-color: #ffc4ad; background: #fffaf8; }
.font-scale-options button.is-selected { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(255,107,53,.08); }
.font-scale-options strong { font-size: calc(10px * var(--ui-font-scale)); white-space: nowrap; }
.font-scale-options small { font-size: calc(8px * var(--ui-font-scale)); }
.device-preference-note { margin: 13px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: calc(8px * var(--ui-font-scale)); line-height: 1.6; }
.device-preference-note strong { color: var(--green); }
.settings-update-panel { grid-column: 1 / -1; margin-top: 0; }
.update-nav-badge { min-width: 24px; color: #fff; background: var(--brand); }
.update-shortcut { position: relative; color: var(--brand); background: var(--brand-soft); }
.update-shortcut > span { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; background: var(--danger); }

.security-hero { display: flex; align-items: center; gap: 26px; padding: 30px; border-radius: 22px; color: #fff; background: linear-gradient(125deg, #17243f, #253a5f); box-shadow: 0 18px 40px rgba(25,37,62,.15); }
.security-gauge { display: grid; width: 100px; height: 100px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: conic-gradient(var(--green) 0 92%, rgba(255,255,255,.15) 92%); }
.security-gauge::before { position: absolute; width: 78px; height: 78px; border-radius: 50%; background: #213352; content: ""; }
.security-gauge div { position: relative; z-index: 1; display: grid; text-align: center; }
.security-gauge strong { font-size: calc(26px * var(--ui-font-scale)); }
.security-gauge small { color: #aeb9cc; font-size: calc(8px * var(--ui-font-scale)); }
.safe-badge { display: inline-block; color: #70dfbd; background: rgba(27,169,127,.15); }
.security-hero h2 { margin: 10px 0 6px; font-size: calc(22px * var(--ui-font-scale)); }
.security-hero p { max-width: 650px; margin: 0; color: #aeb9cc; font-size: calc(10px * var(--ui-font-scale)); line-height: 1.7; }
.security-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 17px; }
.security-item { display: flex; min-height: 124px; align-items: flex-start; gap: 15px; padding: 20px; }
.security-item > div { flex: 1; }
.security-item strong { font-size: calc(12px * var(--ui-font-scale)); }
.security-item p { margin: 7px 0 0; color: var(--muted); font-size: calc(9px * var(--ui-font-scale)); line-height: 1.65; }
.security-item > b { color: var(--green); font-size: calc(8px * var(--ui-font-scale)); }
.info-tag { color: var(--blue); background: var(--blue-soft); white-space: nowrap; }
.coming-tag { color: var(--warning); background: #fff7e9; white-space: nowrap; }
.danger-text { color: var(--danger); white-space: nowrap; }
.ios-note { margin-top: 17px; padding: 23px; }
.ios-note { display: grid; grid-template-columns: 230px 1fr; align-items: center; gap: 30px; }
.ios-note h2 { margin: 0; font-size: calc(16px * var(--ui-font-scale)); }
.ios-note > p { margin: 0; color: var(--muted); font-size: calc(9px * var(--ui-font-scale)); line-height: 1.9; }
.sync-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 17px; padding: 21px; }
.sync-copy { display: flex; min-width: 0; align-items: center; gap: 14px; }
.sync-copy h2 { margin: 0; font-size: calc(14px * var(--ui-font-scale)); }
.sync-copy p:not(.section-kicker) { margin: 5px 0 0; color: var(--muted); font-size: calc(9px * var(--ui-font-scale)); }
.sync-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; }
.sync-state { padding: 6px 10px; border-radius: 13px; color: var(--muted); background: #f2f3f6; font-size: calc(8px * var(--ui-font-scale)); font-weight: 800; }
.sync-state.is-synced { color: var(--green); background: var(--green-soft); }
.update-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px 24px; margin-top: 17px; padding: 21px; }
.update-panel .sync-copy small { display: block; margin-top: 4px; color: var(--muted-2); font-size: calc(8px * var(--ui-font-scale)); }
.update-panel .sync-copy small + small { margin-top: 7px; }
.update-preferences { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(300px, .9fr) minmax(0, 1.1fr); gap: 14px; }
.update-auto-check { min-height: 82px; padding: 0 15px; border: 1px solid var(--line); border-radius: 15px; background: #fbfbfd; }
.update-auto-check .setting-icon svg { width: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.update-release-notes { min-height: 82px; padding: 15px 17px; border: 1px solid #ffe0d4; border-radius: 15px; background: #fffaf8; }
.update-release-notes strong { color: var(--brand); font-size: calc(10px * var(--ui-font-scale)); }
.update-release-notes p { margin: 6px 0 5px; color: var(--ink); font-size: calc(9px * var(--ui-font-scale)); line-height: 1.6; }
.update-release-notes small { color: var(--muted-2); font-size: calc(8px * var(--ui-font-scale)); }
.update-progress { grid-column: 1 / -1; height: 5px; overflow: hidden; border-radius: 5px; background: #f0f1f4; }
.update-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), #ff8a61); transition: width .2s ease; }

.task-dialog { width: min(780px, calc(100vw - 30px)); max-height: 92vh; padding: 0; overflow: hidden auto; border: 0; border-radius: 25px; color: var(--ink); background: #fff; box-shadow: var(--shadow-lg); }
.task-dialog::backdrop, .confirm-dialog::backdrop, .progress-dialog::backdrop, .validation-dialog::backdrop { background: rgba(15,23,42,.56); backdrop-filter: blur(3px); }
.task-dialog form { padding: 30px 34px 28px; }
.dialog-heading { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.dialog-heading h2 { margin: 0; font-size: calc(20px * var(--ui-font-scale)); }
.dialog-heading > div > p:last-child { margin: 6px 0 0; color: var(--muted); font-size: calc(9px * var(--ui-font-scale)); }
.dialog-close { flex: 0 0 auto; color: var(--muted); font-size: calc(23px * var(--ui-font-scale)); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field > span { font-size: calc(11px * var(--ui-font-scale)); font-weight: 800; }
.field input, .field select, .price-input-row input { width: 100%; height: 48px; padding: 0 14px; outline: none; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: #fbfbfd; font-size: calc(12px * var(--ui-font-scale)); transition: .2s; }
.field input:focus, .field select:focus, .price-input-row input:focus { border-color: #ffb79d; background: #fff; box-shadow: 0 0 0 3px var(--brand-soft); }
.field select { padding-right: 40px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, #7f8798 50%), linear-gradient(135deg, #7f8798 50%, transparent 50%); background-position: calc(100% - 19px) 20px, calc(100% - 14px) 20px; background-repeat: no-repeat; background-size: 5px 5px, 5px 5px; }
.field small { color: var(--muted-2); font-size: calc(9px * var(--ui-font-scale)); line-height: 1.5; }

.smart-select { position: relative; min-width: 0; }
.smart-select.is-open { z-index: 35; }
.smart-select-trigger { display: flex; width: 100%; min-height: 58px; align-items: center; gap: 11px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: #fbfbfd; text-align: left; cursor: pointer; transition: .2s ease; }
.smart-select-trigger:hover { border-color: #dfe2eb; background: #fff; }
.smart-select.is-open .smart-select-trigger { border-color: #ffad90; background: #fff; box-shadow: 0 0 0 3px var(--brand-soft); }
.smart-select-trigger > svg:last-child { width: 18px; margin-left: auto; fill: none; stroke: var(--muted); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; transition: transform .2s; }
.smart-select.is-open .smart-select-trigger > svg:last-child { transform: rotate(180deg); }
.select-leading { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 11px; }
.platform-choice { color: #fff; font-size: calc(10px * var(--ui-font-scale)); font-weight: 900; }
.location-choice { color: var(--brand); background: var(--brand-soft); }
.location-choice svg { width: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.select-trigger-copy { display: grid; min-width: 0; gap: 3px; }
.select-trigger-copy strong { overflow: hidden; font-size: calc(12px * var(--ui-font-scale)); text-overflow: ellipsis; white-space: nowrap; }
.select-trigger-copy small { overflow: hidden; color: var(--muted); font-size: calc(8px * var(--ui-font-scale)); text-overflow: ellipsis; white-space: nowrap; }
.smart-select-trigger.is-placeholder .select-trigger-copy strong { color: var(--muted); font-weight: 650; }
.smart-select-menu { position: absolute; z-index: 40; top: calc(100% + 8px); right: 0; left: 0; padding: 7px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 18px 48px rgba(31,38,55,.17); }
.smart-select-option { display: flex; width: 100%; align-items: center; gap: 11px; padding: 9px; border: 0; border-radius: 11px; background: transparent; text-align: left; cursor: pointer; }
.smart-select-option:hover, .smart-select-option.is-selected { background: #fff7f3; }
.smart-select-option > span:nth-child(2) { display: grid; flex: 1; gap: 3px; min-width: 0; }
.smart-select-option strong { font-size: calc(11px * var(--ui-font-scale)); }
.smart-select-option small { color: var(--muted); font-size: calc(8px * var(--ui-font-scale)); }
.smart-select-option > i { color: var(--brand); font-size: calc(12px * var(--ui-font-scale)); font-style: normal; opacity: 0; }
.smart-select-option.is-selected > i { opacity: 1; }
.city-select-menu { max-height: 330px; overflow: hidden; }
.select-search { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; padding: 0 10px; border-radius: 11px; background: #f6f7fa; }
.select-search svg { width: 16px; flex: 0 0 auto; fill: none; stroke: var(--muted); stroke-linecap: round; stroke-width: 1.8; }
.select-search input { height: 38px; padding: 0; border: 0; background: transparent; box-shadow: none; font-size: calc(10px * var(--ui-font-scale)); }
.select-search input:focus { border: 0; background: transparent; box-shadow: none; }
.city-option-list { display: grid; max-height: 250px; grid-template-columns: repeat(3, 1fr); gap: 3px; overflow: auto; padding: 2px; }
.city-option-list .smart-select-option { justify-content: center; min-height: 35px; padding: 7px 4px; font-size: calc(10px * var(--ui-font-scale)); font-weight: 700; text-align: center; }
.city-option-list .smart-select-option.is-selected { color: var(--brand); }
.city-empty { margin: 15px 0; color: var(--muted); font-size: calc(9px * var(--ui-font-scale)); text-align: center; }

.date-time-picker { position: relative; }
.date-time-picker.is-open { z-index: 30; }
.date-time-trigger { display: flex; width: 100%; min-height: 62px; align-items: center; gap: 12px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(135deg, #fff, #fafbfe); text-align: left; cursor: pointer; transition: .2s; }
.date-time-trigger:hover { border-color: #dfe2eb; }
.date-time-picker.is-open .date-time-trigger { border-color: #ffad90; box-shadow: 0 0 0 3px var(--brand-soft); }
.date-time-icon { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border-radius: 12px; color: var(--brand); background: var(--brand-soft); }
.date-time-icon svg, .time-heading svg { width: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.date-time-trigger > span:nth-child(2) { display: grid; gap: 4px; }
.date-time-trigger small { color: var(--muted); font-size: calc(8px * var(--ui-font-scale)); font-weight: 700; }
.date-time-trigger strong { font-size: calc(13px * var(--ui-font-scale)); }
.trigger-chevron { width: 18px; margin-left: auto; fill: none; stroke: var(--muted); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; transition: transform .2s; }
.date-time-picker.is-open .trigger-chevron { transform: rotate(180deg); }
.date-time-panel { position: absolute; z-index: 32; top: calc(100% + 8px); right: 0; left: 0; display: grid; grid-template-columns: 1.06fr .94fr; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 22px 55px rgba(31,38,55,.18); }
.calendar-section { padding: 16px; border-right: 1px solid var(--line); }
.calendar-section header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.calendar-section header strong { font-size: calc(12px * var(--ui-font-scale)); }
.calendar-section header button { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: calc(19px * var(--ui-font-scale)); cursor: pointer; }
.calendar-section header button:hover { color: var(--brand); border-color: #ffd0bf; background: #fff8f4; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.calendar-weekdays { margin-bottom: 4px; }
.calendar-weekdays span { color: var(--muted-2); font-size: calc(8px * var(--ui-font-scale)); font-weight: 800; text-align: center; }
.calendar-day, .calendar-blank { aspect-ratio: 1; }
.calendar-day { display: grid; place-items: center; padding: 0; border: 0; border-radius: 9px; background: transparent; font-size: calc(9px * var(--ui-font-scale)); font-weight: 700; cursor: pointer; }
.calendar-day:hover:not(:disabled) { color: var(--brand); background: var(--brand-soft); }
.calendar-day.is-today { box-shadow: inset 0 0 0 1px #ffc7b2; }
.calendar-day.is-selected { color: #fff; background: linear-gradient(135deg, #ff7d4a, #f45a2a); box-shadow: 0 5px 12px rgba(244,90,42,.22); }
.calendar-day:disabled { color: #cfd3dc; cursor: not-allowed; }
.time-section { padding: 16px; }
.time-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.time-heading > span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: calc(9px * var(--ui-font-scale)); font-weight: 800; }
.time-heading strong { color: var(--brand); font-size: calc(16px * var(--ui-font-scale)); letter-spacing: .06em; }
.time-section > small { display: block; margin: 10px 0 6px; color: var(--muted-2); font-size: calc(8px * var(--ui-font-scale)); font-weight: 800; }
.time-option-grid { display: grid; gap: 4px; }
.time-option-grid.hours { grid-template-columns: repeat(6, 1fr); }
.time-option-grid.minutes { grid-template-columns: repeat(6, 1fr); }
.time-option-grid button { min-height: 28px; padding: 0; border: 1px solid transparent; border-radius: 8px; color: var(--muted); background: #f6f7fa; font-size: calc(8px * var(--ui-font-scale)); font-weight: 750; cursor: pointer; }
.time-option-grid button:hover { color: var(--brand); border-color: #ffd5c6; background: #fff8f4; }
.time-option-grid button.is-selected { color: #fff; background: var(--brand); }
.confirm-time-button { width: 100%; min-height: 36px; margin-top: 14px; border: 0; border-radius: 10px; color: #fff; background: var(--navy); font-size: calc(9px * var(--ui-font-scale)); font-weight: 800; cursor: pointer; }
.price-input-row { display: flex; gap: 8px; }
.price-input-row .mini-button { min-width: 58px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.price-tag { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 10px; color: var(--brand); background: var(--brand-soft); font-size: calc(8px * var(--ui-font-scale)); font-weight: 700; }
.price-tag button { padding: 0; border: 0; color: inherit; background: transparent; font-weight: 800; cursor: pointer; }
.agreement { display: flex; align-items: flex-start; gap: 8px; margin-top: 19px; color: var(--muted); font-size: calc(9px * var(--ui-font-scale)); line-height: 1.5; }
.agreement input { accent-color: var(--brand); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; padding-top: 19px; border-top: 1px solid var(--line); }
.confirm-dialog { width: min(380px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 20px; box-shadow: var(--shadow-lg); }
.confirm-dialog form { display: grid; justify-items: center; padding: 28px; text-align: center; }
.confirm-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 50%; color: var(--danger); background: #fff0f2; font-size: calc(18px * var(--ui-font-scale)); font-weight: 800; }
.confirm-icon.is-primary { color: var(--brand); background: var(--brand-soft); }
.confirm-dialog h2 { margin: 13px 0 5px; font-size: calc(17px * var(--ui-font-scale)); }
.confirm-dialog p { margin: 0; color: var(--muted); font-size: calc(10px * var(--ui-font-scale)); line-height: 1.6; }
.confirm-dialog form > div { display: flex; gap: 9px; margin-top: 20px; }
.progress-dialog { width: min(520px, calc(100vw - 30px)); padding: 0; border: 0; border-radius: 22px; color: var(--ink); box-shadow: var(--shadow-lg); }
.progress-dialog::backdrop { background: rgba(15,23,42,.56); backdrop-filter: blur(3px); }
.progress-dialog form { padding: 27px; }
.progress-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.progress-options button { display: flex; align-items: center; gap: 11px; min-height: 74px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-align: left; cursor: pointer; }
.progress-options button:hover { border-color: #ffbea7; background: #fff9f6; }
.progress-options button > span { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: var(--brand); background: var(--brand-soft); font-size: calc(10px * var(--ui-font-scale)); font-weight: 800; }
.progress-options button div { display: grid; gap: 4px; }
.progress-options button strong { font-size: calc(10px * var(--ui-font-scale)); }
.progress-options button small { color: var(--muted); font-size: calc(8px * var(--ui-font-scale)); line-height: 1.4; }
.progress-options .success-option > span { color: var(--green); background: var(--green-soft); }
.progress-options .failed-option > span { color: var(--danger); background: #fff0f2; }
.progress-note { margin: 15px 0 0; color: var(--muted); font-size: calc(8px * var(--ui-font-scale)); line-height: 1.6; }
.account-dialog { width: min(500px, calc(100vw - 30px)); max-height: 92vh; padding: 0; overflow: auto; border: 0; border-radius: 22px; color: var(--ink); box-shadow: var(--shadow-lg); }
.account-dialog::backdrop { background: rgba(15,23,42,.56); backdrop-filter: blur(3px); }
.account-dialog-body { padding: 27px; }
.account-mode { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; margin-bottom: 18px; padding: 4px; border-radius: 12px; background: #f3f4f7; }
.account-mode button { height: 34px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-size: calc(10px * var(--ui-font-scale)); font-weight: 800; cursor: pointer; }
.account-mode button.is-active { color: var(--brand); background: #fff; box-shadow: 0 3px 10px rgba(30,39,58,.07); }
#account-form { display: grid; gap: 14px; }
.server-test-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: -6px; }
.server-test-row > div { display: flex; align-items: center; gap: 12px; }
.server-test-row span { color: var(--muted-2); font-size: calc(8px * var(--ui-font-scale)); }
.server-test-row span.is-good { color: var(--green); }
.account-error { margin: 0; padding: 9px 11px; border-radius: 10px; color: var(--danger); background: #fff0f2; font-size: calc(9px * var(--ui-font-scale)); line-height: 1.5; }
.registration-error { margin: 14px 0 0; padding: 10px 12px; border-radius: 11px; color: var(--danger); background: #fff0f2; font-size: calc(10px * var(--ui-font-scale)); line-height: 1.55; }
.validation-dialog { width: min(440px, calc(100vw - 30px)); padding: 0; border: 0; border-radius: 22px; color: var(--ink); box-shadow: var(--shadow-lg); }
.validation-dialog form { display: grid; justify-items: center; padding: 29px; text-align: center; }
.validation-dialog-icon { display: grid; width: 48px; height: 48px; place-items: center; margin-bottom: 13px; border-radius: 15px; color: var(--danger); background: #fff0f2; font-size: calc(20px * var(--ui-font-scale)); font-weight: 900; }
.validation-dialog h2 { margin: 4px 0 7px; font-size: calc(17px * var(--ui-font-scale)); }
.validation-dialog > form > p:not(.section-kicker) { margin: 0; color: var(--muted); font-size: calc(10px * var(--ui-font-scale)); line-height: 1.7; }
.validation-dialog-details { width: 100%; margin: 15px 0 0; padding: 11px 13px; border-radius: 12px; color: #8b4a13; background: #fff8e8; font-size: calc(9px * var(--ui-font-scale)); line-height: 1.6; text-align: left; }
.validation-dialog .primary-button { margin-top: 20px; }
.account-security-note { margin: 15px 0 0; color: var(--muted); font-size: calc(8px * var(--ui-font-scale)); line-height: 1.6; }
.account-signed-in { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: #fafbfc; }
.account-avatar { display: block; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 13px; box-shadow: 0 6px 16px rgba(255,107,53,.2); }
.account-signed-in > div { display: grid; flex: 1; gap: 4px; min-width: 0; }
.account-signed-in strong { overflow: hidden; font-size: calc(11px * var(--ui-font-scale)); text-overflow: ellipsis; }
.account-signed-in small { color: var(--muted); font-size: calc(8px * var(--ui-font-scale)); }
.policy-lock { position: fixed; z-index: 120; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(15,23,42,.72); backdrop-filter: blur(8px); }
.policy-lock > div { display: flex; width: min(440px, 100%); align-items: flex-start; gap: 14px; padding: 22px; border-radius: 18px; background: #fff; box-shadow: var(--shadow-lg); }
.policy-lock > div > span { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 12px; color: var(--danger); background: #fff0f2; font-weight: 900; }
.policy-lock strong { font-size: calc(14px * var(--ui-font-scale)); }
.policy-lock p { margin: 6px 0 0; color: var(--muted); font-size: calc(10px * var(--ui-font-scale)); line-height: 1.6; }

.toast-region { position: fixed; z-index: 100; right: 24px; bottom: 24px; display: grid; gap: 8px; pointer-events: none; }
.toast { display: flex; width: min(340px, calc(100vw - 32px)); align-items: center; gap: 10px; padding: 13px 15px; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; color: white; background: #202c45; box-shadow: 0 14px 36px rgba(20,30,50,.25); font-size: calc(10px * var(--ui-font-scale)); line-height: 1.5; animation: toast-in .25s ease; }
.toast::before { display: grid; width: 20px; height: 20px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #fff; background: var(--green); content: "✓"; font-size: calc(10px * var(--ui-font-scale)); }
.toast.is-warning::before { background: var(--brand); content: "!"; }
.toast.is-leaving { opacity: 0; transform: translateY(5px); transition: .2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.offline-banner { position: fixed; z-index: 90; right: 20px; bottom: 20px; left: 268px; padding: 9px 15px; border-radius: 10px; color: #fff; background: #8b5b17; font-size: calc(9px * var(--ui-font-scale)); text-align: center; }
.mobile-nav { display: none; }

@media (max-width: 1120px) {
  .sidebar { width: 208px; padding-right: 14px; padding-left: 14px; }
  .main-content { margin-left: 208px; padding-right: 24px; padding-left: 24px; }
  .nav-item.is-active::before { left: -14px; }
  .hero-copy { width: 72%; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .task-card { grid-template-columns: auto minmax(180px, 1fr) minmax(130px, .6fr) auto; }
  .task-card .task-data:nth-of-type(3) { display: none; }
  .platform-grid { grid-template-columns: repeat(2, 1fr); }
  .offline-banner { left: 228px; }
}

@media (max-width: 760px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .sidebar { display: none; }
  .main-content { margin-left: 0; padding: 18px 15px 30px; }
  .topbar { min-height: 48px; margin-bottom: 18px; }
  .topbar h1 { font-size: calc(20px * var(--ui-font-scale)); }
  .topbar-actions .notification-button { display: none; }
  .primary-button.compact { width: 38px; min-height: 38px; overflow: hidden; padding: 0; font-size: 0; }
  .hero-card { min-height: 318px; padding: 29px 23px; }
  .hero-copy { width: 100%; }
  .hero-card h2 { width: 93%; font-size: calc(21px * var(--ui-font-scale)); }
  .hero-visual { width: 60%; opacity: .4; }
  .hero-card::after { display: none; }
  .countdown { gap: 5px; }
  .countdown strong { min-width: 31px; font-size: calc(28px * var(--ui-font-scale)); }
  .hero-meta { flex-wrap: wrap; }
  .hero-actions { position: absolute; top: 216px; left: 0; width: 100%; }
  .hero-actions button { flex: 1; padding: 0 10px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 12px 0; }
  .metric-card { min-height: 89px; align-items: flex-start; gap: 8px; padding: 13px; }
  .metric-icon { width: 32px; height: 32px; border-radius: 10px; }
  .metric-icon svg { width: 16px; }
  .metric-card p { font-size: calc(8px * var(--ui-font-scale)); }
  .metric-card strong { font-size: calc(16px * var(--ui-font-scale)); }
  .metric-card small { display: block; margin-top: 2px; white-space: normal; }
  .upcoming-panel, .readiness-panel { padding: 18px; }
  .readiness-panel { order: -1; }
  .flow-panel { overflow: hidden; padding: 19px; }
  .flow-track { align-items: flex-start; }
  .flow-step { min-width: 55px; flex-direction: column; gap: 6px; text-align: center; }
  .flow-step div { max-width: 62px; }
  .flow-step small { display: none; }
  .flow-track > i { margin: 17px 4px 0; }
  .section-toolbar { align-items: flex-start; gap: 9px; }
  .section-toolbar > .primary-button { width: 40px; min-width: 40px; padding: 0; overflow: hidden; font-size: 0; }
  .segmented-control { max-width: calc(100vw - 80px); overflow-x: auto; }
  .segmented-control button { flex: 0 0 auto; padding: 0 11px; }
  .task-card { grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 16px; }
  .task-card .task-data { display: none; }
  .task-card .task-status { display: none; }
  .task-main h3 { font-size: calc(12px * var(--ui-font-scale)); }
  .task-actions .task-action:not(.open-official):last-child { display: none; }
  .platform-intro { align-items: flex-start; }
  .platform-intro h2 { font-size: calc(20px * var(--ui-font-scale)); }
  .platform-intro .adapter-count { display: none; }
  .platform-grid, .notification-layout, .security-grid, .settings-layout { grid-template-columns: 1fr; }
  .font-setting-row { grid-template-columns: 1fr; gap: 12px; }
  .font-scale-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .extension-panel { align-items: flex-start; flex-direction: column; }
  .capability-panel { padding: 15px; overflow: hidden; }
  .capability-table { overflow-x: auto; }
  .cap-row { min-width: 540px; }
  .security-hero { align-items: flex-start; padding: 22px; }
  .security-gauge { width: 72px; height: 72px; }
  .security-gauge::before { width: 56px; height: 56px; }
  .security-gauge strong { font-size: calc(19px * var(--ui-font-scale)); }
  .security-hero h2 { font-size: calc(17px * var(--ui-font-scale)); }
  .ios-note { grid-template-columns: 1fr; gap: 12px; }
  .sync-panel { align-items: flex-start; flex-direction: column; }
  .update-panel { grid-template-columns: 1fr; }
  .update-panel .sync-actions, .update-preferences, .update-progress { grid-column: 1; }
  .update-preferences { grid-template-columns: 1fr; }
  .sync-actions { width: 100%; flex-wrap: wrap; }
  .sync-actions .secondary-button, .sync-actions .primary-button { flex: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: 1; }
  .task-dialog form { padding: 23px 19px; }
  .smart-select-menu { position: fixed; z-index: 90; top: auto; right: 14px; bottom: calc(82px + env(safe-area-inset-bottom)); left: 14px; max-height: min(420px, 62vh); }
  .city-select-menu { max-height: min(420px, 62vh); }
  .city-option-list { max-height: 300px; }
  .date-time-panel { position: static; grid-template-columns: 1fr; margin-top: 8px; box-shadow: 0 12px 30px rgba(31,38,55,.12); }
  .calendar-section { border-right: 0; border-bottom: 1px solid var(--line); }
  .time-option-grid.hours { grid-template-columns: repeat(8, 1fr); }
  .progress-options { grid-template-columns: 1fr; }
  .mobile-nav { position: fixed; z-index: 50; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(6, 1fr); padding: 7px 5px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.96); box-shadow: 0 -5px 22px rgba(32,39,55,.08); backdrop-filter: blur(12px); }
  .mobile-nav button { position: relative; display: grid; justify-items: center; gap: 3px; padding: 2px; border: 0; color: #8b92a2; background: transparent; font-size: calc(8px * var(--ui-font-scale)); }
  .mobile-nav button.is-active { color: var(--brand); }
  .mobile-nav svg { width: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
  .mobile-nav .mobile-create { margin-top: -27px; color: var(--brand); }
  .mobile-create > span { display: grid; width: 48px; height: 48px; place-items: center; border: 5px solid var(--canvas); border-radius: 50%; color: #fff; background: var(--brand); box-shadow: 0 5px 14px rgba(255,107,53,.27); box-sizing: content-box; }
  .mobile-create small { color: var(--muted); font-size: calc(8px * var(--ui-font-scale)); }
  .mobile-update-badge { position: absolute; top: 0; left: calc(50% + 8px); width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; background: var(--danger); }
  .toast-region { right: 16px; bottom: calc(91px + env(safe-area-inset-bottom)); left: 16px; }
  .offline-banner { right: 12px; bottom: calc(85px + env(safe-area-inset-bottom)); left: 12px; }
}

@media (max-width: 420px) {
  .hero-meta span:nth-child(2) { display: none; }
  .task-preview-status { display: none; }
  .security-hero { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
