/* Общие компоненты: панели, кнопки, таблицы, модальные окна */

*{
  box-sizing: border-box;
}

.hidden{
  display: none;
}

.muted,.subtitle,.login-msg{
  color: var(--muted);
}

.error-text{
  color: var(--error-text);
  font-weight: 780;
}

.nowrap{
  white-space: nowrap;
}

nav{
  min-height: 0;
  display: flex;
  flex-direction: column;
  
  

  gap: 3px;
  overflow: auto;
  scrollbar-width: thin;
  flex: 1 1 auto;
}

.side-copyright{
  

  font-size: 9px;
}

.panel{
  
  
  
  
  overflow: hidden;

  margin-bottom: 0;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.login-screen{
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  
  
  

  background: linear-gradient(90deg,rgba(17,28,40,.76),rgba(17,28,40,.14)),var(--brand-bg) right bottom/cover no-repeat fixed;
  place-items: center start;
  padding: 40px 10vw;
  overflow: auto;
}

.login-card{
  
  
  border-radius: 24px;
  
  
  
  
  
  animation: loginCardIn .36s ease both;

  width: min(410px,90vw);
  border: 1px solid var(--line-strong);
  padding: 28px 32px;
  background: var(--glass);
  color: var(--text);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.login-logo{
  
  
  display: block;
  object-fit: contain;
  
  filter: none;
  animation: logoReveal .45s ease both;

  width: 140px;
  height: 140px;
  margin: 0 auto 16px;
}

.login-card .subtitle{
  max-width: 360px;
  
  
  
  text-align: center;

  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin: 0 auto 24px;
}

.login-card #loginBtn{
  display: flex;
  
  min-width: 118px;
  

  width: 100%;
  margin: 20px auto 0;
  min-height: 42px;
}

.login-card #forgotPassBtn{
  display: flex;
  width: auto;
  min-width: 220px;
  margin: 8px auto 0;

  border: 0;
  background: transparent;
  font-weight: 400;
}

.login-card.exit{
  animation: loginCardOut .22s ease both;
}

.right-column{
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto auto;
  

  gap: 16px;
}

.zoom-readout{
  min-width: 54px;
  text-align: center;
  

  font-weight: 500;
  font-size: 12px;
}

.tag{
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 2px 4px 2px 0;
  border: 0;
  border-radius: 999px;
  padding: 3px 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 760;
}

.tag.договор,.tag.pdf,.contract-inline{
  background: #f05d78;
  color: #fff;
}

.week-toolbar{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  
  align-items: center;
  

  gap: 10px;
  margin-bottom: 18px;
}

.week-toolbar>div{
  display: flex;
  flex-wrap: wrap;
  
  align-items: center;
  justify-content: flex-end;

  gap: 5px;
}

.week-head b{
  

  text-transform: none;
  font-size: 13px;
  font-weight: 600;
}

.week-head span,.week-head em,.week-head small{
  

  font-size: 10px;
}

.week-head em{
  color: var(--text-2);
  font-style: normal;
}

.week-head small{
  color: var(--muted);
  

  font-weight: 400;
  margin-top: 4px;
}

.time-cell{
  color: var(--muted);
  

  font-weight: 500;
  font-size: 11px;
}

.week-head.workday,.mini-day.workday,.day-head.workday{
  border-color: #2d5f85;
}

.week-head.workday{
  background: #142743;
}

.short{
  box-shadow: inset 0 0 0 2px rgba(255,214,10,.75);
}

.mini-month-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.mini-weekdays,.mini-month{
  display: grid;
  grid-template-columns: repeat(7,minmax(0,1fr));
  gap: 5px;
}

.mini-weekdays span{
  color: var(--muted);
  text-align: center;
  
  

  font-size: 11px;
  font-weight: 500;
}

.mini-day{
  
  padding: 5px 0;
  
  
  color: var(--text);
  
  text-align: center;
  

  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font-weight: 500;
  font-size: 12px;
}

.mini-day.today{
  outline: 2px solid var(--warn);
  outline-offset: 1px;
}

.sticky-col,.emp-cell{
  position: sticky;
  left: 0;
  z-index: 3;
  width: 120px;
  min-width: 120px;
  max-width: 120px;
}

.emp-cell{
  
  
  
  

  background: var(--paper);
  color: var(--text);
  padding: 5px 7px;
  border-radius: 0;
}

.emp-cell b,.emp-cell span{
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emp-cell span{
  
  
  line-height: 1.15;

  color: var(--muted);
  font-size: 9px;
}

.code-Р{
  background: #18b76b;
}

.code-В{
  background: #566d80;
}

.code-ОТ{
  background: #1687d9;
}

.code-Б{
  background: #f0b429;
  color: #241800;
}

.total-cell{
  min-width: 54px;
  text-align: center;
  font-weight: 800;
}

.floating-menu{
  position: fixed;
  z-index: 80;
  display: flex;
  gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.mini-card{
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 3px 10px;
  align-items: center;
}

.mini-card b,.mini-card span{
  grid-column: 2;
}

.avatar{
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  object-fit: cover;
  background: var(--surface-3);
  color: var(--text);
  font-weight: 780;
}

.info-grid{
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
  margin: 12px 0;
}

.info-grid>.wide{
  grid-column: 1 / -1;
}

.data-table{
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

.data-table th{
  color: #fff;
  background: #0f4e82;
}

.data-table th,.data-table td{
  border: 1px solid var(--line);
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

#mainMapBox{
  flex: 1;
  min-height: 0;
  display: flex;
}

.grid-highlight span{
  display: none;
}

.priority-normal{
  border-left: 1px solid var(--line);
}

.priority-high{
  border-left: 1px solid var(--line);
}

.priority-urgent{
  border-left: 1px solid var(--line);
}

.priority-low{
  border-left: 1px solid var(--line);
}

.priority-badge{
  display: inline-flex;
  width: fit-content;
  margin-bottom: 7px;
  border-radius: 999px;
  padding: 3px 8px;
  color: #06180b;
  background: var(--good);
  font-size: 11px;
  font-weight: 760;
}

.priority-high .priority-badge{
  background: #ff9f0a;
  color: #1c1200;
}

.priority-urgent .priority-badge{
  background: var(--bad);
  color: #fff;
}

.priority-low .priority-badge{
  background: var(--accent-2);
  color: #06111c;
}

.health{
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}

.health.ok{
  color: #c9f5d7;
  background: #0b2b1a;
}

.health.warn{
  color: #ffe8b6;
  background: #352a08;
}

.diag-grid{
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 10px;
  margin: 12px 0;
}

.diag-grid div{
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: var(--surface-2);
}

.diag-grid b{
  display: block;
  font-size: 28px;
}

.compact-check{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--surface-2);
}

.compact-check span{
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.field-block{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-block>span{
  color: var(--text-2);
  font-size: 13px;
  font-weight: 760;
}

.pill.mini{
  display: inline-flex;
  margin: 2px;
  padding: 3px 7px;
  font-size: 10px;
}

.modal-backdrop{
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 28px;
  

  background: rgba(6,15,24,.50);
  backdrop-filter: blur(5px);
}

.modal-card{
  position: relative;
  width: min(960px,92vw);
  max-height: 88vh;
  overflow: auto;
  
  
  

  background: var(--surface-modal);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 28px;
  border-radius: 20px;
}

.modal-card.print-modal{
  width: min(1500px,98vw);
  max-height: 92vh;
  padding: 16px;
}

.modal-x{
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 30;
  
  
  padding: 0;
  
  

  width: 32px;
  min-height: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  border: 0;
  background: var(--surface-2);
}

.tooltip{
  position: fixed;
  z-index: 90;
  max-width: 340px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 10px 12px;
  
  
  box-shadow: var(--shadow);
  pointer-events: none;
  visibility: hidden;
  transform: translateY(4px);

  background: var(--surface-modal);
  color: var(--text);
  border-color: var(--line-strong);
}

.tooltip.show{
  visibility: visible;
  transform: translateY(0);
}

.toast{
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  border-radius: 12px;
  padding: 12px 16px;
  color: #fff;
  background: var(--accent);
  box-shadow: var(--shadow);
}

.print-preview{
  --text: #111;
  --text-2: #333;
  --muted: #555;
  --surface: #fff;
  --surface-2: #fff;
  --line: #777;
  overflow: auto;
  border-radius: 4px;
  padding: 12px;
  color: #111;
  background: #fff;
}

.print-sheet{
  width: 210mm;
  min-height: 297mm;
  margin: auto;
  padding: 14mm;
  color: #111;
  background: #fff;
  font-family: Arial,sans-serif;
}

.print-sheet.landscape{
  width: 297mm;
  min-height: 210mm;
  padding: 6mm;
}

.print-sheet.portrait,.print-preview.print-portrait .print-sheet{
  width: 210mm;
  min-height: 297mm;
  padding: 12mm 14mm;
}

.print-shift-pick{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text);
}

.tag,.pill,.priority-badge,.contract-inline{
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  border: 1px solid rgba(255,255,255,.30);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.05;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.26),0 1px 2px rgba(0,0,0,.18);
}

.tag.аито{
  background: linear-gradient(180deg,#ff4f68,#cc2c45);
}

.tag.ито{
  background: linear-gradient(180deg,#2ed4a2,#118a73);
}

.tag.ао{
  background: linear-gradient(180deg,#268fff,#0864c2);
}

.tag.кп{
  background: linear-gradient(180deg,#877cff,#6256df);
}

.tag.договор,.contract-inline{
  background: linear-gradient(180deg,#ff7790,#d84964);
}

.grid-highlight{
  position: absolute;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(0,0,0,.24),0 0 18px rgba(88,236,255,.70),0 0 34px rgba(255,64,129,.34);
  display: block;
  z-index: 9;
  border: 3px solid #ff3a70;
  border-radius: 6px;
  background: rgba(255,58,112,.035);
  animation: uteMapSquarePulse .62s ease-in-out 4 forwards;
}

.grid-highlight::after{
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 999px;
  background: #ff4081;
  box-shadow: 0 0 12px rgba(255,64,129,.82);
  display: none;
}

.priority-normal,.priority-high,.priority-urgent,.priority-low{
  border-left-width: 1px;
  border-inline-start-width: 1px;
}

.group td{
  
  
  
  
  
  
  box-shadow: none;

  padding: 8px;
  background: var(--surface-2);
  color: var(--text-2);
  border: 0;
  border-radius: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .015em;
}

.official-sign{
  justify-content: space-between;
  gap: 8mm;
  margin-top: 2mm;
  font-size: 8px;
  display: none;
}

.login-exchange-box{
  margin-top: 10px;
  
  
  
  
  text-align: center;

  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 14px 0 0;
  border-radius: 0;
}

.login-exchange-status{
  
  line-height: 1.28;
  
  margin-bottom: 8px;

  color: var(--muted);
  font-size: 11px;
}

.login-exchange-status b{
  font-weight: 700;
  
  word-break: break-all;

  color: var(--text-2);
}

.section-head-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.section-head-row>div{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-row{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.settings-row>*{
  min-width: 160px;
  max-width: 100%;
}

.settings-row>input,.settings-row>select{
  flex: 1 1 220px;
  width: auto;
}

.wide-modal{
  width: min(1160px,94vw);
}

@media (max-width:900px){
.settings-row>*{
  flex: 1 1 100%;
  min-width: 0;
}
}

.panel{
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.modal-card{
  background: var(--surface-modal);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 28px;
  border-radius: 20px;
}
.action-menu{position:relative}.action-menu>summary{list-style:none;cursor:pointer;width:36px;height:36px;display:grid;place-items:center;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--surface-card);font-size:22px}.action-menu>summary::-webkit-details-marker{display:none}.action-menu>div{position:absolute;right:0;top:42px;z-index:20;display:grid;min-width:190px;padding:var(--space-2);border:1px solid var(--line);border-radius:var(--radius-md);background:var(--surface-modal);box-shadow:var(--shadow-soft)}.action-menu button{justify-content:flex-start;width:100%;background:transparent;color:var(--text);border:0}
::-webkit-scrollbar{width:7px;height:7px}::-webkit-scrollbar-thumb{border-radius:999px;
  background: var(--line-strong);
}::-webkit-scrollbar-thumb:hover{
  background: var(--muted);
}::-webkit-scrollbar-track{background:transparent}

/* Служебное состояние скрытия должно перекрывать базовый display компонента. */
.hidden.hidden{display:none}

.login-msg {margin-top:12px;font-size:11px}
@media(max-width:760px){.login-screen{padding:20px;place-items:center}.login-card{padding:24px}.login-logo{width:108px;height:108px}}
@media(prefers-reduced-transparency:reduce){.login-card{background:var(--surface-modal);backdrop-filter:none}.modal-backdrop{backdrop-filter:none}}
