/* Главная мастера в стиле Gata: синяя карта месяца, медная кнопка, плитки */

body.on-home .app-header,
body.on-home #screen-hint-wrap {
  display: none !important;
}

.home-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 4px;
}

.home-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 2px 0;
}
.home-top img { display: block; border-radius: 9px; }
.home-brand {
  flex: 1;
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text);
}
.home-bell {
  width: 48px;
  height: 48px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  box-shadow: var(--btn2-shadow);
}
.home-bell:active { transform: scale(0.95); }
.home-bell-dot {
  position: absolute;
  top: 10px;
  right: 11px;
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background: var(--copper);
  border: 2px solid var(--surface);
}

/* Карта месяца */
.home-hero {
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 24px var(--hero-shadow);
  border: 1px solid var(--hero-edge);
}
.home-hero-top {
  position: relative;
  overflow: hidden;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--hero-from) 0%, var(--hero-to) 100%);
  color: var(--hero-text);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.home-hero-ring {
  position: absolute;
  right: -30px;
  top: -30px;
  width: 140px;
  height: 140px;
  border-radius: 70px;
  border: 1px solid var(--hero-ring);
  pointer-events: none;
}
.home-hero-mark {
  position: absolute;
  right: -28px;
  bottom: -52px;
  width: 150px;
  height: 150px;
  opacity: 0.10;
  color: var(--hero-text);
  pointer-events: none;
}
.home-hero-row {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.home-month {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
}
.home-month-bar {
  width: 4px;
  height: 22px;
  border-radius: 2px;
  background: var(--hero-accent);
}
.home-pro {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--hero-accent-soft);
}
.home-sum-block {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.home-sum-label {
  font-size: 17px;
  font-weight: 300;
  letter-spacing: 0.01em;
  color: var(--hero-muted);
}
.home-sum-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 10px;
  row-gap: 4px;
}
.home-sum {
  font-family: var(--font-head);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.home-delta {
  font-size: 14px;
  font-weight: 800;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}
.home-delta.is-up { background: var(--hero-up-bg); color: var(--hero-up-text); }
.home-delta.is-down { background: var(--hero-down-bg); color: var(--hero-down-text); }
.home-name {
  position: relative;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hero-name);
  margin-top: 2px;
}

.home-hero-strip {
  position: relative;
  overflow: hidden;
  padding: 12px 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  background: linear-gradient(180deg, var(--hero-strip-from) 0%, var(--hero-strip-to) 100%);
  box-shadow: inset 0 8px 10px -8px var(--hero-shadow-in);
}
.home-strip-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, var(--hero-shine) 45%, transparent 60%);
  pointer-events: none;
}
.home-scale {
  position: relative;
  height: 3px;
  border-radius: 2px;
  background: var(--hero-scale-bg);
  overflow: hidden;
  display: flex;
}
.home-scale-acc { background: var(--hero-acc); }
.home-scale-wait { background: var(--copper); }
.home-legend {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  column-gap: 18px;
  row-gap: 4px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}
.home-legend-item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.home-dot { width: 8px; height: 8px; border-radius: 4px; }
.home-dot.is-acc { background: var(--hero-acc); }
.home-dot.is-wait { background: var(--copper); }

/* Большая медная кнопка */
.home-new {
  min-height: 62px;
  border: none;
  border-radius: 18px;
  background: var(--btn1-bg);
  color: var(--accent-on);
  box-shadow: var(--btn1-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
}
.home-new:active { transform: scale(0.98); }
.home-new-text {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
}

/* Плитки разделов */
.home-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.home-tile {
  min-height: 96px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--btn2-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.home-tile:active { transform: scale(0.98); background: var(--surface-2); }
.home-tile-head {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.home-tile-ic {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 20px;
  border: 1.5px solid var(--tile-ring);
  color: var(--hero-acc);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.home-tile-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 11px;
  height: 11px;
  border-radius: 6px;
  background: var(--copper);
  border: 2px solid var(--surface);
}
.home-tile-count {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-muted);
}
.home-tile-badge {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent-on);
  background: var(--copper-solid);
  border-radius: 10px;
  padding: 3px 8px;
  white-space: nowrap;
}
.home-tile-label {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

/* События в колокольчике: что случилось и по какой смете */
.home-ev-label { display: block; font-weight: 700; }
.home-ev-name { display: block; font-size: 15px; color: var(--text-muted); font-weight: 500; }

/* Пункты меню, которые открываются с главной, а не снизу */
.bottom-nav .nav-btn.nav-hidden { display: none; }

/* Точка «есть новое» у пункта меню */
.nav-new-dot {
  position: absolute;
  top: -3px;
  right: -6px;
  width: 9px;
  height: 9px;
  border-radius: 5px;
  background: var(--copper);
}

/* Колокольчик: есть новое — оранжевый круг, белый колокольчик и число */
.home-bell.is-new { background: var(--copper); border-color: var(--copper); color: #FFFFFF; box-shadow: 0 0 0 4px var(--copper-tint), var(--btn2-shadow); }
.home-bell-count {
  position: absolute; top: -6px; right: -6px; min-width: 24px; height: 24px; padding: 0 6px; box-sizing: border-box;
  border-radius: 12px; background: var(--navy); color: #FFFFFF; font-size: 14px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--surface);
}

/* Объекты в работе */
.hobj-wrap { display: flex; flex-direction: column; gap: 10px; }
.hobj-h { display: flex; align-items: baseline; justify-content: space-between; font-family: var(--font-head); font-weight: 800; font-size: 20px; color: var(--text); }
.hobj-n { font-size: 17px; color: var(--text-muted); font-weight: 700; }
.hobj { border-radius: 18px; background: var(--surface); border: 1.5px solid var(--border); overflow: hidden; }
.hobj.is-open { border-color: var(--accent-ink); }
.hobj-head { width: 100%; min-height: 64px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; background: none; text-align: left; color: var(--text); cursor: pointer; font: inherit; }
.hobj-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hobj-title { font-family: var(--font-head); font-weight: 800; font-size: 18px; color: var(--text); }
.hobj-sub { font-size: 16px; color: var(--text-muted); }
.hobj-chev { flex: 0 0 auto; color: var(--text-muted); transition: transform .2s; }
.hobj.is-open .hobj-chev { transform: rotate(180deg); }
.hobj-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--copper); flex: 0 0 auto; }
.hobj-body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.hobj-money { font-size: 17px; font-weight: 700; color: var(--text); }
.hobj-track { height: 10px; border-radius: 99px; background: var(--surface-active); overflow: hidden; }
.hobj-fill { height: 100%; border-radius: 99px; background: var(--success, #15803D); }
.hobj-alert { min-height: 48px; border-radius: 12px; border: 1.5px solid var(--copper); background: var(--copper-tint); color: var(--copper-ink); font-size: 17px; font-weight: 700; cursor: pointer; font-family: inherit; }
.hobj-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hobj-btns .btn { min-height: 48px; font-size: 17px; }

/* Плитка «Объекты в работе» на главной */
.home-obj-tile {
  width: 100%; min-height: 72px; display: flex; align-items: center; gap: 12px; padding: 12px 16px; box-sizing: border-box;
  border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--btn2-shadow);
  text-align: left; color: var(--text); cursor: pointer; font: inherit;
}
.home-obj-tile.is-active { border: 2px dashed var(--copper); background: var(--copper-tint); }
.home-obj-tile:active { transform: scale(0.98); }
.home-obj-tile .home-tile-ic { position: relative; flex: 0 0 auto; }
.home-obj-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.home-obj-title { font-family: var(--font-head); font-size: 18px; font-weight: 800; color: var(--text); }
.home-obj-sub { font-size: 16px; color: var(--text-muted); }
/* счётчики на плитках — мягко-оранжевые, чтобы цеплять взгляд */
.home-tile-count { color: var(--copper); }
.obj-empty-title { font-size: 19px; font-weight: 800; color: var(--text); margin: 0 0 6px; }
.obj-empty-text { font-size: 17px; color: var(--text-muted); margin: 0; }

/* Ход работ в карточке объекта */
.hobj-stage { font-size: 17px; font-weight: 700; color: var(--text); }
.hobj-segs { display: grid; gap: 4px; }
.hobj-seg { height: 10px; border-radius: 99px; background: var(--surface-active); }
.hobj-seg.is-done { background: var(--success, #047857); }
.hobj-seg.is-now { background: var(--accent-ink); }
.hobj-chip { align-self: flex-start; font-size: 15px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--surface-active); color: var(--text-muted); }
.hobj-chip.is-ok { background: var(--success-bg, #d1fae5); color: var(--success, #047857); }
.hobj-chip.is-warn { background: var(--copper-tint); color: var(--copper-ink); }
.hobj-cam { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px !important; }
.hobj-done { min-height: 52px !important; border-color: var(--accent-ink); color: var(--accent-ink); font-weight: 700; }

/* Лист «Ход работ» */
.work-sheet { max-height: 88vh; overflow-y: auto; }
.work-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.work-st { border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); }
.work-st.is-now { border-color: var(--accent-ink); }
.work-st-head { width: 100%; min-height: 60px; display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 0; background: none; text-align: left; color: var(--text); font: inherit; cursor: pointer; }
.work-st-n { width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; font-weight: 800; background: var(--surface-active); color: var(--text-muted); }
.work-st.is-done .work-st-n { background: var(--success, #047857); color: #FFFFFF; }
.work-st.is-now .work-st-n { background: var(--accent-ink); color: #FFFFFF; }
.work-st-t { flex: 1; display: flex; flex-direction: column; font-size: 17px; font-weight: 700; }
.work-st-t small { font-size: 15px; font-weight: 500; color: var(--text-muted); }
.work-st-body { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.work-ph { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.work-ph img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.work-empty { font-size: 16px; color: var(--text-muted); margin: 0; }
.work-undo { min-height: 48px; }

/* «Завершить работы» */
.hobj-finish { min-height: 52px !important; }
.cmpl-rows { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.cmpl-row { display: flex; justify-content: space-between; font-size: 17px; color: var(--text); padding: 6px 0; border-bottom: 1px solid var(--border); }
.cmpl-row.is-warn b { color: var(--copper-ink); }
.cmpl-note { font-size: 15px; color: var(--copper-ink); margin: 4px 0 12px; }
