:root {
  --ink: #14172e;
  --muted: #747b94;
  --line: #e8eaf1;
  --paper: #ffffff;
  --surface: #f5f6fa;
  --navy: #171a43;
  --violet: #6557dc;
  --cyan: #37c6eb;
  --mint: #44d6ad;
  --coral: #ff7e78;
  --orange: #ffbd61;
  --shadow: 0 22px 60px rgba(37, 33, 91, .14);
}

* { box-sizing: border-box; }

html, body {
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

a, button, select, summary, [role="button"], input, textarea, label { touch-action: manipulation; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 4%, rgba(103, 90, 223, .85), transparent 26%),
    radial-gradient(circle at 86% 8%, rgba(46, 195, 228, .68), transparent 25%),
    linear-gradient(140deg, #18183f 0%, #262260 37%, #175b7a 100%);
  font-family: "Manrope", sans-serif;
  overflow-x: hidden;
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.auth-pending .sidebar, .auth-pending .app-shell { visibility: hidden; }
.auth-screen { position: fixed; z-index: 500; inset: 0; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 18% 10%, #6557dc 0, transparent 34%), radial-gradient(circle at 88% 85%, #2bbcc6 0, transparent 33%), #171a43; }
.auth-card { width: min(430px, 100%); padding: 34px; border: 1px solid rgba(255,255,255,.2); border-radius: 26px; background: rgba(255,255,255,.96); box-shadow: 0 35px 100px rgba(6,8,32,.42); }
.auth-logo { width: 48px; height: 48px; margin-bottom: 24px; display: grid; place-items: center; color: white; border-radius: 16px 16px 16px 5px; background: linear-gradient(145deg, #63e4dd, #6658df 70%); font-family: "Unbounded", sans-serif; font-weight: 700; }
.auth-card h2 { margin-bottom: 9px; }
.auth-description { margin: 0 0 23px; color: #777d91; font-size: 12px; }
.auth-card label { display: block; margin-bottom: 14px; color: #777d91; font-size: 11px; font-weight: 700; }
.auth-card input { width: 100%; height: 48px; margin-top: 6px; padding: 0 13px; border: 1px solid #e1e3eb; border-radius: 11px; outline: 0; background: #fbfbfd; }
.auth-card input:focus { border-color: #756ade; box-shadow: 0 0 0 3px rgba(101,87,220,.1); }
.auth-card .primary-button { width: 100%; margin-top: 5px; }
.auth-error { min-height: 18px; margin: 0; color: #df625e; font-size: 10px; }

.aurora {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(3px);
  pointer-events: none;
}

.aurora-one {
  width: 42vw;
  height: 42vw;
  right: -10vw;
  top: 16vh;
  background: linear-gradient(145deg, rgba(83, 249, 213, .8), rgba(73, 116, 236, .35) 47%, transparent 72%);
  opacity: .68;
  transform: rotate(-22deg);
}

.aurora-two {
  width: 24vw;
  height: 24vw;
  left: 36vw;
  bottom: -14vw;
  background: rgba(121, 75, 223, .7);
  filter: blur(65px);
}

.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  width: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(17, 19, 54, .84);
  border-right: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(22px);
}

.brand {
  height: 78px;
  width: 100%;
  display: grid;
  place-items: center;
  text-decoration: none;
}

.brand-mark {
  width: 58.8px;
  height: 29.4px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, #63e4dd, #6658df 70%);
  border-radius: 15px 15px 15px 5px;
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(71, 210, 220, .24);
}

.side-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 14px 10px;
}

.side-link {
  position: relative;
  width: 56px;
  height: 52px;
  padding: 0;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.52);
  border: 0;
  border-radius: 15px;
  background: transparent;
  transition: .2s ease;
}

.side-link:hover, .side-link.active {
  color: white;
  background: rgba(255,255,255,.12);
}

.side-link.active::before {
  content: "";
  position: absolute;
  left: -10px;
  width: 3px;
  height: 24px;
  border-radius: 3px;
  background: #6ce0dc;
  box-shadow: 0 0 14px #54d9d2;
}

.icon { font-size: 24px; line-height: 1; }
.side-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  color: white;
  background: #ff817b;
  border-radius: 9px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}
.side-bottom { margin: 0 10px 18px; }
.side-label { display: none; }

.app-shell { margin-left: 78px; min-height: 100vh; padding: 14px; }

.topbar {
  height: 64px;
  padding: 0 18px 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 22px 22px 0 0;
  background: rgba(28, 30, 70, .4);
  backdrop-filter: blur(24px);
}

.product-nav, .top-actions, .heading-actions, .view-switcher {
  display: flex;
  align-items: center;
}

.product-nav { gap: 25px; height: 100%; }
.product-link {
  position: relative;
  height: 100%;
  padding: 0;
  color: rgba(255,255,255,.65);
  border: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.product-link:hover, .product-link.active { color: white; }
.product-link.active::after {
  content: "";
  position: absolute;
  height: 3px;
  left: 0;
  right: 0;
  bottom: 0;
  background: #70e3db;
  border-radius: 3px 3px 0 0;
}

.top-actions { gap: 8px; }
.round-button {
  position: relative;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 12px;
  color: white;
  background: rgba(255,255,255,.08);
}
.notification-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  right: 8px;
  top: 7px;
  background: #ff817b;
  border-radius: 50%;
}
.profile-button {
  height: 42px;
  margin-left: 6px;
  padding: 0 10px 0 5px;
  display: flex;
  gap: 8px;
  align-items: center;
  color: white;
  border: 0;
  background: transparent;
  font-weight: 600;
}
.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #262247;
  background: #75e5d9;
  font-size: 12px;
  font-weight: 800;
}

.workspace {
  min-height: calc(100vh - 92px);
  padding: 28px;
  background: rgba(247, 248, 252, .96);
  border-radius: 0 0 22px 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.products-workspace { min-height: calc(100vh - 92px); }
.product-toolbar { margin-bottom: 18px; padding: 11px; display: grid; grid-template-columns: auto minmax(260px, 1fr) repeat(3, auto); align-items: center; gap: 12px; border-radius: 18px; }
.product-tabs { display: flex; gap: 4px; background: #f0f1f5; border-radius: 10px; padding: 3px; }
.product-tab { padding: 6px 14px; border: 0; border-radius: 8px; background: transparent; color: #7a7f92; font-size: 11px; font-weight: 700; cursor: pointer; }
.product-tab.active { background: white; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.product-tab:hover:not(.active) { color: var(--ink); }
.product-stat { min-width: 130px; padding: 6px 14px; border-left: 1px solid var(--line); }
.product-stat small, .product-stat strong { display: block; }
.product-stat small { margin-bottom: 4px; color: #989daf; font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.product-stat strong { font-size: 15px; }
.product-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 17px; background: white; box-shadow: 0 10px 30px rgba(43,45,84,.05); }
.product-table { width: 100%; border-collapse: collapse; min-width: 850px; }
.product-table th { padding: 13px 16px; color: #9499aa; background: #f6f7fa; text-align: left; font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.product-table td { padding: 15px 16px; border-top: 1px solid var(--line); color: #60667c; font-size: 11px; }
.product-table td strong { display: block; color: var(--ink); font-size: 12px; }
.product-table td small { display: block; margin-top: 3px; color: #9a9eae; }
.product-actions { white-space: nowrap; text-align: right; }
.product-edit, .product-delete, .product-restore { width: 32px; height: 32px; border: 0; border-radius: 9px; color: #a0a4b3; background: transparent; cursor: pointer; font-size: 15px; }
.product-edit:hover { color: #3b82f6; background: #eff6ff; }
.product-delete:hover { color: #d15854; background: #fff0ef; }
.product-restore:hover { color: #258b72; background: #e9f9f3; }
.product-trash-row td { opacity: .65; }
.product-empty-row td { padding: 55px; color: #9a9eae; text-align: center; }

.workspace-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 5px;
  color: #878ca1;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1, h2 { margin: 0; font-family: "Unbounded", sans-serif; letter-spacing: -.045em; }
h1 { font-size: clamp(30px, 3vw, 44px); }
h2 { font-size: 24px; }
.heading-actions { gap: 10px; }

.primary-button, .ghost-button {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 13px;
  font-weight: 700;
  border: 0;
}
.primary-button {
  color: white;
  background: linear-gradient(135deg, #6659df, #4e84e8);
  box-shadow: 0 10px 22px rgba(87, 91, 218, .24);
}
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 13px 27px rgba(87, 91, 218, .3); }
.ghost-button { color: #535a72; background: white; border: 1px solid var(--line); }
.trash-button { width: 44px; height: 44px; display: grid; place-items: center; color: #737990; border: 1px solid var(--line); border-radius: 13px; background: white; font-size: 21px; transition: .18s ease; }
.trash-button:hover { color: #d15854; border-color: #ffd3d0; background: #fff1f0; }

.glass-panel {
  background: rgba(255,255,255,.8);
  border: 1px solid white;
  box-shadow: 0 10px 30px rgba(43, 45, 84, .07);
}

.toolbar {
  min-height: 72px;
  padding: 10px;
  display: grid;
  grid-template-columns: 235px minmax(260px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border-radius: 18px;
}

.pipeline-button {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  border: 0;
  border-radius: 12px;
  background: #f2f3f8;
}
.pipeline-button > span:nth-child(2) { flex: 1; }
.pipeline-button small, .summary-card small {
  display: block;
  color: #989daf;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
}
.pipeline-button strong { font-size: 13px; }
.pipeline-dot { width: 9px; height: 9px; border-radius: 50%; background: #6358df; }
.pipeline-dot.green { background: var(--mint); }
.pipeline-dot.orange { background: var(--orange); }

.search-wrap {
  position: relative;
  height: 52px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.search-icon { padding-left: 15px; color: #858ba1; font-size: 22px; }
.search-wrap input { width: 100%; height: 100%; border: 0; outline: 0; padding: 0 10px; color: var(--ink); background: transparent; }
.search-wrap kbd { margin-right: 12px; padding: 4px 7px; color: #999eb0; border: 1px solid #e4e6ed; border-radius: 6px; background: #f8f8fb; font-size: 10px; white-space: nowrap; }
.filter-button, .view-button {
  height: 44px;
  border: 1px solid var(--line);
  color: #697087;
  background: white;
}
.filter-button { padding: 0 14px; border-radius: 12px; font-weight: 700; }
.view-switcher { padding: 4px; background: #f0f1f5; border-radius: 12px; }
.view-button { width: 38px; border: 0; background: transparent; border-radius: 9px; }
.view-button.active { color: #5d57d9; background: white; box-shadow: 0 3px 10px rgba(49,50,90,.1); }

.summary-row {
  margin: 16px 0 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr) 1.25fr;
  gap: 12px;
}
.summary-card {
  min-height: 78px;
  padding: 14px 17px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}
.summary-card strong { display: block; margin-top: 4px; font-size: 20px; }
.summary-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; font-weight: 800; }
.summary-icon.blue { color: #4c7de6; background: #e9efff; }
.summary-icon.mint { color: #25a986; background: #e4faf3; }
.summary-icon.coral { color: #e76661; background: #ffebe9; }
.spark-card { justify-content: space-between; }
.spark-card svg { width: 44%; height: 44px; overflow: visible; }
.spark-card path { fill: none; stroke: #47caae; stroke-width: 3; stroke-linecap: round; }
.spark-card circle { fill: white; stroke: #47caae; stroke-width: 2; cursor: help; }

.board {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: clamp(7px, .8vw, 12px);
  overflow-x: hidden;
  padding-bottom: 12px;
  scrollbar-width: thin;
}

.column {
  min-width: 0;
  min-height: 455px;
  border-radius: 18px;
  background: #eceef4;
}
.column-title { overflow-wrap: anywhere; }
.deal-card { min-width: 0; }
.deal-card-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: -16px -16px 12px;
  padding: 9px 12px;
  color: white;
  border-radius: 14px 14px 4px 4px;
  transition: margin .7s cubic-bezier(.4,0,.2,1), padding .7s cubic-bezier(.4,0,.2,1);
}
.column:nth-child(1) .deal-card-header { background: linear-gradient(135deg, #29bbdf, #347fd6); }
.column:nth-child(2) .deal-card-header { background: linear-gradient(135deg, #5c86e5, #6460dc); }
.column:nth-child(3) .deal-card-header { background: linear-gradient(135deg, #8a70d8, #7850bb); }
.column:nth-child(4) .deal-card-header { background: linear-gradient(135deg, #55c4aa, #36a98d); }
.column:nth-child(5) .deal-card-header { background: linear-gradient(135deg, #f1ab5b, #e78767); }
.column:nth-child(6) .deal-card-header { background: linear-gradient(135deg, #f7c948, #f5a623); }
.column:nth-child(7) .deal-card-header { background: linear-gradient(135deg, #6bcb9a, #3daa7a); }
.deal-card-header .deal-id { position: static; margin: 0; color: rgba(255,255,255,.85); font-size: 11px; font-weight: 700; }
.deal-card-header .deal-title { width: auto; margin: 0; color: white; font-size: 12px; font-weight: 800; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deal-card-header .deal-amount {
  min-width: 0;
  overflow: hidden;
  text-align: right;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
}
.deal-card-header .deal-amount-orig { color: rgba(255,255,255,.6); font-weight: 400; font-size: 10px; }
.deal-card.collapsed {
  grid-template-rows: auto 0fr;
  padding: 0;
  cursor: pointer;
}
.deal-card.collapsed .deal-card-header {
  margin: 0;
  border-radius: 14px;
}
.column-header {
  position: relative;
  min-height: 74px;
  padding: 15px 15px 14px 18px;
  color: white;
  border-radius: 18px 18px 4px 4px;
  overflow: hidden;
}
.column-header::after {
  content: "";
  position: absolute;
  width: 80px;
  height: 80px;
  right: -25px;
  top: -35px;
  border: 14px solid rgba(255,255,255,.11);
  border-radius: 50%;
}
.column:nth-child(1) .column-header { background: linear-gradient(135deg, #29bbdf, #347fd6); }
.column:nth-child(2) .column-header { background: linear-gradient(135deg, #5c86e5, #6460dc); }
.column:nth-child(3) .column-header { background: linear-gradient(135deg, #8a70d8, #7850bb); }
.column:nth-child(4) .column-header { background: linear-gradient(135deg, #55c4aa, #36a98d); }
.column:nth-child(5) .column-header { background: linear-gradient(135deg, #f1ab5b, #e78767); }
.column:nth-child(6) .column-header { background: linear-gradient(135deg, #f7c948, #f5a623); }
.column:nth-child(7) .column-header { background: linear-gradient(135deg, #6bcb9a, #3daa7a); }
.column-title-row { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 10px; }
.column-title { font-size: 10px; font-weight: 800; text-transform: uppercase; }
.column-count { min-width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.17); font-size: 11px; font-weight: 800; }
.column-total { position: relative; z-index: 1; margin-top: 6px; color: rgba(255,255,255,.76); font-size: 11px; }
.column-body { min-height: 370px; padding: 10px; }
.column-body.drag-over { background: rgba(100, 88, 223, .08); border-radius: 0 0 18px 18px; }

.deal-card {
  position: relative;
  margin-bottom: 9px;
  padding: 15px;
  border: 1px solid rgba(226,228,236,.9);
  border-radius: 14px;
  background: white;
  box-shadow: 0 7px 18px rgba(44,46,79,.055);
  cursor: grab;
  display: grid;
  grid-template-rows: auto 1fr;
  transition: transform .18s ease, box-shadow .18s ease, grid-template-rows .7s cubic-bezier(.4,0,.2,1), padding .7s cubic-bezier(.4,0,.2,1);
  animation: cardIn .35s both;
}
.deal-card-body { min-height: 0; overflow: hidden; }
.deal-card:hover { transform: translateY(-2px); box-shadow: 0 12px 25px rgba(44,46,79,.11); }
.deal-card:active { cursor: grabbing; }
.deal-card.dragging { opacity: .4; }
.deal-card.attention::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 15px;
  bottom: 15px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--coral);
}
.approval-status { margin: 13px 0 11px; }
.approval-copy { margin-bottom: 6px; display: flex; justify-content: space-between; color: #858a9d; font-size: 9px; font-weight: 700; }
.approval-copy-right { justify-content: flex-end; text-align: right; }
.approval-signer-list { width: 100%; display: grid; gap: 4px; }
.approval-signer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.approval-signer span { min-width: 0; overflow: hidden; color: #6f7487; text-overflow: ellipsis; white-space: nowrap; }
.approval-signer strong { flex: none; font-size: 8px; }
.approval-signer strong.signed { color: #249276; }
.approval-signer strong.unsigned { color: #cf5454; }
.approval-copy strong { color: #6a607f; font-size: 9px; }
.approval-track { height: 5px; overflow: hidden; border-radius: 10px; background: #e9eaf0; }
.approval-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffad64, #6c61dc); transition: width .3s ease; }
.approval-status.complete .approval-copy, .approval-status.complete .approval-copy strong { color: #269b7d; }
.approval-status.complete .approval-fill { background: linear-gradient(90deg, #41caa5, #58d7ba); }
.deal-menu {
  position: absolute;
  right: 10px;
  top: 9px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  color: #a1a5b3;
  background: transparent;
}
.deal-menu:hover { color: var(--coral); background: #fff0ef; }
.deal-comment-btn { position: absolute; left: 6px; top: 9px; width: 28px; height: 28px; border: 0; border-radius: 8px; color: #b5b9c7; background: transparent; font-size: 14px; display: grid; place-items: center; }
.deal-comment-btn:hover { color: #4d5368; background: #f0f1f5; }
.deal-comment-btn.has-comment { color: #d15854; }
.deal-comment-btn.has-comment:hover { color: #b94541; background: #fff0ef; }
.deal-comment-btn.resolved { color: #249276; }
.deal-comment-btn.resolved:hover { color: #1d7a62; background: #e4faf3; }
.deal-title { width: calc(100% - 22px); margin: 0 0 9px; margin-left: 0; font-size: 13px; font-weight: 800; line-height: 1.4; }
.deal-id { margin-left: 0; margin-top: -5px; }
.deal-amount { font-size: 17px; font-weight: 800; }
.deal-client { margin: 5px 0 12px; color: #7a8095; font-size: 11px; }
.deal-initiator { margin: -7px 0 10px; color: #9a9eae; font-size: 10px; }
.deal-initiator { margin: -7px 0 10px; color: #9a9eae; font-size: 10px; }
.deal-assignee { margin: 0 0 11px; display: block; color: #777d91; font-size: 10px; }
.deal-assignee select { width: 100%; height: 34px; margin-top: 5px; padding: 0 8px; border: 1px solid #e1e3eb; border-radius: 9px; background: #fbfbfd; color: #4d5368; font-size: 10px; }
.deal-footer { min-width: 0; display: flex; align-items: center; justify-content: flex-start; gap: 9px; padding-top: 11px; border-top: 1px solid #eff0f4; }
.deal-due { color: #9297a7; font-size: 10px; }
.deal-due.late { color: #e46762; font-weight: 700; }
.owner { width: 27px; height: 27px; display: grid; place-items: center; overflow: hidden; color: white; border: 2px solid white; border-radius: 9px; background: linear-gradient(145deg, #6558dc, #43bad6); font-size: 9px; font-weight: 800; line-height: 1; white-space: nowrap; box-shadow: 0 2px 6px rgba(55,57,90,.2); }
.deal-footer .owner-label { width: 27px; min-width: 27px; max-width: 27px; margin-left: auto; margin-right: 30px; padding: 0; display: grid; overflow: hidden; line-height: 1; text-align: center; white-space: nowrap; }
.empty-column { padding: 25px 10px; text-align: center; color: #a0a4b3; font-size: 11px; border: 1px dashed #d6d9e2; border-radius: 12px; }

.deal-list { border: 1px solid var(--line); border-radius: 17px; overflow: hidden; background: white; }
.list-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 60px; gap: 16px; padding: 15px 18px; align-items: center; border-bottom: 1px solid var(--line); font-size: 12px; }
.list-row[data-edit-id] { cursor: pointer; transition: background .18s ease; }
.list-row[data-edit-id]:hover { background: #f8f8fc; }
.list-row:last-child { border-bottom: 0; }
.list-header { color: #9297a7; background: #f6f7fa; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.stage-pill { width: max-content; padding: 6px 9px; border-radius: 8px; color: #5f5bd2; background: #efefff; font-size: 10px; font-weight: 700; }
.hidden { display: none !important; }

.dropdown {
  position: fixed;
  z-index: 50;
  width: 235px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  box-shadow: var(--shadow);
}
.dropdown button { width: 100%; padding: 11px; display: flex; gap: 10px; align-items: center; border: 0; border-radius: 9px; color: #4d5369; background: white; text-align: left; font-size: 12px; }
.dropdown button:hover { background: #f2f3f8; }

.deal-modal {
  width: min(570px, calc(100vw - 30px));
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: white;
  box-shadow: 0 30px 100px rgba(21, 21, 56, .35);
}
.admin-modal { width: min(1040px, calc(100vw - 30px)); height: min(720px, calc(100vh - 30px)); padding: 0; border: 0; border-radius: 23px; background: white; box-shadow: 0 30px 100px rgba(21,21,56,.38); }
.admin-modal::backdrop { background: rgba(18,19,50,.58); backdrop-filter: blur(8px); }
.admin-shell { height: 100%; display: grid; grid-template-columns: 330px 1fr; }
.admin-users { padding: 25px 18px; overflow: hidden; border-right: 1px solid var(--line); background: #f5f6fa; }
.admin-list-heading { padding: 0 7px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.admin-list-heading h2 { font-size: 20px; }
.compact-button { min-height: 36px; padding: 0 11px; font-size: 10px; }
.admin-user-list { height: calc(100% - 70px); overflow-y: auto; }
.admin-user-row { width: 100%; margin-bottom: 7px; padding: 11px; display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 9px; text-align: left; border: 1px solid transparent; border-radius: 12px; background: transparent; }
.admin-user-row:hover, .admin-user-row.active { border-color: #dedff0; background: white; box-shadow: 0 5px 16px rgba(43,45,84,.06); }
.admin-user-row.inactive { opacity: .52; }
.admin-user-avatar { width: 38px; height: 38px; display: grid; place-items: center; color: white; border-radius: 11px; background: linear-gradient(145deg,#6558dc,#43bad6); font-size: 10px; font-weight: 800; }
.admin-user-copy strong, .admin-user-copy small { display: block; }
.admin-user-copy strong { margin-bottom: 3px; color: var(--ink); font-size: 11px; }
.admin-user-copy small { color: #969aad; font-size: 9px; }
.role-badge { padding: 5px 7px; color: #625bd1; border-radius: 7px; background: #ecebff; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.admin-editor { padding: 28px; overflow-y: auto; }
.admin-editor .modal-heading { margin-bottom: 22px; }
.admin-editor label { display: block; margin-bottom: 15px; color: #777d91; font-size: 11px; font-weight: 700; }
.admin-editor input:not([type="checkbox"]), .admin-editor select { width: 100%; height: 47px; margin-top: 6px; padding: 0 13px; border: 1px solid #e1e3eb; border-radius: 11px; outline: 0; background: #fbfbfd; }
.active-user-toggle span { height: 47px; margin-top: 6px; padding: 0 13px; display: flex; align-items: center; gap: 8px; border: 1px solid #e1e3eb; border-radius: 11px; background: #fbfbfd; color: #4d5368; }
.permission-fieldset { margin: 1px 0 18px; padding: 14px; border: 1px solid #e1e3eb; border-radius: 13px; }
.permission-fieldset legend { padding: 0 6px; color: #777d91; font-size: 11px; font-weight: 800; }
.permission-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.permission-option { min-height: 42px; padding: 8px 10px; display: flex; align-items: center; gap: 8px; border: 1px solid #e7e8ef; border-radius: 10px; color: #53596f; background: white; font-size: 9px; cursor: pointer; }
.permission-option:has(input:checked) { color: #288a72; border-color: #8fddca; background: #effbf7; }
.credential-notice { margin-bottom: 17px; padding: 13px 15px; color: #4e5570; border: 1px solid #a8dfd2; border-radius: 12px; background: #effbf7; font-size: 11px; line-height: 1.6; }
.credential-notice strong { color: #21886e; }
.admin-form-actions { display: flex; align-items: center; gap: 9px; }
.action-spacer { flex: 1; }
.danger-button { min-height: 44px; padding: 0 15px; color: #d15854; border: 1px solid #ffd3d0; border-radius: 13px; background: #fff1f0; font-weight: 700; }
.danger-button.activate-button { color: #21886e; border-color: #a8dfd2; background: #effbf7; }
.trash-modal { width: min(700px, calc(100vw - 30px)); max-height: min(680px, calc(100vh - 30px)); padding: 0; border: 0; border-radius: 22px; background: white; box-shadow: 0 30px 100px rgba(21,21,56,.38); }
.trash-modal::backdrop { background: rgba(18,19,50,.58); backdrop-filter: blur(8px); }
.trash-modal-content { padding: 27px; }
.trash-description { margin: -9px 0 18px; color: #8d92a5; font-size: 11px; }
.trash-list { max-height: 480px; overflow-y: auto; }
.trash-item { margin-bottom: 9px; padding: 14px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 13px; background: #fafafd; }
.trash-item-copy strong, .trash-item-copy span { display: block; }
.trash-item-copy strong { margin-bottom: 5px; font-size: 12px; }
.trash-item-copy span { color: #9095a7; font-size: 9px; }
.restore-button { min-height: 36px; padding: 0 12px; color: #21886e; border: 1px solid #a8dfd2; border-radius: 10px; background: #effbf7; font-size: 10px; font-weight: 800; }
.trash-empty { padding: 45px 20px; text-align: center; color: #9a9eae; border: 1px dashed #d9dbe4; border-radius: 13px; font-size: 11px; }
.deal-modal::backdrop { background: rgba(18, 19, 50, .55); backdrop-filter: blur(8px); }
.deal-modal form { padding: 15px 16px; }
.modal-heading { margin-bottom: 15px; display: flex; justify-content: space-between; align-items: flex-start; }
.close-button { width: 36px; height: 36px; border: 0; border-radius: 11px; color: #777d91; background: #f3f4f7; font-size: 24px; }
.deal-modal label { display: block; margin-bottom: 12px; color: #777d91; font-size: 11px; font-weight: 700; }
.deal-modal input, .deal-modal select { width: 100%; height: 47px; margin-top: 6px; padding: 0 13px; color: var(--ink); border: 1px solid #e1e3eb; border-radius: 11px; outline: 0; background: #fbfbfd; }
.deal-modal input:focus, .deal-modal select:focus { border-color: #756ade; box-shadow: 0 0 0 3px rgba(101,87,220,.1); }
.fixed-field { cursor: default; }
.fixed-field select, .fixed-field input { color: #666b7d; background: #f1f2f6; cursor: default; box-shadow: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-grid .full-form-field { grid-column: 1 / -1; }
.modal-actions { margin-top: 8px; display: flex; justify-content: flex-end; align-items: center; gap: 9px; }
.icon-button { min-width: 44px; min-height: 44px; padding: 0 12px; display: grid; place-items: center; font-size: 15px; }
.danger-icon { color: #d15854 !important; border-color: #ffd3d0 !important; background: #fff1f0 !important; }
.danger-icon:hover { background: #ffe2e0 !important; }
.dynamic-form:not(.hidden) { animation: formReveal .24s ease both; }
.procurement-fields { margin-bottom: 1px; }
#locationField { position: relative; }
.memo-products { padding: 14px; border: 1px solid #e1e3eb; border-radius: 13px; background: #fbfbfd; }
.memo-products-heading { margin-bottom: 11px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.memo-heading-actions { display: flex; gap: 7px; }
.memo-products-heading strong, .memo-products-heading small { display: block; }
.memo-products-heading strong { color: #4d5368; font-size: 11px; }
.memo-products-heading small { margin-top: 3px; color: #9a9eae; font-size: 9px; }
.memo-product-header { margin-bottom: 4px; display: grid; grid-template-columns: minmax(250px, 1fr) 81px 70px 28px; gap: 4px; padding: 0 1px; color: #9a9eae; font-size: 8px; text-transform: uppercase; letter-spacing: .3px; }
.memo-product-header span { display: flex; align-items: center; }
.memo-hdr-qty { margin-left: 16px; }
.memo-hdr-price { margin-left: 2px; }
.memo-product-line { margin-bottom: 3px; display: grid; grid-template-columns: minmax(250px, 1fr) 81px 70px 28px; align-items: center; gap: 4px; }
.memo-product-line label { margin: 0; }
.memo-product-line input { height: 28px; margin-top: 0; padding: 0 6px; font-size: 10px; border-radius: 6px; -moz-appearance: textfield; }
.memo-product-line input::-webkit-outer-spin-button,
.memo-product-line input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.memo-item-picker { width: 100%; max-width: 284px; }
.memo-picker-wrap { position: relative; min-width: 0; }
.memo-picker-wrap .memo-item-picker { max-width: 100%; }
.memo-picker-list {
  position: absolute;
  z-index: 60;
  top: calc(100% + 4px);
  left: 0;
  width: min(340px, 92vw);
  max-height: 280px;
  overflow-y: auto;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  box-shadow: 0 18px 45px rgba(30, 32, 68, .18);
}
.memo-picker-option {
  width: 100%;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid #f1f2f6;
  background: transparent;
  text-align: left;
}
.memo-picker-option:last-child { border-bottom: 0; }
.memo-picker-option:hover, .memo-picker-option:active { background: #f4f2ff; }
.memo-picker-name { color: var(--ink); font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.memo-picker-sku { color: #9a9eae; font-size: 10px; white-space: nowrap; }
.memo-item-qty-wrap { display: flex; align-items: center; gap: 2px; height: 28px; }
.memo-item-qty-wrap input { width: 0; flex: 1; min-width: 20px; -moz-appearance: textfield; }
.memo-item-qty-wrap input::-webkit-outer-spin-button,
.memo-item-qty-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.memo-item-value-label { display: flex; align-items: center; justify-content: center; height: 28px; padding: 0 4px; margin-left: -15px; color: #6558dc; border-bottom: 1px dashed #8e85df; cursor: pointer; user-select: none; font-size: 10px; white-space: nowrap; }
.memo-item-value-label:focus-visible { outline: 2px solid rgba(101,87,220,.35); outline-offset: 2px; border-radius: 3px; }
.memo-product-unit { height: 28px; margin-top: 0; padding: 0 6px; display: flex; align-items: center; color: #808598; border: 1px solid #e1e3eb; border-radius: 6px; background: white; font-size: 9px; }
.memo-product-remove { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 6px; color: #a0a4b3; background: transparent; font-size: 14px; }
.memo-product-remove:hover { color: #d15854; background: #fff0ef; }
.memo-products-total { margin-top: 12px; padding-top: 11px; display: flex; justify-content: space-between; border-top: 1px solid #e1e3eb; color: #777d91; font-size: 11px; }
.memo-products-total strong { color: var(--ink); font-size: 15px; }
.memo-products.locked .memo-product-lines { opacity: .72; }
.memo-products.locked .memo-product-remove { display: none; }
.memo-products.collapsed .memo-product-lines,
.memo-products.collapsed .memo-products-total { display: none; }
.memo-products.collapsed .memo-products-heading { margin-bottom: 0; }
.quote-products { border-color: #cfcbea; background: #f8f7ff; }
.quote-product-line { width: 100%; min-width: 0; margin-bottom: 9px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(70px, .45fr) minmax(90px, .6fr); align-items: end; gap: 8px; }
.quote-product-line > * { min-width: 0; }
.quote-product-line label { margin: 0; }
.quote-product-line input { min-width: 0; max-width: 100%; }
.quote-product-name { min-height: 47px; padding: 8px 10px; display: flex; flex-direction: column; justify-content: center; border: 1px solid #e1e3eb; border-radius: 11px; background: white; }
.quote-product-name strong, .quote-product-name small { display: block; }
.quote-product-name strong { color: #4d5368; font-size: 10px; }
.quote-product-name small { margin-top: 3px; color: #9a9eae; font-size: 8px; }
.quote-products.locked .quote-product-lines { opacity: .72; }
.comment-item { margin-bottom: 8px; padding: 8px 10px; border-radius: 10px; background: white; border-left: 3px solid #e1e3eb; }
.comment-item.unresolved { border-left-color: #d15854; background: #fff8f7; }
.comment-item.resolved { border-left-color: #249276; background: #f5fdfa; }
.comment-meta { font-size: 9px; color: #9a9eae; margin-bottom: 4px; }
.comment-text { font-size: 11px; color: #4d5368; line-height: 1.4; white-space: pre-wrap; }
.signature-fieldset { margin: 3px 0 17px; padding: 14px; border: 1px solid #e1e3eb; border-radius: 13px; background: #fbfbfd; }
.signature-fieldset legend { padding: 0 6px; color: #777d91; font-size: 11px; font-weight: 800; }
.signature-hint { margin: -2px 0 10px; color: #9a9eae; font-size: 9px; }
.signature-checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.signature-person { min-height: 43px; margin: 0 !important; padding: 7px 9px; display: flex !important; align-items: center; gap: 9px; border: 1px solid #e7e8ef; border-radius: 10px; background: white; cursor: pointer; transition: .18s ease; }
.signature-person:hover { border-color: #bcb7e8; }
.signature-person:has(input:checked) { color: #288a72; border-color: #8fddca; background: #effbf7; }
.signature-person input { width: 18px; height: 18px; margin: 0; accent-color: #40b99a; }
.signature-person span { color: #4d5368; font-size: 10px; line-height: 1.25; }

@keyframes formReveal {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 25px;
  padding: 12px 18px;
  color: white;
  border-radius: 12px;
  background: #1d2046;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 20px);
  transition: .25s ease;
  font-size: 12px;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1050px) {
  .product-nav { gap: 18px; overflow-x: auto; scrollbar-width: none; }
  .product-nav::-webkit-scrollbar { display: none; }
  .summary-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  body { background: #171a43; }
  .sidebar { inset: auto 0 0 0; width: 100%; height: 68px; flex-direction: row; justify-content: center; border-right: 0; border-top: 1px solid rgba(255,255,255,.1); }
  .brand, .side-bottom, .side-link:nth-child(n+7) { display: none; }
  .side-nav { flex: initial; flex-direction: row; justify-content: center; width: auto; padding: 6px; }
  .side-link.active::before { width: 24px; height: 3px; left: 16px; top: -6px; }
  .app-shell { margin-left: 0; padding: 0 0 68px; }
  .topbar { height: 58px; border-radius: 0; padding: 0 14px; }
  .product-nav { flex: 1; min-width: 0; gap: 14px; overflow-x: auto; scrollbar-width: none; }
  .product-nav::-webkit-scrollbar { display: none; }
  .product-link { font-size: 12px; white-space: nowrap; }
  .product-link:nth-child(3), .product-link:nth-child(4) { display: block; }
  .more-link, .round-button, .profile-name { display: none; }
  .workspace { min-height: calc(100vh - 126px); padding: 19px 14px 28px; border-radius: 0; }
  .workspace-heading { align-items: center; }
  .workspace-heading .ghost-button { display: none; }
  .primary-button { padding: 0 13px; font-size: 12px; min-height: 44px; }
  .ghost-button, .trash-button { min-height: 44px; }
  .toolbar { grid-template-columns: 1fr auto; }
  .pipeline-button { grid-column: 1 / -1; }
  .filter-button span { display: none; }
  .view-switcher { display: none; }
  .summary-row { display: flex; overflow-x: auto; scrollbar-width: none; }
  .summary-row::-webkit-scrollbar { display: none; }
  .summary-card { min-width: 180px; }
  .spark-card { min-width: 240px; }
  .board { grid-template-columns: repeat(7, 82vw); overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; padding: 4px 0 12px; }
  .column { scroll-snap-align: center; scroll-snap-stop: always; }
  .column-header { min-height: 66px; padding: 13px 13px 12px 15px; }
  .column-body { min-height: 320px; padding: 8px; }
  .column-title { font-size: 9px; }
  .deal-card { padding: 13px; }
  .deal-card-header { margin: -14px -14px 12px; }
  .deal-card.collapsed { padding: 0; }
  .deal-card.collapsed .deal-card-header { margin: 0; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .signature-checklist { grid-template-columns: 1fr; }
  .memo-product-header { grid-template-columns: minmax(0,1fr) 62px 70px 32px; gap: 4px; font-size: 8px; }
  .memo-product-line { grid-template-columns: minmax(0,1fr) 62px 70px 32px; gap: 4px; }
  .memo-product-line input { height: 38px; font-size: 16px; }
  .memo-item-qty-wrap { height: 38px; }
  .memo-item-value-label { height: 38px; font-size: 9px; margin-left: -4px; }
  .memo-product-remove { width: 34px; height: 38px; font-size: 14px; }
  .memo-products { padding: 10px; }
  .deal-modal { border-radius: 16px; max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); overflow-y: auto; overflow-x: hidden; overscroll-behavior-x: none; touch-action: pan-y; }
  .deal-modal form { padding: 12px; }
  .deal-modal input, .deal-modal select, .deal-modal textarea { height: 44px; font-size: 16px; }
  .modal-heading { margin-bottom: 10px; }
  .modal-actions { gap: 10px; }
  .modal-actions .primary-button, .modal-actions .ghost-button { flex: 1; }
  .quote-product-line { grid-template-columns: 1fr 1fr; }
  .quote-product-line > .quote-product-name { grid-column: 1 / -1; }
  .admin-modal { height: calc(100vh - 16px); width: calc(100vw - 16px); }
  .admin-shell { grid-template-columns: 1fr; overflow-y: auto; }
  .admin-users { min-height: 280px; border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-user-list { height: 200px; }
  .permission-grid { grid-template-columns: 1fr 1fr; }
  .auth-screen { padding: 14px; }
  .auth-card { padding: 24px 18px; border-radius: 20px; }
  .auth-card input { height: 48px; }
  .trash-modal-content { padding: 18px; }
  .trash-item { padding: 14px; }
  .trash-item-copy { min-width: 0; }
  .trash-item-copy strong { overflow-wrap: anywhere; }
  .product-toolbar { grid-template-columns: repeat(3, 1fr); }
  .product-toolbar .product-tabs { grid-column: 1 / -1; justify-content: center; }
  .product-toolbar .search-wrap { grid-column: 1 / -1; }
  .product-stat { min-width: 0; border-left: 0; padding: 8px; }

  .product-table-wrap { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .product-table, .product-table thead, .product-table tbody { display: block; }
  .product-table { min-width: 0; }
  .product-table thead { display: none; }
  .product-table tbody { display: block; }
  .product-table tr { display: block; margin-bottom: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 4px 12px rgba(43,45,84,.05); }
  .product-table tr:last-child { margin-bottom: 0; }
  .product-table td { display: grid; grid-template-columns: minmax(92px, .85fr) 1.15fr; gap: 10px; align-items: center; padding: 7px 0; border: 0; font-size: 12px; }
  .product-table td::before { content: attr(data-label); color: #9a9eae; font-size: 10px; font-weight: 700; letter-spacing: .03em; }
  .product-table .product-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; padding-top: 10px; border-top: 1px solid #eff0f4; }
  .product-table .product-actions::before { display: none; }
  .product-table .product-actions button { width: 38px; height: 38px; font-size: 16px; }
  .product-table td:first-child strong { font-size: 13px; }
  .product-table .product-empty-row { display: block; padding: 30px 20px; text-align: center; }
  .product-table .product-empty-row td { display: block; text-align: center; }
  .product-table .product-empty-row td::before { display: none; }

  input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: 16px; }
  .admin-editor input:not([type="checkbox"]), .admin-editor select { height: 46px; font-size: 16px; }
  .permission-option { font-size: 12px; }
}

.pto-workspace { min-height: calc(100vh - 92px); }
.pto-toolbar { grid-template-columns: auto minmax(260px, 1fr) repeat(2, auto); }
.pto-table td { white-space: nowrap; }
.pto-panel { animation: fadeIn .25s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #4656c9;
  font-weight: 700;
  font-size: 11px;
}
.link-button:hover { text-decoration: underline; }
.snab-blocks-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.snab-block-chip {
  padding: 8px 14px;
  color: #4d5368;
  background: #f4f5fa;
  border: 1px solid #e1e3eb;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.snab-block-chip:hover { background: #e9ebf5; }
.snab-block-chip.active {
  color: #fff;
  background: #4656c9;
  border-color: #4656c9;
}
.snab-section-row td {
  padding: 8px 12px !important;
  color: #4656c9;
  background: #eef0fb;
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.snab-area-row td {
  padding: 8px 12px !important;
  color: #4d5368;
  background: #f4f5fa;
  font-size: 11px;
  font-weight: 700;
}

/* Снабжение — объекты */
.snab-toolbar { grid-template-columns: minmax(240px, 1fr) repeat(3, auto); }
.snab-open-button {
  padding: 7px 13px;
  border: 1px solid #d9dcf5;
  border-radius: 999px;
  background: #f2f3fc;
  color: #4656c9;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.snab-open-button:hover { background: #4656c9; border-color: #4656c9; color: #fff; transform: translateY(-1px); }

/* Снабжение — дашборд «Таблица снабжения» */
.snab-dash {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 1280px;
  animation: fadeIn .25s ease;
}
.snab-dash-objects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 10px;
}
.snab-object-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 13px 14px 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
  box-shadow: 0 5px 16px rgba(43, 45, 84, .04);
  text-align: left;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.snab-object-chip:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(43, 45, 84, .09); border-color: #cfd3ec; }
.snab-object-chip.active {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(101, 87, 220, .14), 0 10px 24px rgba(43, 45, 84, .08);
}
.snab-object-chip-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.snab-object-chip-name { font-size: 13px; font-weight: 800; color: var(--ink); overflow-wrap: anywhere; }
.snab-object-chip-pct { font-size: 13px; font-weight: 800; color: #4656c9; white-space: nowrap; }
.snab-object-chip-bar { display: block; height: 8px; border-radius: 999px; background: #eef0f6; overflow: hidden; }
.snab-object-chip-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  transition: width .7s cubic-bezier(.2, .8, .3, 1);
}
.snab-object-chip-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #9a9eae;
  font-size: 10px;
  font-weight: 700;
}
.snab-object-chip-rest { color: #6b708a; font-size: 10px; }
.snab-object-chip.done .snab-object-chip-pct { color: #258b72; }
.snab-object-chip.done .snab-object-chip-bar i { background: linear-gradient(90deg, #2fae8f, #58d3b2); }
.snab-object-chip.over .snab-object-chip-rest { color: #c0392b; }

.snab-dash-periods { display: flex; flex-wrap: wrap; gap: 8px; }
.snab-period-chip {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: #6b708a;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.snab-period-chip:hover { border-color: #cfd3ec; color: var(--ink); }
.snab-period-chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }

.snab-dash-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.snab-summary-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 6px 18px rgba(43, 45, 84, .05);
  overflow: hidden;
}
.snab-summary-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent, #b9bdd4);
}
.snab-summary-card small { color: #989daf; font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.snab-summary-card strong { font-size: 22px; font-weight: 800; color: var(--ink); }
.snab-summary-card em { font-style: normal; color: #9a9eae; font-size: 10px; font-weight: 600; }
.snab-summary-card.need { --accent: var(--violet); }
.snab-summary-card.fact { --accent: #2fae8f; }
.snab-summary-card.exec { --accent: #3b82f6; }
.snab-summary-card.rest { --accent: #f0a23c; }
.snab-summary-card.rest.negative { --accent: #d15854; }
.snab-summary-card.rest.negative strong { color: #c0392b; }
.snab-summary-bar { display: block; height: 7px; margin-top: 4px; border-radius: 999px; background: #eef0f6; overflow: hidden; }
.snab-summary-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #3b82f6, #37c6eb); transition: width .7s cubic-bezier(.2, .8, .3, 1); }

.snab-dash-warnings { display: flex; flex-direction: column; gap: 8px; }
.snab-warning {
  padding: 11px 15px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  animation: fadeIn .25s ease;
}
.snab-warning.red { color: #a13c3c; background: #fdecec; border: 1px solid #f6d2d2; }
.snab-warning.amber { color: #8f6517; background: #fff5e0; border: 1px solid #f3e2b8; }

.snab-dash-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 6px 18px rgba(43, 45, 84, .04);
}
.snab-dash-toolbar .search-wrap { flex: 1 1 220px; max-width: 360px; }
.snab-dash-blocks { display: flex; flex-wrap: wrap; gap: 8px; }
.snab-block-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: #4d5368;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.snab-block-tab:hover { border-color: #cfd3ec; transform: translateY(-1px); }
.snab-block-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--block-color, #4656c9); flex-shrink: 0; }
.snab-block-tab em { font-style: normal; font-size: 10px; font-weight: 800; color: #9a9eae; }
.snab-block-tab.active { background: var(--block-color, #4656c9); border-color: var(--block-color, #4656c9); color: #fff; }
.snab-block-tab.active .snab-block-dot { background: #fff; }
.snab-block-tab.active em { color: rgba(255, 255, 255, .85); }

.snab-section-row td,
.snab-total-row td {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  white-space: normal;
}
.snab-section-name { color: inherit; }
.snab-section-subs { display: flex; flex-wrap: wrap; gap: 16px; font-style: normal; }
.snab-section-subs em { font-style: normal; font-size: 10px; color: #7a7f92; }
.snab-section-subs b { font-size: 12px; color: var(--ink); }
.snab-section-row .snab-section-subs b { color: inherit; }
.snab-total-row td {
  padding: 12px 16px !important;
  background: #f6f7fb;
  color: var(--ink);
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
}
.snab-total-row .snab-section-subs em { font-size: 11px; }
.snab-total-row .snab-section-subs b { font-size: 14px; }
.snab-dash-table .neg { color: #c0392b !important; font-weight: 800; }
.snab-dash-table tr.snab-neg-row td { background: #fff6f5; }
.snab-dash-table tr.snab-noplan-row td { background: #fffbf0; }
.snab-badge {
  display: inline-block;
  margin-left: 7px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ffe9b8;
  color: #8f6517;
  font-size: 9px;
  font-weight: 800;
  vertical-align: 1px;
}
.snab-badge.muted { background: #e9eaf0; color: #7a7f92; }
.snab-empty-row td { background: #fafbfd; }
.snab-empty-row { opacity: .88; }
.pto-areas-summary {
  margin: -4px 0 16px;
  padding: 9px 13px;
  color: #4d5368;
  background: #f4f5fa;
  border-radius: 11px;
  font-size: 11px;
  line-height: 1.5;
}
.pto-matrix-wrap { overflow-x: auto; }
.pto-matrix-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.pto-matrix-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #777d91;
  font-size: 11px;
  font-weight: 700;
}
.pto-matrix-controls select {
  min-width: 220px;
  height: 42px;
  padding: 0 13px;
  color: var(--ink);
  border: 1px solid #e1e3eb;
  border-radius: 11px;
  outline: 0;
  background: #fbfbfd;
  font-size: 13px;
}
.pto-matrix-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
  box-shadow: 0 10px 30px rgba(43,45,84,.05);
}
.pto-matrix { width: 100%; border-collapse: collapse; }
.pto-matrix th {
  padding: 6px 8px;
  color: #9499aa;
  background: #f6f7fa;
  font-size: 9px;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: bottom;
  height: 132px;
}
.pto-matrix th .pto-doc-hdr {
  display: block;
  transform: rotate(-90deg) translateX(-100%);
  transform-origin: 0 0;
  width: 132px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pto-matrix th.pto-stage-hdr {
  height: 44px;
  padding: 0 12px;
}
.pto-matrix td {
  padding: 10px;
  border-top: 1px solid var(--line);
  border-left: 1px solid #f0f1f5;
  text-align: center;
  font-size: 12px;
  white-space: nowrap;
}
.pto-stage-cell { color: #60667c; font-weight: 600; }
.pto-doc-cell {
  min-width: 46px;
  cursor: pointer;
  transition: background .15s ease;
  user-select: none;
}
.pto-doc-cell:hover { box-shadow: inset 0 0 0 2px rgba(101,87,220,.35); }
.pto-doc-cell.doc-none { background: #fafbfd; color: #c3c7d2; }
.pto-doc-cell.doc-partial { background: #fff8e1; color: #9a7b1a; font-weight: 800; }
.pto-doc-cell.doc-ready { background: #e7f8ef; color: #1f8a5d; font-weight: 800; }
.pto-hint { margin: 12px 0 0; color: #989daf; font-size: 11px; line-height: 1.6; }
.pto-hint b { color: #9a7b1a; }
.pto-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 14px;
  margin-bottom: 10px;
  border: 1px solid #d8d4f5;
  border-radius: 10px;
  background: #f0eeff;
  color: #6558dc;
  font-size: 11px;
  font-weight: 600;
}
.pto-filter-chip button {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #e2defb;
  color: #6558dc;
  font-size: 11px;
  cursor: pointer;
}
.pto-analysis-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.pto-analysis-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #777d91;
  font-size: 11px;
  font-weight: 600;
}
.pto-analysis-controls select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid #e1e3eb;
  border-radius: 9px;
  outline: 0;
  background: #fbfbfd;
  font-size: 12px;
}
.pto-analysis-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.pto-analysis-stats .summary-card { margin: 0; }.an-ok { background: #e7f8ef; color: #1f8a5d; }
.an-part { background: #fff8e1; color: #9a7b1a; }
.an-miss { background: #fdecec; color: #c0392b; }
.an-match {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 5px 8px;
  margin: 2px 0;
  border-radius: 8px;
  background: #f4f5fa;
}
.an-match strong { font-size: 11px; color: #2f3352; }
.an-match small { font-size: 10px; color: #8a8fa3; }
.an-weak { background: #f7f7fa; }
.an-weak strong { color: #7a7f93; }
.an-weak-label { display: block; margin: 6px 0 2px; color: #9a9eae; font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.an-none { color: #b8bccb; }
@media (max-width: 760px) {
  .pto-analysis-controls { flex-direction: column; align-items: stretch; }
  .pto-analysis-controls select { width: 100%; min-width: 0; }
  .pto-analysis-stats { grid-template-columns: repeat(2, 1fr); }
}
.pto-wide-modal { width: min(880px, calc(100vw - 30px)); }
.pto-wide-modal .modal-heading { padding: 20px 20px 0; }
.pto-wide-modal .modal-heading .close-button { margin-right: 16px; }
.pto-wide-modal .memo-product-header { padding: 0 20px; }
.pto-wide-modal .memo-product-lines { padding: 0 20px; }
.pto-wide-modal .memo-products-total { margin: 10px 20px 0; }
.pto-wide-modal #ptoAddCostItem { margin-left: 20px; }
.pto-wide-modal .modal-actions { margin: 0 20px 18px; }
.pto-object-name { text-align: left; font-size: 12px; }
.pto-stages { display: flex; flex-direction: column; gap: 10px; padding: 0 20px; }
.pto-legend {
  margin: 0 0 4px;
  padding: 10px 13px;
  color: #60667c;
  background: #f4f5fa;
  border-radius: 11px;
  font-size: 11px;
  line-height: 1.6;
}
.pto-legend b { color: var(--ink); }
.pto-legend .doc-ready, .pto-legend .doc-partial {
  padding: 2px 7px;
  border-radius: 7px;
  font-weight: 800;
}
.pto-block {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  overflow: hidden;
}
.pto-block summary {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background .15s ease;
}
.pto-block summary:hover { background: #f4f6ff; }
.pto-block summary::-webkit-details-marker { display: none; }
.pto-block[open] summary .pto-block-arrow { transform: rotate(90deg); }
.pto-block-arrow {
  color: #4656c9;
  font-size: 12px;
  transition: transform .15s ease;
}
.pto-block-name { font-weight: 800; font-size: 13px; color: var(--ink); }
.pto-block-range { color: #9a9eae; font-size: 11px; }
.pto-block-pct { margin-left: auto; color: #4656c9; font-weight: 800; font-size: 12px; }
.pto-block-progress {
  height: 5px;
  margin: 0 14px;
  border-radius: 4px;
  background: #eef0f5;
  overflow: hidden;
}
.pto-block-progress span { display: block; height: 100%; background: linear-gradient(90deg, #6659df, #4e84e8); }
.pto-block-stages { padding: 8px 14px 12px; display: flex; flex-direction: column; }
.pto-stage-head {
  display: flex;
  gap: 10px;
  padding: 4px;
  color: #9a9eae;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.pto-stage-head span:nth-child(1) { width: 22px; text-align: center; }
.pto-stage-head span:nth-child(2) { flex: 1; }
.pto-stage-head span:nth-child(3) { text-align: right; }
.pto-stage-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 7px 4px;
  border-top: 1px solid #f0f1f5;
  font-size: 12px;
}
.pto-stage-num {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: #4656c9;
  background: #eef1ff;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 800;
}
.pto-stage-name { flex: 1; color: #4d5368; font-weight: 600; }
.pto-stage-status { display: flex; gap: 8px; justify-content: flex-end; }
.pto-stage-clickable { cursor: pointer; transition: background .15s ease; border-radius: 8px; }
.pto-stage-clickable:hover { background: #f4f6ff; }
.pto-stage-clickable:hover .pto-stage-open { color: #4656c9; }
.pto-stage-details {
  border: 1px solid #eef0f6;
  border-radius: 10px;
  margin-top: 6px;
  background: #fcfcfe;
}
.pto-stage-details summary {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  border-radius: 10px;
}
.pto-stage-details summary::-webkit-details-marker { display: none; }
.pto-stage-details[open] summary { border-bottom: 1px solid #eef0f6; }
.pto-stage-details[open] summary .pto-stage-arrow { transform: rotate(90deg); }
.pto-stage-arrow { color: #4656c9; font-size: 10px; transition: transform .15s ease; }
.pto-stage-donepct { color: #9a9eae; font-size: 10px; font-weight: 800; margin-left: 2px; white-space: nowrap; }
.pto-stage-works { padding: 6px 10px 10px; display: flex; flex-direction: column; gap: 4px; }
.pto-stage-works-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 6px;
  color: #9a9eae;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.pto-work-row { border-radius: 8px; }
.pto-work-details summary {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 7px 8px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  border-radius: 8px;
  transition: background .15s ease;
}
.pto-work-details summary:hover { background: #f4f6ff; }
.pto-work-details summary::-webkit-details-marker { display: none; }
.pto-work-details[open] summary .pto-work-arrow { transform: rotate(90deg); }
.pto-work-arrow { color: #b6bac9; font-size: 9px; transition: transform .15s ease; }
.pto-work-name { flex: 1; color: #4d5368; font-size: 12px; font-weight: 600; }
.pto-work-toggle {
  border: none;
  border-radius: 8px;
  padding: 4px 10px;
  font-family: "Manrope", sans-serif;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  background: #eef0f4;
  color: #9a9eae;
  transition: all .15s ease;
}
.pto-work-toggle.is-done { background: #e6f7ed; color: #1e9e4a; }
.pto-work-toggle.is-partial { background: #fdf3dc; color: #b8860b; }
.pto-work-details-body { padding: 4px 8px 10px 30px; }
.pto-work-note { margin: 0; font-size: 12px; color: #4d5368; line-height: 1.5; }
.pto-work-note-empty { margin: 0; font-size: 11px; color: #b6bac9; font-style: italic; }
  color: #b6bac9;
  font-size: 15px;
  font-weight: 800;
  transition: color .15s ease;
}
.pto-stage-docs { display: flex; flex-direction: column; gap: 6px; padding: 0 20px 8px; max-height: 60vh; overflow-y: auto; }
.pto-stage-docs-group {
  margin: 14px 0 4px;
  font-family: "Manrope", sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #9a9eae;
}
.pto-stage-doc-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfbfd;
  font-size: 12px;
  cursor: pointer;
  transition: background .15s ease;
}
.pto-stage-doc-row:hover { background: #f4f6ff; border-color: #d6dbef; }
.pto-stage-doc-code { flex: 1; color: var(--ink); font-weight: 700; }
.pto-stage-doc-row .doc-ready, .pto-stage-doc-row .doc-partial, .pto-stage-doc-row .doc-none {
  padding: 3px 9px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.pto-stage-doc-empty { margin: 0; color: #b6bac9; font-size: 12px; }
@media (max-width: 760px) {
  .pto-stage-docs { padding: 0 14px 8px; }
}
.pto-stage-status b { font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 8px; }
@media (max-width: 760px) {
  .pto-stages { padding: 0 14px; }
}
.pto-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  padding: 0 20px 14px;
}
.pto-summary-grid .summary-card { margin: 0; }
.pto-summary-sections { padding: 0 20px 4px; }
.pto-summary-tables { margin-top: 10px; overflow-x: auto; }
.pto-summary-tables .product-table-wrap { overflow: visible; }
@media (max-width: 760px) {
  .pto-summary-grid { padding: 0 14px 10px; grid-template-columns: repeat(2, 1fr); }
  .pto-summary-sections { padding: 0 14px 4px; }
}

.pto-files-upload {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 14px;
}
.pto-files-upload input[type="file"] {
  flex: 1;
  font-size: 12px;
}
.pto-files-list { display: flex; flex-direction: column; gap: 8px; }
.pto-file-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfbfd;
}
.pto-file-name {
  flex: 1;
  min-width: 0;
  color: #4656c9;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pto-file-name:hover { text-decoration: underline; }
.pto-file-size, .pto-file-date { color: #9a9eae; font-size: 10px; white-space: nowrap; }

.pto-cost-line { display: flex; gap: 8px; align-items: center; }.pto-cost-line input {
  min-width: 0;
  flex: 1;
  height: 40px;
  padding: 0 10px;
  border: 1px solid #e1e3eb;
  border-radius: 9px;
  outline: 0;
  background: #fbfbfd;
  font-size: 12px;
}
.pto-cost-line .pto-item-section { flex: 1.2; }
.pto-cost-line .pto-item-name { flex: 1.4; }
.pto-cost-line .pto-item-volume { flex: .8; }
.pto-cost-line .pto-item-plan { flex: 1; }
.pto-cost-line .pto-item-fact { flex: 1; }
.pto-cost-line .pto-item-contract { flex: .6; }

@media (max-width: 760px) {
  .pto-toolbar { grid-template-columns: 1fr; }
  .pto-toolbar .product-tabs { grid-column: 1 / -1; justify-content: center; }
  .pto-toolbar .search-wrap { grid-column: 1 / -1; }
  .pto-matrix-controls { flex-direction: column; align-items: stretch; }
  .pto-matrix-controls select { width: 100%; min-width: 0; }
  .pto-cost-line { flex-wrap: wrap; }
  .pto-cost-line input { flex: 1 1 44%; }
  .pto-cost-line .memo-item-remove { margin-left: auto; }
  .pto-wide-modal .modal-heading { padding: 14px 14px 0; }
  .pto-wide-modal .memo-product-header { display: none; }
  .pto-wide-modal .memo-product-lines { padding: 0 14px; }
  .pto-wide-modal .memo-products-total { margin: 10px 14px 0; }
  .pto-wide-modal #ptoAddCostItem { margin-left: 14px; }
  .pto-wide-modal .modal-actions { margin: 0 14px 14px; }
}

/* ППР — стадия строительства */
.ppr-progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  padding: 22px;
  max-width: 1200px;
}
.ppr-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 18px 14px;
  box-shadow: 0 6px 22px rgba(20, 23, 46, .05);
  opacity: 0;
  animation: ppr-card-in .5s ease forwards;
}
@keyframes ppr-card-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.ppr-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.ppr-card-head h3 { margin: 0; font-size: 17px; font-weight: 800; color: var(--ink); }
.ppr-pct-big {
  font-size: 26px;
  font-weight: 800;
  color: var(--violet);
  background: linear-gradient(135deg, #eeeffc, #f6f7ff);
  border-radius: 12px;
  padding: 4px 12px;
  min-width: 74px;
  text-align: center;
}
.ppr-bar {
  height: 12px;
  border-radius: 8px;
  background: #eef0f6;
  overflow: hidden;
  position: relative;
}
.ppr-bar-fill {
  display: block;
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  width: 0;
  animation: ppr-bar-grow 1.1s cubic-bezier(.2, .8, .3, 1) forwards;
}
@keyframes ppr-bar-grow {
  from { width: 0; }
}
.ppr-bar-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
  background-size: 200% 100%;
  animation: ppr-shine 1.6s linear infinite;
}
@keyframes ppr-shine {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}
.ppr-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.ppr-chip {
  font-size: 10px;
  font-weight: 800;
  border-radius: 8px;
  padding: 3px 9px;
  letter-spacing: .03em;
}
.ppr-status-done { background: #e6f7ed; color: #1e9e4a; }
.ppr-status-active { background: #eef0ff; color: #4656c9; }
.ppr-status-early { background: #fdf3dc; color: #b8860b; }
.ppr-meta-text { font-size: 11px; color: var(--muted); }
.ppr-dates {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 11px;
  color: #9a9eae;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 760px) {
  .ppr-progress-grid { grid-template-columns: 1fr; padding: 14px; }
}

.ppr-card-clickable { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.ppr-card-clickable:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(20, 23, 46, .12); }
.ppr-card-clickable:hover h3 { color: var(--violet); }
.ppr-object-toolbar { padding: 0 20px 6px; }
.ppr-block-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 4px 20px 10px;
}
.ppr-block-tab {
  flex: 1 1 0;
  min-width: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  font-family: "Manrope", sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  background: white;
  border: 2px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
  transition: border-color .15s ease, transform .1s ease, box-shadow .15s ease;
}
.ppr-block-tab:hover { transform: translateY(-1px); }
.ppr-block-tab-active {
  border-color: var(--block-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--block-color) 18%, transparent);
}
.ppr-block-swatch {
  width: 12px; height: 12px;
  flex: 0 0 12px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}
.ppr-object-hint {
  margin: 0;
  padding: 10px 13px;
  color: #60667c;
  background: #f4f5fa;
  border-radius: 11px;
  font-size: 11px;
  line-height: 1.6;
}
.ppr-works { display: flex; flex-direction: column; gap: 8px; padding: 8px 20px 14px; max-height: 62vh; overflow-y: auto; }
.ppr-work {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  padding: 10px 12px;
  opacity: 0;
  animation: ppr-card-in .4s ease forwards;
}
.ppr-work-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.ppr-work-num {
  width: 22px; height: 22px;
  flex: 0 0 22px;
  display: flex; align-items: center; justify-content: center;
  background: #eef0ff; color: #4656c9;
  border-radius: 7px;
  font-size: 11px; font-weight: 800;
}
.ppr-work-name { font-size: 13px; font-weight: 700; color: var(--ink); flex: 1; }
.ppr-work-range {
  font-size: 10px;
  font-weight: 800;
  color: #4656c9;
  background: #eef0ff;
  border-radius: 8px;
  padding: 3px 9px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ppr-dur-select {
  font-family: "Manrope", sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: var(--ink);
  background: #fbfbfd;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px 6px;
  cursor: pointer;
  outline: none;
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath fill='%239a9eae' d='M4 5 0 0h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  padding-right: 20px;
}
.ppr-dur-select:hover { border-color: #b9c0f5; }
.ppr-dur-select:focus { outline: 2px solid #dfe3ff; border-color: #b9c0f5; }
.ppr-work-dirty .ppr-dur-select { border-color: #ffd166; background-color: #fffaf0; }
.ppr-work-bar {
  display: flex;
  gap: 3px;
  overflow-x: auto;
  padding-bottom: 2px;
  user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
}
.ppr-cell {
  width: 14px; height: 16px;
  flex: 0 0 14px;
  border-radius: 4px;
  background: #eef0f6;
  transition: background .15s ease, transform .1s ease;
  touch-action: pan-y;
}
.ppr-cell:hover { background: #dde2f7; }
.ppr-cell-on {
  background: var(--block-color, linear-gradient(90deg, var(--violet), var(--cyan)));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
.ppr-cell-sel { background: #ffd166; box-shadow: 0 0 0 2px #ffb703 inset; }
.ppr-month-labels {
  display: flex;
  gap: 3px;
  margin-top: 3px;
  padding-left: 1px;
}
.ppr-month-labels span {
  width: 14px; flex: 0 0 14px;
  font-size: 7px;
  color: #b6bac9;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
}
.ppr-work-dirty {
  background: #fffdf4;
  border-color: #ffd166;
}
.ppr-work-dirty .ppr-work-range {
  color: #b37a00;
  background: #fff3cc;
}
.ppr-save-all-btn {
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfbfd;
  color: #b6bac9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s ease;
}
.ppr-save-all-btn:hover { border-color: #b9c0f5; color: #4656c9; }
.ppr-save-all-btn.has-unsaved {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, var(--violet), #4656c9);
  box-shadow: 0 3px 10px rgba(101, 87, 220, .3);
}
.ppr-save-all-btn.ppr-saving { opacity: .7; pointer-events: none; }
@media (max-width: 760px) {
  .ppr-works { padding: 8px 14px 12px; }
}

/* Снабжение — дашборд на мобильных */
@media (max-width: 760px) {
  .snab-dash { gap: 11px; }
  .snab-dash-objects { grid-template-columns: 1fr 1fr; gap: 8px; }
  .snab-object-chip { padding: 11px 12px 9px; gap: 7px; }
  .snab-object-chip-name { font-size: 12px; }
  .snab-dash-summary { grid-template-columns: 1fr 1fr; gap: 8px; }
  .snab-summary-card { padding: 12px 13px; gap: 4px; }
  .snab-summary-card strong { font-size: 17px; }
  .snab-dash-toolbar { padding: 9px; }
  .snab-dash-toolbar .search-wrap { max-width: none; flex-basis: 100%; }
  .snab-section-row td,
  .snab-total-row td,
  .snab-area-row td {
    display: block;
    white-space: normal;
  }
  .snab-section-subs { gap: 10px 14px; margin-top: 6px; }
  .snab-dash-table tr.snab-section-row,
  .snab-dash-table tr.snab-total-row,
  .snab-dash-table tr.snab-area-row {
    padding: 12px 14px;
  }
}

/* Привязка товаров к видам работ */
.product-worktypes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 5px;
  max-height: 190px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfbfd;
}
.product-worktypes-grid .permission-option { min-height: 34px; padding: 6px 9px; font-size: 10px; }

/* Раздел «Объекты» */
.objects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 14px;
}

.object-card {
  position: relative;
  padding: 16px 16px 13px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-radius: 16px;
  overflow: hidden;
}
.object-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #6ce0dc;
}
.object-card.st-plan::before { background: var(--orange); }
.object-card.st-done::before { background: #25a986; }
.object-card.st-frozen::before { background: #e76661; }
.object-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.object-card-code {
  padding: 3px 9px;
  border-radius: 8px;
  color: #5d57d9;
  background: #ecedfd;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}
.object-card-status {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 8px;
}
.object-card-status.st-work { color: #1f8a5d; background: #e7f8ef; }
.object-card-status.st-plan { color: #b06a12; background: #fdf2df; }
.object-card-status.st-done { color: #1f8a5d; background: #e4faf3; }
.object-card-status.st-frozen { color: #c0392b; background: #ffebe9; }
.object-card h3 { margin: 0; font-size: 16px; line-height: 1.25; }
.object-card-note {
  margin: 0;
  color: #697087;
  font-size: 12px;
  line-height: 1.4;
}
.object-card-stats {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: #989daf;
  font-size: 11px;
  font-weight: 700;
}

.object-add-card {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 2px dashed #c9cdea;
  border-radius: 16px;
  color: #5d57d9;
  background: rgba(93, 87, 217, .05);
  font-size: 14px;
  font-weight: 800;
  transition: .2s ease;
}
.object-add-card span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: #5d57d9;
  font-size: 22px;
  box-shadow: 0 8px 18px rgba(93, 87, 217, .3);
}
.object-add-card small {
  color: #989daf;
  font-size: 10px;
  font-weight: 700;
}
.object-add-card:hover {
  border-color: #5d57d9;
  background: rgba(93, 87, 217, .1);
  transform: translateY(-2px);
}

.object-card.clickable { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.object-card.clickable:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(43,45,84,.12); border: 1px solid #d9dcf0; }
.object-card.clickable:active { transform: translateY(0); }

.object-detail-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.object-detail-stat { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.object-detail-stat small { display: block; color: #989daf; font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; margin-bottom: 4px; }
.object-detail-stat strong { font-size: 18px; font-weight: 800; }
.object-detail-panel { animation: fadeIn .2s ease; }
.block-card { position: relative; padding: 14px 14px 12px 16px; display: flex; flex-direction: column; gap: 7px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); overflow: hidden; }
.block-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--block-color, #6ce0dc); }
.block-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.block-card-name { font-size: 14px; font-weight: 800; overflow-wrap: anywhere; }
.block-card-code { padding: 2px 8px; border-radius: 7px; background: #ecedfd; color: #5d57d9; font-size: 11px; font-weight: 800; }
.block-card-note { color: #697087; font-size: 11px; line-height: 1.4; }
.block-card-stats { display: flex; flex-wrap: wrap; gap: 4px 10px; color: #989daf; font-size: 10px; font-weight: 700; border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 4px; }
.block-card-actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 6px; }
.block-card-actions button { width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: #a0a4b3; cursor: pointer; }
.block-card-actions button:hover { background: #f2f3f8; color: #4656c9; }
.block-card-actions button.danger:hover { background: #fff0ef; color: #d15854; }
.block-add-card { min-height: 140px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 2px dashed #c9cdea; border-radius: 16px; background: rgba(93, 87, 217, .04); color: #5d57d9; font-weight: 800; cursor: pointer; transition: .18s ease; }
.block-add-card span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #5d57d9; color: white; font-size: 20px; }
.block-add-card:hover { background: rgba(93,87,217,.08); border-color: #5d57d9; transform: translateY(-1px); }

#salesStatusFilter { height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: white; color: #4d5368; font-size: 12px; font-weight: 600; }
#salesStatusFilter:focus { border-color: #5d57d9; outline: 0; box-shadow: 0 0 0 3px rgba(93,87,217,.12); }
.snab-period-chip.disabled { opacity: .5; pointer-events: none; }
@media (max-width: 760px) {
  .object-detail-stats { grid-template-columns: repeat(2, 1fr); }
}
