/* Signed-in app geometry lives here. Legacy/login shell rules exclude it. */
:root {
  --vc-ink: #eef1f6;
  --vc-muted: #a2adbd;
  --vc-surface: #101720;
  --vc-line: #26303c;
  --vc-accent: #a9e8cb;
  --vc-accent-ink: #10291d;
}

html.vc-app-active,
body.vc-app-active {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  scroll-behavior: auto;
}

body.vc-app-active {
  position: fixed;
  inset: 0;
  touch-action: manipulation;
}

.app-shell.vc-operational {
  position: fixed;
  inset: auto;
  top: var(--vc-viewport-top, 0px);
  left: var(--vc-viewport-left, 0px);
  width: var(--vc-viewport-width, 100%);
  height: var(--vc-viewport-height, 100dvh);
  max-width: none;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: #0a0f15;
  color: var(--vc-ink);
  --vc-safe-top: var(--safe-top, 0px);
  --vc-safe-right: var(--safe-right, 0px);
  --vc-safe-bottom: var(--safe-bottom, 0px);
  --vc-safe-left: var(--safe-left, 0px);
  --vc-header-height: 76px;
  --vc-nav-height: 64px;
  --vc-content-gap: 20px;
}

.app-shell.vc-operational .vc-main {
  position: relative;
  display: block;
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: var(--vc-content-gap) max(20px, var(--vc-safe-right)) 24px max(20px, var(--vc-safe-left));
  overflow-x: clip;
  overflow-y: auto;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  scroll-padding: 16px;
}

.vc-screen,
.vc-operational .main-flow > .vc-training {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

.vc-screen { display: grid; gap: 24px; }
.vc-operational h1, .vc-operational h2, .vc-operational h3, .vc-operational p { overflow-wrap: anywhere; }
.vc-operational h1, .vc-operational h2, .vc-operational h3 { color: var(--vc-ink); }
.vc-operational .vc-screen h1 { margin: 6px 0 8px; font-size: clamp(26px, 4vw, 36px); line-height: 1.14; letter-spacing: -0.8px; }
.vc-operational .vc-screen h2 { margin: 0; font-size: 21px; line-height: 1.25; letter-spacing: -0.35px; }
.vc-operational .vc-screen h3 { margin: 0; font-size: 19px; line-height: 1.3; }
.vc-operational .vc-screen p { margin: 0; font-size: 14px; line-height: 1.6; }
.vc-page-heading > p, .vc-page-heading > div > p, .vc-muted { color: var(--vc-muted); }
.vc-kicker { color: var(--vc-muted); font-size: 11px; font-weight: 650; letter-spacing: 1.2px; text-transform: uppercase; }
.vc-operational .vc-small { color: var(--vc-muted); font-size: 12px !important; line-height: 1.5; }

.vc-test-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: #c2cbd6; font-size: 11px; line-height: 1.4; }
.vc-test-banner strong { color: #d8c6a1; font-weight: 500; }
.vc-test-dot { width: 6px; height: 6px; border-radius: 50%; background: #d0b47c; }
.vc-test-divider { color: #596473; }
.vc-section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.vc-section-heading > div { flex: 1 1 210px; }
.vc-section-heading h2 { margin-top: 6px !important; }
.vc-focus-grid, .vc-plan-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.vc-card { border: 1px solid var(--vc-line); border-radius: 18px; background: var(--vc-surface); padding: 24px; min-width: 0; }
.vc-focus-card { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.vc-focus-card > h2 { font-size: 25px !important; letter-spacing: -0.6px !important; }
.vc-focus-card > .vc-button-primary { margin-top: auto; }
.vc-card-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; width: 100%; margin-bottom: 8px; }
.vc-icon-label { display: flex; align-items: center; gap: 10px; }
.vc-icon-label > svg { width: 21px; height: 21px; color: var(--vc-accent); }
.vc-pill { display: inline-flex; padding: 5px 8px; border: 1px solid #365042; border-radius: 6px; color: var(--vc-accent); font-size: 10px; line-height: 1.2; font-weight: 550; }
.vc-pill-muted { color: #b6c0cb; background: #19222c; border-color: #303b48; }
.vc-session-detail { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--vc-muted); font-size: 12px; line-height: 1.5; padding-bottom: 8px; }
.vc-session-status { color: var(--vc-accent); }
.vc-plan-state { color: #c8d1dc; font-size: 12px !important; padding: 4px 0 8px; }
.vc-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; padding: 11px 16px; border: 1px solid #36414f; border-radius: 9px; background: #19232e; color: var(--vc-ink); font: inherit; font-size: 13px; font-weight: 600; line-height: 1.35; text-align: center; cursor: pointer; touch-action: manipulation; }
.vc-button > svg { flex: 0 0 18px; width: 18px; height: 18px; }
.vc-button:hover { background: #24313e; border-color: #526271; }
.vc-button-primary { background: var(--vc-accent); border-color: var(--vc-accent); color: var(--vc-accent-ink); }
.vc-button-primary:hover { background: #c3f4dd; border-color: #c3f4dd; }
.vc-button-quiet { background: transparent; border-color: transparent; padding-inline: 0; color: #c5d4e0; justify-content: flex-start; }
.vc-button-quiet:hover { color: white; background: transparent; border-color: transparent; text-decoration: underline; }
.vc-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.vc-onboarding { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 18px 20px; background: #14241f; border: 1px solid #2b493a; border-radius: 12px; }
.vc-onboarding > div { flex: 1 1 240px; }
.vc-onboarding h2 { font-size: 16px !important; margin-bottom: 6px !important; }
.vc-onboarding p { font-size: 13px !important; color: #b0c6bb; }
.vc-legacy-notice { padding: 0 4px; }
.vc-legacy-notice h2 { font-size: 15px !important; margin-bottom: 6px !important; }
.vc-legacy-notice p { font-size: 13px !important; color: var(--vc-muted); }
.vc-feature-section { display: grid; gap: 12px; margin-top: 8px; }
.vc-feature-section > .vc-muted { font-size: 13px !important; }
.vc-feature-list { border-top: 1px solid var(--vc-line); }
.vc-feature-row { width: 100%; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 18px 0; border: 0; border-bottom: 1px solid var(--vc-line); background: transparent; color: var(--vc-ink); text-align: left; cursor: pointer; }
.vc-feature-row:hover .vc-feature-copy strong { color: var(--vc-accent); }
.vc-feature-icon { color: #7f8e9f; }
.vc-feature-icon svg { width: 20px; height: 20px; }
.vc-feature-copy { display: grid; gap: 5px; }
.vc-feature-copy strong { font-size: 14px; font-weight: 550; }
.vc-feature-copy > span { color: var(--vc-muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.vc-feature-state { color: var(--vc-muted); font-size: 10px; padding-left: 4px; }
.vc-plan-card { display: grid; gap: 12px; align-content: start; }
.vc-plan-card > .vc-button { justify-self: start; margin-top: 4px; }
.vc-plan-progress { display: grid; gap: 8px; }
.vc-progress-label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--vc-muted); font-size: 11px; }
.vc-plan-progress progress { display: block; width: 100%; height: 4px; overflow: hidden; border: none; border-radius: 4px; appearance: none; background: #283442; accent-color: var(--vc-accent); }
.vc-plan-progress progress::-webkit-progress-bar { background: #283442; }
.vc-plan-progress progress::-webkit-progress-value { background: var(--vc-accent); }
.vc-plan-progress progress::-moz-progress-bar { background: var(--vc-accent); }
.vc-empty-state { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding-block: 32px; }
.vc-empty-state > p { max-width: 540px; color: var(--vc-muted); }
.vc-empty-icon { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid #34483f; background: #16251f; border-radius: 14px; color: var(--vc-accent); }
.vc-empty-icon svg { width: 26px; height: 26px; }
.vc-locked-state > h1 { font-size: 28px !important; }
.vc-sync-notice { display: grid; gap: 12px; background: #2c251a; border: 1px solid #5d4a2c; border-radius: 12px; padding: 18px; color: #edd9b8; }
.vc-sync-notice h2 { font-size: 16px !important; }
.vc-sync-notice p { font-size: 13px !important; }
.vc-inline-heading { display: flex; align-items: center; gap: 10px; }
.vc-inline-heading svg { width: 22px; height: 22px; }
.vc-account-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 18px 0; border-top: 1px solid var(--vc-line); border-bottom: 1px solid var(--vc-line); }
.vc-account-strip > div { display: grid; gap: 5px; flex: 1 1 180px; }
.vc-account-strip strong { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.vc-account-avatar { display: grid; place-items: center; border: 1px solid var(--vc-line); border-radius: 50%; width: 42px; height: 42px; flex-shrink: 0; color: #c7d7e4; }
.vc-account-avatar svg { width: 22px; height: 22px; }
.vc-profile-form { display: grid; gap: 22px; }
.vc-profile-form fieldset { min-inline-size: 0; margin: 0; padding-top: 16px; }
.vc-profile-form legend { padding: 0 8px; font-size: 15px; font-weight: 600; }
.vc-profile-form fieldset > .vc-muted { margin-bottom: 20px; font-size: 13px; }
.vc-form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.vc-field { display: grid; align-content: start; gap: 8px; min-width: 0; margin: 0; }
.vc-field > span { font-size: 13px; font-weight: 550; }
.vc-required { display: inline-block; color: var(--vc-muted); font-size: 10px; font-weight: 400; margin-left: 6px; }
.vc-field > small { color: var(--vc-muted); font-size: 12px; line-height: 1.45; }
.vc-operational input, .vc-operational select, .vc-operational textarea { font-size: 16px !important; min-height: 48px; scroll-margin: 16px 0; }
.vc-field input, .vc-field select, .vc-field textarea { width: 100%; padding: 12px; background: #0b1119; border: 1px solid #364352; border-radius: 8px; color: var(--vc-ink); font-family: inherit; line-height: 1.3; }
.vc-field input::placeholder { color: #7c8a9a; }
.vc-field input[type="date"] { display: block; min-width: 0; max-width: 100%; }
.vc-operational :is(button, input, select, textarea, a):focus-visible { outline: 3px solid var(--vc-accent); outline-offset: 3px; }
.vc-form-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.vc-recovery { display: grid; gap: 14px; }
.vc-recovery h2 { font-size: 18px !important; }

.vc-topbar { position: relative; z-index: 2; background: rgba(10, 15, 21, 0.95); border-bottom: 1px solid #222d38; }
.vc-header-inner { width: 100%; max-width: 1000px; margin: 0 auto; padding: calc(12px + var(--vc-safe-top)) max(20px, var(--vc-safe-right)) 12px max(20px, var(--vc-safe-left)); display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: calc(var(--vc-header-height) + var(--vc-safe-top)); }
.vc-brand { display: inline-flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; color: var(--vc-ink); cursor: pointer; text-align: left; min-height: 44px; }
.vc-brand > span:last-child { display: grid; gap: 3px; }
.vc-brand strong { font-size: 17px; font-weight: 700; letter-spacing: -0.5px; }
.vc-brand small { color: var(--vc-muted); font-size: 10px; }
.vc-brand-mark { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; background: var(--vc-accent); color: var(--vc-accent-ink); font-size: 17px; font-style: italic; font-weight: 800; letter-spacing: -5px; padding-right: 6px; border-radius: 9px; }
.vc-brand-mark > span { font-size: 14px; padding-top: 3px; }
.vc-header-actions { display: flex; align-items: center; gap: 12px; }
.vc-sync-label { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--vc-muted); line-height: 1.3; max-width: 110px; }
.vc-sync-label > i { width: 5px; height: 5px; border-radius: 50%; background: #8996a6; flex-shrink: 0; }
.vc-sync-problem { color: #dfc18d; }
.vc-sync-problem > i { background: #dfc18d; }
.vc-profile-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; border: 1px solid #303e4c; border-radius: 50%; background: #18222d; color: #c5d7e4; cursor: pointer; }
.vc-profile-button svg { width: 21px; height: 21px; }
.vc-nav-dock { position: relative; z-index: 2; padding: 8px max(14px, var(--vc-safe-right)) calc(12px + var(--vc-safe-bottom)) max(14px, var(--vc-safe-left)); }
.vc-bottom-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; max-width: 520px; height: var(--vc-nav-height); margin: 0 auto; padding: 6px 8px; border: 1px solid #34414e; border-radius: 22px; background: rgba(16, 23, 32, 0.97); box-shadow: 0 8px 30px #0008; }
.vc-nav-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 50px; padding: 5px; border: 0; border-radius: 12px; color: #9caabc; background: transparent; font-size: 10px; font-weight: 500; cursor: pointer; touch-action: manipulation; }
.vc-nav-tab svg { width: 21px; height: 21px; }
.vc-nav-tab.active { color: var(--vc-accent); background: #a9e8cb0d; }
.vc-keyboard-open .vc-nav-dock { display: none; }

/* In the installed app the dock reaches the bottom. Reserve the gesture area
   inside its background, rather than lifting the whole bar above that area. */
.vc-operational.standalone-shell .vc-nav-dock {
  padding: 0 var(--vc-safe-right) 0 var(--vc-safe-left);
  border-top: 1px solid var(--vc-line);
  background: var(--vc-surface);
}
.vc-operational.standalone-shell .vc-bottom-nav {
  height: calc(var(--vc-nav-height) + var(--vc-safe-bottom));
  padding-bottom: calc(6px + var(--vc-safe-bottom));
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

/* Training module shares the shell but owns its view markup. */
.vc-training { display: grid; gap: 20px; }
.vc-training-hero { display: grid; gap: 12px; padding: 24px; border: 1px solid #33473e; border-radius: 18px; background: #13221b; }
.vc-training-hero h1, .vc-training-hero h2 { margin: 0; line-height: 1.2; letter-spacing: -0.6px; }
.vc-training-hero p { margin: 0; color: #bbcfc2; font-size: 14px; line-height: 1.6; }
.vc-training-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: #b8c4d1; font-size: 13px; line-height: 1.5; }
.vc-training-nav { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.vc-training-nav > select { flex: 1 1 220px; }
.vc-training-days { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.vc-training-day { display: grid; align-content: start; gap: 14px; padding: 20px; border: 1px solid var(--vc-line); background: var(--vc-surface); border-radius: 14px; }
.vc-training-day h2, .vc-training-day h3 { margin: 0; font-size: 18px; line-height: 1.35; }
.vc-training-day p { margin: 0; color: var(--vc-muted); font-size: 14px; line-height: 1.6; }
.vc-training-day-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px; }
.vc-training-day-head > div { min-width: 0; }
.vc-training-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--vc-muted); font-size: 12px; }
.vc-training-status select { width: 100%; }
.vc-training-notes, .vc-training-fuel-link { display: grid; gap: 8px; color: #c9d2de; font-size: 13px; }
.vc-training-notes textarea { width: 100%; min-height: 86px; resize: vertical; }
.vc-training-fuel-link select { width: 100%; }
.vc-training-empty { display: grid; justify-items: start; gap: 16px; padding: 28px; border: 1px solid var(--vc-line); border-radius: 18px; background: var(--vc-surface); }
.vc-training-warning { border: 1px solid #67532f; border-radius: 12px; padding: 16px; color: #e3cea9; background: #292217; line-height: 1.55; font-size: 13px; }
.vc-training :is(input, select, textarea) { width: 100%; padding: 11px 12px; border: 1px solid #364352; border-radius: 8px; background: #0b1119; color: var(--vc-ink); }
.vc-training .btn { min-height: 44px; }
.vc-training .vc-button.is-selected,
.vc-training .vc-button[aria-pressed="true"] { background: #264837; border-color: #89bda1; color: #d5f2e1; }
.vc-training :is(.is-today, [data-today="true"]) { border-color: #82bda2; }

@media (min-width: 760px) {
  .vc-focus-grid, .vc-plan-grid, .vc-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vc-focus-card { min-height: 294px; }
  .vc-screen { gap: 28px; }
  .vc-profile { max-width: 760px; }
  .vc-training-days { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 390px) {
  .vc-card { padding: 20px; }
  .vc-header-inner { gap: 8px; }
  .vc-header-actions { gap: 8px; }
  .vc-sync-label { max-width: 78px; font-size: 9px; }
  .vc-feature-row { grid-template-columns: 24px minmax(0, 1fr) auto; gap: 8px; }
  .vc-feature-state { max-width: 60px; }
}

@media (prefers-reduced-motion: reduce) {
  .vc-operational *, .vc-operational *::before, .vc-operational *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

@media print {
  @page { margin: 12mm; background: white; }
  :root { color-scheme: light; --bg: #fff; --text: #111; }
  .vc-topbar, .vc-nav-dock, .vc-bottom-nav, .vc-test-banner { display: none !important; }
  .app-shell.vc-operational::before, .app-shell.vc-operational::after,
  html.pwa-standalone .app-shell.vc-operational.standalone-shell:not(.auth-shell)::after { display: none !important; content: none !important; }
  .app-shell.vc-operational .main-flow { display: none !important; }
  html:has(.app-shell.vc-operational), body:has(.app-shell.vc-operational),
  .app-shell.vc-operational,
  html.pwa-standalone .app-shell.vc-operational.standalone-shell {
    position: static !important;
    inset: auto !important;
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    contain: none !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
  }
  .app-shell.vc-operational .print-only { display: block !important; padding: 0; }
  .app-shell.vc-operational .print-only * { color: #111 !important; background: transparent !important; box-shadow: none !important; }
}

/* Account status remains live without replacing focused forms. */
.vc-cloud-feedback { grid-column: 1 / -1; font-size: 13px; color: #a1afb9; margin-bottom: 12px; }
.vc-cloud-feedback p { margin: 0 0 6px; }
.vc-cloud-feedback [hidden] { display: none !important; }
.vc-cloud-feedback .btn { margin: 0 4px 4px 0; }
.vc-development-label { color: #b5c3ca; font-size: 13px; }
.vc-username-anchor { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.auth-form input { font-size: 16px; }

/* Account-scoped provider controls; no connection is implied by a developer registration. */
.vc-connections { display: grid; gap: 16px; min-width: 0; }
.vc-connections-grid { display: grid; gap: 16px; min-width: 0; }
.vc-connection-card { display: grid; align-content: start; gap: 12px; min-width: 0; }
.vc-connection-card h3, .vc-connection-card p { margin: 0; }
.vc-connection-card .vc-card-heading { align-items: start; gap: 12px; }
.vc-connection-card .vc-card-heading h3 { font-size: 18px; overflow-wrap: anywhere; }
.vc-connection-card .vc-pill { flex-shrink: 0; }
.vc-connection-feedback { color: #a1afb9; font-size: 13px; line-height: 1.5; }
.vc-connection-attention { color: #e3cea9; font-size: 13px; line-height: 1.5; }
.vc-connections button:disabled { opacity: .48; cursor: not-allowed; }
.vc-callback-page { --vc-ink: #edf2f7; --vc-line: #283442; --vc-surface: #111923; --vc-accent: #a7d6bd; margin: 0; min-height: 100svh; padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); box-sizing: border-box; display: grid; align-items: center; background: #080c12; color: #edf2f7; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.vc-callback-card { width: 100%; max-width: 520px; box-sizing: border-box; margin-inline: auto; padding: 28px; border: 1px solid #283442; border-radius: 20px; background: #111923; }
.vc-callback-card h1 { font-size: clamp(26px, 6vw, 34px); line-height: 1.15; overflow-wrap: anywhere; }
.vc-callback-card p { color: #b8c5d3; line-height: 1.6; }
.vc-callback-card a { margin-top: 12px; text-decoration: none; }
.vc-callback-card a:focus-visible { outline: 3px solid #a7d6bd; outline-offset: 4px; }
@media (min-width: 760px) { .vc-connections-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
