/* ДРЕВО Mobile 0.4 — reference-derived fusion UI.
   Keep the original corporate logo asset. Designed for mobile-first PWA. */
:root{
 --bg:#F2F5FC;--surface:#FFFFFF;--surface-soft:#EEF2FA;
 --text:#161E30;--sub:#5C687C;--hairline:#DCE2EF;
 --brand:#97213F;--brand-deep:#84213F;--brand-soft:#F8EAF0;
 --danger:#9F244B;--danger-soft:#F8E9F0;
 --nav:#F7F8FD;--card-a:#FFFFFF;--card-b:#F2F5FC;
 --blue:#0967F5;--blue-dark:#004BD6;--blue-lite:#1785FF;
 --shadow:0 7px 17px rgba(47,62,108,.11);
 --shadow-soft:0 4px 12px rgba(47,62,108,.07);
 color-scheme:light;
}
:root[data-theme="dark"]{
 --bg:#151D2B;--surface:#2A3547;--surface-soft:#252F41;
 --text:#F8FAFE;--sub:#CDD5E3;--hairline:#5A667B;
 --brand:#D35277;--brand-deep:#B43D61;--brand-soft:#4B3043;
 --danger:#FFD0DF;--danger-soft:#4B2D40;
 --nav:#1A2433;--card-a:#303C50;--card-b:#242D3D;
 --blue:#147BFB;--blue-dark:#064BD9;--blue-lite:#188EFF;
 --shadow:0 9px 22px rgba(0,0,0,.24);
 --shadow-soft:0 5px 15px rgba(0,0,0,.18);
 color-scheme:dark;
}
html,body{min-width:0;max-width:none;width:100%;overflow-x:hidden;background:var(--bg)}
body{
 background:radial-gradient(circle at 115% 17%,rgba(151,177,235,.13),transparent 40%),
 linear-gradient(140deg,var(--bg),var(--bg))!important;
 color:var(--text);font-family:Roboto,"Segoe UI",Arial,sans-serif;font-size:16px
}
.app-shell{max-width:none;min-width:0;width:100%;min-height:100dvh;background:transparent;box-shadow:none}
.main{
 min-width:0;width:100%;max-width:none;
 padding:clamp(16px,4vw,28px) clamp(16px,4.5vw,38px) calc(98px + env(safe-area-inset-bottom))
}
.head{gap:10px;margin:0 0 11px}
.brand img{width:clamp(148px,38vw,188px);height:auto}
:root[data-theme="dark"] .brand img{
 filter:brightness(0) saturate(100%) invert(59%) sepia(40%) saturate(780%) hue-rotate(301deg) brightness(99%) contrast(95%);
}
.mobile{font-size:15px;color:var(--sub);margin-top:-1px}
.voice-switch{
 min-height:43px;padding:7px 10px;gap:6px;
 background:linear-gradient(125deg,var(--card-a),var(--card-b));
 border:1px solid var(--hairline);box-shadow:var(--shadow-soft);
}
.voice-switch span.label{font-size:12px;line-height:1.05;font-weight:570}
.voice-switch .small-ico{width:17px;height:17px}
.switch-track{width:36px;height:21px;background:#AFB9CB}
.switch-knob{width:15px;height:15px}
.voice-switch[aria-pressed="true"] .switch-track{background:var(--blue)}
.voice-switch[aria-pressed="true"] .switch-knob{transform:translateX(15px)}
.identity-line{
 min-height:51px;margin:0 0 19px;padding:8px 12px;gap:10px;
 border-radius:17px;background:linear-gradient(125deg,var(--card-a),var(--card-b));
 border:1px solid var(--hairline);box-shadow:var(--shadow-soft);
}
.identity-avatar{
 display:grid;place-items:center;overflow:hidden;
 width:35px;height:35px;border-radius:50%;
 background:#DADFE8;color:#738094;font-size:15px
}
.identity-placeholder{width:24px;height:24px;stroke:currentColor;stroke-width:1.6;fill:none}
.identity-content{min-width:0}
.identity-name{font-size:clamp(12.8px,3.1vw,14px);font-weight:570;line-height:1.25}
.identity-line>.ico{width:19px;height:19px}
.home-bento{
 display:grid;grid-template-areas:"create sign" "agree accept" "ack extend";
 grid-template-columns:minmax(0,.93fr) minmax(0,1.07fr);
 grid-template-rows:clamp(152px,38vw,181px) 100px 96px;
 gap:11px;min-width:0
}
.home-bento .bento-create{grid-area:create}
.home-bento .bento-action[data-queue="sign"]{grid-area:sign}
.home-bento .bento-action[data-queue="agree"]{grid-area:agree}
.home-bento .bento-action[data-queue="accept"]{grid-area:accept}
.home-bento .bento-action[data-queue="ack"]{grid-area:ack}
.bento-create{
 width:100%;height:100%;min-width:0;min-height:0!important;
 padding:21px;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;
 background:linear-gradient(135deg,var(--blue-lite) 0%,var(--blue) 45%,var(--blue-dark) 100%)!important;
 border:1px solid #2689FB;border-radius:20px;color:#FFF!important;
 box-shadow:0 9px 21px rgba(5,85,200,.22)!important
}
.bento-create:before{display:none}
.bento-create .plus{
 font-family:Arial,sans-serif;display:grid;place-items:center;
 width:43px;height:43px;border-radius:11px;background:#FFF;
 color:#0562F0;font-size:32px;font-weight:400;line-height:1;
}
.bento-create strong{font-size:21px;font-weight:740;line-height:1.13}
.bento-action{
 position:relative;width:100%;height:100%;min-width:0;min-height:0;
 display:flex;flex-direction:column;align-items:stretch;justify-content:space-between;
 padding:15px 16px;
 background:linear-gradient(135deg,var(--card-a),var(--card-b))!important;
 border:1px solid var(--hairline)!important;border-radius:19px;
 color:var(--text)!important;text-align:left;
 box-shadow:var(--shadow)!important
}
.bento-action .ico{color:var(--text)!important;width:25px;height:25px}
.action-top{display:flex;align-items:flex-start;justify-content:space-between;gap:7px}
.action-count,.action-count.strong{font-size:30px;font-weight:540;line-height:1;letter-spacing:-.04em;color:var(--text)}
.action-label{font-size:16px;font-weight:620;line-height:1.23;color:var(--text)}
.home-bento .bento-action[data-queue="sign"]{
 justify-content:flex-start;padding:20px;
}
.home-bento .bento-action[data-queue="sign"] .action-top{
 display:contents;
}
.home-bento .bento-action[data-queue="sign"] .action-top .ico{position:absolute;top:18px;left:17px;width:29px;height:29px}
.home-bento .bento-action[data-queue="sign"] .action-label{
 position:absolute;top:21px;left:54px;right:10px;font-size:17px;font-weight:660
}
.home-bento .bento-action[data-queue="sign"] .action-count{
 position:absolute;top:74px;left:19px;font-size:clamp(46px,12vw,56px);font-weight:430
}
.home-bento .bento-action[data-queue="sign"]:after{
 content:"›";position:absolute;right:14px;bottom:16px;
 width:31px;height:31px;display:grid;place-items:center;
 border-radius:50%;background:var(--surface-soft);font-size:24px;color:var(--text)
}
.home-bento .bento-action[data-queue="agree"],
.home-bento .bento-action[data-queue="accept"]{padding:14px 15px}
.home-bento .bento-action[data-queue="agree"] .action-top,
.home-bento .bento-action[data-queue="accept"] .action-top{display:contents}
.home-bento .bento-action[data-queue="agree"] .action-top .ico,
.home-bento .bento-action[data-queue="accept"] .action-top .ico{position:absolute;top:14px;left:15px}
.home-bento .bento-action[data-queue="agree"] .action-label,
.home-bento .bento-action[data-queue="accept"] .action-label{
 position:absolute;top:17px;left:50px;right:8px;font-size:15px
}
.home-bento .bento-action[data-queue="agree"] .action-count,
.home-bento .bento-action[data-queue="accept"] .action-count{
 position:absolute;left:50px;bottom:13px;font-size:30px
}
.home-bento .bento-action[data-queue="ack"]{
 flex-direction:row;align-items:center;gap:15px;padding:15px 18px;
}
.home-bento .bento-action[data-queue="ack"] .action-top{
 flex:1;align-items:center;justify-content:space-between;gap:10px;
}
.home-bento .bento-action[data-queue="ack"] .action-top .ico{width:30px;height:30px}
.home-bento .bento-action[data-queue="ack"] .action-count{font-size:36px;font-weight:540}
.home-bento .bento-action[data-queue="ack"] .action-label{
 position:absolute;left:63px;top:17px;font-size:18px
}
.home-bento .bento-action[data-queue="ack"]:after{
 content:"›";position:absolute;right:14px;bottom:13px;
 width:30px;height:30px;border-radius:50%;display:grid;place-items:center;
 background:var(--surface-soft);color:var(--text);font-size:24px
}
.minor-heading{
 font-size:21px;font-weight:720;color:var(--text);margin:28px 0 14px;
}
.minor-heading:after{display:none}
.focus-grid,.folders{gap:12px}
.focus-card{
 min-width:0;min-height:79px;padding:12px 13px;
 background:linear-gradient(135deg,var(--danger-soft),var(--surface-soft))!important;
 border:1px solid #E8C1D3!important;border-radius:17px;
 box-shadow:var(--shadow-soft)!important;color:var(--danger)!important;
 display:flex;align-items:center;flex-direction:row;gap:8px
}
:root[data-theme="dark"] .focus-card{border-color:#9D667F!important}
.focus-card:nth-child(2){border-left:1px solid #E8C1D3!important}
.focus-top{
 font-size:clamp(12.7px,3.2vw,14px);line-height:1.28;
 font-weight:620;display:flex;align-items:center;gap:6px;flex:1
}
.focus-top .small-ico{width:23px;height:23px;flex:none}
.focus-card .num{font-size:19px;font-weight:750;align-self:center}
.folders{margin-top:18px}
.folder-card{
 min-width:0;min-height:104px;padding:15px;
 background:linear-gradient(135deg,var(--card-a),var(--card-b))!important;
 border:1px solid var(--hairline);border-radius:19px;box-shadow:var(--shadow)!important
}
.folder-head .ico{width:25px;height:25px;color:var(--text)}
.folder-head small{display:none}
.folder-card .folder-label{font-size:16px;font-weight:580;line-height:1.23}
.bottom-nav{
 position:fixed;left:0;right:0;bottom:0;z-index:8;
 background:var(--nav)!important;border-top:1px solid var(--hairline);
 box-shadow:0 -4px 13px rgba(23,33,60,.08);
 backdrop-filter:none!important;
 padding:8px 8px max(11px,env(safe-area-inset-bottom))
}
.nav-item{font-size:13px;font-weight:550;min-height:58px;gap:5px;color:var(--sub)}
.nav-item.active{color:var(--brand);font-weight:740}
.nav-item .ico{width:25px;height:25px}
/* Remaining pages carry the same visual language, without changing logic. */
.page-top h1{font-size:clamp(27px,4.5vw,35px);color:var(--text)}
.icon-button,.list-card,.searchbox,.control-wrap,.empty,.doc-preview,
.action-secondary,.pill{
 background:linear-gradient(135deg,var(--card-a),var(--card-b))!important;
 border-color:var(--hairline)!important;box-shadow:var(--shadow-soft)!important;color:var(--text)
}
.list-card{min-height:96px}
.list-card>.ico{background:var(--surface-soft);color:var(--brand)}
.list-card>.ico:last-child{background:transparent}
.item-title{font-weight:680}
.action-primary{
 background:linear-gradient(120deg,var(--blue-lite),var(--blue-dark))!important;
 color:#FFF!important;border:1px solid var(--blue)!important;
 box-shadow:0 7px 19px rgba(8,84,180,.18)
}
.pill.selected{background:var(--brand-soft)!important;color:var(--brand)}
.demo-alert{background:var(--brand-soft);border-left-color:var(--brand)}
.empty,.doc-preview{font-size:16px}
@media(max-width:370px){
 .main{padding-left:12px;padding-right:12px}
 .home-bento{gap:9px;grid-template-rows:143px 96px 92px}
 .bento-create{padding:15px}
 .bento-create strong{font-size:19px}
 .bento-action{padding:12px}
 .home-bento .bento-action[data-queue="sign"] .action-label{left:47px;font-size:15px}
 .home-bento .bento-action[data-queue="agree"] .action-label,
 .home-bento .bento-action[data-queue="accept"] .action-label{left:40px;font-size:13px}
 .home-bento .bento-action[data-queue="agree"] .action-count,
 .home-bento .bento-action[data-queue="accept"] .action-count{left:40px}
 .identity-name{font-size:12.8px}
 .focus-card{padding:10px;gap:4px}
 .focus-top{font-size:12px}
}
@media(min-width:600px){
 .main{padding-left:clamp(26px,4vw,64px);padding-right:clamp(26px,4vw,64px)}
 .home-bento{gap:17px;grid-template-rows:220px 120px 110px}
 .bento-create{padding:26px}
 .bento-create strong{font-size:27px}
 .home-bento .bento-action[data-queue="sign"] .action-count{font-size:64px}
 .home-bento .bento-action[data-queue="agree"] .action-label,
 .home-bento .bento-action[data-queue="accept"] .action-label{font-size:18px}
 .home-bento .bento-action[data-queue="agree"] .action-count,
 .home-bento .bento-action[data-queue="accept"] .action-count{font-size:38px}
 .folder-card{min-height:125px}
 .item-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(min-width:1024px){
 .main.page-home{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto auto auto auto;gap:0 clamp(25px,3vw,55px)}
 .main.page-home>.head,.main.page-home>.identity-line{grid-column:1/-1}
 .main.page-home>section[aria-label="Быстрые действия"]{grid-column:1;grid-row:3/span 2}
 .main.page-home>.minor-heading{grid-column:2;grid-row:3;margin-top:0}
 .main.page-home>.focus-grid{grid-column:2;grid-row:4;align-self:start}
 .main.page-home>.folders{grid-column:2;grid-row:5;align-self:start}
 .home-bento{grid-template-rows:220px 120px 110px}
}
@media(min-width:1600px){.item-list{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}


/* 0.4.1: task count safe space, consistent blue border */
.home-bento .bento-action[data-queue="ack"] .action-count{
  position:absolute;
  inset:auto 57px 14px auto;
  z-index:1;
  min-width:2ch;
  text-align:right;
  line-height:1.05;
  font-variant-numeric:tabular-nums;
}
.home-bento .bento-action[data-queue="ack"] .action-label{
  right:54px;
  max-width:calc(100% - 108px);
}
.home-bento .bento-action[data-queue="ack"]:after{
  right:14px;
  bottom:13px;
  z-index:2;
}
:root[data-theme="dark"] .bento-create{
  border:1px solid #2689FB !important;
  outline-color:#8DBAFF;
  box-shadow:0 9px 21px rgba(5,85,200,.22)!important;
}
:root[data-theme="dark"] .bento-create:focus-visible{
  outline:3px solid #8DBAFF;
  outline-offset:3px;
}
@media(max-width:360px){
  .home-bento .bento-action[data-queue="ack"] .action-count{
    font-size:31px;
    right:55px;
  }
  .home-bento .bento-action[data-queue="ack"] .action-label{
    font-size:16px;
    right:54px;
  }
}

/* 0.5.1 assignment readability / mobile-first */
.rx-assignment-list{gap:9px;grid-template-columns:minmax(0,1fr)}
.rx-assignment-card{
  width:100%;min-width:0;height:auto;min-height:88px;
  display:flex;align-items:center;gap:12px;
  padding:14px 13px;border-radius:16px;
  background:linear-gradient(120deg,var(--card-a),var(--card-b))!important;
  box-shadow:var(--shadow-soft)!important;text-align:left;
}
.rx-assignment-card>.ico:first-child{
  align-self:center;flex-shrink:0;width:40px;height:40px;padding:10px;
  color:var(--brand);background:var(--surface-soft);border-radius:12px
}
.rx-assignment-card>.ico:last-child{
  align-self:center;width:18px;height:22px;flex-shrink:0;
  padding:1px;color:var(--sub);background:transparent
}
.rx-assignment-card .entry{
  display:flex;flex-direction:column;justify-content:center;
  flex:1 1 0;min-width:0;gap:7px
}
.rx-assignment-card .item-title{
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
  overflow:hidden;max-height:2.7em;
  font-size:16px;font-weight:640;line-height:1.35;
  overflow-wrap:anywhere;word-break:normal
}
.rx-task-meta{
  display:flex;flex-wrap:wrap;align-items:center;column-gap:12px;row-gap:3px;
  font-size:13px;line-height:1.3;color:var(--sub)
}
.rx-task-detail-title{
  font-size:clamp(20px,5.1vw,27px);font-weight:680;
  line-height:1.34;overflow-wrap:anywhere;margin:18px 0 22px
}
.rx-task-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.rx-task-detail-cell{
  padding:16px;background:var(--surface);border:1px solid var(--hairline);
  border-radius:16px;box-shadow:var(--shadow-soft);
  display:flex;flex-direction:column;gap:9px
}
.rx-detail-caption{font-size:13px;color:var(--sub)}
.rx-task-detail-cell strong{font-size:16px;font-weight:670;overflow-wrap:anywhere}
.page-queue .subhead{font-size:13px;line-height:1.4;margin-bottom:14px}
.page-queue .section-label{font-size:18px;margin:18px 0 12px}
.page-queue .item-list{margin-bottom:18px}
/* Employee role: three secondary tiles must not overflow a fixed-height row. */
.page-home .action-row{
  height:auto!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-auto-rows:minmax(100px,auto);align-items:stretch;
  gap:10px;margin-top:11px
}
.page-home .action-row .bento-action{
  height:auto!important;min-height:100px!important;
  padding:13px 14px;justify-content:space-between
}
.page-home .action-row .bento-action:last-child:nth-child(odd){
  grid-column:1/-1;min-height:85px!important
}
.page-home .action-row .bento-action .action-label{
  position:static!important;line-height:1.22
}
@media(max-width:365px){
 .rx-assignment-card{gap:9px;padding:12px}
 .rx-assignment-card>.ico:first-child{width:36px;height:36px;padding:9px}
 .rx-task-meta{font-size:12px}
 .page-home .action-row .bento-action{padding:12px}
}
@media(min-width:800px){
 .rx-assignment-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}


/* 0.5.3 task classes: split acquaintance / deadline extension */
.home-bento .bento-action[data-queue="extend"]{grid-area:extend}
.home-bento .bento-action[data-queue="ack"],
.home-bento .bento-action[data-queue="extend"]{
  display:flex;flex-direction:column;justify-content:flex-start;
  min-width:0;min-height:0;position:relative;
  padding:13px 13px;border-radius:18px;
}
.home-bento .bento-action[data-queue="ack"] .action-top,
.home-bento .bento-action[data-queue="extend"] .action-top{
  display:contents;
}
.home-bento .bento-action[data-queue="ack"] .action-top .ico,
.home-bento .bento-action[data-queue="extend"] .action-top .ico{
  position:absolute;top:13px;left:12px;
  width:25px;height:25px;
}
.home-bento .bento-action[data-queue="ack"] .action-label,
.home-bento .bento-action[data-queue="extend"] .action-label{
  position:absolute;top:15px;left:43px;right:8px;
  max-width:none;line-height:1.18;
  font-size:clamp(12.4px,3.4vw,15px);
  overflow-wrap:normal;white-space:normal;
}
.home-bento .bento-action[data-queue="ack"] .action-count,
.home-bento .bento-action[data-queue="extend"] .action-count{
  position:absolute;inset:auto auto 11px 43px;
  min-width:0;text-align:left;font-size:29px;
  font-weight:550;line-height:1.1
}
.home-bento .bento-action[data-queue="ack"]:after{content:none}
@media(max-width:370px){
  .home-bento .bento-action[data-queue="ack"],
  .home-bento .bento-action[data-queue="extend"]{padding:11px 10px}
  .home-bento .bento-action[data-queue="ack"] .action-top .ico,
  .home-bento .bento-action[data-queue="extend"] .action-top .ico{left:9px;top:12px;width:22px;height:22px}
  .home-bento .bento-action[data-queue="ack"] .action-label,
  .home-bento .bento-action[data-queue="extend"] .action-label{left:34px;top:15px;font-size:12px}
  .home-bento .bento-action[data-queue="ack"] .action-count,
  .home-bento .bento-action[data-queue="extend"] .action-count{left:34px;font-size:27px}
}


/* 0.5.4: expose non-sensitive error codes instead of silent dashes */
.rx-error-banner{margin:5px 0 16px;padding:15px 16px;border:1px solid var(--hairline);border-left:4px solid var(--brand);border-radius:14px;background:var(--surface);color:var(--text)}
.rx-error-banner strong{font-size:16px;line-height:1.3}
.rx-error-banner p{font-size:14px;line-height:1.45;margin:8px 0}
.rx-error-code{font-size:13px;color:var(--sub);overflow-wrap:anywhere}
.rx-error-retry{min-height:43px;padding:10px 14px;margin-top:12px;border:1px solid var(--brand);background:var(--surface-soft);color:var(--brand);font-size:14px;font-weight:670;border-radius:12px}
.rx-loading-banner{font-size:14px;color:var(--sub);margin:5px 0 13px}

.rx-diagnostic-link{display:inline-flex;align-items:center;min-height:44px;padding:10px 12px;color:var(--brand);font-size:14px;font-weight:650;text-decoration:underline;text-underline-offset:3px}
.rx-loading-banner a{color:var(--brand);font-weight:650}


/* 0.5.8: unknown Directum subclasses are visible, never guessed */
.rx-unclassified-notice{
 display:grid;grid-template-columns:minmax(0,1fr) auto;
 align-items:center;gap:4px 12px;width:100%;margin:12px 0 2px;padding:13px 16px;
 border:1px solid var(--hairline);border-radius:15px;text-align:left;
 background:var(--surface);color:var(--text)
}
.rx-unclassified-notice .rx-unclassified-title{
 font-size:15px;line-height:1.25;font-weight:680
}
.rx-unclassified-notice strong{grid-column:2;grid-row:1/3;font-size:25px;font-variant-numeric:tabular-nums;font-weight:640;color:var(--brand)}
.rx-unclassified-notice small{font-size:12px;line-height:1.35;color:var(--sub)}
