/* ATSRS V5847: permanent shared field design for Personal and Corporate workspaces. */
:root{
  --atsrs-field-height:44px;
  --atsrs-field-radius:10px;
  --atsrs-field-border-width:1px;
  --atsrs-field-label-size:10px;
  --atsrs-field-label-offset:12px;
  --atsrs-field-label-padding:6px;
  --atsrs-field-inline-padding:12px;
}

html[data-theme="dark"]{
  --atsrs-field-surface:var(--atsrs-ref-dark-surface,#0b0d0d);
  --atsrs-field-line:var(--atsrs-ref-dark-line,#2a2f2d);
  --atsrs-field-text:var(--atsrs-ref-dark-text,#f4f6ef);
  --atsrs-field-muted:#91a09a;
  --atsrs-field-accent:var(--atsrs-brand-green,#22c55e);
  --atsrs-field-accent-ring:rgba(34,197,94,.16);
  --atsrs-field-accent-shadow:rgba(34,197,94,.11);
  --atsrs-field-hover-inline-line:var(--atsrs-control-hover-border,#4b5d52);
  --atsrs-field-focus-block-line:var(--atsrs-field-line);
  --atsrs-field-focus-inline-line:var(--atsrs-field-accent);
  --atsrs-field-focus-shadow:-3px 0 0 var(--atsrs-field-accent-ring),3px 0 0 var(--atsrs-field-accent-ring),0 8px 20px var(--atsrs-field-accent-shadow);
}
html[data-theme="light"]{
  --atsrs-field-surface:#fff;
  --atsrs-field-line:#aebdca;
  --atsrs-field-text:#142c3f;
  --atsrs-field-muted:#526b7e;
  --atsrs-field-accent:var(--atsrs-light-blue,#2563eb);
  --atsrs-field-accent-ring:rgba(37,99,235,.14);
  --atsrs-field-accent-shadow:rgba(37,99,235,.12);
  --atsrs-field-focus-block-line:var(--atsrs-field-accent);
  --atsrs-field-focus-inline-line:var(--atsrs-field-accent);
  --atsrs-field-focus-shadow:0 0 0 3px var(--atsrs-field-accent-ring),0 8px 20px var(--atsrs-field-accent-shadow);
}

body :where(#app,#auth,.share-public-page,dialog,.modal,#atsrsSecurityModal) .atsrs-field-shell{
  position:relative!important;
  display:grid!important;
  align-self:start!important;
  align-items:center!important;
  min-width:0!important;
  min-height:var(--atsrs-field-height)!important;
  margin-top:6px!important;
  border:var(--atsrs-field-border-width) solid var(--atsrs-field-line)!important;
  border-radius:var(--atsrs-field-radius)!important;
  background:var(--atsrs-field-surface)!important;
  background-image:none!important;
  color:var(--atsrs-field-text)!important;
  box-shadow:none!important;
  transition:border-color .16s ease,box-shadow .16s ease!important;
}
body :where(#app,#auth,.share-public-page,dialog,.modal,#atsrsSecurityModal) .atsrs-field-shell > .atsrs-field-label{
  position:absolute!important;
  z-index:5!important;
  top:0!important;
  left:var(--atsrs-field-label-offset)!important;
  width:auto!important;
  max-width:calc(100% - 24px)!important;
  min-height:0!important;
  margin:0!important;
  padding:0 var(--atsrs-field-label-padding)!important;
  transform:translateY(-50%)!important;
  border:0!important;
  border-radius:0!important;
  background:var(--atsrs-field-label-surface)!important;
  background-image:none!important;
  color:var(--atsrs-field-muted)!important;
  font-size:var(--atsrs-field-label-size)!important;
  font-weight:600!important;
  line-height:14px!important;
  letter-spacing:.01em!important;
  text-transform:none!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  pointer-events:none!important;
  box-shadow:none!important;
}
body :where(#app,#auth,.share-public-page,dialog,.modal,#atsrsSecurityModal) .atsrs-field-shell:not(.atsrs-field-textarea){
  height:var(--atsrs-field-height)!important;
  max-height:var(--atsrs-field-height)!important;
}
body :where(#app,#auth,.share-public-page,dialog,.modal,#atsrsSecurityModal) .atsrs-field-shell :where(
  input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  select,
  textarea,
  .atsrs-field-control,
  .atsrs-select-trigger,
  .talent-work-type-filter > summary,
  .work-type-select-toggle
){
  width:100%!important;
  min-width:0!important;
  min-height:calc(var(--atsrs-field-height) - 2px)!important;
  margin:0!important;
  padding:12px var(--atsrs-field-inline-padding) 4px!important;
  border:0!important;
  border-radius:calc(var(--atsrs-field-radius) - 1px)!important;
  outline:0!important;
  background:transparent!important;
  background-image:none!important;
  color:var(--atsrs-field-text)!important;
  -webkit-text-fill-color:var(--atsrs-field-text)!important;
  box-shadow:none!important;
  font:inherit!important;
}
body :where(#app,#auth,.share-public-page,dialog,.modal,#atsrsSecurityModal) .atsrs-field-shell :where(.atsrs-field-control-frame,.atsrs-search-control,.jobs-select-host,.personnel-combobox,.personnel-select-shell,.phone-field,.work-type-select,.talent-work-type-filter,.atsrs-disclosure-shell){
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  width:100%!important;
  min-width:0!important;
  min-height:calc(var(--atsrs-field-height) - 2px)!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:calc(var(--atsrs-field-radius) - 1px)!important;
  outline:0!important;
  background:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
}
body #app .atsrs-search-field.atsrs-field-shell .atsrs-search-control > i{
  position:absolute!important;
  top:50%!important;
  right:12px!important;
  left:auto!important;
  margin:0!important;
  transform:translateY(-50%)!important;
  color:var(--atsrs-field-muted)!important;
  pointer-events:none!important;
}
body #app .atsrs-search-field.atsrs-field-shell .atsrs-search-control > input{
  padding-left:var(--atsrs-field-inline-padding)!important;
  padding-right:40px!important;
}
body :where(#app,#auth,.share-public-page,dialog,.modal,#atsrsSecurityModal) .atsrs-field-shell :where(.atsrs-disclosure-indicator,.personnel-filter-arrow,.work-type-select-arrow){right:12px!important;color:var(--atsrs-field-muted)!important}
body :where(#app,#auth,.share-public-page,dialog,.modal,#atsrsSecurityModal) .atsrs-field-shell .atsrs-select-trigger{padding-right:36px!important;text-align:left!important}
body :where(#app,#auth,.share-public-page,dialog,.modal,#atsrsSecurityModal) .atsrs-field-shell.atsrs-field-textarea{align-items:stretch!important;min-height:96px!important}
body :where(#app,#auth,.share-public-page,dialog,.modal,#atsrsSecurityModal) .atsrs-field-shell.atsrs-field-textarea textarea{min-height:94px!important;padding-top:14px!important;resize:vertical!important}
@media(hover:hover){
  html[data-theme="dark"] body :where(#app,#auth,.share-public-page,dialog,.modal,#atsrsSecurityModal) .atsrs-field-shell:hover:not(:focus-within):not(:has(:is(.talent-work-type-filter[open],[aria-expanded="true"]))){
    border-right-color:var(--atsrs-field-hover-inline-line)!important;
    border-left-color:var(--atsrs-field-hover-inline-line)!important;
  }
}
body :where(#app,#auth,.share-public-page,dialog,.modal,#atsrsSecurityModal) .atsrs-field-shell:focus-within{
  border-color:var(--atsrs-field-focus-block-line) var(--atsrs-field-focus-inline-line)!important;
  box-shadow:var(--atsrs-field-focus-shadow)!important;
}
body :where(#app,#auth,.share-public-page,dialog,.modal,#atsrsSecurityModal) .atsrs-field-shell:has(:is(.talent-work-type-filter[open],[aria-expanded="true"])){
  border-color:var(--atsrs-field-focus-block-line) var(--atsrs-field-focus-inline-line)!important;
  box-shadow:var(--atsrs-field-focus-shadow)!important;
}
body :where(#app,#auth,.share-public-page,dialog,.modal,#atsrsSecurityModal) .atsrs-field-shell:focus-within > .atsrs-field-label,
body :where(#app,#auth,.share-public-page,dialog,.modal,#atsrsSecurityModal) .atsrs-field-shell:has(:is(.talent-work-type-filter[open],[aria-expanded="true"])) > .atsrs-field-label{color:var(--atsrs-field-accent)!important}
body :where(#app,#auth,.share-public-page,dialog,.modal,#atsrsSecurityModal) .atsrs-field-shell :where(input,select,textarea,button):focus,
body :where(#app,#auth,.share-public-page,dialog,.modal,#atsrsSecurityModal) .atsrs-field-shell :where(input,select,textarea,button):focus-visible{outline:0!important;box-shadow:none!important}
body :where(#app,#auth,.share-public-page,dialog,.modal,#atsrsSecurityModal) .atsrs-field-shell:has(:where([aria-invalid="true"],.error,.is-error)){
  border-color:#ef4444!important;box-shadow:0 0 0 3px rgba(239,68,68,.12)!important
}
body :where(#app,#auth,.share-public-page,dialog,.modal,#atsrsSecurityModal) .atsrs-field-shell:has(:where([aria-invalid="true"],.error,.is-error)) > .atsrs-field-label{color:#ef4444!important}
body :where(#app,#auth,.share-public-page,dialog,.modal,#atsrsSecurityModal) .atsrs-field-shell:has(:where(.is-success,[data-state="success"])) {border-color:#22a95b!important}
body :where(#app,#auth,.share-public-page,dialog,.modal,#atsrsSecurityModal) .atsrs-field-shell.atsrs-field-disabled,
body :where(#app,#auth,.share-public-page,dialog,.modal,#atsrsSecurityModal) .atsrs-field-shell:has(:disabled){opacity:.58!important;cursor:not-allowed!important}
body :where(#app,#auth,.share-public-page,dialog,.modal,#atsrsSecurityModal) .atsrs-field-source-label{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important}
body :where(#app,#auth,.share-public-page,dialog,.modal,#atsrsSecurityModal) .atsrs-field-shell input:-webkit-autofill,
body :where(#app,#auth,.share-public-page,dialog,.modal,#atsrsSecurityModal) .atsrs-field-shell textarea:-webkit-autofill{
  -webkit-box-shadow:0 0 0 1000px var(--atsrs-field-surface) inset!important;
  -webkit-text-fill-color:var(--atsrs-field-text)!important;
  caret-color:var(--atsrs-field-text)!important;
}

/* Complex field families keep one border around the entire interactive shell. */
body #app .atsrs-field-shell.phone-field{display:flex!important;padding-top:0!important}
body #app .atsrs-field-shell.phone-field > .atsrs-field-label{display:block!important}
body #app .atsrs-field-shell.phone-field :where(.phone-code-picker,input:not([type="hidden"])){border:0!important;background:transparent!important;box-shadow:none!important}
body #app .atsrs-field-shell .personnel-combobox-toggle{position:absolute!important;right:0!important;top:0!important;width:38px!important;min-height:42px!important;border:0!important;background:transparent!important;box-shadow:none!important}

/* Personnel Profession/Project combobox internals must stay inside the one shared shell. */
html[data-theme] body #app.app:not(.hidden) #personnelPage .atsrs-field-shell .personnel-combobox>input,
html[data-theme] body #app.app:not(.hidden) #personnelPage .atsrs-field-shell .personnel-combobox>.personnel-combobox-toggle{
  height:100%!important;
  min-height:0!important;
  margin:0!important;
  border:0!important;
  outline:0!important;
  outline-offset:0!important;
  box-shadow:none!important;
}

@media(max-width:620px){
  :root{--atsrs-field-label-size:9px;--atsrs-field-label-offset:10px;--atsrs-field-label-padding:5px;--atsrs-field-inline-padding:10px}
  body :where(#app,#auth,.share-public-page,dialog,.modal,#atsrsSecurityModal) .atsrs-field-shell > .atsrs-field-label{max-width:calc(100% - 18px)!important}
}
@media(prefers-reduced-motion:reduce){body :where(#app,#auth,.share-public-page,dialog,.modal,#atsrsSecurityModal) .atsrs-field-shell{transition:none!important}}

/* Canonical last-mile reset: legacy wrappers may retain two-row grids or their own 46px borders. */
html body #app .atsrs-field-shell,
html body #auth .atsrs-field-shell{
  grid-template:minmax(0,1fr)/minmax(0,1fr)!important;
  gap:0!important;
}
html body #app .atsrs-field-shell :where(.atsrs-field-control-frame,.atsrs-search-control,.jobs-select-host,.personnel-combobox,.personnel-select-shell,.phone-field,.work-type-select,.talent-work-type-filter,.atsrs-disclosure-shell){
  width:100%!important;
  height:calc(var(--atsrs-field-height) - 2px)!important;
  min-height:calc(var(--atsrs-field-height) - 2px)!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  outline:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
html body #app .atsrs-field-shell :where(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),select,textarea,.atsrs-field-control,.atsrs-select-trigger,.jobs-select-toggle,.work-type-select-toggle,.talent-work-type-filter>summary),
html body #auth .atsrs-field-shell :where(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),select,textarea,.atsrs-field-control,.atsrs-select-trigger,.jobs-select-toggle,.work-type-select-toggle,.talent-work-type-filter>summary){
  width:100%!important;
  height:calc(var(--atsrs-field-height) - 2px)!important;
  min-height:calc(var(--atsrs-field-height) - 2px)!important;
  margin:0!important;
  padding:12px var(--atsrs-field-inline-padding) 4px!important;
  border:0!important;
  outline:0!important;
  border-radius:calc(var(--atsrs-field-radius) - 1px)!important;
  background:transparent!important;
  box-shadow:none!important;
}
html body #app .atsrs-search-field.atsrs-field-shell .atsrs-search-control>input{
  height:calc(var(--atsrs-field-height) - 2px)!important;
  min-height:calc(var(--atsrs-field-height) - 2px)!important;
  padding-left:var(--atsrs-field-inline-padding)!important;
  padding-right:40px!important;
  border:0!important;
  border-radius:calc(var(--atsrs-field-radius) - 1px)!important;
  background:transparent!important;
}
html[data-theme] body #app.app .atsrs-search-field.atsrs-field-shell .atsrs-search-control>input:focus,
html[data-theme] body #app.app .atsrs-search-field.atsrs-field-shell .atsrs-search-control>input:focus-visible{
  border:0!important;
  outline:0!important;
  outline-offset:0!important;
  box-shadow:none!important;
}
html[data-theme] body #app.app #jobsPage .atsrs-field-shell .jobs-select-toggle:focus,
html[data-theme] body #app.app #jobsPage .atsrs-field-shell .jobs-select-toggle:focus-visible,
html[data-theme] body #app.app #jobsPage .atsrs-field-shell .jobs-select-toggle[aria-expanded="true"]{
  border:0!important;
  outline:0!important;
  outline-offset:0!important;
  box-shadow:none!important;
}
html body #app .atsrs-field-shell.atsrs-field-textarea textarea{height:auto!important;min-height:94px!important;padding-top:14px!important}
html[data-theme] body #app.app .atsrs-field-shell:focus-within,
html[data-theme] body #app.app .atsrs-field-shell:has(:is(.talent-work-type-filter[open],[aria-expanded="true"])){
  border-color:var(--atsrs-field-focus-block-line) var(--atsrs-field-focus-inline-line)!important;
  box-shadow:var(--atsrs-field-focus-shadow)!important;
}
html[data-theme] body #app.app .atsrs-field-shell:focus-within>.atsrs-field-label,
html[data-theme] body #app.app .atsrs-field-shell:has(:is(.talent-work-type-filter[open],[aria-expanded="true"]))>.atsrs-field-label{color:var(--atsrs-field-accent)!important}

/* One shell owns every field focus indication; legacy inner-control rings are suppressed. */
html[data-theme] body #app.app:not(.hidden) :is(#profilePage,#certificatesPage,#jobsPage,#candidatesPage,#personnelPage,#projectsPage) .atsrs-field-shell :is(
  input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  select,
  textarea,
  input.atsrs-field-control,
  select.atsrs-field-control,
  textarea.atsrs-field-control,
  button.atsrs-field-control,
  .atsrs-select-trigger
):focus,
html[data-theme] body #app.app:not(.hidden) :is(#profilePage,#certificatesPage,#jobsPage,#candidatesPage,#personnelPage,#projectsPage) .atsrs-field-shell :is(
  input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  select,
  textarea,
  input.atsrs-field-control,
  select.atsrs-field-control,
  textarea.atsrs-field-control,
  button.atsrs-field-control,
  .atsrs-select-trigger
):focus-visible{
  border:0!important;
  outline:0!important;
  outline-offset:0!important;
  box-shadow:none!important;
}

/* V5844: keep all three Profile work-availability field shells on one row baseline. */
html body.personal-mode #app.app #profilePage .work-availability-grid>.atsrs-field-shell{
  margin-top:0!important;
}
