/* №94: shared foundation. Screen structure and business states stay in their modules. */
:root{
  --name-font:var(--app-font);
  --space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-5:24px;
  --screen-title-size:26px;--section-title-size:14px;--field-label-size:12px;
  --caption-size:13px;--control-min-height:44px;--card-radius:16px;
}
:root[data-style="warm"]{--space-3:16px;--space-4:20px;--space-5:28px;--control-min-height:48px;--card-radius:24px}
:root:not([data-palette]),:root[data-palette="milk"]{
  --palette-page-light:#f4f1eb;--palette-surface-light:#fffcf7;--palette-soft-light:#e4eddf;
  --palette-chip-light:#edf1e9;--palette-line-light:#d8ded3;--palette-line-strong-light:#b9cbbb;
  --palette-text-light:#24362e;--palette-hint-light:#59665a;--palette-accent-light:#2d6651;
  --palette-link-light:#2d6651;--palette-on-accent-light:#fff;
  --palette-page-dark:#252925;--palette-surface-dark:#303630;--palette-soft-dark:#3b513d;
  --palette-chip-dark:#374538;--palette-line-dark:#586457;--palette-line-strong-dark:#66866a;
  --palette-text-dark:#f1f3eb;--palette-hint-dark:#bac5b9;--palette-accent-dark:#b4d4b3;
  --palette-link-dark:#b4d4b3;--palette-on-accent-dark:#17231c;
}
:root[data-palette="lavender"]{
  --palette-page-light:#f3f1fa;--palette-surface-light:#fff;--palette-soft-light:#eae5f3;
  --palette-chip-light:#f0edf6;--palette-line-light:#ded7e9;--palette-line-strong-light:#c7badb;
  --palette-text-light:#30283d;--palette-hint-light:#675c75;--palette-accent-light:#695292;
  --palette-link-light:#695292;--palette-on-accent-light:#fff;
  --palette-page-dark:#262333;--palette-surface-dark:#322e44;--palette-soft-dark:#443958;
  --palette-chip-dark:#3c354f;--palette-line-dark:#615470;--palette-line-strong-dark:#877397;
  --palette-text-dark:#f3effa;--palette-hint-dark:#c5bad2;--palette-accent-dark:#c1ade2;
  --palette-link-dark:#c1ade2;--palette-on-accent-dark:#241c32;
}
body{font-family:var(--app-font);font-synthesis:none}
body :is(button,input,textarea,select,label,legend,summary){font-family:var(--app-font)}
body h1,body.canddesk :is(#home,#vacs,#view,#intro,#step1,#form,#preview)>h1,body #login h1{
  font-size:var(--screen-title-size);font-weight:500;line-height:1.3;letter-spacing:-.35px;
  text-transform:none;overflow-wrap:anywhere;
}
body :is(.ws-section>h3,.pc .sec>b:not(.mk)){
  font-size:var(--section-title-size);font-weight:600;line-height:22px;letter-spacing:.04em;text-transform:uppercase;
}
body :is(label.l,.field-caption,.blab,.bkv span,.ws-fact b){
  font-size:var(--field-label-size);font-weight:600;line-height:18px;letter-spacing:.04em;text-transform:uppercase;
}
body .card h2{font-size:var(--section-title-size);font-weight:600;line-height:22px;text-transform:none}
body :is(.sub,.note){font-size:var(--caption-size);font-weight:400}
body :is(.pc .nm,.company-name){font-family:var(--app-font);text-transform:none}
body label.l{margin:var(--space-4) 0 var(--space-1)}
body .card{min-width:0;overflow-wrap:anywhere;border-radius:var(--card-radius);padding:var(--space-3) var(--space-4);margin-bottom:var(--space-3)}
body .btn{white-space:normal;overflow-wrap:anywhere;font-size:13px;font-weight:600;min-height:var(--control-min-height)}
body :is(button,a,input,textarea,select,summary):focus-visible{outline:2px solid var(--btn);outline-offset:3px}
/* Palette and theme remain separate choices; labels and checked state are always visible. */
#appearance .appearance-options:not(.theme){grid-template-columns:repeat(2,minmax(0,100px));gap:var(--space-2)}
#appearance [data-palette-value]{
  position:relative;aspect-ratio:1;min-height:0;width:100%;padding:8px;gap:6px;
  flex-direction:column;border:1px solid var(--brand-line-strong);font-size:12px;line-height:1.25;
  text-align:center;white-space:normal;overflow-wrap:anywhere;
}
#appearance [data-palette-value]::before{width:32px;height:24px;flex:0 0 24px;border:1px solid var(--brand-line);border-radius:5px;background:linear-gradient(135deg,var(--swatch-page) 0 36%,var(--swatch-soft) 36% 65%,var(--palette-swatch) 65%)}
#appearance [data-palette-value].on{border:2px solid var(--btn)}
#appearance [data-palette-value].on::after{content:'✓';position:absolute;right:5px;top:3px;font-size:13px;color:var(--accent)}
[data-palette-value="milk"]{--palette-swatch:#2d6651;--swatch-page:#f4f1eb;--swatch-soft:#e4eddf}
[data-palette-value="lavender"]{--palette-swatch:#695292;--swatch-page:#f3f1fa;--swatch-soft:#eae5f3}
[data-palette-value="terracotta"]{--swatch-page:#f5f0ec;--swatch-soft:#f1e6df}
[data-palette-value="teal"]{--swatch-page:#f2f3f0;--swatch-soft:#e8eeeb}
[data-palette-value="navy"]{--swatch-page:#f2f3f6;--swatch-soft:#e8ecf1}
[data-palette-value="sage"]{--swatch-page:#f2f3ef;--swatch-soft:#e8eee9}
[data-palette-value="plum"]{--swatch-page:#f5f1f4;--swatch-soft:#eee6ec}
[data-palette-value="ochre"]{--swatch-page:#f6f2e9;--swatch-soft:#f1e8d8}
#appearance .appearance-options.theme{grid-template-columns:repeat(3,minmax(0,1fr))}
#appearance [data-theme-value]{font-size:12px;white-space:normal;overflow-wrap:anywhere;min-width:0}
@media(min-width:800px){#appearance .appearance-options:not(.theme){grid-template-columns:repeat(4,minmax(0,100px))}}
@media(max-width:600px){:root{--screen-title-size:24px}}

/* 96: shared workspace header. Existing role/company controls keep their permissions. */
#workspace-header{position:relative;display:flex;align-items:center;justify-content:space-between;gap:12px;max-width:1440px;margin:0 auto 20px;padding:8px 0 16px;border-bottom:1px solid var(--brand-line);font-family:var(--app-font)}
#workspace-header[hidden]{display:none}.workspace-brand{display:flex;gap:10px;align-items:flex-start;min-width:0}.workspace-brand>i{width:7px;height:7px;flex:none;border-radius:50%;background:var(--btn);margin-top:8px}.workspace-brand>div{min-width:0}.workspace-brand span{display:block;font-size:16px;font-weight:500;overflow-wrap:anywhere}.workspace-brand small{display:block;margin-top:4px;font-size:12px;color:var(--hint)}
#workspace-header nav{display:flex;gap:8px;flex:none}#workspace-header nav button{width:44px;height:44px;min-height:44px;border:1px solid var(--brand-line);background:var(--bg);color:var(--text);font-size:24px;cursor:pointer;padding:0}
.workspace-shell #home>h1 .mobile-brand{font-size:0}.workspace-shell #home>h1 .mobile-brand::after{content:'Главная';font-size:var(--screen-title-size)}
body.canddesk #workspace-header{margin-left:240px;max-width:calc(100% - 240px)}
@media(max-width:799px){#workspace-header{margin-bottom:12px}.workspace-brand span{font-size:14px}body.canddesk #workspace-header{margin-left:0;max-width:100%}}

/* 97: the existing candidate header, material actions and actual search state. */
.pc .hd{flex-wrap:wrap;align-items:flex-start}.pc .hd .profile-copy{flex:1;min-width:140px}.pc .hd .nm{font-weight:500;font-size:22px;line-height:1.35;overflow-wrap:anywhere}.pc .hd .rl{font-size:14px;color:var(--text);overflow-wrap:anywhere}
.pc .profile-state{display:flex;align-items:flex-start;gap:8px;margin:6px 0 0;padding:0;background:none;border:0;color:var(--text);font:400 12px/18px var(--app-font);text-align:left;border-radius:0!important;max-width:100%;overflow-wrap:anywhere}.pc button.profile-state{cursor:pointer;min-height:44px;align-items:center}.profile-state i{font-style:normal;flex:none}
.pc .hd .profile-media{padding:0;display:flex;flex:none;gap:8px;margin-left:auto}.pc .hd .profile-media button{width:96px;height:96px;flex:none;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:6px;padding:8px;border-radius:16px!important;font-size:11px;font-weight:500;white-space:normal;overflow-wrap:anywhere}.profile-media button>span{font-size:27px;line-height:1}
:root[data-style="warm"] .pc .profile-media button{height:64px;width:112px}
@media(max-width:799px){.pc .hd .profile-media{flex-basis:100%;justify-content:flex-end}.pc .hd .nm{font-size:20px}}

/* 98: desktop leaves the source screen live; mobile uses the same modal panel. */
#object-panel{box-sizing:border-box;border:1px solid var(--brand-line);border-radius:20px;padding:16px;background:var(--bg);color:var(--text);max-width:calc(100vw - 24px);overflow:auto;font-family:var(--app-font)}
#object-panel::backdrop{background:#0008}#object-panel>header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}#object-panel h2{font-size:18px;font-weight:500;margin:0;overflow-wrap:anywhere}#object-panel [data-panel-close]{width:44px;height:44px;flex:none;border:0;background:var(--brand-soft);color:var(--text);font-size:24px;cursor:pointer}#object-panel-body{overflow-wrap:anywhere;min-width:0}#object-panel-body .resume-frame{width:100%;height:65vh;border:0;background:var(--sec)}
@media(min-width:800px){#object-panel{position:fixed;left:auto;right:16px;top:16px;bottom:16px;width:360px;height:calc(100dvh - 32px);max-height:none;margin:0;z-index:65;box-shadow:0 12px 40px #0003}body.card-panel-open{padding-right:392px}body.card-panel-open.canddesk :is(#home,#view,#form,#preview){width:calc(100vw - 664px);max-width:100%}body.card-panel-open #workspace-header{max-width:100%}}
@media(max-width:799px){#object-panel{width:calc(100vw - 24px);max-height:calc(100dvh - 24px);margin:auto}}

/* 99: compact lines/points use the palette, state labels keep their actual text. */
.visual-row{position:relative;min-width:0;overflow-wrap:anywhere}.visual-row>*{min-width:0}.visual-row:focus-visible{outline:2px solid var(--btn);outline-offset:3px}
:root:not([data-style="warm"]) .visual-row{border-left:1px solid var(--brand-line-strong);padding:8px 8px 8px 18px!important;margin-top:8px!important;margin-bottom:8px!important;border-radius:0!important;background:transparent}
:root:not([data-style="warm"]) .visual-row::before{content:'';position:absolute;width:5px;height:5px;background:var(--btn);border-radius:50%;left:-3px;top:17px;pointer-events:none}
:root[data-style="warm"] .visual-row{padding:16px!important;margin:12px 0!important;background:var(--bg);border:1px solid var(--brand-line);border-radius:20px}
[data-task-state="done"]>.task-title{text-decoration:line-through;text-decoration-thickness:1px}
.visual-row :is(.note,small){text-decoration:none}.visual-row .pill9{white-space:normal}.svcard .pr{white-space:normal!important;text-align:right;overflow-wrap:anywhere}.consultation-step{margin-top:12px}.vacancy-row>div{flex:1;min-width:0}

/* 100: both agreed layouts share content, controls, colors and navigation. */
#layout-choices{margin-top:20px;padding-top:12px;border-top:1px solid var(--brand-line)}#layout-choices .chips{gap:8px}#layout-choices button{flex:1;min-width:120px;white-space:normal;text-align:left;justify-content:flex-start}
:root[data-style="warm"] .card{border:1px solid var(--brand-line);box-shadow:0 3px 12px color-mix(in srgb,var(--text) 3%,transparent)}
:root[data-style="compact"] .card{box-shadow:none}
:root[data-style="compact"] .pc .sec{position:relative;border-top:0;border-left:1px solid var(--brand-line-strong);margin:0 16px;padding:10px 0 10px 16px}
:root[data-style="compact"] .pc .sec::before{content:'';position:absolute;width:5px;height:5px;left:-3px;top:18px;border-radius:50%;background:var(--btn)}
:root[data-style="warm"] .pc .sec{margin:10px 16px;border:1px solid var(--brand-line);border-radius:16px;padding:16px}
:root[data-style="warm"] .pc{padding-bottom:12px}
@media(max-width:380px){.pc .hd{padding:12px}.pc .hd .profile-copy{min-width:100px}.profile-media{gap:8px}}

/* Desktop customer workspace keeps the same shared header and side panel. */
.dk-main>#workspace-header{width:auto;max-width:none;padding:12px 20px;margin:0;background:var(--sec);flex:none}
body.card-panel-open.desk #desk{width:calc(100vw - 392px)}
body.card-panel-open.desk #desk.wd{grid-template-columns:224px minmax(0,1fr)}
body.card-panel-open.desk #desk.wd #dkDrawer{display:none}

/* 105: seven category rows stay readable without horizontal scrolling. */
#notice-category-matrix fieldset{margin:12px 0;padding:12px}#notice-category-matrix legend{font-size:14px}#notice-dialog .notice-category-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}#notice-dialog .notice-category-options label{margin:0;min-height:44px;min-width:0;font-size:14px}#notice-dialog .notice-category-options input{flex:none}#notice-dialog .notice-category-options span{min-width:0;overflow-wrap:anywhere}#notice-dialog input[type=checkbox]{flex:none}

/* 107: points are a small accent; actions and readable links remain independent. */
:root,:root[data-theme="light"]{--brand-point:var(--palette-point-light,var(--brand-link));--brand-heading:var(--palette-heading-light,var(--brand-text));--action-edge:var(--palette-action-edge-light,var(--btn))}
:root[data-theme="dark"]{--brand-point:var(--palette-point-dark,var(--brand-link));--brand-heading:var(--palette-heading-dark,var(--brand-text));--action-edge:var(--palette-action-edge-dark,var(--btn))}
.workspace-brand>i,:root:not([data-style="warm"]) .visual-row::before,:root[data-style="compact"] .pc .sec::before{background:var(--brand-point)}
:root[data-style="compact"] .dk-tbl tr[data-dk="vac"]>td:first-child{position:relative;padding-left:26px}
:root[data-style="compact"] .dk-tbl tr[data-dk="vac"]>td:first-child::before{content:'';position:absolute;left:8px;top:18px;width:5px;height:5px;border-radius:50%;background:var(--brand-point);z-index:1}
:root[data-style="compact"] .dk-tbl tr[data-dk="vac"]>td:first-child::after{content:'';position:absolute;left:10px;top:18px;bottom:10px;width:1px;background:var(--brand-line-strong)}
.workspace-brand span,body h1,.pc .hd .nm{color:var(--brand-heading)}
body .btn:not(.ghost),.dk-btn.pri{box-shadow:inset 0 0 0 1px var(--action-edge)}
#appearance .appearance-options:not(.theme){grid-template-columns:repeat(auto-fit,minmax(88px,100px))}
#appearance [data-palette-value]::before{width:38px;height:28px;flex-basis:28px;background:linear-gradient(135deg,var(--swatch-page) 0 55%,var(--palette-swatch) 55%)}
#appearance .appearance-point{position:absolute;top:31px;left:calc(50% - 15px);width:6px;height:6px;flex:none;border-radius:50%;background:var(--swatch-point,var(--palette-swatch));pointer-events:none}
[data-palette-value="milk"]{--swatch-point:#1e4735}
[data-palette-value="blueTerracotta"]{--swatch-page:#faf7f2;--palette-swatch:#1b3a5c;--swatch-point:#b04a2e}
[data-palette-value="indigo"]{--swatch-page:#f4f3f9;--palette-swatch:#3d458f}
[data-palette-value="olive"]{--swatch-page:#faf7f2;--palette-swatch:#5f7055}
[data-palette-value="monochrome"]{--swatch-page:#f5f5f5;--palette-swatch:#252525;--swatch-point:#c71e69}
#appearance .appearance-custom{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin-top:16px;flex-wrap:wrap}
#appearance .appearance-custom label{margin:0;font-size:12px}
#appearance .appearance-custom input{width:48px;min-width:48px;height:44px;min-height:44px;padding:4px;flex:none}
#appearance .appearance-custom code{font:12px/20px var(--app-font);color:var(--hint)}
#appearanceContext{margin:0 0 16px}#appearanceLegacy{margin:12px 0}
/* Non-button semantic states keep their existing text and colors. */

/* Keep workspace tabs inside narrow mobile viewports. */
.emp-tabs{flex-wrap:wrap}

/* Automation remains reachable inside the existing recruitment tools. */
.chips [data-rt-tab="automation"]{display:inline-flex!important}

/* 107/122: one theme row and eight reusable color choices in both settings hosts. */
:is(#appearance,#settingsAppearanceControls) .appearance-options.theme{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
:is(#appearance,#settingsAppearanceControls) .appearance-options.theme .chip{justify-content:center;text-align:center;white-space:nowrap;min-height:44px;padding:8px 6px;font-size:12px}
:is(#appearance,#settingsAppearanceControls) .appearance-options:not(.theme){display:grid;grid-template-columns:repeat(4,44px);gap:12px;justify-content:start;padding:4px;margin:0 0 0 -4px;max-width:100%;box-sizing:border-box}
:is(#appearance,#settingsAppearanceControls) [data-palette-value]{display:block;width:44px;height:44px;min-width:44px;min-height:44px;aspect-ratio:1;margin:0;padding:0;border:1px solid color-mix(in srgb,var(--text) 18%,transparent);border-radius:6px!important;background:var(--palette-swatch);font-size:0;line-height:0;box-shadow:none}
:is(#appearance,#settingsAppearanceControls) [data-palette-value]::before,:is(#appearance,#settingsAppearanceControls) [data-palette-value]::after,:is(#appearance,#settingsAppearanceControls) .appearance-point{display:none}
:is(#appearance,#settingsAppearanceControls) [data-palette-value].on{border:1px solid var(--palette-swatch);box-shadow:0 0 0 2px var(--bg),0 0 0 4px var(--text)}
:is(#appearance,#settingsAppearanceControls) .appearance-custom{display:flex;justify-content:flex-start;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px}
:is(#appearance,#settingsAppearanceControls) .appearance-custom[hidden]{display:none}
:is(#appearance,#settingsAppearanceControls) .appearance-custom label{margin:0;font-size:12px}
:is(#appearance,#settingsAppearanceControls) .appearance-custom input{width:48px;min-width:48px;height:44px;padding:4px}
:is(#appearance,#settingsAppearanceControls) .appearance-custom code{font:12px/20px var(--app-font);color:var(--hint)}
#appearancePaletteName{margin:10px 0 0;min-height:20px}
@media(max-width:600px){:is(#appearance,#settingsAppearanceControls) .appearance-options:not(.theme){grid-template-columns:repeat(4,44px)}}
@media(min-width:601px) and (max-width:1150px){#settingsAppearanceControls .appearance-options:not(.theme){grid-template-columns:repeat(4,44px)}}

@media(min-width:1151px){#settingsAppearanceControls .appearance-options:not(.theme){grid-template-columns:repeat(8,44px)}}
/* 128: оформление «основа + акцент» */
.appearance-combos{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--space-2)}
.appearance-combo{display:flex;align-items:center;gap:10px;min-height:56px;padding:8px 10px;border:1px solid var(--brand-line-strong);border-radius:12px;background:var(--bg);color:var(--text);text-align:left;cursor:pointer}
.appearance-combo>i{flex:none;width:40px;height:26px;background:radial-gradient(circle at 13px 13px,var(--a) 12px,transparent 12.5px),radial-gradient(circle at 27px 13px,var(--b) 12px,transparent 12.5px)}
.appearance-combo b{display:block;font-size:13px;font-weight:600}
.appearance-combo small{display:block;font-size:11px;color:var(--hint)}
.appearance-combo.on{border:2px solid var(--btn)}
.appearance-swatches{display:flex;flex-wrap:wrap;gap:6px 4px}
.appearance-swatch{display:flex;flex-direction:column;align-items:center;gap:6px;width:84px;padding:4px 0;border:0;background:transparent;color:var(--text);font-size:12px;line-height:1.25;cursor:pointer}
.appearance-swatch>i{width:32px;height:32px;border-radius:50%;background:var(--sw);display:flex;align-items:center;justify-content:center;color:#fff;font-style:normal;font-size:14px}
.appearance-swatch.on{font-weight:600}
.appearance-swatch.on>i{box-shadow:0 0 0 2px var(--bg),0 0 0 4px var(--sw)}
.appearance-swatch.on>i::after{content:"✓"}
.appearance-swatch:disabled{opacity:.35;cursor:not-allowed}
@media (max-width:600px){.appearance-combos{grid-template-columns:1fr}.appearance-swatch{width:30%}}
