:root {
  --blue: #12337f;
  --blue-2: #315cc8;
  --blue-soft: #eef3ff;
  --yellow: #f1cd00;
  --bg: #f3f6fb;
  --card: #fff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #dbe3f0;
  --green: #16884f;
  --red: #c81e1e;
  --amber: #9a6a00;
  --shadow: 0 12px 36px rgba(18, 51, 127, .07);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { min-height: 100vh; margin: 0; background: radial-gradient(circle at 8% 0,rgba(49,92,200,.09),transparent 28rem),var(--bg); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { display: block; width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 .5rem; color: var(--blue-2); font-size: .75rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }

.loading-screen { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 1.2rem; background: var(--bg); }
.spinner { width: 28px; height: 28px; border: 3px solid #cfdaef; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin .8s linear infinite; }

.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 1.25rem; background: radial-gradient(circle at top right, #dfe8ff 0, transparent 34%), linear-gradient(145deg, #f7f9fd, #eef3fb); }
.auth-card { width: min(100%, 470px); padding: 2rem; border: 1px solid var(--border); border-radius: 28px; background: #fff; box-shadow: 0 28px 70px rgba(18,51,127,.14); }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: .8rem; margin-bottom: 2rem; color: var(--blue); font-weight: 900; }
.auth-logo-window { position: relative; width: 140px; height: 68px; overflow: hidden; flex: 0 0 auto; }
.auth-logo { position: absolute; top: -87px; left: -15px; width: 165px; max-width: none; height: auto; }
.auth-brand span { padding-left: .8rem; border-left: 1px solid var(--border); }
.auth-card h1 { margin: 0; color: #071126; font-size: clamp(1.8rem, 7vw, 2.35rem); line-height: 1.08; }
.auth-description { margin: .8rem 0 1.5rem; line-height: 1.6; }

.topbar { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.96); backdrop-filter: blur(14px); }
.topbar-inner { width: min(100%, 1480px); height: 68px; margin: auto; padding: 0 1.25rem; display: flex; align-items: center; gap: 1rem; }
.brand-button { display: flex; align-items: center; gap: .7rem; padding: 0; border: 0; background: transparent; color: var(--blue); text-align: left; }
.brand-mark { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 18px; background: var(--blue); color: var(--yellow); font-size: 1.75rem; font-weight: 1000; box-shadow: 0 7px 14px rgba(18,51,127,.18); }
.brand-mark.small { width: 42px; height: 42px; border-radius: 13px; font-size: 1.25rem; }
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy strong { letter-spacing: .02em; }
.brand-copy small { margin-top: .25rem; color: var(--muted); font-size: .72rem; font-weight: 700; }
.desktop-nav { flex: 1; display: flex; align-items: center; gap: .25rem; margin-left: .75rem; overflow-x: auto; scrollbar-width: none; }
.desktop-nav::-webkit-scrollbar { display: none; }
.nav-button { display: flex; align-items: center; gap: .45rem; height: 42px; padding: 0 .8rem; border: 0; border-radius: 12px; background: transparent; color: #53627b; font-size: .84rem; font-weight: 800; white-space: nowrap; }
.nav-button:hover { background: var(--blue-soft); color: var(--blue); }
.nav-button.active { background: var(--blue); color: #fff; box-shadow: 0 5px 12px rgba(18,51,127,.16); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .45rem; }
.icon-button { position: relative; display: grid; width: 42px; height: 42px; place-items: center; border: 0; border-radius: 12px; background: transparent; color: #526078; }
.icon-button:hover { background: #f1f5f9; }
.notification-button { border: 1px solid var(--border); background: #fff; }
.notification-count { position: absolute; top: -4px; right: -5px; min-width: 20px; padding: 2px 5px; border-radius: 999px; background: var(--yellow); color: var(--blue); font-size: .65rem; font-weight: 1000; }
.user-copy { max-width: 170px; margin: 0 .35rem; display: grid; text-align: right; line-height: 1.2; }
.user-copy strong { overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.user-copy small { margin-top: .2rem; color: var(--muted); font-size: .7rem; }

.page { width: min(100%, 1480px); min-height: calc(100vh - 68px); margin: auto; padding: 2rem 1.5rem 3rem; outline: none; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.page-header h1 { margin: 0; color: #020817; font-size: clamp(1.85rem, 4vw, 2.65rem); line-height: 1.08; letter-spacing: -.035em; }
.page-header p:not(.eyebrow) { max-width: 760px; margin: .75rem 0 0; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.page-actions { display: flex; align-items: center; gap: .6rem; }

.btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .65rem 1rem; border: 1px solid transparent; border-radius: 12px; font-weight: 850; transition: transform .12s, background .12s, border-color .12s, opacity .12s; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:disabled { cursor: not-allowed; opacity: .55; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #0d2867; }
.btn-secondary { border-color: var(--border); background: #fff; color: #344258; }
.btn-secondary:hover:not(:disabled) { border-color: #aebfe0; background: #f8faff; }
.btn-success { background: var(--green); color: #fff; }
.btn-danger { background: #c81e1e; color: #fff; }
.btn-ghost { background: transparent; color: var(--blue); }
.btn-large { min-height: 48px; width: 100%; font-size: 1rem; }
.btn-icon { width: 42px; min-width: 42px; padding: 0; }

.card { border: 1px solid var(--border); border-radius: 22px; background: var(--card); box-shadow: 0 2px 6px rgba(18,51,127,.025); }
.card-pad { padding: 1.25rem; }
.card-title { margin: 0; font-size: 1.08rem; font-weight: 950; }
.card-subtitle { margin: .35rem 0 0; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .85rem; }
.metric-card { padding: 1rem; }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.metric-icon { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid #d7e2ff; border-radius: 13px; background: var(--blue-soft); color: var(--blue); }
.metric-value { font-size: 1.9rem; font-weight: 1000; letter-spacing: -.04em; }
.metric-card p { margin: .7rem 0 0; color: #56647a; font-size: .84rem; font-weight: 800; }
.tone-red .metric-icon { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.tone-yellow .metric-icon { border-color: #f5e477; background: #fffbda; color: #7c6200; }
.tone-green .metric-icon { border-color: #bbf7d0; background: #f0fdf4; color: #15803d; }

.mirror-card { margin-bottom: 1.25rem; padding: 1rem; border-color: #cbd9f5; }
.mirror-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.mirror-card select { width: min(100%, 330px); }
.view-banner { display: flex; align-items: flex-start; gap: .65rem; margin-top: .9rem; padding: .8rem 1rem; border: 1px solid #f4d778; border-radius: 13px; background: #fff9df; color: #6f5200; font-size: .84rem; line-height: 1.5; }

.performance-hero { --goal-color: var(--yellow); position: relative; isolation: isolate; margin-bottom: 1.25rem; padding: 1.35rem; overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 28px; background: linear-gradient(135deg,#071b4c 0%,#12337f 52%,#244da8 100%); color: #fff; box-shadow: 0 22px 55px rgba(18,51,127,.22); }
.performance-hero.goal-below70 { --goal-color: #ff8b75; }
.performance-hero.goal-tier70 { --goal-color: #f1cd00; }
.performance-hero.goal-tier90 { --goal-color: #54d6a0; }
.performance-hero.goal-tier100 { --goal-color: #8bf0bd; background: linear-gradient(135deg,#052f30 0%,#0c6558 52%,#17875f 100%); }
.hero-orb { position: absolute; z-index: -1; border-radius: 50%; filter: blur(2px); pointer-events: none; }
.orb-one { top: -130px; right: -90px; width: 330px; height: 330px; background: radial-gradient(circle,rgba(241,205,0,.25),transparent 68%); }
.orb-two { bottom: -210px; left: 22%; width: 430px; height: 430px; background: radial-gradient(circle,rgba(96,136,255,.26),transparent 68%); }
.hero-topline { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.hero-tools { display: flex; align-items: center; justify-content: flex-end; gap: .6rem; }
.goal-month-picker { display: flex; align-items: center; gap: .5rem; padding: .35rem .45rem .35rem .7rem; border: 1px solid rgba(255,255,255,.17); border-radius: 999px; background: rgba(255,255,255,.09); color: #dbe6ff; font-size: .68rem; font-weight: 900; }
.goal-month-picker select { width: auto; min-width: 150px; min-height: 34px; padding: .35rem 1.9rem .35rem .65rem; border: 0; border-radius: 999px; background: #fff; color: var(--blue); font-size: .74rem; font-weight: 900; text-transform: capitalize; box-shadow: none; }
.hero-logo-window { position: relative; width: 200px; height: 98px; overflow: hidden; flex: 0 0 auto; }
.hero-logo-window img { position: absolute; top: -124px; left: -22px; width: 236px; max-width: none; height: auto; }
.hero-date { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem .75rem; border: 1px solid rgba(255,255,255,.17); border-radius: 999px; background: rgba(255,255,255,.09); color: #eaf0ff; font-size: .78rem; font-weight: 850; text-transform: capitalize; backdrop-filter: blur(8px); }
.hero-main { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 2rem; padding: .6rem .4rem 1.3rem; }
.hero-message { max-width: 800px; }
.hero-eyebrow { margin: 0 0 .6rem; color: var(--yellow); font-size: .73rem; font-weight: 950; letter-spacing: .15em; text-transform: uppercase; }
.hero-message h1 { max-width: 760px; margin: 0; font-size: clamp(2rem,5vw,3.35rem); line-height: .98; letter-spacing: -.055em; }
.hero-message > p:not(.hero-eyebrow) { max-width: 670px; margin: .9rem 0 0; color: #dbe6ff; font-size: .98rem; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.2rem; }
.hero-btn-primary { border-color: var(--yellow); background: var(--yellow); color: #102861; box-shadow: 0 9px 22px rgba(241,205,0,.2); }
.hero-btn-primary:hover:not(:disabled) { background: #ffe52e; }
.hero-btn-secondary { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.1); color: #fff; }
.hero-btn-secondary:hover:not(:disabled) { background: rgba(255,255,255,.17); }
.score-orbit { --score-angle: 0deg; position: relative; width: 184px; height: 184px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: conic-gradient(var(--goal-color) var(--score-angle),rgba(255,255,255,.15) 0deg); box-shadow: 0 15px 35px rgba(0,0,0,.22); }
.score-orbit::before { position: absolute; inset: 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; background: #102d72; content: ''; }
.score-orbit-inner { position: relative; z-index: 1; display: grid; justify-items: center; text-align: center; }
.score-orbit-inner span { color: #dbe6ff; font-size: .67rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.score-orbit-inner strong { margin: .25rem 0; color: #fff; font-size: 2.8rem; font-weight: 1000; letter-spacing: -.07em; line-height: 1; }
.score-orbit-inner small { color: var(--yellow); font-size: .72rem; font-weight: 900; }
.goal-thresholds { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .65rem; margin-bottom: .65rem; }
.goal-threshold { position: relative; min-width: 0; padding: .7rem .85rem; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(5,20,58,.24); opacity: .68; }
.goal-threshold::before { position: absolute; top: 0; right: .7rem; left: .7rem; height: 3px; border-radius: 0 0 5px 5px; background: rgba(255,255,255,.2); content: ''; }
.goal-threshold span,.goal-threshold small { display: block; color: #c8d6f5; font-size: .64rem; font-weight: 850; }
.goal-threshold strong { display: block; margin: .15rem 0; color: #fff; font-size: 1.1rem; font-weight: 1000; }
.goal-threshold.achieved { border-color: rgba(139,240,189,.45); background: rgba(22,136,79,.24); opacity: 1; }
.goal-threshold.achieved::before { background: #72e1aa; }
.goal-threshold.next { border-color: rgba(241,205,0,.6); background: rgba(241,205,0,.13); opacity: 1; }
.goal-threshold.next::before { background: var(--yellow); }
.hero-scoreboard { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .65rem; }
.hero-scoreboard > div { min-width: 0; padding: .85rem .9rem; border: 1px solid rgba(255,255,255,.13); border-radius: 15px; background: rgba(255,255,255,.08); backdrop-filter: blur(7px); }
.hero-scoreboard span,.hero-scoreboard small { display: block; overflow: hidden; color: #c8d6f5; font-size: .67rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.hero-scoreboard strong { display: block; margin: .25rem 0; color: var(--yellow); font-size: 1.65rem; font-weight: 1000; letter-spacing: -.04em; }
.hero-readonly { display: inline-flex; align-items: center; gap: .45rem; margin-top: .8rem; color: #dbe6ff; font-size: .72rem; font-weight: 800; }
.mission-metrics { margin-bottom: 1.25rem; }

.section-card { margin-top: 1.4rem; overflow: hidden; }
.mission-center { scroll-margin-top: 88px; border-color: #cbd8ef; box-shadow: var(--shadow); }
.section-head { min-height: 72px; padding: 1rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--border); }
.section-head h2 { margin: 0; font-size: 1.08rem; }
.section-head p { margin: .3rem 0 0; color: var(--muted); font-size: .82rem; }
.section-head .eyebrow { margin: 0 0 .25rem; color: var(--blue-2); font-size: .65rem; }
.tabs { display: flex; gap: .2rem; padding: .65rem 1rem 0; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab { min-height: 44px; padding: .6rem .9rem; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #5a687e; font-weight: 850; white-space: nowrap; }
.tab.active { border-color: var(--blue); color: var(--blue); }
.count-pill { display: inline-grid; min-width: 22px; margin-left: .3rem; padding: 2px 6px; place-items: center; border-radius: 999px; background: #eef2f7; font-size: .7rem; }
.task-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .85rem; padding: 1.15rem; }
.task-card { position: relative; padding: 1rem; overflow: hidden; border: 1px solid var(--border); border-radius: 17px; background: #fff; box-shadow: 0 7px 20px rgba(18,51,127,.045); }
.task-card::before { position: absolute; top: 0; right: 0; left: 0; height: 4px; background: var(--blue-2); content: ''; }
.task-card.task-assembly::before { background: #7257d9; }
.task-card.task-followup::before { background: #d58b00; }
.task-card.task-overdue::before { background: var(--red); }
.task-card-top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .8rem; }
.task-kind { color: #66758b; font-size: .65rem; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.task-points { display: inline-flex; padding: .3rem .55rem; border-radius: 999px; font-size: .68rem; font-weight: 1000; }
.task-points.positive { border: 1px solid #a7e3c1; background: #eaf8f0; color: #11683c; }
.task-points.lost { border: 1px solid #fecaca; background: #fef2f2; color: #b91c1c; }
.task-points.neutral { border: 1px solid #dbe3f0; background: #f4f7fb; color: #5a687e; }
.task-row { display: flex; gap: .75rem; }
.task-icon { display: grid; width: 44px; height: 44px; flex: 0 0 auto; place-items: center; border-radius: 13px; background: var(--blue-soft); color: var(--blue); }
.task-assembly .task-icon { background: #f1efff; color: #6146c7; }
.task-followup .task-icon { background: #fff5d8; color: #956400; }
.task-icon.late { background: #fef2f2; color: #b91c1c; }
.task-main { min-width: 0; flex: 1; }
.task-main h3 { overflow: hidden; margin: 0; font-size: .98rem; text-overflow: ellipsis; white-space: nowrap; }
.task-main .task-title { margin: .28rem 0 0; color: var(--blue-2); font-size: .82rem; font-weight: 850; }
.task-meta { display: flex; flex-wrap: wrap; gap: .3rem .75rem; margin-top: .55rem; color: var(--muted); font-size: .72rem; font-weight: 700; }
.task-card .btn { width: 100%; margin-top: .85rem; }
.task-card .task-action { min-height: 46px; }
.task-assembly .task-action:not(:disabled) { background: #5e43bc; }
.task-overdue .task-action:not(:disabled) { background: #b91c1c; }
.blocker { margin: .75rem 0 0; padding: .55rem .7rem; border-radius: 10px; background: #fff6db; color: #765700; font-size: .72rem; font-weight: 850; }
.badge { display: inline-flex; align-items: center; gap: .25rem; padding: .26rem .55rem; border: 1px solid var(--border); border-radius: 999px; background: #f8fafc; color: #4c5b70; font-size: .68rem; font-weight: 900; }
.badge-red { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.badge-green { border-color: #bbf7d0; background: #f0fdf4; color: #15803d; }
.badge-blue { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }
.badge-amber { border-color: #fde68a; background: #fffbeb; color: #92400e; }
.empty-state { min-height: 230px; display: grid; place-items: center; padding: 2rem; text-align: center; color: var(--muted); }
.empty-state strong { display: block; margin-top: .7rem; color: #334155; }

.journey-section { margin-top: 1.5rem; }
.journey-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.journey-heading h2 { margin: 0; font-size: 1.35rem; }
.journey-heading p:not(.eyebrow) { margin: .4rem 0 0; color: var(--muted); font-size: .85rem; }
.journey-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .85rem; }
.journey-card { padding: 1rem; box-shadow: 0 9px 25px rgba(18,51,127,.055); }
.journey-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; }
.journey-card-head h3 { overflow: hidden; margin: 0; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.journey-card-head p { margin: .3rem 0 0; color: var(--muted); font-size: .7rem; }
.journey-points { display: flex; align-items: baseline; gap: .2rem; flex: 0 0 auto; color: var(--blue); }
.journey-points strong { font-size: 1.45rem; font-weight: 1000; letter-spacing: -.04em; }
.journey-points span { color: var(--muted); font-size: .65rem; font-weight: 850; }
.journey-track { position: relative; display: grid; grid-template-columns: repeat(var(--journey-columns,4),minmax(0,1fr)); gap: .4rem; margin-top: 1rem; }
.journey-track::before { position: absolute; top: 20px; right: 10%; left: 10%; z-index: 0; height: 2px; background: #e2e8f3; content: ''; }
.journey-stage { position: relative; z-index: 1; min-width: 0; display: grid; justify-items: center; text-align: center; }
.journey-stage > span { display: grid; width: 40px; height: 40px; place-items: center; border: 3px solid #fff; border-radius: 50%; background: #e8edf5; color: #718096; box-shadow: 0 0 0 1px #d7dfec; }
.journey-stage > strong { width: 100%; overflow: hidden; margin-top: .45rem; color: #405069; font-size: .64rem; text-overflow: ellipsis; white-space: nowrap; }
.journey-stage > small { width: 100%; overflow: hidden; margin-top: .18rem; color: var(--muted); font-size: .57rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.journey-stage.stage-earned > span { background: var(--green); color: #fff; box-shadow: 0 0 0 1px #74c99d,0 5px 12px rgba(22,136,79,.2); }
.journey-stage.stage-earned > small { color: var(--green); }
.journey-stage.stage-today > span { background: var(--yellow); color: #4f4000; box-shadow: 0 0 0 1px #d6b700,0 5px 12px rgba(241,205,0,.22); }
.journey-stage.stage-today > small { color: #806700; }
.journey-stage.stage-missed > span,.journey-stage.stage-overdue > span { background: var(--red); color: #fff; box-shadow: 0 0 0 1px #e98d8d,0 5px 12px rgba(200,30,30,.18); }
.journey-stage.stage-missed > small,.journey-stage.stage-overdue > small { color: var(--red); }
.journey-stage.stage-waiting_schedule > span { border-style: dashed; background: #fff7db; color: #8a6500; box-shadow: 0 0 0 1px #efd576; }
.journey-stage.stage-waiting_schedule > small { color: #8a6500; }

.assembly-alert-section { margin: 1.25rem 0; overflow: hidden; border-color: #eed783; }
.assembly-alert-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .8rem; padding: 1rem; }
.assembly-alert-card { display: grid; align-content: start; gap: .75rem; padding: 1rem; border: 1px solid #e5d79d; border-radius: 16px; background: linear-gradient(145deg,#fffdf4,#fff); }
.assembly-alert-card.danger { border-color: #fecaca; background: #fff7f7; }
.assembly-alert-card h3 { margin: .6rem 0 0; font-size: 1rem; }
.assembly-alert-card p { margin: .25rem 0 0; color: var(--muted); font-size: .75rem; }
.assembly-alert-dates { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.assembly-alert-dates span { padding: .55rem; border-radius: 10px; background: rgba(255,255,255,.8); color: var(--muted); font-size: .68rem; }
.assembly-alert-dates strong { display: block; margin-top: .15rem; color: #344258; font-size: .78rem; }
.installer-line { display: flex; align-items: center; gap: .4rem; color: var(--blue) !important; font-weight: 850; }

.form-stack { display: grid; gap: 1rem; }
label { display: grid; gap: .45rem; color: #344258; font-size: .82rem; font-weight: 850; }
input, select, textarea { width: 100%; min-height: 43px; padding: .65rem .8rem; border: 1px solid #cfd9e8; border-radius: 11px; background: #fff; color: #0f172a; outline: 0; }
textarea { min-height: 100px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--blue-2); box-shadow: 0 0 0 3px rgba(49,92,200,.13); }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.span-2 { grid-column: span 2; }
.two-column { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(310px,.7fr); gap: 1rem; align-items: start; }
.stack { display: grid; gap: 1rem; }
.sticky { position: sticky; top: 90px; }
.summary-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid #edf1f6; font-size: .84rem; }
.summary-row span { color: var(--muted); }
.summary-row strong { max-width: 65%; text-align: right; }

.dropzone { min-height: 360px; display: grid; place-items: center; padding: 2rem; border: 2px dashed #b9c9eb; border-radius: 24px; background: #fff; color: #506078; text-align: center; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.dragging { border-color: var(--blue-2); background: #f9fbff; }
.drop-icon { display: grid; width: 76px; height: 76px; margin: 0 auto; place-items: center; border-radius: 24px; background: var(--blue-soft); color: var(--blue); font-size: 1.8rem; }
.dropzone strong { display: block; margin-top: 1.2rem; color: #0f172a; font-size: 1.2rem; }
.dropzone span { display: block; margin-top: .55rem; }
.steps-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .75rem; margin-top: 1rem; }
.step-card { padding: 1rem; }
.success-strip { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; border: 1px solid #bbf7d0; border-radius: 15px; background: #f0fdf4; color: #166534; }
.cancel-note-card { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; margin-top: 1rem; padding: 1.15rem; border-color: #fecaca; background: linear-gradient(135deg,#fff,#fff7f7); }
.cancel-note-card h2 { margin: 0; color: #7f1d1d; font-size: 1.05rem; }
.cancel-note-card p:not(.eyebrow) { max-width: 620px; margin: .35rem 0 0; color: #6b5560; font-size: .82rem; line-height: 1.5; }
.field-help { display: block; color: var(--muted); font-size: .72rem; font-weight: 650; line-height: 1.45; }
.disabled-field { color: #7d8999; }
.disabled-field input { background: #eef2f7; color: #8b96a6; }
.assembly-summary { margin-top: 1rem; }
.assembly-plan { padding: 1rem; border: 1px solid #d8e2f4; border-radius: 15px; background: #f8faff; }
.assembly-plan.disabled-field { opacity: .65; }
.assembly-plan-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; margin-bottom: 1rem; }
.assembly-plan-head > div > strong { color: var(--blue); font-size: .9rem; }
.assembly-plan-head p { margin: .3rem 0 0; color: var(--muted); font-size: .74rem; line-height: 1.45; }
.assembly-toggle { min-width: 126px; display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; padding: .2rem; border: 1px solid var(--border); border-radius: 11px; background: #f1f5f9; }
.assembly-toggle button { min-height: 34px; padding: .35rem .55rem; border: 0; border-radius: 8px; background: transparent; color: #64748b; font-size: .75rem; font-weight: 900; }
.assembly-toggle button.active.yes { background: var(--blue); color: #fff; box-shadow: 0 3px 8px rgba(18,51,127,.18); }
.assembly-toggle button.active.no { background: #475569; color: #fff; box-shadow: 0 3px 8px rgba(71,85,105,.18); }
.product-review-table td:nth-child(2) { min-width: 250px; }
.product-review-table tr.item-without-assembly { background: #f8fafc; }
.product-detail-row > span:last-child { display: grid; justify-items: end; gap: .35rem; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .82rem; }
th, td { padding: .8rem 1rem; border-bottom: 1px solid #e8edf5; text-align: left; vertical-align: top; }
th { background: #f8fafc; color: #59677d; font-size: .7rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }

.filter-row { display: grid; grid-template-columns: 1fr 240px; gap: .75rem; padding: 1rem; border-bottom: 1px solid var(--border); }
.search-box { position: relative; }
.search-box input { padding-left: 2.6rem; }
.search-box svg { position: absolute; top: 50%; left: .85rem; transform: translateY(-50%); color: #94a3b8; }
.order-list > article { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(170px,.6fr) minmax(220px,.75fr) auto; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--border); }
.order-list > article:last-child { border-bottom: 0; }
.order-list > article:hover { background: #fafcff; }
.order-main { min-width: 0; }
.order-main h3 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-main p { margin: .35rem 0 0; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.order-main .order-number { color: var(--blue-2); font-weight: 850; }
.date-pair { display: grid; gap: .5rem; font-size: .8rem; }
.date-pair div { display: flex; align-items: center; gap: .55rem; }
.address-copy { display: flex; align-items: flex-start; gap: .5rem; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.order-actions { display: flex; gap: .45rem; }

.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; border-bottom: 1px solid var(--border); }
.month-controls { display: flex; align-items: center; gap: .5rem; }
.month-controls h2 { min-width: 180px; margin: 0; text-align: center; font-size: 1.05rem; text-transform: capitalize; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); }
.calendar-weekdays div { padding: .65rem .25rem; background: #f8fafc; color: var(--muted); font-size: .68rem; font-weight: 900; text-align: center; text-transform: uppercase; }
.calendar-day { min-height: 132px; padding: .5rem; border-top: 1px solid var(--border); border-right: 1px solid var(--border); background: #fff; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.outside { background: #f8fafc; color: #c2cad6; }
.day-number { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; font-size: .78rem; font-weight: 850; }
.calendar-day.today .day-number { background: var(--blue); color: #fff; }
.calendar-event { width: 100%; margin-top: .28rem; padding: .35rem .45rem; overflow: hidden; border: 0; border-radius: 7px; font-size: .68rem; font-weight: 850; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event.delivery { background: #eaf1ff; color: #173f9f; }
.calendar-event.assembly { background: #fff5cf; color: #745800; }
.calendar-event.assembly-deadline { background: #fef2f2; color: #b91c1c; }

.team-list > article { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--border); }
.team-list > article:last-child { border-bottom: 0; }
.avatar { display: grid; width: 46px; height: 46px; flex: 0 0 auto; place-items: center; border-radius: 14px; background: var(--blue-soft); color: var(--blue); font-weight: 1000; }
.team-main { min-width: 0; flex: 1; }
.team-main h3 { margin: 0; }
.team-main p { margin: .2rem 0 0; color: var(--muted); font-size: .78rem; }
.team-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }

.template-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 1rem; }
.template-tabs { display: flex; gap: .4rem; padding: .55rem; margin-bottom: 1rem; overflow-x: auto; }
.template-tab { min-height: 40px; padding: .55rem .8rem; border: 0; border-radius: 10px; background: transparent; color: #526078; font-weight: 850; white-space: nowrap; }
.template-tab.active { background: var(--blue); color: #fff; }
.whatsapp-preview { min-height: 320px; padding: 1.2rem; background: #e7efe8; }
.message-bubble { max-width: 92%; padding: .9rem; border-radius: 14px 14px 14px 3px; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.07); font-size: .86rem; line-height: 1.55; white-space: pre-wrap; }
.placeholder-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.placeholder { padding: .38rem .55rem; border: 1px solid var(--border); border-radius: 8px; background: #f8fafc; color: var(--blue-2); font-family: ui-monospace, monospace; font-size: .72rem; font-weight: 800; }

.manual-hero { padding: 1.5rem; border-radius: 24px; background: linear-gradient(135deg,#12337f,#2855b1); color: #fff; }
.manual-hero h2 { margin: .4rem 0; font-size: 1.45rem; }
.manual-hero p { max-width: 880px; margin: 0; color: #dce6ff; line-height: 1.65; }
.manual-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .85rem; margin-top: 1rem; }
.manual-step { display: flex; gap: .85rem; padding: 1rem; }
.step-number { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 12px; background: var(--blue-soft); color: var(--blue); font-weight: 1000; }
.manual-step h3 { margin: 0; font-size: .95rem; }
.manual-step p { margin: .35rem 0 0; color: var(--muted); font-size: .82rem; line-height: 1.55; }

.danger-card { margin-top: 1rem; overflow: hidden; border-color: #fecaca; }
.danger-head { padding: 1rem 1.2rem; border-bottom: 1px solid #fecaca; background: #fef2f2; color: #991b1b; }
.danger-body { padding: 1.2rem; }
.danger-body p { max-width: 850px; color: #59677d; line-height: 1.65; }
.alert { padding: .85rem 1rem; border: 1px solid var(--border); border-radius: 13px; font-size: .84rem; line-height: 1.55; }
.alert p { margin: .25rem 0 0; }
.alert-danger { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.alert-warning { border-color: #fde68a; background: #fffbeb; color: #78350f; }
.alert-info { border-color: #bfdbfe; background: #eff6ff; color: #1e3a8a; }
.alert-success { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }

.app-dialog { width: min(94vw, 680px); max-height: 91vh; padding: 0; overflow: auto; border: 0; border-radius: 22px; box-shadow: 0 28px 80px rgba(5,18,50,.28); }
.app-dialog::backdrop { background: rgba(8,18,38,.52); backdrop-filter: blur(3px); }
.app-dialog.dialog-fallback:not([open]) { display: none; }
.app-dialog.dialog-fallback[open] { position: fixed; z-index: 100; top: 50%; left: 50%; inset: 50% auto auto 50%; display: block; margin: 0; transform: translate(-50%,-50%); box-shadow: 0 0 0 100vmax rgba(8,18,38,.52),0 28px 80px rgba(5,18,50,.28); }
.dialog-close { position: sticky; z-index: 3; top: .65rem; float: right; width: 38px; height: 38px; margin: .65rem .65rem -3rem 0; border: 0; border-radius: 50%; background: #eef2f7; color: #475569; font-size: 1.5rem; }
.dialog-body { padding: 1.5rem; }
.dialog-body h2 { margin: 0; color: var(--blue); font-size: 1.35rem; }
.dialog-description { margin: .4rem 0 1.2rem; color: var(--muted); line-height: 1.5; }
.dialog-section { margin-top: 1rem; padding: 1rem; border: 1px solid var(--border); border-radius: 16px; background: #fff; }
.dialog-section h3 { margin: 0 0 .75rem; font-size: .9rem; }
.outcome-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .5rem; }
.outcome-button { min-height: 44px; padding: .55rem; border: 1px solid var(--border); border-radius: 11px; background: #fff; color: #344258; font-weight: 800; text-align: left; }
.outcome-button.selected { border-color: var(--blue); background: var(--blue); color: #fff; }
.timeline { display: grid; gap: .65rem; }
.timeline-item { display: flex; gap: .7rem; padding: .75rem; border: 1px solid var(--border); border-radius: 13px; }
.timeline-dot { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #fff5cf; color: #795c00; }
.timeline-item.done .timeline-dot { background: #dcfce7; color: #15803d; }
.timeline-item h4 { margin: 0; font-size: .82rem; }
.timeline-item p { margin: .25rem 0 0; color: var(--muted); font-size: .74rem; line-height: 1.45; }

.toast-region { position: fixed; z-index: 200; top: 82px; right: 1rem; display: grid; gap: .55rem; width: min(92vw,390px); }
.toast { padding: .85rem 1rem; border: 1px solid var(--border); border-radius: 13px; background: #fff; box-shadow: var(--shadow); color: #334155; font-size: .84rem; font-weight: 750; animation: toast-in .2s ease-out; }
.toast.success { border-color: #bbf7d0; color: #166534; }
.toast.error { border-color: #fecaca; color: #991b1b; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

.mobile-nav { display: none; }

@media (max-width: 1100px) {
  .desktop-nav { margin-left: .25rem; }
  .nav-button { padding: 0 .55rem; }
  .nav-button span:last-child { display: none; }
  .order-list > article { grid-template-columns: 1fr 180px auto; }
  .address-copy { display: none; }
  .hero-scoreboard { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .assembly-alert-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 820px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .topbar-inner { height: 64px; padding: 0 .85rem; }
  .desktop-nav { display: none; }
  .brand-copy { display: none; }
  .user-copy { display: none; }
  .page { min-height: calc(100vh - 64px); padding: 1.25rem .9rem 2rem; }
  .page-header { align-items: flex-start; flex-direction: column; margin-bottom: 1.15rem; }
  .page-header h1 { font-size: 2rem; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hero-main { gap: 1.1rem; }
  .hero-tools { align-items: flex-end; flex-direction: column-reverse; }
  .score-orbit { width: 156px; height: 156px; }
  .score-orbit-inner strong { font-size: 2.3rem; }
  .task-grid { grid-template-columns: 1fr; padding: .8rem; }
  .journey-grid { grid-template-columns: 1fr; }
  .assembly-alert-grid { grid-template-columns: 1fr; }
  .two-column, .template-layout { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .order-list > article { grid-template-columns: 1fr; }
  .date-pair { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .order-actions { width: 100%; }
  .order-actions .btn:not(.btn-icon) { flex: 1; }
  .calendar-day { min-height: 94px; padding: .3rem; }
  .calendar-event { padding: .28rem; font-size: .61rem; }
  .calendar-toolbar { align-items: flex-start; flex-direction: column; }
  .manual-grid { grid-template-columns: 1fr; }
  .mobile-nav { position: fixed; z-index: 40; right: 0; bottom: 0; left: 0; inset: auto 0 0; display: grid; grid-template-columns: repeat(5,1fr); gap: .25rem; padding: .45rem .5rem max(.45rem,env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: rgba(255,255,255,.97); box-shadow: 0 -8px 28px rgba(15,35,75,.08); backdrop-filter: blur(14px); }
  .mobile-nav .nav-button { min-height: 54px; height: auto; padding: .35rem .2rem; flex-direction: column; gap: .25rem; border-radius: 12px; font-size: .66rem; }
  .mobile-nav .nav-button span:last-child { display: block; }
  .mobile-nav .nav-button.active { background: var(--blue-soft); color: var(--blue); box-shadow: none; }
}

@media (max-width: 560px) {
  .auth-card { padding: 1.4rem; border-radius: 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .mirror-row { align-items: stretch; flex-direction: column; }
  .mirror-card select { width: 100%; }
  .performance-hero { padding: 1rem; border-radius: 22px; }
  .hero-topline { min-height: 66px; align-items: flex-start; flex-direction: column; }
  .hero-tools { width: 100%; align-items: stretch; flex-direction: column; }
  .goal-month-picker { width: 100%; justify-content: space-between; border-radius: 13px; }
  .goal-month-picker select { min-width: 0; max-width: 64%; }
  .hero-logo-window { width: 160px; height: 79px; }
  .hero-logo-window img { top: -100px; left: -18px; width: 189px; }
  .hero-date { max-width: none; width: 100%; align-items: center; border-radius: 13px; font-size: .65rem; line-height: 1.35; }
  .hero-main { grid-template-columns: 1fr; justify-items: stretch; padding-top: .4rem; }
  .hero-message h1 { font-size: 2.25rem; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .score-orbit { width: 156px; height: 156px; justify-self: center; }
  .hero-scoreboard { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .goal-thresholds { grid-template-columns: repeat(3,minmax(0,1fr)); gap: .35rem; }
  .goal-threshold { padding: .65rem .5rem; }
  .hero-scoreboard > div { padding: .72rem; }
  .hero-scoreboard span,.hero-scoreboard small { white-space: normal; }
  .journey-heading { align-items: stretch; flex-direction: column; }
  .journey-heading .btn { width: 100%; }
  .journey-track { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .85rem .4rem; }
  .journey-track::before { display: none; }
  .steps-grid { grid-template-columns: 1fr; }
  .cancel-note-card { align-items: stretch; flex-direction: column; }
  .cancel-note-card .btn { width: 100%; }
  .assembly-plan-head { flex-direction: column; }
  .filter-row { grid-template-columns: 1fr; }
  .team-list > article { align-items: flex-start; flex-wrap: wrap; }
  .team-main { min-width: calc(100% - 64px); }
  .team-badges { width: 100%; justify-content: flex-start; padding-left: 60px; }
  .outcome-grid { grid-template-columns: 1fr; }
  .calendar-weekdays div { font-size: .58rem; }
  .calendar-day { min-height: 83px; }
  .day-number { width: 23px; height: 23px; font-size: .68rem; }
  .calendar-event { height: 21px; font-size: 0; }
  .calendar-event::before { content: ''; display: block; width: 8px; height: 8px; margin: auto; border-radius: 50%; background: currentColor; }
  th, td { padding: .7rem .75rem; }
}
