:root {
  color-scheme: light;
  /* Mubea Brand Styleguide, pp. 13–15 */
  --blue: #004b95;
  --dark-blue: #00194b;
  --light-blue: #4e90bf;
  --azure: #2586e6;
  --blue-grey: #ccdbea;
  --warm-grey: #e2e4e4;
  --powder-grey: #d2dee1;
  --apple-green: #a4c20f;
  --lime: #c8ed10;
  --white: #fff;
  --ink: #444;
  --muted: #505960;
  --line: var(--blue-grey);
  --base: #f5f6f7;
  --blue-tint: #eaf0f7;
  --brand-gradient:
    radial-gradient(ellipse at 100% 63%, var(--light-blue), transparent 68%),
    radial-gradient(ellipse at 0% 100%, var(--dark-blue), transparent 48%),
    var(--blue);
  --shell-padding: clamp(18px, 4vw, 48px);
  --panel-shadow: 0 2px 4px #183e6808, 0 8px 24px #12345608;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: var(--ink);
  background: var(--base);
  font-size: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--blue); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--azure); outline-offset: 2px; }
svg { flex: none; }
.site-header { color: #fff; background: linear-gradient(107deg, var(--dark-blue), var(--blue) 64%); }
.header-inner, .nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1512px; margin: 0 auto; padding-inline: var(--shell-padding); }
.header-inner { min-height: 65px; }
.brand { display: flex; align-items: center; gap: 17px; color: #fff; flex: none; }
.mubea-mark { width: 100px; height: auto; display: block; }
.brand span { padding-left: 17px; border-left: 1px solid #ffffff60; font-size: .94rem; font-weight: 700; white-space: nowrap; }
.header-account, .account-id { display: flex; align-items: center; min-width: 0; gap: 9px; }
.account-id { margin-right: 7px; }
.account-id strong, .account-id small { display: block; max-width: 140px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.account-id strong { font-size: .875rem; line-height: 1.2; }
.account-id small { margin-top: 3px; color: #e4efff; font-size: .75rem; }
.avatar { flex: none; height: 36px; width: 36px; display: inline-grid; place-items: center; border-radius: 10px; background: var(--blue-tint); color: var(--blue); font-size: .88rem; font-weight: 700; }
.account-id .avatar { height: 33px; width: 33px; color: #fff; background: #ffffff26; }
.site-header .header-password, .site-header .logout { color: #fff; border-color: #ffffff55; background: #ffffff12; }
.site-header .header-password:hover, .site-header .logout:hover { background: #ffffff30; color: #fff; }
.nav-bar { background: #fff; box-shadow: 0 3px 12px #143f6509; border-bottom: 1px solid var(--line); }
.nav-inner { min-height: 58px; }
nav { display: flex; gap: 7px; min-width: 0; flex-wrap: wrap; align-items: center; }
nav a { display: flex; align-items: center; gap: 8px; color: var(--muted); border-radius: 8px; padding: 9px 13px; font-size: .88rem; font-weight: 680; white-space: nowrap; }
nav a svg { width: 17px; height: 17px; }
nav a:hover { background: #f1f6fc; color: var(--blue); }
nav .current { color: var(--blue); background: var(--blue-tint); }
.nav-inner > button { flex: none; }
.breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; color: var(--muted); font-size: .85rem; }
.breadcrumb svg { width: 14px; height: 14px; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--muted); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { color: var(--blue); background: #edf6ff; }
.content { max-width: 1512px; margin: 0 auto; padding: 24px var(--shell-padding) 48px; }
.email-workspace { display: grid; height: max(620px, calc(100dvh - 154px)); overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--white); box-shadow: var(--panel-shadow); }
.email-workspace > * { grid-area: 1 / 1; }
#email-editor { width: 100%; height: 100%; border: 0; visibility: hidden; }
.email-placeholder-header { display: flex; align-items: center; height: 76px; padding: 0 clamp(12px, 2vw, 28px); border-bottom: 1px solid var(--line); }
.email-placeholder-header h1 { color: var(--dark-blue); font-size: 17px; letter-spacing: normal; }
.email-progress, .email-error { margin: 0; padding: 18px clamp(12px, 2vw, 28px); color: var(--muted); font-size: .875rem; }
.email-error { display: none; align-items: center; gap: 12px; flex-wrap: wrap; }
.email-workspace[data-email-state="error"] .email-progress,
.email-workspace[data-email-state="ready"] .email-placeholder { display: none; }
.email-workspace[data-email-state="error"] .email-error { display: flex; }
.email-workspace[data-email-state="ready"] #email-editor { visibility: visible; }
@media (max-width: 760px) {
  .email-placeholder-header { height: 104px; align-items: flex-start; padding-top: 16px; }
  .email-placeholder-header h1 { font-size: 15px; }
}
.heading { position: relative; isolation: isolate; overflow: hidden; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; min-height: 151px; margin-bottom: 20px; padding: 28px clamp(20px, 3.5vw, 43px); border-radius: 14px; color: #fff; background: linear-gradient(110deg, var(--blue), var(--azure)); box-shadow: 0 8px 24px #004b951d; }
.heading-copy { overflow-wrap: anywhere; min-width: 0; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.75rem, 3vw, 2.45rem); letter-spacing: -.035em; font-weight: 760; line-height: 1.20; }
h2 { color: var(--dark-blue); font-size: 1.08rem; font-weight: 740; }
.heading p { margin-top: 10px; color: #f4faff; font-size: .94rem; line-height: 1.6; }
.heading .actions { flex: none; }
.heading .btn { color: #fff; background: #00194b80; border-color: #ffffffa0; }
.heading .btn:hover { background: #004b95ba; border-color: #fff; }
.heading .primary { color: var(--blue); background: #fff; border-color: #fff; }
.heading .primary:hover { background: #e8f4ff; border-color: #e8f4ff; }
.kicker { margin-bottom: 9px; }
.actions, .form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn, .login-card button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 40px; padding: 0 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); font-size: .87rem; white-space: nowrap; font-weight: 650; }
.btn svg { height: 17px; width: 17px; }
.btn:hover { background: #eaf4ff; border-color: #aacbec; }
.primary, .login-card button { background: var(--blue); border-color: var(--blue); color: var(--white); }
.primary:hover, .login-card button:hover { background: var(--dark-blue); border-color: var(--dark-blue); }
.delete-button { width: 40px; padding: 0; color: #912732; }
.delete-button:hover { background: #fdf0f1; border-color: #e8b6bb; }
.danger { background: #912732; border-color: #912732; color: var(--white); }
.danger:hover { background: #731c27; border-color: #731c27; }
.compact { min-height: 32px; padding: 0 9px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; min-height: 101px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); box-shadow: var(--panel-shadow); }
.stat-copy { display: grid; gap: 8px; color: var(--muted); font-size: .86rem; font-weight: 650; }
.stat strong { color: var(--dark-blue); font-size: 1.8rem; font-variant-numeric: tabular-nums; line-height: 1; }
.stat-icon { display: inline-grid; place-items: center; width: 35px; height: 35px; border-radius: 9px; flex: none; }
.blue { color: var(--blue); background: var(--blue-tint); }
.azure { color: var(--dark-blue); background: color-mix(in srgb, var(--azure) 15%, var(--white)); }
.attention { color: var(--ink); background: color-mix(in srgb, var(--lime) 24%, var(--white)); }
.positive { color: #344500; background: color-mix(in srgb, var(--apple-green) 20%, var(--white)); }
.gray { color: var(--ink); background: var(--warm-grey); }
.panel { border: 1px solid var(--line); border-radius: 12px; background: var(--white); box-shadow: var(--panel-shadow); overflow: hidden; margin-bottom: 18px; }
.panel-title { padding: 19px 20px 13px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.panel-title span { color: var(--muted); font-size: .84rem; }
.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 1px 20px 15px; }
.tabs { display: inline-flex; align-items: center; gap: 4px; background: #eff5fa; border-radius: 8px; padding: 3px; }
.tabs button { padding: 6px 11px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: .85rem; }
.tabs .active { color: var(--blue); background: white; font-weight: 700; box-shadow: 0 1px 3px #1d345721; }
.unit-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 0 20px 15px; }
.unit-filters > span { margin-right: 4px; color: var(--muted); font-size: .875rem; font-weight: 650; }
.unit-filters button { min-height: 32px; padding: 3px 11px; border: 1px solid var(--line); border-radius: 20px; background: #fff; color: var(--muted); font-size: .875rem; }
.unit-filters button:hover { background: #f1f6fc; color: var(--blue); }
.unit-filters button[aria-pressed="true"] { border-color: var(--light-blue); background: var(--blue-tint); color: var(--blue); font-weight: 700; }
.search { display: inline-flex; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; width: min(100%, 320px); background: #fbfdff; color: var(--muted); }
.search:focus-within { border-color: var(--blue); }
.search input { width: 100%; border: none; background: none; min-height: 38px; font-size: .875rem; color: var(--ink); outline: none; }
.search svg { width: 16px; height: 16px; }
.search input::placeholder { color: #626f84; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; }
th, td { padding: 13px 17px; vertical-align: middle; }
th { background: var(--blue-tint); border-block: 1px solid var(--line); color: var(--muted); font-size: .81rem; white-space: nowrap; }
td { border-bottom: 1px solid #e5e9ee; font-size: .88rem; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f4f9fe; }
.record { font-weight: 720; color: var(--ink); white-space: nowrap; }
.record:hover { color: var(--blue); text-decoration: underline; }
td small { display: block; margin-top: 5px; font-size: .76rem; color: var(--muted); }
.row-link { display: inline-grid; place-items: center; min-width: 26px; min-height: 30px; color: var(--muted); }
.row-link svg { width: 16px; height: 16px; }
.record-actions { white-space: nowrap; }
.record-actions .row-link { vertical-align: middle; }
.record-actions .delete-button { width: 34px; min-height: 34px; vertical-align: middle; }
.tag { display: inline-block; padding: 3px 8px; margin: 1px 0; border-radius: 20px; font-size: .8rem; font-weight: 650; white-space: nowrap; }
.tag:not(.blue,.azure,.attention,.positive,.gray) { color: #354c71; background: #edf2fa; }
.progress { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
progress { width: clamp(45px, 7vw, 88px); height: 7px; appearance: none; border: 0; border-radius: 8px; background: var(--powder-grey); }
progress::-webkit-progress-bar { background: var(--powder-grey); border-radius: 8px; }
progress::-webkit-progress-value { background: var(--blue); border-radius: 8px; }
progress::-moz-progress-bar { background: var(--blue); border-radius: 8px; }
.progress span { color: var(--muted); font-variant-numeric: tabular-nums; }
.progress strong { color: var(--ink); }
.name-cell { display: flex; align-items: center; gap: 9px; }
.empty { padding: 36px 14px; display: grid; justify-items: center; gap: 9px; text-align: center; }
.empty p, .muted { color: var(--muted); font-size: .88rem; }
.detail { padding: 20px; }
.detail p { margin-top: 10px; line-height: 1.55; }
.preserve { white-space: pre-wrap; overflow-wrap: anywhere; }
.details-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 15px; }
.pipeline { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.pipeline .stat { min-height: 91px; }
.pipeline .stat-icon { width: 27px; height: 27px; }
.pipeline .stat-icon svg { width: 16px; height: 16px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.attachment { display: flex; align-items: center; gap: 8px; margin-top: 11px; overflow-wrap: anywhere; }
.note { border-top: 1px solid var(--line); margin-top: 13px; padding-top: 11px; }
.note time { margin-left: 8px; color: var(--muted); font-size: .82rem; }
.back { display: table; margin: 0 auto 20px; }
dialog { color: var(--ink); width: min(555px, calc(100% - 26px)); max-height: 88dvh; padding: 0; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 90px #05223e58; }
dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
dialog::backdrop { background: #071b32a6; backdrop-filter: blur(2px); }
.dialog-head { flex: none; display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); background: #f4f8fc; }
.form-body { min-height: 0; overflow-y: auto; padding: 16px 19px 0; display: grid; gap: 12px; }
.form-body label, .login-card label { display: grid; gap: 6px; color: var(--ink); font-size: .88rem; font-weight: 650; min-width: 0; }
.form-body input, .form-body select, .form-body textarea, .login-card input { color: var(--ink); padding: 9px; border: 1px solid var(--line); border-radius: 7px; width: 100%; background: #fff; }
.form-body textarea { min-height: 82px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-actions { position: sticky; bottom: 0; z-index: 1; justify-content: flex-end; margin: 0 -19px; padding: 11px 19px; border-top: 1px solid var(--line); background: var(--white); }
.form-error { color: #a52731; font-size: .86rem; }
.form-error:empty { display: none; }
.file-picker { border: 1px dashed #9aafe2; background: #f4f7ff; padding: 13px; border-radius: 9px; }
.file-picker small { font-size: .78rem; font-weight: 450; color: var(--muted); }
#import-results { max-height: 36vh; overflow-y: auto; }
#import-results:empty { display: none; }
.import-row { display: grid; grid-template-columns: 1fr auto; gap: 7px; border-bottom: 1px solid var(--line); padding: 9px 0; font-size: .85rem; overflow-wrap: anywhere; }
.match { grid-column: 1 / -1; border-radius: 6px; background: #f5f7fb; padding: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#toast { position: fixed; bottom: 19px; right: 19px; z-index: 10; padding: 10px 14px; border-radius: 8px; background: var(--dark-blue); color: #fff; display: none; max-width: calc(100vw - 38px); }
#toast.visible { display: block; }
#toast.error { background: #912732; }
.boot { padding: 40px; text-align: center; color: var(--muted); }
.login-page { position: relative; isolation: isolate; display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding: 28px; background: var(--brand-gradient); }
.login-layout { width: min(100%, 970px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 406px); gap: clamp(24px, 8vw, 120px); align-items: center; }
.login-brand { display: grid; gap: 15px; color: #fff; }
.login-brand .mubea-mark { width: clamp(126px, 14vw, 190px); margin-bottom: 10px; }
.login-brand strong { font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -.035em; }
.login-brand p { line-height: 1.55; color: #f3faff; }
.login-card { display: grid; gap: 15px; padding: clamp(24px, 4vw, 36px); background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 55px #07305355; }
.login-card h1 { font-size: 1.6rem; }
.login-card p { color: var(--muted); font-size: .91rem; }
.login-card button { min-height: 43px; }
.login-card .form-error { color: #a52731; }
@media (max-width: 1000px) {
  .pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  th, td { padding-inline: 12px; }
}
@media (max-width: 700px) {
  .header-inner { min-height: 55px; gap: 9px; }
  .brand { gap: 8px; }
  .brand .mubea-mark { width: 74px; }
  .brand span { padding-left: 8px; font-size: .8rem; }
  .header-account { gap: 5px; }
  .account-id { display: none; }
  .site-header .header-password { font-size: .75rem; padding-inline: 6px; }
  .nav-inner { gap: 6px; padding-block: 7px; }
  nav { gap: 2px; }
  nav a { padding: 7px 8px; font-size: .81rem; }
  nav a svg { display: none; }
  .content { padding-top: 16px; }
  .heading { align-items: flex-start; flex-direction: column; gap: 15px; min-height: 0; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat { min-height: 82px; padding: 11px; }
  .stat-icon { width: 31px; height: 31px; }
  .details-grid { display: block; }
  table { min-width: 520px; }
  .login-layout { grid-template-columns: minmax(0, 430px); justify-content: center; }
  .login-brand { gap: 6px; }
  .login-brand .mubea-mark { width: 114px; margin-bottom: 3px; }
}
/* AI configuration and evidence */
.ai-panel h2 { display: flex; gap: 8px; align-items: center; }
.ai-panel h2 svg { color: var(--blue); width: 18px; height: 18px; }
.ai-panel h3 { margin: 0; font-size: .9rem; }
.advice-grid { margin-top: 13px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.advice-item { background: #f4f7fc; border: 1px solid var(--line); border-radius: 8px; padding: 11px 13px; }
.advice-item ul { margin: 7px 0 0; padding-left: 17px; line-height: 1.5; }
.advice-item li + li { margin-top: 5px; }
.advice-item li { overflow-wrap: anywhere; }
.match-controls { padding: 0 17px 12px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.match-status { margin: 0 17px 13px; }
.match-score { font-size: 1.18rem; color: var(--blue); }
.evidence-body { min-width: 210px; display: grid; gap: 8px; margin-top: 8px; }
.dimensions { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: .8rem; }
details summary { color: var(--blue); cursor: pointer; white-space: nowrap; }
.settings-list { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 12px 20px; align-items: baseline; margin: 20px 0; }
.settings-list dt { font-weight: 680; }
.settings-list dd { margin: 0; overflow-wrap: anywhere; }
.settings-actions { align-items: center; margin-top: 15px; }
.success-text { color: #344500; font-size: .87rem; }
.form-body .check-line { display: flex; align-items: flex-start; gap: 8px; line-height: 1.5; font-weight: 500; }
.form-body .check-line input { width: 16px; height: 16px; margin: 2px 0 0; flex: none; accent-color: var(--blue); }
.import-hint { grid-column: 1 / -1; color: var(--muted); }
.hint { font-size: .82rem; }
@media(max-width: 700px) {
  .advice-grid { grid-template-columns: 1fr; }
}

.job-date { white-space: nowrap; }
.job-attributes { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 12px 18px; margin: 0; }
.job-attributes dt { color: var(--muted); font-size: .84rem; }
.job-attributes dd { margin: 5px 0 0; overflow-wrap: anywhere; font-weight: 650; }

.candidate-contact { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; font-size: .875rem; }
.candidate-contact > div { display: flex; gap: 6px; align-items: baseline; }
.candidate-contact dt { display: inline-flex; align-items: center; gap: 4px; color: #e3edf9; }
.candidate-contact svg { width: 14px; height: 14px; }
.candidate-contact dd { margin: 0; }
.candidate-contact a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.resume-section { padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--line); }
.resume-section h3 { color: var(--dark-blue); font-size: .95rem; margin: 0; }
.resume-section p, .resume-source p { white-space: pre-line; overflow-wrap: anywhere; }
.resume-skill-tags { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 9px; }
.resume-skill-tags .tag { white-space: normal; overflow-wrap: anywhere; }
.resume-source { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; font-size: .875rem; }
.resume-source p { color: var(--muted); }
.resume-preferences { display: grid; gap: 9px; margin: 14px 0 0; }
.resume-preferences > div { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: 8px; font-size: .875rem; }
.resume-preferences dt { color: var(--muted); }
.resume-preferences dd { margin: 0; overflow-wrap: anywhere; }
