:root {
  --blue: #155ee8;
  --blue-2: #0d72ff;
  --blue-dark: #103b9c;
  --blue-50: #eef5ff;
  --blue-100: #dceaff;
  --ink: #14213d;
  --text: #27344f;
  --muted: #74809a;
  --line: #e2e8f2;
  --line-strong: #d3dceb;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --bg: #f3f6fb;
  --green: #169b62;
  --green-50: #eaf8f1;
  --orange: #f08a24;
  --orange-50: #fff4e9;
  --red: #e84b55;
  --red-50: #fff0f2;
  --violet: #7856d8;
  --violet-50: #f3efff;
  --shadow: 0 12px 36px rgba(23, 43, 83, .08);
  --shadow-sm: 0 5px 18px rgba(23, 43, 83, .07);
  --radius: 18px;
  --radius-sm: 12px;
  --font: Inter, Pretendard, "Noto Sans KR", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid rgba(21, 94, 232, .22); outline-offset: 2px; }
button:disabled { opacity: .58; cursor: wait; }
h1, h2, h3, h4, p { margin-top: 0; }
svg.icon { flex: 0 0 auto; }
.muted { color: var(--muted); }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 850; letter-spacing: -.02em; font-size: 22px; }
.brand img { display: block; }
.eyebrow { display: inline-block; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; }

.btn { border: 1px solid transparent; border-radius: 11px; min-height: 42px; padding: 0 17px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 750; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease; background: white; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: white; background: linear-gradient(135deg, var(--blue-2), var(--blue)); box-shadow: 0 8px 18px rgba(21, 94, 232, .22); }
.btn-primary:hover { box-shadow: 0 11px 23px rgba(21, 94, 232, .28); }
.btn-secondary { background: white; color: var(--blue); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: #a9c4f5; background: var(--blue-50); }
.btn-quiet { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.btn-quiet:hover { background: var(--blue-50); color: var(--blue); }
.btn-danger-quiet { background: var(--red-50); color: var(--red); border-color: #ffd8dd; }
.btn-large { min-height: 50px; padding-inline: 23px; font-size: 16px; }
.btn-small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.icon-btn { border: 0; width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: transparent; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--blue-50); color: var(--blue); }
.text-link { border: 0; background: transparent; color: var(--blue); font-weight: 750; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; padding: 5px; }
.back-link { border: 0; background: transparent; color: var(--muted); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 7px 0; }
.back-link:hover { color: var(--blue); }

input, select, textarea { width: 100%; border: 1px solid var(--line-strong); background: white; border-radius: 11px; color: var(--text); transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
input, select { min-height: 46px; padding: 0 13px; }
textarea { min-height: 118px; padding: 13px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(21, 94, 232, .09); outline: none; }
label { font-weight: 700; color: var(--text); }
label input, label select, label textarea { margin-top: 7px; font-weight: 500; }
.field-label { display: block; font-size: 14px; font-weight: 750; color: var(--text); margin: 16px 0 8px; }
.field-help { margin: 8px 0 0; color: var(--muted); font-size: 13px; }

.status-pill { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 5px 10px; font-weight: 750; font-size: 12px; white-space: nowrap; }
.status-done { background: var(--green-50); color: var(--green); }
.status-needed { background: var(--orange-50); color: #d56f0d; }
.status-soft { background: var(--blue-50); color: var(--blue); }
.count-chip { border-radius: 999px; background: var(--blue-50); color: var(--blue); font-size: 12px; font-weight: 800; padding: 5px 10px; }
.count-chip.warning { background: var(--orange-50); color: var(--orange); }
.mode-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 850; letter-spacing: .04em; }
.mode-pill.cloud, .mode-pill.demo, .mode-pill.cloud { background: var(--green-50); color: var(--green); }
.mode-pill.demo { background: var(--violet-50); color: var(--violet); }
.demo-chip { background: var(--violet-50); color: var(--violet); border-radius: 999px; padding: 5px 8px; font-size: 11px; font-weight: 800; }

.avatar { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 13px; font-weight: 850; flex: 0 0 auto; }
.avatar-blue { background: var(--blue-100); color: var(--blue); }
.avatar-green { background: var(--green-50); color: var(--green); }
.avatar-dark { background: var(--ink); color: white; }

.full-loading, .fatal-error { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; text-align: center; }
.spinner { width: 38px; height: 38px; border: 3px solid var(--blue-100); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.fatal-error h1 { color: var(--ink); }

/* Login */
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(420px, .75fr); background: white; }
.login-visual { position: relative; overflow: hidden; padding: 46px 64px; background: linear-gradient(145deg, #edf5ff 0%, #f7faff 55%, #e8f1ff 100%); display: flex; flex-direction: column; }
.login-visual::before { content: ""; position: absolute; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(13,114,255,.22), rgba(13,114,255,0) 67%); right: -150px; bottom: -170px; }
.login-visual::after { content: ""; position: absolute; inset: auto 8% 10% auto; width: 340px; height: 250px; border: 1px solid rgba(21,94,232,.12); border-radius: 42px; transform: rotate(-8deg); box-shadow: 0 0 0 28px rgba(21,94,232,.035), 0 0 0 58px rgba(21,94,232,.025); }
.login-copy { position: relative; z-index: 1; margin: auto 0; max-width: 700px; }
.login-copy h1 { color: var(--ink); font-size: clamp(42px, 4.5vw, 72px); line-height: 1.09; letter-spacing: -.055em; margin-bottom: 24px; }
.login-copy > p { font-size: 19px; color: #586681; max-width: 650px; line-height: 1.75; }
.login-feature-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.login-feature-row span { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.82); border: 1px solid rgba(21,94,232,.1); border-radius: 999px; padding: 10px 14px; color: var(--blue-dark); font-weight: 700; font-size: 13px; }
.login-panel-wrap { display: flex; align-items: center; justify-content: center; padding: 45px; background: #fff; }
.login-panel { width: min(460px, 100%); }
.login-panel-head h2 { color: var(--ink); font-size: 32px; letter-spacing: -.03em; margin: 17px 0 8px; }
.login-panel-head p { color: var(--muted); margin-bottom: 28px; }
.stack-form { display: grid; gap: 18px; }
.demo-account-list { display: grid; gap: 12px; }
.demo-account { width: 100%; border: 1px solid var(--line); border-radius: 14px; background: white; padding: 15px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.demo-account:hover { border-color: #b6cdf5; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.demo-account.admin { border-color: #d9d3f2; background: #fbfaff; }
.demo-account span:nth-child(2) { display: grid; }
.demo-account strong { color: var(--ink); font-size: 15px; }
.demo-account small { color: var(--muted); margin-top: 2px; }
.login-footnote { color: var(--muted); background: var(--surface-2); border-radius: 11px; padding: 12px 14px; margin-top: 22px; font-size: 12px; line-height: 1.55; }
.password-guidance { margin: -3px 0 2px; color: var(--muted); font-size: 11px; line-height: 1.6; }

/* Partner */
.partner-shell { min-height: 100vh; background: #f7f9fc; }
.partner-header { height: 76px; padding: 0 42px; background: white; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; position: sticky; top: 0; z-index: 30; }
.partner-nav { display: flex; align-self: stretch; }
.nav-tab { border: 0; border-bottom: 3px solid transparent; background: transparent; min-width: 120px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-weight: 750; cursor: pointer; }
.nav-tab:hover { color: var(--blue); background: var(--blue-50); }
.nav-tab.active { color: var(--blue); border-bottom-color: var(--blue); }
.partner-user { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.user-name { font-weight: 750; color: var(--ink); }
.language-select { width: auto; min-height: 36px; padding: 0 30px 0 10px; border-radius: 9px; font-size: 12px; }
.partner-main { width: min(1060px, calc(100% - 40px)); margin: 0 auto; padding: 55px 0 80px; }
.partner-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; margin-bottom: 27px; }
.partner-page-head.simple { align-items: flex-start; }
.partner-page-head h1, .entry-heading h1 { font-size: 38px; color: var(--ink); letter-spacing: -.04em; margin: 0 0 8px; }
.partner-page-head p, .entry-heading p { color: var(--muted); margin: 0; }
.simple-summary { background: white; border: 1px solid var(--line); border-radius: var(--radius); display: flex; align-items: center; padding: 20px 26px; margin-bottom: 17px; box-shadow: var(--shadow-sm); }
.simple-summary > div:not(.summary-divider) { min-width: 210px; display: grid; gap: 3px; }
.simple-summary strong { color: var(--ink); font-size: 22px; }
.simple-summary span { color: var(--muted); font-size: 13px; }
.summary-divider { width: 1px; height: 43px; background: var(--line); margin: 0 34px; }
.input-guide { border: 1px solid #cfdef8; background: linear-gradient(90deg, #f6faff, #fff); border-radius: 14px; padding: 17px 20px; display: flex; align-items: center; gap: 16px; margin-bottom: 18px; color: var(--muted); }
.input-guide.compact { margin-bottom: 18px; }
.input-guide > strong { color: var(--ink); margin-right: 5px; }
.guide-step { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.guide-step b { width: 28px; height: 28px; border-radius: 50%; background: #edf1f7; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.guide-step.active { color: var(--blue); }
.guide-step.active b { background: var(--blue); color: white; }
.partner-card { background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-section-head { display: flex; justify-content: space-between; align-items: center; padding: 22px 26px 17px; }
.card-section-head h2 { color: var(--ink); margin: 0; font-size: 20px; }
.card-section-head > span { background: var(--blue-50); color: var(--blue); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800; }
.partner-project-list { padding: 0 16px 16px; }
.partner-project-row { border: 1px solid var(--line); border-radius: 14px; padding: 19px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 17px; margin-top: 10px; background: #fff; }
.partner-project-row.done { background: #fbfdfc; border-color: #dcefe6; }
.project-row-icon { width: 46px; height: 46px; border-radius: 14px; background: var(--blue-50); color: var(--blue); display: flex; align-items: center; justify-content: center; }
.partner-project-row.done .project-row-icon { background: var(--green-50); color: var(--green); }
.project-row-title { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; color: var(--ink); }
.project-row-title strong { font-size: 16px; }
.project-row-title b { font-weight: 650; }
.project-row-title span { color: #a1aabd; }
.project-row-meta { display: flex; gap: 13px; align-items: center; margin-top: 7px; min-width: 0; }
.project-row-meta > span { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
.last-summary { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 380px; }
.project-row-action { display: flex; align-items: center; gap: 11px; }
.partner-bottom-nav { display: none; }

/* Partner entry */
.entry-top-row { display: grid; grid-template-columns: 160px 1fr 160px; align-items: start; margin-bottom: 25px; }
.entry-heading { text-align: center; }
.autosave-indicator { color: var(--green); font-size: 12px; font-weight: 750; display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; padding-top: 8px; }
.wizard-progress { border: 1px solid #cfdef8; background: linear-gradient(90deg, #f6faff, #fff); border-radius: 14px; padding: 14px 18px; display: flex; align-items: center; justify-content: center; gap: 13px; margin-bottom: 18px; color: var(--muted); }
.wizard-progress > span { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 750; white-space: nowrap; }
.wizard-progress b { width: 26px; height: 26px; border-radius: 50%; background: #e9eef6; display: inline-flex; align-items: center; justify-content: center; }
.wizard-progress > span.active { color: var(--blue); }
.wizard-progress > span.active b { background: var(--blue); color: white; }
.partner-entry-form { background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.new-project-form { max-width: 820px; margin: 0 auto; }
.new-project-top-row { max-width: 820px; margin-left: auto; margin-right: auto; }
.new-project-fields { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; }
.new-project-fields .field-label { margin: 0; color: var(--ink); font-weight: 750; }
.new-project-fields input { margin-top: 8px; min-height: 52px; font-size: 15px; font-weight: 650; }
.new-project-actions { align-items: center; }
.entry-section { padding: 25px 30px; border-bottom: 1px solid var(--line); }
.entry-section.numbered { display: grid; grid-template-columns: 42px 1fr; gap: 18px; }
.entry-wizard-step[hidden] { display: none; }
.section-number { width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: white; display: flex; align-items: center; justify-content: center; font-weight: 850; }
.section-content h2 { font-size: 18px; color: var(--ink); margin: 5px 0 17px; }
.question-kicker { color: var(--blue); font-size: 11px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.question-help { color: var(--muted); font-size: 13px; margin: -8px 0 16px; }
.project-picker-section { background: linear-gradient(90deg, #fbfdff, #fff); }
.project-picker-section .field-label { margin-top: 0; }
.large-select { min-height: 52px; font-size: 16px; font-weight: 700; color: var(--ink); }
.previous-note { margin-top: 12px; display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; align-items: start; background: var(--surface-2); border-radius: 11px; padding: 12px 14px; }
.previous-note span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 750; }
.previous-note p { margin: 0; color: #59667e; font-size: 13px; }
.recall-card { margin-top: 10px; border: 1px solid #cfe0ff; background: #f5f9ff; border-radius: 11px; padding: 12px 14px; display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; align-items: center; }
.recall-card > span { color: var(--blue); font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }
.recall-card strong { color: var(--ink); font-size: 14px; }
.recall-card small { grid-column: 2; color: var(--muted); }
.choice-grid { display: grid; gap: 9px; }
.choice-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.choice-grid.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.choice-grid.guided-options { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.choice-grid.compact-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice-radio { position: relative; cursor: pointer; }
.choice-checkbox { position: relative; cursor: pointer; }
.choice-radio input, .choice-checkbox input { position: absolute; opacity: 0; pointer-events: none; }
.choice-radio span, .choice-checkbox span { min-height: 45px; border: 1px solid var(--line-strong); background: white; border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 7px 10px; color: #5f6c84; font-size: 13px; font-weight: 750; text-align: center; transition: .15s; }
.choice-radio span::before, .choice-checkbox span::before { content: ""; width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; border: 1px solid #bcc5d4; margin-right: 7px; }
.choice-checkbox span::before { border-radius: 3px; }
.choice-radio:hover span, .choice-checkbox:hover span { border-color: #a9c4f5; background: var(--blue-50); }
.choice-radio input:checked + span, .choice-checkbox input:checked + span { border-color: var(--blue); color: var(--blue); background: var(--blue-50); box-shadow: inset 0 0 0 1px var(--blue); }
.choice-radio input:checked + span::before, .choice-checkbox input:checked + span::before { background: var(--blue); border-color: var(--blue); box-shadow: inset 0 0 0 2px white; }
.choice-radio input:focus-visible + span, .choice-checkbox input:focus-visible + span { outline: 3px solid rgba(21, 94, 232, .28); outline-offset: 2px; }
.status-confirm-block { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line-strong); }
.no-change-reason-panel { display: none; margin-top: 17px; padding: 16px; border-radius: 12px; background: #fffaf1; border: 1px solid #f2dfb3; }
.no-change-reason-panel.visible { display: block; }
.wizard-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.checkpoint-panel { margin-top: 24px; padding: 18px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.checkpoint-panel h3 { color: var(--ink); margin: 0 0 5px; font-size: 16px; }
.checkpoint-panel > p, .generated-summary > p { color: var(--muted); font-size: 12px; margin: 0 0 14px; }
.checkpoint-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sentence-stack { display: grid; gap: 12px; margin-top: 18px; }
.multi-sentence-row { min-width: 0; }
.multi-sentence-row[hidden] { display: none; }
.multi-sentence-row .sentence-builder-card { margin: 0; }
.sentence-builder-card { position: relative; overflow: hidden; padding: 15px 16px 13px; border: 1px solid #bfd4fa; border-radius: 14px; background: linear-gradient(135deg, #f7fbff 0%, #fff 58%, #fffaf0 100%); box-shadow: 0 8px 24px rgba(33, 86, 170, .08); animation: sentence-pop .24s ease-out; }
.sentence-builder-card[hidden] { display: none; }
.sentence-builder-card::after { content: ""; position: absolute; width: 86px; height: 86px; right: -38px; top: -48px; border-radius: 50%; background: radial-gradient(circle, rgba(255,211,83,.35), transparent 68%); pointer-events: none; }
.sentence-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; color: var(--blue); font-size: 12px; }
.sentence-card-head strong { font-size: 13px; }
.sentence-sparkle { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #8d6500; background: #fff1a8; box-shadow: 0 0 0 4px rgba(255,226,92,.16); }
.sentence-complete-label { margin-left: auto; color: var(--muted); font-weight: 700; }
.sentence-builder-card.complete .sentence-complete-label { color: #15835f; }
.sentence-builder-card.complete .sentence-sparkle { color: white; background: #25a979; box-shadow: 0 0 0 4px rgba(37,169,121,.13); }
.sentence-compose-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 7px; color: #1a2a47; font-size: 17px; font-weight: 650; line-height: 1.85; }
.sentence-answer-wrap { flex: 1 1 260px; min-width: min(260px, 100%); }
.sentence-answer-wrap[hidden] { display: none; }
input.sentence-blank { width: 100%; min-height: 39px; padding: 5px 9px 4px; border: 0; border-bottom: 2px solid #77a8ff; border-radius: 8px 8px 3px 3px; outline: 0; background: linear-gradient(180deg, rgba(255,246,174,.18), rgba(255,236,105,.46)); color: #155ee8; font: inherit; font-weight: 800; transition: .18s ease; }
input.sentence-blank::placeholder { color: #6e86ad; font-weight: 650; opacity: .88; }
input.sentence-blank:placeholder-shown { border-bottom-color: #edb82e; animation: blank-glow 1.8s ease-in-out infinite; }
input.sentence-blank:focus { background: #fff; border-bottom-color: var(--blue); box-shadow: 0 7px 18px rgba(21,94,232,.12); }
.sentence-format-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 11px; padding-top: 10px; border-top: 1px dashed #d4e0f4; }
[data-format-shell][hidden] { display: none; }
.sentence-format-toolbar > span { color: var(--muted); font-size: 11px; font-weight: 750; margin-right: 3px; }
.format-tool, .format-reset { min-width: 29px; height: 29px; border: 1px solid #cdd9ea; border-radius: 7px; background: white; color: #4c5c76; cursor: pointer; }
.format-tool:hover, .format-tool.active { border-color: var(--blue); background: var(--blue-50); color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.format-divider { width: 1px; height: 20px; background: var(--line); margin: 0 3px; }
.format-swatch { min-width: 23px; width: 23px; height: 23px; border-radius: 50%; border: 3px solid white; box-shadow: 0 0 0 1px #cdd9ea; }
.format-swatch.active { box-shadow: 0 0 0 2px var(--blue); }
.swatch-blue { background: #155ee8; }.swatch-coral { background: #e95656; }.swatch-violet { background: #7555c7; }.swatch-green { background: #138365; }
.format-highlight { color: #7a5b00; background: #fff1a8; }
.format-reset { width: auto; padding: 0 8px; font-size: 10px; color: var(--muted); }
.fmt-bold { font-weight: 900 !important; }.fmt-italic { font-style: italic !important; }.fmt-underline { text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: 3px; }
.fmt-color-blue { color: #155ee8 !important; }.fmt-color-coral { color: #d84040 !important; }.fmt-color-violet { color: #6943bc !important; }.fmt-color-green { color: #08775a !important; }
.fmt-highlight-yellow { background: #fff19a !important; border-radius: 4px; }.fmt-highlight-mint { background: #c9f5df !important; border-radius: 4px; }.fmt-highlight-blue { background: #d8e9ff !important; border-radius: 4px; }
.checkpoint-detail-list { display: grid; gap: 12px; margin-top: 18px; padding-top: 17px; border-top: 1px dashed var(--line-strong); }
.checkpoint-detail-list[hidden] { display: none; }
.checkpoint-detail-list h4 { margin: 0 0 2px; color: var(--ink); font-size: 14px; }
.checkpoint-sentence-row { display: grid; grid-template-columns: 31px minmax(0, 1fr); gap: 9px; align-items: start; }
.checkpoint-sentence-row[hidden] { display: none; }
.checkpoint-sequence { width: 28px; height: 28px; margin-top: 13px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--blue); color: white; font-size: 12px; }
.checkpoint-sentence-row .sentence-builder-card { margin: 0; }
.generated-summary { margin-top: 22px; }
.generated-summary textarea { min-height: 260px; line-height: 1.65; }
.rich-summary-preview { overflow: hidden; border: 1px solid #cbdaf1; border-radius: 15px; background: white; box-shadow: 0 10px 30px rgba(25,67,135,.08); }
.rich-summary-header { padding: 14px 17px; background: linear-gradient(135deg, #155ee8, #427ff0); color: white; font-weight: 800; }
.rich-summary-line { display: grid; grid-template-columns: 115px 1fr; gap: 13px; padding: 13px 16px; border-top: 1px solid var(--line); }
.rich-summary-label { color: var(--blue); font-size: 11px; font-weight: 850; }
.rich-summary-line p { margin: 0; color: #253652; line-height: 1.65; }
.rich-summary-line.incomplete { background: #fffaf0; }
.rich-answer { display: inline; padding: 2px 4px; color: #155ee8; font-weight: 850; background: #fff3aa; border-radius: 4px; }
.manual-summary-editor { margin-top: 12px; border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; }
.manual-summary-editor summary { color: var(--muted); font-size: 12px; font-weight: 750; cursor: pointer; }
.manual-summary-editor textarea { margin-top: 10px; }
.summary-regenerate { margin-top: 10px; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 19px 30px; background: #fbfcfe; }
.guided-entry-form .form-actions { margin: 22px -30px -25px; }
.sticky-actions { position: sticky; bottom: 0; z-index: 4; border-top: 1px solid var(--line); }

@keyframes sentence-pop { from { opacity: 0; transform: translateY(7px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes blank-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(237,184,46,0); } 50% { box-shadow: 0 0 0 5px rgba(237,184,46,.11); } }

/* Partner history/schedule */
.history-list { padding: 5px 26px 20px; }
.history-item { display: grid; grid-template-columns: 95px 1fr; gap: 22px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.history-item:last-child { border-bottom: 0; }
.history-date { display: grid; align-content: start; }
.history-date strong { color: var(--blue); font-size: 17px; }
.history-date small { color: var(--muted); }
.history-content > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.history-content strong { color: var(--ink); }
.history-content p { color: #55627a; margin: 9px 0; }
.history-meta { display: flex; flex-wrap: wrap; gap: 15px; color: var(--muted); font-size: 12px; }
.history-meta span { display: inline-flex; align-items: center; gap: 5px; }
.agenda-list { padding: 0 26px 20px; }
.agenda-item { display: grid; grid-template-columns: 78px 1fr auto; align-items: center; gap: 18px; padding: 19px 0; border-bottom: 1px solid var(--line); }
.agenda-item:last-child { border-bottom: 0; }
.agenda-date { text-align: center; border-right: 1px solid var(--line); }
.agenda-date strong { display: block; color: var(--blue); }
.agenda-date small { color: var(--muted); }
.agenda-main { display: grid; gap: 4px; }
.agenda-main strong { color: var(--ink); }
.agenda-main span { color: var(--muted); font-size: 13px; }

/* Admin layout */
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); background: var(--bg); }
.admin-sidebar { position: fixed; inset: 0 auto 0 0; width: 232px; background: #0f2344; color: white; display: flex; flex-direction: column; z-index: 60; }
.sidebar-brand { padding: 23px 22px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-brand .brand { color: white; font-size: 19px; }
.sidebar-brand .brand img { background: white; border-radius: 9px; }
.sidebar-nav { padding: 18px 12px; display: grid; gap: 5px; }
.sidebar-link { border: 0; border-radius: 10px; background: transparent; color: #b8c4d9; min-height: 45px; padding: 0 13px; display: flex; align-items: center; gap: 12px; font-weight: 700; cursor: pointer; text-align: left; }
.sidebar-link:hover { color: white; background: rgba(255,255,255,.07); }
.sidebar-link.active { background: linear-gradient(135deg, #196cf5, #1552ce); color: white; box-shadow: 0 8px 22px rgba(0,0,0,.17); }
.sidebar-bottom { margin-top: auto; padding: 15px 13px 20px; }
.cloud-status { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 11px; background: rgba(255,255,255,.06); }
.cloud-status > div { display: grid; }
.cloud-status strong { font-size: 12px; }
.cloud-status small { color: #93a2bb; font-size: 10px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 4px rgba(120,86,216,.16); }
.status-dot.online { background: #2dcc86; box-shadow: 0 0 0 4px rgba(45,204,134,.14); }
.status-dot.connecting { background: var(--orange); box-shadow: 0 0 0 4px rgba(240,138,36,.16); }
.status-dot.error, .status-dot.disconnected { background: var(--red); box-shadow: 0 0 0 4px rgba(232,75,85,.16); }
.sidebar-logout { width: 100%; border: 0; background: transparent; color: #9faec4; display: flex; align-items: center; gap: 10px; padding: 12px; margin-top: 7px; cursor: pointer; }
.sidebar-logout:hover { color: white; }
.admin-workspace { grid-column: 2; min-width: 0; }
.admin-topbar { height: 78px; background: white; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 30px; position: sticky; top: 0; z-index: 40; }
.topbar-left { display: flex; align-items: center; gap: 10px; }
.topbar-left h1 { color: var(--ink); font-size: 22px; margin: 0; letter-spacing: -.02em; }
.topbar-left p { color: var(--muted); font-size: 12px; margin: 1px 0 0; }
.topbar-user { display: flex; align-items: center; gap: 10px; }
.topbar-user > div:last-child { display: grid; }
.topbar-user strong { color: var(--ink); font-size: 13px; }
.topbar-user small { color: var(--muted); font-size: 11px; }
.mobile-menu-btn { display: none; }
.admin-main { padding: 24px 28px 55px; }
.admin-filterbar { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; align-items: flex-end; gap: 12px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.admin-filterbar label { font-size: 11px; color: var(--muted); min-width: 155px; }
.admin-filterbar select { min-height: 38px; margin-top: 4px; font-size: 13px; }
.country-segments, .view-segments, .report-tabs { display: inline-flex; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 3px; }
.country-segments button, .view-segments button, .report-tabs button { border: 0; background: transparent; min-height: 34px; padding: 0 13px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 750; font-size: 12px; }
.country-segments button.active, .view-segments button.active, .report-tabs button.active { background: white; color: var(--blue); box-shadow: 0 2px 8px rgba(23,43,83,.09); }
.admin-view { display: grid; gap: 18px; }
.admin-card { background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); min-width: 0; }
.admin-card-head { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 19px 21px; border-bottom: 1px solid var(--line); }
.admin-card-head h2 { color: var(--ink); font-size: 17px; margin: 0; }
.admin-card-head p { color: var(--muted); font-size: 11px; margin: 3px 0 0; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card { background: white; border: 1px solid var(--line); border-radius: 15px; padding: 18px; display: flex; gap: 14px; box-shadow: var(--shadow-sm); }
.metric-icon { width: 43px; height: 43px; border-radius: 12px; background: var(--blue-50); color: var(--blue); display: flex; align-items: center; justify-content: center; }
.metric-card.danger .metric-icon { background: var(--red-50); color: var(--red); }
.metric-card.green .metric-icon, .metric-card.success .metric-icon { background: var(--green-50); color: var(--green); }
.metric-card.violet .metric-icon { background: var(--violet-50); color: var(--violet); }
.metric-card > div:last-child { display: grid; flex: 1; }
.metric-card span { color: var(--muted); font-size: 11px; font-weight: 700; }
.metric-card strong { color: var(--ink); font-size: 25px; line-height: 1.25; }
.metric-card small { color: #9aa4b6; font-size: 10px; }
.dashboard-grid { display: grid; gap: 18px; }
.dashboard-grid.two-col { grid-template-columns: 1.05fr .95fr; }
.dashboard-grid.wide-narrow { grid-template-columns: 1.5fr .75fr; }
.country-status-list { padding: 8px 21px 18px; }
.country-status-row { display: grid; grid-template-columns: 155px 1fr 80px; align-items: center; gap: 18px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.country-status-row:last-child { border-bottom: 0; }
.country-name { display: flex; align-items: center; gap: 10px; }
.flag-circle { width: 37px; height: 37px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; }
.country-name > div { display: grid; }
.country-name strong { color: var(--ink); }
.country-name small { color: var(--muted); font-size: 10px; }
.progress-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.progress-label b { color: var(--blue); }
.progress { height: 7px; background: #edf1f6; border-radius: 999px; overflow: hidden; margin-top: 7px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue-2), var(--green)); border-radius: 999px; }
.missing-number { text-align: right; color: var(--green); font-size: 11px; font-weight: 800; }
.missing-number.has-missing { color: var(--red); }
.compact-agenda { padding: 8px 21px 18px; }
.compact-agenda-row { display: grid; grid-template-columns: 10px 62px 1fr; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.compact-agenda-row:last-child { border-bottom: 0; }
.compact-agenda-row time { font-size: 11px; color: var(--muted); font-weight: 750; }
.compact-agenda-row > div { display: grid; }
.compact-agenda-row strong { color: var(--ink); font-size: 12px; }
.compact-agenda-row small { color: var(--muted); font-size: 10px; }
.country-dot { width: 8px; height: 8px; border-radius: 50%; background: #a0a8b8; }
.country-japan { --event: #ef5964; }
.country-korea { --event: #2172eb; }
.country-other { --event: #7a879c; }
.country-dot.country-japan, .calendar-event.country-japan { background-color: #ef5964; }
.country-dot.country-korea, .calendar-event.country-korea { background-color: #2172eb; }
.country-dot.country-other, .calendar-event.country-other { background-color: #7a879c; }
.support-list { padding: 8px 20px 17px; }
.support-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.support-row:last-child { border-bottom: 0; }
.support-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--violet-50); color: var(--violet); display: flex; align-items: center; justify-content: center; }
.support-row > div { min-width: 0; }
.support-row strong { color: var(--ink); font-size: 12px; }
.support-row p { color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 2px 0 0; }
.country-tag { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 7px; font-size: 10px; white-space: nowrap; }

/* Tables */
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th { text-align: left; padding: 11px 13px; color: var(--muted); background: #fafbfd; font-size: 10px; font-weight: 800; white-space: nowrap; border-bottom: 1px solid var(--line); }
.data-table td { padding: 12px 13px; border-bottom: 1px solid var(--line); vertical-align: middle; color: #4d5a72; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfdff; }
.data-table td > strong { color: var(--ink); font-size: 12px; display: block; }
.data-table td > small { color: var(--muted); font-size: 10px; display: block; margin-top: 2px; }
.table-link { border: 0; background: transparent; color: inherit; padding: 0; text-align: left; cursor: pointer; }
.table-link strong { display: block; color: var(--ink); font-size: 12px; }
.table-link small { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }
.table-link:hover strong { color: var(--blue); }
.truncate { max-width: 220px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage-badge { background: var(--blue-50); color: var(--blue-dark); border-radius: 7px; padding: 4px 7px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.priority { border-radius: 999px; padding: 4px 7px; font-size: 10px; font-weight: 800; }
.priority-high { background: var(--red-50); color: var(--red); }
.priority-medium { background: var(--orange-50); color: var(--orange); }
.priority-low { background: var(--green-50); color: var(--green); }
.inline-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); }
.inline-metrics.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.inline-metrics > div { padding: 16px 20px; border-right: 1px solid var(--line); display: grid; gap: 3px; }
.inline-metrics > div:last-child { border-right: 0; }
.inline-metrics span { color: var(--muted); font-size: 10px; }
.inline-metrics strong { color: var(--ink); font-size: 21px; }
.inline-metrics .success strong { color: var(--green); }
.inline-metrics .danger strong { color: var(--red); }
.inline-metrics .warning strong { color: var(--orange); }
.inline-metrics .date-value { font-size: 15px; }
.reminder-request-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 21px; }
.reminder-request-panel h2 { margin: 2px 0 4px; color: var(--ink); font-size: 17px; }
.reminder-request-panel p { margin: 0; color: var(--muted); font-size: 11px; }
.country-reminder-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.country-reminder-button { min-width: 205px; justify-content: flex-start; gap: 8px; }
.country-reminder-button span { margin-left: auto; padding-left: 8px; color: var(--muted); font-size: 10px; font-weight: 750; }
.country-reminder-button.country-korea { border-color: #b8d4ff; background: #f5f9ff; }
.country-reminder-button.country-japan { border-color: #ffc7cc; background: #fff7f8; }
.country-reminder-button:disabled { opacity: .58; cursor: not-allowed; }

/* Calendar */
.calendar-toolbar { display: flex; justify-content: space-between; align-items: center; }
.calendar-nav { display: flex; align-items: center; gap: 8px; }
.calendar-nav h2 { color: var(--ink); font-size: 22px; margin: 0 6px; }
.calendar-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .55fr); gap: 18px; }
.calendar-card { padding: 15px; }
.weekday-row { display: grid; grid-template-columns: repeat(7, 1fr); }
.weekday-row span { text-align: center; padding: 10px; color: var(--muted); font-size: 10px; font-weight: 800; }
.weekday-row span:first-child { color: var(--red); }
.weekday-row span:last-child { color: var(--blue); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.calendar-cell { min-height: 118px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 7px; background: white; }
.calendar-cell.other-month { background: #fafbfd; }
.calendar-cell.other-month .day-number { color: #bbc2cf; }
.calendar-cell.today .day-number { background: var(--blue); color: white; }
.day-number { width: 25px; height: 25px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--text); font-size: 11px; font-weight: 750; }
.day-events { display: grid; gap: 4px; margin-top: 5px; }
.calendar-event { border: 0; color: white; border-radius: 5px; min-width: 0; padding: 4px 5px; text-align: left; cursor: pointer; display: grid; }
.calendar-event span { font-size: 9px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calendar-event small { font-size: 8px; opacity: .82; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.more-events { color: var(--muted); font-size: 9px; padding-left: 3px; }
.agenda-side-list { padding: 6px 17px 16px; }
.agenda-side-row { width: 100%; border: 0; background: white; border-bottom: 1px solid var(--line); padding: 12px 0; display: grid; grid-template-columns: 55px 8px 1fr auto; align-items: center; gap: 9px; text-align: left; cursor: pointer; }
.agenda-side-row:hover { background: #fbfdff; }
.agenda-side-row time { display: grid; }
.agenda-side-row time strong { font-size: 11px; color: var(--ink); }
.agenda-side-row time small { font-size: 9px; color: var(--muted); }
.agenda-side-row > div { min-width: 0; display: grid; }
.agenda-side-row > div strong { color: var(--ink); font-size: 11px; }
.agenda-side-row > div small { color: var(--muted); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Reports */
.report-tabs { width: fit-content; }
.report-tabs button { min-width: 135px; min-height: 39px; font-size: 13px; }
.report-document { padding: 0 27px 25px; }
.report-doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 26px 0 20px; border-bottom: 1px solid var(--line); }
.report-doc-head h2 { color: var(--ink); font-size: 27px; margin: 0 0 4px; }
.report-doc-head p { color: var(--muted); font-size: 12px; margin: 0; }
.report-actions { display: flex; gap: 9px; }
.report-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 20px 0; }
.report-summary-grid article { background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 14px; display: grid; gap: 3px; }
.report-summary-grid span { color: var(--muted); font-size: 10px; }
.report-summary-grid strong { color: var(--ink); font-size: 18px; }
.report-summary-grid .currency-summary { font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.report-section { border: 1px solid var(--line); border-radius: 13px; padding: 17px; margin-top: 12px; }
.report-section-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.report-section-title h3 { color: var(--ink); font-size: 15px; margin: 0; }
.report-section-title span { color: var(--blue); background: var(--blue-50); border-radius: 999px; padding: 3px 8px; font-size: 10px; font-weight: 800; }
.report-update-list { display: grid; gap: 10px; }
.report-update-list article { background: #fbfcfe; border-radius: 10px; padding: 13px; }
.report-item-head { display: flex; justify-content: space-between; gap: 12px; }
.report-item-head strong { color: var(--ink); font-size: 12px; }
.report-item-head > span { color: var(--blue); font-size: 10px; font-weight: 800; }
.report-update-list p { margin: 7px 0; font-size: 12px; color: #4f5e76; }
.report-update-list article > div:last-child { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 10px; }
.support-highlight { color: var(--violet); font-weight: 700; }
.report-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.report-section ul { margin: 0; padding-left: 18px; }
.report-section li { color: #54617a; font-size: 11px; margin: 7px 0; }
.report-section li strong { color: var(--ink); }
.report-warning { margin-top: 14px; background: var(--orange-50); color: #a8590c; border: 1px solid #ffd7ae; border-radius: 11px; padding: 12px 14px; display: flex; gap: 8px; align-items: center; font-size: 11px; }
.bar-list { display: grid; gap: 11px; }
.bar-list > div { display: grid; grid-template-columns: 155px 1fr 30px; align-items: center; gap: 9px; font-size: 10px; }
.bar { height: 7px; background: #eef1f6; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--green)); }
.country-amount-list { display: grid; gap: 12px; }
.country-amount-list > div { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.country-amount-list span { color: var(--text); font-size: 12px; }
.country-amount-list strong { color: var(--ink); }
.mapping-strip { margin: 17px 20px; background: linear-gradient(90deg, var(--blue-50), #faf8ff); border: 1px solid #dce6f8; border-radius: 11px; padding: 12px; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.mapping-strip span { font-size: 10px; color: var(--muted); }
.mapping-strip b { color: var(--ink); margin-right: 4px; }

/* Settings */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.full-span { grid-column: 1 / -1; }
.connection-card { display: flex; gap: 15px; align-items: center; padding: 21px; }
.connection-icon { width: 54px; height: 54px; border-radius: 15px; background: var(--blue-50); color: var(--blue); display: flex; align-items: center; justify-content: center; }
.connection-card strong { color: var(--ink); }
.connection-card p { color: var(--muted); font-size: 11px; margin: 4px 0 0; }
.settings-view .admin-card > .btn { margin: 0 21px 21px; }
.settings-list { margin: 0; padding: 10px 21px 20px; }
.settings-list > div { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.settings-list dt { color: var(--muted); font-size: 11px; }
.settings-list dd { color: var(--ink); font-weight: 750; font-size: 12px; margin: 0; }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 18px 21px; }
.profile-grid article { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 11px; padding: 12px; }
.profile-grid article > div { display: grid; }
.profile-grid strong { color: var(--ink); font-size: 12px; }
.profile-grid small { color: var(--muted); font-size: 10px; }
.locale-chip { background: var(--surface-2); border-radius: 7px; padding: 4px 6px; color: var(--muted); font-size: 9px; font-weight: 800; }
.schema-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 18px 21px 21px; }
.schema-cards article { background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 15px; display: grid; gap: 6px; }
.schema-cards strong { color: var(--blue); }
.schema-cards span { color: var(--muted); font-size: 11px; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(10, 22, 43, .52); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 100; }
.modal { width: min(620px, 100%); max-height: calc(100vh - 48px); overflow: auto; background: white; border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.24); }
.modal:focus { outline: none; }
.modal-large { width: min(920px, 100%); }
.modal-medium { width: min(650px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; padding: 22px 24px 17px; border-bottom: 1px solid var(--line); }
.modal-head h2 { color: var(--ink); margin: 0; font-size: 22px; }
.modal-form { padding: 20px 24px 24px; }
.form-grid { display: grid; gap: 13px; margin-bottom: 14px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.form-grid.three { grid-template-columns: repeat(3, 1fr); }
.form-grid.four { grid-template-columns: 1.2fr .7fr 1fr .8fr; }
.modal-form label { font-size: 11px; color: var(--muted); }
.modal-form input, .modal-form select { font-size: 13px; }
.modal-actions { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 20px; display: flex; justify-content: space-between; align-items: center; }
.modal-actions > div { display: flex; gap: 9px; }
.detail-list { padding: 20px 24px 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-list > div { background: var(--surface-2); border-radius: 11px; padding: 12px; display: grid; gap: 4px; }
.detail-list .wide { grid-column: 1 / -1; }
.detail-list span { color: var(--muted); font-size: 10px; }
.detail-list strong { color: var(--ink); font-size: 12px; }
.detail-list p { margin: 0; color: #4f5e76; font-size: 12px; }
.event-detail { padding: 25px; }
.event-date-large { color: var(--blue); font-size: 16px; font-weight: 800; }
.event-detail h3 { color: var(--ink); font-size: 20px; margin: 8px 0 18px; }
.event-detail dl { margin: 0 0 20px; }
.event-detail dl > div { display: grid; grid-template-columns: 100px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.event-detail dt { color: var(--muted); font-size: 11px; }
.event-detail dd { margin: 0; color: var(--text); font-size: 12px; }

.empty-state { min-height: 200px; padding: 35px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-icon { width: 58px; height: 58px; border-radius: 16px; background: var(--blue-50); color: var(--blue); display: flex; align-items: center; justify-content: center; margin-bottom: 13px; }
.empty-state h3 { color: var(--ink); margin: 0 0 5px; }
.empty-state p { color: var(--muted); margin: 0 0 15px; font-size: 12px; }

.toast-root { position: fixed; top: 18px; right: 18px; z-index: 200; display: grid; gap: 9px; }
.toast { min-width: 260px; max-width: 420px; background: #12233f; color: white; border-radius: 11px; padding: 12px 14px; display: flex; align-items: center; gap: 9px; box-shadow: 0 15px 38px rgba(0,0,0,.2); transform: translateY(-8px); opacity: 0; transition: .2s; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast-error { background: #b9343d; }
.admin-overlay { display: none; }

@media (max-width: 1200px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid.two-col, .dashboard-grid.wide-narrow { grid-template-columns: 1fr; }
  .choice-grid.six { grid-template-columns: repeat(3, 1fr); }
  .choice-grid.guided-options { grid-template-columns: repeat(3, 1fr); }
  .calendar-layout { grid-template-columns: 1fr; }
  .agenda-side { max-height: 420px; overflow: auto; }
  .admin-filterbar { flex-wrap: wrap; }
  .login-page { grid-template-columns: 1fr 440px; }
  .login-visual { padding: 40px; }
}

@media (max-width: 980px) {
  .login-page { grid-template-columns: 1fr; }
  .login-visual { min-height: 360px; padding: 32px; }
  .login-copy h1 { font-size: 46px; }
  .login-panel-wrap { padding: 36px 22px 55px; }
  .partner-header { grid-template-columns: 1fr auto; padding: 0 20px; }
  .partner-header .partner-nav { display: none; }
  .partner-user .user-name { display: none; }
  .partner-bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; height: calc(64px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); z-index: 45; backdrop-filter: blur(12px); padding-bottom: env(safe-area-inset-bottom); }
  .partner-bottom-nav button { border: 0; background: transparent; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10px; font-weight: 700; }
  .partner-bottom-nav button.active { color: var(--blue); }
  .partner-main { padding-bottom: calc(105px + env(safe-area-inset-bottom)); }
  .partner-entry-page .sticky-actions { bottom: calc(64px + env(safe-area-inset-bottom)); }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .admin-shell.sidebar-open .admin-sidebar { transform: translateX(0); }
  .admin-workspace { grid-column: 1; }
  .admin-overlay { position: fixed; inset: 0; background: rgba(10,22,43,.4); z-index: 55; }
  .admin-shell.sidebar-open .admin-overlay { display: block; }
  .mobile-menu-btn { display: inline-flex; }
  .admin-main { padding: 20px; }
  .calendar-cell { min-height: 95px; }
  .settings-grid { grid-template-columns: 1fr; }
  .full-span { grid-column: 1; }
  .report-two-col { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .login-visual { min-height: 330px; }
  .login-copy h1 { font-size: 36px; }
  .login-copy > p { font-size: 15px; }
  .login-feature-row { display: none; }
  .partner-header { height: 67px; }
  .partner-header .brand { font-size: 18px; }
  .partner-header .brand img { width: 32px; height: 32px; }
  .partner-user { gap: 4px; }
  .language-select { width: 88px; }
  .partner-main { width: min(100% - 24px, 1060px); padding-top: 30px; }
  .partner-page-head { align-items: flex-start; flex-direction: column; }
  .partner-page-head .btn { width: 100%; }
  .partner-page-head h1, .entry-heading h1 { font-size: 31px; }
  .simple-summary { padding: 16px; }
  .simple-summary > div:not(.summary-divider) { min-width: 0; flex: 1; }
  .summary-divider { margin: 0 18px; }
  .input-guide { overflow-x: auto; gap: 10px; white-space: nowrap; }
  .input-guide > strong { display: none; }
  .wizard-progress { overflow-x: auto; justify-content: flex-start; padding: 12px; }
  .wizard-progress > span { font-size: 10px; }
  .wizard-progress b { width: 23px; height: 23px; }
  .guide-step { font-size: 11px; }
  .guide-step b { width: 25px; height: 25px; }
  .partner-project-row { grid-template-columns: auto 1fr; padding: 15px; }
  .project-row-action { grid-column: 1 / -1; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 12px; }
  .project-row-action .btn { flex: 1; }
  .last-summary { max-width: 190px; }
  .entry-top-row { grid-template-columns: 1fr auto; }
  .entry-heading { grid-column: 1 / -1; grid-row: 2; text-align: left; margin-top: 15px; }
  .autosave-indicator { grid-column: 2; grid-row: 1; }
  .entry-section { padding: 20px 16px; }
  .entry-section.numbered { grid-template-columns: 34px 1fr; gap: 10px; }
  .section-number { width: 29px; height: 29px; }
  .choice-grid.four, .choice-grid.six { grid-template-columns: repeat(2, 1fr); }
  .choice-grid.guided-options, .choice-grid.compact-options, .checkpoint-options { grid-template-columns: repeat(2, 1fr); }
  .sentence-compose-line { font-size: 15px; }
  .sentence-answer-wrap { flex-basis: 100%; min-width: 100%; }
  .rich-summary-line { grid-template-columns: 1fr; gap: 4px; }
  .new-project-fields { grid-template-columns: 1fr; }
  .choice-radio span { font-size: 12px; }
  .choice-checkbox span { font-size: 12px; }
  .recall-card { grid-template-columns: 1fr; }
  .recall-card small { grid-column: 1; }
  .guided-entry-form .form-actions { margin-inline: -16px; margin-bottom: -20px; }
  .form-actions { padding: 14px 16px; }
  .form-actions .btn { flex: 1; }
  .history-list, .agenda-list { padding-inline: 16px; }
  .history-item { grid-template-columns: 1fr; gap: 8px; }
  .history-date { display: flex; gap: 7px; align-items: baseline; }
  .history-content > div:first-child { align-items: flex-start; }
  .agenda-item { grid-template-columns: 63px 1fr; }
  .agenda-item .btn { grid-column: 1 / -1; }
  .admin-topbar { padding: 0 15px; }
  .topbar-user > div:last-child, .topbar-user .mode-pill { display: none; }
  .admin-main { padding: 14px 12px 40px; }
  .admin-filterbar { align-items: stretch; }
  .reminder-request-panel { align-items: stretch; flex-direction: column; }
  .country-reminder-actions { justify-content: stretch; }
  .country-reminder-button { width: 100%; min-width: 0; }
  .country-segments { width: 100%; overflow-x: auto; }
  .admin-filterbar label { flex: 1; min-width: 140px; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric-card { padding: 13px; gap: 9px; }
  .metric-icon { width: 36px; height: 36px; }
  .metric-card strong { font-size: 20px; }
  .country-status-row { grid-template-columns: 1fr; gap: 9px; }
  .missing-number { text-align: left; }
  .inline-metrics { grid-template-columns: 1fr 1fr; }
  .inline-metrics > div:nth-child(2) { border-right: 0; }
  .inline-metrics > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .inline-metrics.five { grid-template-columns: 1fr 1fr; }
  .inline-metrics.five > div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .inline-metrics.five > div:nth-child(even) { border-right: 0; }
  .inline-metrics.five > div:last-child { grid-column: 1 / -1; border-right: 0; border-bottom: 0; }
  .calendar-toolbar { align-items: flex-start; flex-direction: column; gap: 12px; }
  .month-calendar { min-width: 690px; }
  .calendar-card { overflow-x: auto; }
  .report-tabs { width: 100%; overflow-x: auto; }
  .report-tabs button { min-width: 125px; }
  .report-document { padding: 0 16px 18px; }
  .report-doc-head { flex-direction: column; }
  .report-actions { width: 100%; }
  .report-actions .btn { flex: 1; }
  .report-summary-grid { grid-template-columns: 1fr 1fr; }
  .settings-grid { gap: 12px; }
  .profile-grid, .schema-cards { grid-template-columns: 1fr; }
  .form-grid.two, .form-grid.three, .form-grid.four { grid-template-columns: 1fr; }
  .modal-backdrop { padding: 10px; align-items: flex-end; }
  .modal { max-height: 94vh; border-radius: 18px 18px 0 0; }
  .detail-list { grid-template-columns: 1fr; }
  .detail-list .wide { grid-column: 1; }
  .toast-root { left: 12px; right: 12px; top: 12px; }
  .toast { min-width: 0; width: 100%; }
}

@media (max-width: 430px) {
  .metric-grid { grid-template-columns: 1fr; }
  .simple-summary strong { font-size: 18px; }
  .project-row-icon { width: 40px; height: 40px; }
  .project-row-title { font-size: 13px; }
  .project-row-meta { display: grid; gap: 4px; }
  .last-summary { max-width: 240px; }
  .choice-grid.four, .choice-grid.six { grid-template-columns: 1fr 1fr; }
  .choice-grid.guided-options, .choice-grid.compact-options, .checkpoint-options { grid-template-columns: 1fr 1fr; }
  .entry-section.numbered { grid-template-columns: 1fr; }
  .section-number { margin-bottom: -4px; }
}

@media print {
  body { background: white; }
  .admin-sidebar, .admin-topbar, .admin-filterbar, .report-tabs, .report-actions, .partner-header, .partner-bottom-nav, .toast-root { display: none !important; }
  .admin-shell { display: block; }
  .admin-workspace { display: block; }
  .admin-main { padding: 0; }
  .admin-view > *:not(#print-area), .report-view > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; border: 0; box-shadow: none; padding: 0; }
  .report-section { break-inside: avoid; }
}

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