/* === Layout: Plus/minus, Split-screen, Dashboard grids, Transposed tables === */

/* ═══ PLUS/MINUS, SPLIT-SCREEN, DASHBOARD LAYOUT, GRIDS ═══ */

 /* ===== PLUS / MINUS INLINE IN INPUT ===== */
 .tep-box-pm {
 position: relative;
 width: 100% }
 .tep-box-pm .tep-box-input {
 padding-right: 68px }
 .pm-ctrl {
 position: absolute;
 right: 4px;
 top: 50%;
 transform: translateY(-50%);
 display: flex;
 align-items: center;
 height: 32px;
 border-radius: var(--radius-sm);
 background: var(--bg3);
 box-shadow: var(--shadow-btn);
 overflow: hidden;
 user-select: none;
 opacity: 0;
 pointer-events: none;
 transition: opacity var(--t-fast) }
 .tep-box-pm:hover .pm-ctrl {
 opacity: 1;
 pointer-events: auto }

 .pm-btn.minus { color: var(--red) }
 .pm-btn.plus { color: var(--green) }

 .pm-btn:active { transform: scale(0.88) }
 .pm-divider {
 width: 1px;
 height: 16px;
 background: var(--brd);
 flex-shrink: 0 }
 /* Light neumorphic */

 /* Compact +/- for bar inputs (shares & areas) */
 .pm-bar {
 display: flex;
 align-items: center;
 justify-content: center;
 margin: 4px auto 0;
 height: 22px;
 width: 48px;
 border-radius: var(--radius-sm);
 background: transparent;
 overflow: hidden;
 user-select: none;
 opacity: 0;
 pointer-events: none;
 transition: opacity var(--t-fast) }
 .vbar-col:hover .pm-bar,
 .area-bar-col:hover .pm-bar,
 .prop-bar-card:hover .pm-bar {
 opacity: 1;
 pointer-events: auto }
 .pm-bar .pm-btn {
 width: 22px;
 height: 100%;
 font-size: var(--fs-xl);
 font-weight: var(--fw-black) }
 .pm-bar .pm-divider {
 height: 12px }
 /* Section table +/- */
 .sec-pm-td { position: relative }
 .sec-pm { position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); width: 52px }
 .sec-pm-td:hover .sec-pm { opacity: 1; pointer-events: auto }

 /* ===== SPLIT-SCREEN DASHBOARD ===== */
 .split-layer {
 position: fixed; inset: 0; z-index: 999;
 display: none; align-items: center; justify-content: center;
 background: var(--bg3);
 pointer-events: none;
 opacity: 0;
 transition: opacity 0.3s ease }
 body.split-open .split-layer {
 display: flex;
 pointer-events: auto;
 opacity: 1;
 transition: opacity 0.4s ease 0.15s }

 .split-section-label {
 font-size: var(--fs-md); font-weight: var(--fw-medium); color: var(--txt3); letter-spacing: var(--ls-wide);
 text-transform: uppercase; margin-bottom: 24px }

 .split-subtitle {
 font-size: var(--fs-2xl); color: var(--txt3); line-height: 1.6;
 margin-bottom: 36px }

 .split-metric {
 text-align: center;
 padding: 0 12px;
 border-right: 1px solid var(--brd) }
 .split-metric:last-child { border-right: none }
 .split-metric-value {
 font-size: 26px; font-weight: var(--fw-semi); color: var(--txt); letter-spacing: -0.5px;
 margin-bottom: 4px }
 .split-metric-label {
 font-size: var(--fs-md); color: var(--txt3); font-weight: var(--fw-normal) }
 .split-variants {
 display: flex; flex-direction: column; gap: 14px }
 .split-variant-row {
 display: flex; align-items: center; gap: 16px }
 .split-variant-name {
 font-size: var(--fs-xl); color: var(--txt2); font-weight: var(--fw-medium); width: 140px;
 white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
 .split-variant-track {
 background: var(--brd) }
 .split-variant-fill.v1 { background: var(--green) }
 .split-variant-fill.v2 { background: var(--red) }
 .split-variant-fill.v3 { background: var(--blue) }
 .split-variant-pct {
 font-size: var(--fs-lg); color: var(--txt3); width: 40px; text-align: right }
 .split-variant-badge {
 font-size: var(--fs-md); color: var(--txt3); padding: 3px 8px;
 border: 1px solid var(--brd); border-radius: var(--radius-md);
 white-space: nowrap }
 .split-variant-badge.v1 { color: var(--green); border-color: rgba(77,201,160,0.3) }
 .split-variant-badge.v2 { color: var(--red); border-color: rgba(224,92,109,0.3) }
 .split-variant-badge.v3 { color: var(--blue); border-color: rgba(90,156,246,0.3) }

 /* Animation classes for staggered fade-in */
 @keyframes splitFadeIn {
 from { opacity: 0; transform: translateY(8px) }
 to { opacity: 1; transform: translateY(0) }
 }
 body.split-open .split-anim {
 animation: splitFadeIn 0.35s both }
 body.split-open .split-anim-1 { animation-delay: 0.25s }
 body.split-open .split-anim-2 { animation-delay: 0.30s }
 body.split-open .split-anim-3 { animation-delay: 0.35s }
 body.split-open .split-anim-4 { animation-delay: 0.40s }
 body.split-open .split-anim-5 { animation-delay: 0.45s }
 body:not(.split-open) .split-anim { opacity: 0 }

 /* Halves slide */
 body.split-open .fixed-header {
 transform: translateY(-240px);
 transition: transform var(--t-anim);
 pointer-events: none }
 body:not(.split-open) .fixed-header {
 transition: transform var(--t-anim) }
 body.split-open .content-wrapper {
 transform: translateY(240px);
 transition: transform var(--t-anim);
 pointer-events: none }
 body:not(.split-open) .content-wrapper {
 transition: transform var(--t-anim) }
 /* Dim overlay on halves */
 body.split-open::after {
 content: '';
 position: fixed; inset: 0; z-index: 1001;
 background: rgba(0,0,0,0.15);
 pointer-events: none;
 animation: splitFadeIn 0.3s 0.1s both }
 body:not(.split-open)::after {
 content: none;
 display: none }

 /* Cut line */
 .split-cut {
 display: none;
 position: fixed; left: 0; right: 0; top: 50%;
 height: 1px; z-index: 1050; pointer-events: none;
 background: transparent;
 transition: background 0.65s var(--ease) }
 body.split-open .split-cut {
 display: block;
 background: var(--brd) }

 /* Trigger button */

 .split-trigger:hover {
 box-shadow: 0 4px 20px var(--overlay-3);
 transform: translateY(-50%) scale(1.06) }
 body.split-open .split-trigger {
 background: var(--txt); border-color: transparent;
 color: var(--bg) }
 .split-trigger svg path {
 transition: transform 0.4s ease;
 transform-origin: center }
 body.split-open .split-trigger .arr-up { transform: translateY(-1.5px) }
 body.split-open .split-trigger .arr-down { transform: translateY(1.5px) }
 @media (max-width: 900px) {
 .split-trigger { right: 16px; width: 38px; height: 38px }
 .split-layer-inner { padding: 0 24px }
 .split-title { font-size: var(--fs-4xl) }
 .split-metrics { grid-template-columns: repeat(2, 1fr) }
 .split-metric:nth-child(2) { border-right: none }
 .split-metric:last-child { grid-column: span 2;  padding-top: 16px; margin-top: 12px }
 }

 
 /* ═══ DASHBOARD LAYOUT ═══ */
 .dash-hero-row {
     display: grid;
     grid-template-columns: 1fr 1fr 1.6fr;
     gap: 0;
     margin: 20px 0 }
 .dash-hero {
     padding: 20px 22px;
     background: transparent;
     border-right: 1px solid var(--brd) }
 .dash-hero:last-child { border-right: none }
 .dash-hero.accent-conflict { border-left: 2px solid var(--brd) }

 .dash-hero-label {
 font-size: var(--fs-sm);
 font-weight: var(--fw-medium);
 color: var(--txt3);
 letter-spacing: var(--ls-widest);
 text-transform: uppercase;
 margin-bottom: 10px }

 .dash-hero-num sup {
 font-size: var(--fs-3xl);
 font-weight: var(--fw-normal);
 color: var(--txt3);
 margin-left: 2px;
 position: relative;
 top: -22px }

 .dash-hero-inp {
 font-size: 48px;
 width: 90px;
 font-weight: var(--fw-bold);
 border: none;
 
 border-radius: 0;
 background: transparent;
 color: var(--txt);
 padding: 2px 4px;
 outline: none;
 text-align: center;
 font-family: inherit }
 .dash-hero-inp.ta { color: var(--type-a); background: transparent }
 .dash-hero-inp.tb { color: var(--type-b); background: transparent }
 .dash-hero-inp:focus { border-bottom-color: var(--blue); background: transparent }
 .dash-hero-inp.ta:focus { background: transparent }
 .dash-hero-inp.tb:focus { background: transparent }
 .dash-hero-inp::-webkit-outer-spin-button,
 .dash-hero-inp::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0 }
 .dash-hero-inp[type=number] { -moz-appearance: textfield }

 /* Conflict inside hero */
 .dash-conflict-grid {
 display: flex;
 flex-direction: column;
 gap: 8px;
 margin-bottom: 12px }
 .dash-cf-item {
 display: flex;
 align-items: center;
 gap: 10px }
 .dash-cf-lbl {
 font-size: var(--fs-sm);
 color: var(--txt3);
 width: 52px;
 text-align: right;
 letter-spacing: var(--ls-normal);
 text-transform: uppercase }
 .dash-cf-bar-fill.ci-product { background: var(--type-b) }
 .dash-cf-bar-fill.ci-tep { background: var(--type-a) }
 .dash-cf-bar-fill.ta { background: var(--type-a) }
 .dash-cf-bar-fill.tb { background: var(--type-b) }
 .dash-cf-lbl.ta-c, .dash-cf-val.ta-c { color: var(--type-a) }
 .dash-cf-lbl.tb-c, .dash-cf-val.tb-c { color: var(--type-b) }
 .dash-cf-val {
 font-size: var(--fs-lg);
 font-weight: var(--fw-normal); width: 42px;
 color: var(--txt) }
 .dash-cf-metrics {
 display: grid;
 grid-template-columns: repeat(4, 1fr);
 gap: 0;
 margin-bottom: 10px }
 .dash-cf-m { text-align: center; padding: 8px 4px }
 .dash-cf-m-v {
 display: block;
 font-size: var(--fs-2xl);
 font-weight: var(--fw-normal); color: var(--txt) }
 .dash-cf-m-l {
 display: block;
 font-size: var(--fs-2xs);
 color: var(--txt3);
 letter-spacing: 0.08em;
 text-transform: uppercase }
 .ci-metric-value.ci-ok { color: var(--type-a) }
 .ci-metric-value.ci-warn { color: var(--red) }

 /* ═══ TRANSPOSED TABLES ═══ */
 .dash-section { margin-bottom: 16px; overflow-x: auto; border: 1px solid var(--brd); padding: 12px 16px }
 .dash-section-hdr {
 display: flex;
 align-items: center;
 gap: 8px;
 font-size: var(--fs-2xl);
 font-weight: var(--fw-medium);
 letter-spacing: var(--ls-widest);
 text-transform: uppercase;
 color: var(--txt3);
 margin-bottom: 6px;
 padding: 0 0 4px }
 .dash-section-hdr svg { opacity: 0.3 }
 .dash-tbl {
 width: 100%;
 border-collapse: collapse }

 .dash-tbl th:first-child { text-align: left; width: 56px }
 .dash-th-total { border-left: 1px dashed var(--brd); color: var(--blue) }
 .dash-tbl td {
 padding: 4px 3px;
 text-align: center;
 border-bottom: 1px solid var(--brd);
 vertical-align: middle }
 .dash-tbl td:first-child { border-bottom-color: transparent }
 .dash-tbl tfoot td { border-top: 1px dashed var(--brd); border-bottom: none }
 .dash-total-cell { border-left: 1px dashed var(--brd) }
 .dash-type-lbl {
 font-size: var(--fs-2xl);
 font-weight: var(--fw-semi);
 letter-spacing: var(--ls-wide);
 text-transform: uppercase;
 padding-left: 2px !important;
 text-align: left !important }
 .dash-type-lbl.ta { color: var(--type-a) }
 .dash-type-lbl.tb { color: var(--type-b) }
 .dash-type-lbl.tt { color: var(--blue); font-weight: var(--fw-medium) }

 .dash-cell.ta { color: var(--type-a); background: transparent }
 .dash-cell.tb { color: var(--type-b); background: transparent }
 .dash-cell:hover { border-bottom-color: var(--brd) }
 .dash-cell:focus { outline: none; border-bottom-color: var(--blue); color: var(--txt); background: transparent }
 .dash-cell.ta:focus { border-bottom-color: var(--type-a); background: transparent }
 .dash-cell.tb:focus { border-bottom-color: var(--type-b); background: transparent }
 .dash-cell.dash-total-inp { font-weight: var(--fw-semi) }
 .dash-cell::-webkit-outer-spin-button,
 .dash-cell::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0 }
 .dash-cell[type=number] { -moz-appearance: textfield }

 .dash-sigma {
 font-size: var(--fs-3xl);
 font-weight: var(--fw-normal); color: var(--blue) }
 .dash-sigma.total { font-weight: var(--fw-semi); font-size: 15px }
 .dash-mm {
 display: block;
 font-size: var(--fs-lg);
 color: var(--txt3); margin-top: 0;
 line-height: 1.2 }
 .dash-pct {
 font-size: var(--fs-2xl);
 color: inherit }
 .dash-tbl tbody tr:hover td { background: var(--type-t-bg) }

 /* Fine-tune 3-row tables */
 .ft-room-hdr { border-left: 1px dashed var(--brd) }
 .ft-tbl3 .dash-cell { width: 36px; font-size: var(--fs-lg); padding: 3px 1px }
 .ft-tbl3 th:first-child { width: 48px }
 .ft-tbl3 thead tr:first-child th { border-bottom: none; padding-bottom: 0; font-size: var(--fs-base) }
 .ft-tbl3 thead tr:nth-child(2) th { font-size: var(--fs-xs); letter-spacing: 0.06em; padding-top: 0 }
 .ft-tbl3 thead tr:nth-child(2) th:nth-child(4n+2) { border-left: 1px dashed var(--brd) }
 .ft-tbl3 tbody td:nth-child(4n+2) { border-left: 1px dashed var(--brd) }
 .ft-tbl3 tfoot td:nth-child(n+2) { border-left: 1px dashed var(--brd) }
 .ft-tbl3 .dash-sigma.ft-share-total { font-size: var(--fs-lg); font-weight: var(--fw-medium) }
 .ft-tbl3 .dash-sigma.ft-share-total.ok { color: var(--green) }
 .ft-tbl3 .dash-sigma.ft-share-total.err { color: var(--red) }
 .ft-tbl3 .ft-sig-a { margin-right: 6px }
 .ft-tbl3 .ft-sig-a::before { content: 'A'; font-size: var(--fs-xs); color: var(--type-a); margin-right: 2px; letter-spacing: 0 }
 .ft-tbl3 .ft-sig-b::before { content: 'B'; font-size: var(--fs-xs); color: var(--type-b); margin-right: 2px; letter-spacing: 0 }
 .ft-range-pair { display: flex; align-items: center; gap: 0; justify-content: center }
 .ft-range-inp { width: 26px !important; font-size: var(--fs-md) !important; padding: 2px 0 !important }
 .ft-range-dash { font-size: var(--fs-sm); color: var(--txt3); margin: 0 1px }
 .ft-rng-avg { font-size: var(--fs-base) }

 /* ═══ 2-COLUMN GRID ═══ */

 .dash-grid-cell > .hc-panel {
 margin: 0;
 height: 100% }

 @media(max-width:900px) {
 .dash-hero-row { grid-template-columns: 1fr 1fr }
 .dash-hero:nth-child(3) { grid-column: 1 / -1; border-right: none; border-top: 1px solid var(--brd) }
 .dash-grid-2col { grid-template-columns: 1fr }
 }
 @media(max-width:600px) {
 .dash-hero-row { grid-template-columns: 1fr }
 .dash-hero { border-right: none; border-bottom: 1px solid var(--brd) }
 .dash-hero:last-child { border-bottom: none }
 .dash-hero-inp { font-size: 38px; width: 80px }
 .dash-hero-num { font-size: 38px }

 .dash-tbl th { font-size: var(--fs-xs); letter-spacing: 0.06em }
 }

 /* Квартиры - Command Center Tables */
 .q-tbl-section { margin-bottom: 20px }
 .q-tbl-header {
 display: flex; align-items: center; gap: 8px;
 font-size: var(--fs-sm); font-weight: var(--fw-medium); letter-spacing: var(--ls-widest); text-transform: uppercase;
 color: var(--txt3); margin-bottom: 6px; padding: 8px 0 4px;
  flex-shrink: 0 }
 .q-tbl {
 width: 100%; border-collapse: collapse }
 
 .q-tbl th:first-child { text-align: left; width: 80px }
 .q-tbl th.ta { color: var(--type-a) }
 .q-tbl th.tb { color: var(--type-b) }
 .q-tbl th.tt { color: var(--type-t) }
 
 .q-tbl tbody tr:hover td { background: var(--accent-bg-0) }
 .q-tbl tbody tr:last-child td { border-bottom: 1px solid var(--brd) }
 .q-tbl tfoot td { border-bottom: none; background: var(--accent-bg-0) }
 .q-tbl td.q-label {
 text-align: left; font-size: var(--fs-base); font-weight: var(--fw-medium);
 padding-left: 10px; white-space: nowrap; color: var(--txt2);
 letter-spacing: var(--ls-normal); text-transform: uppercase }

 .q-inp:focus { outline: none; border-bottom-color: var(--blue); background: var(--accent-bg-1) }
 .q-inp.ta { color: var(--type-a) }
 .q-inp.ta:focus { border-bottom-color: var(--type-a); background: transparent }
 .q-inp.tb { color: var(--type-b) }
 .q-inp.tb:focus { border-bottom-color: var(--type-b); background: transparent }
 .q-inp.q-total { font-weight: var(--fw-semi) }
 .q-pct { display: none }
 .q-val {
 font-size: var(--fs-2xl); font-weight: var(--fw-normal); color: var(--type-t) }
 .q-val.q-total { font-weight: var(--fw-semi); font-size: 15px }
 .q-mm {
 display: block; font-size: var(--fs-sm); color: var(--txt3); margin-top: 1px }
 .q-total-row td { border-top: 1px solid var(--brd) }
 .q-hint { font-weight: var(--fw-normal); font-size: var(--fs-sm); opacity: 0.5; display: block; letter-spacing: 0; text-transform: none }
 
 /* Hero numbers */

 .q-hero { flex: 1; padding: 14px 18px; border: 1px solid var(--brd) }
 .q-hero-label { font-size: var(--fs-base); color: var(--txt3); letter-spacing: var(--ls-wider); text-transform: uppercase; margin-bottom: 4px }

 .q-hero-val sup { font-size: var(--fs-2xl); font-weight: var(--fw-normal); color: var(--txt2); vertical-align: super; margin-left: 2px }
 .q-hero-sub { font-size: var(--fs-base); color: var(--txt3); margin-top: 4px; letter-spacing: var(--ls-normal) }
 .q-hero.accent-a { border-left: 2px solid var(--type-a) }
 .q-hero.accent-b { border-left: 2px solid var(--type-b) }
 .q-hero.accent-t { border-left: 2px solid var(--blue) }
 
 @media(max-width:600px) {

 .header-actions { gap: 1px; flex-wrap: wrap }
 .header-sep { margin: 0 2px; height: 14px }
 .hdr-btn { width: 26px; height: 26px }
 .tab-group-label { display: none }
 .tab-arrow { display: none }
 .tab-step { width: 16px; height: 16px; font-size: 9px }
 .top-tab { padding: 8px 6px; font-size: 10px; letter-spacing: 0.04em }
 .tab-group { padding: 2px 0 0 }

 .q-tbl th, .q-tbl td { padding: 4px 3px }
 .q-hero-row { flex-direction: column; gap: 8px }
 .q-hero-val { font-size: 28px }
 }

 /* ===== MARKET DASHBOARD ===== */
 @keyframes spin{to{transform:rotate(360deg)}}

/* === Share table: no horizontal lines, vertical dividers, white values === */
.share-tbl td,
.share-tbl th {
    border-bottom: none !important;
    border-top: none !important;
    border-right: 1px solid var(--brd);
}
.share-tbl th:last-child,
.share-tbl td:last-child { border-right: none !important; }
.share-tbl tfoot td { border-top: none !important; }
.share-tbl .dash-sigma { color: var(--txt) !important; }
.share-tbl .dash-cell.ta { color: var(--txt) !important; }
.share-tbl .dash-cell.tb { color: var(--txt) !important; }
.share-tbl .dash-type-lbl.ta { color: var(--type-a) }
.share-tbl .dash-type-lbl.tb { color: var(--type-b) }
.share-tbl .dash-type-lbl.tt { color: var(--txt3) !important; }

/* === Areas table: no horizontal lines, vertical dividers, white values === */
.area-tbl td,
.area-tbl th {
    border-bottom: none !important;
    border-top: none !important;
    border-right: 1px solid var(--brd);
}
.area-tbl th:last-child,
.area-tbl td:last-child { border-right: none !important; }
.area-tbl tfoot td { border-top: none !important; }
.area-tbl .dash-sigma { color: var(--txt) !important; }
.area-tbl .dash-cell.ta { color: var(--txt) !important; }
.area-tbl .dash-cell.tb { color: var(--txt) !important; }

/* === Apt Detail summary table: no horizontal lines, vertical dividers, white values === */
.ad-summary-tbl td,
.ad-summary-tbl th {
    border-bottom: none !important;
    border-top: none !important;
    border-right: 1px solid var(--brd);
}
.ad-summary-tbl th:last-child,
.ad-summary-tbl td:last-child { border-right: none !important; }
.ad-summary-tbl tfoot td { border-top: none !important; }
.ad-summary-tbl .dash-sigma { color: var(--txt) !important; }
.ad-summary-tbl thead th { border-bottom: none !important; }
