/* dash-v3.css — «Главная v3» (макет design/dashboard-v3-mock.html). Префикс d3-. Цвета — токены темы (в тёмной равны макету). */

.d3 { box-sizing: border-box; padding: 20px 32px 32px; display: flex; flex-direction: column; gap: 16px; line-height: normal; max-width: 1760px; margin: 0 auto; }
.d3-preview { align-self: flex-end; font-size: 12px; color: var(--text-faint, #6b7672); display: flex; gap: 10px; align-items: center; }
.d3-preview__off { background: none; border: 0; padding: 0; color: var(--accent-primary); font: inherit; cursor: pointer; }
.d3-top { display: flex; flex-direction: column; gap: 16px; }
.d3-cols { display: grid; grid-template-columns: minmax(0, 8fr) minmax(320px, 4fr); gap: 16px; align-items: start; }
.d3-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.d3-blk[hidden] { display: none; }
.d3-in { animation: d3-rise .42s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes d3-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* карточки: решения, неделя, кто в офисе */
.d3-blk[data-block="decisions"], .d3-blk[data-block="week"], .d3-blk[data-block="office"], .d3-blk[data-block="news"], .d3-blk[data-block="cal"], .d3-blk[data-block="feed"].so-blk { background: var(--bg-secondary); border: 1px solid var(--border-default); border-radius: 16px; padding: 18px 20px; box-sizing: border-box; }
.d3-blk[data-block="decisions"] { padding: 20px 24px 12px; }
.d3-blk.d3-collapsed { background: transparent !important; border: 1px dashed var(--border-strong) !important; padding: 11px 16px !important; display: flex; align-items: center; gap: 12px; color: var(--text-secondary); font-size: 13px; }
.d3-fill { flex: 1; }
.d3-collapsed__t { color: var(--text-secondary); }
.d3-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.d3-h { margin: 0; font: 700 15px var(--font-display); display: flex; align-items: baseline; gap: 10px; }
.d3-h small { font: 400 12px var(--font-sans); color: var(--text-muted); }
.d3-muted { color: var(--text-muted); font-size: 12.5px; }
.d3-empty { padding: 16px 0; color: var(--text-muted); font-size: 13px; }
.d3-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 8px; border: 1px solid var(--border-strong); background: transparent; color: var(--text-primary); font: 500 13px var(--font-sans); cursor: pointer; text-decoration: none; transition: transform .12s, background .15s, border-color .15s; }
.d3-btn:hover { background: var(--bg-panel-hover); }
.d3-btn:active { transform: scale(.97); }

/* скелетоны */
.d3-skel { display: block; border-radius: 12px; background: var(--bg-panel-hover); position: relative; overflow: hidden; }
.d3-skel::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .06) 45%, transparent 70%); transform: translateX(-100%); animation: d3-shimmer 1.1s infinite; }
.d3-skel--line { height: 34px; width: 70%; } .d3-skel--chip { height: 96px; flex: 1; } .d3-skel--card { height: 260px; } .d3-skel--sm { height: 150px; }
@keyframes d3-shimmer { to { transform: translateX(100%); } }

/* герой */
.d3-hero { position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 22px 28px; border: 1px solid var(--border-default); border-radius: 22px; background: var(--bg-secondary); }
.d3-hero::before { content: ''; position: absolute; inset: -30%; z-index: -1; pointer-events: none; background: radial-gradient(520px 260px at 14% 30%, rgba(61, 220, 151, .16), transparent 62%), radial-gradient(520px 240px at 86% 70%, rgba(94, 182, 255, .12), transparent 62%); }
.d3-hero .d3-hero__av.av { --av: 76px; background: linear-gradient(135deg, #2f9f78, #12392b); color: #d9fff0; border: 2px solid rgba(61, 220, 151, .55); box-shadow: 0 0 0 5px rgba(61, 220, 151, .12); font-size: 26px; }
.d3-hero__hi { font: 600 13px var(--font-sans); color: var(--text-secondary); margin-bottom: 6px; }
.d3-hero__hi b { color: var(--accent-primary); }
.d3-hero__s { margin: 0; font: 700 clamp(20px, 1.7vw, 28px)/1.5 var(--font-display); letter-spacing: -.01em; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.d3-quiet { color: var(--text-secondary); }
.d3-part { --pc: var(--accent-primary); display: inline-flex; align-items: center; gap: 8px; padding: 1px 13px 1px 10px; border-radius: 999px; background: color-mix(in srgb, var(--pc) 14%, transparent); color: var(--pc); border: 1px solid color-mix(in srgb, var(--pc) 35%, transparent); font-size: .8em; font-weight: 700; line-height: 1.55; text-decoration: none; white-space: nowrap; transition: background .15s, transform .15s; }
.d3-part:hover { background: color-mix(in srgb, var(--pc) 24%, transparent); transform: translateY(-1px); }
.d3-part:active { transform: scale(.97); }
.d3-part i { width: 8px; height: 8px; border-radius: 50%; background: var(--pc); }
.d3-part--amber { --pc: #f5b942; } .d3-part--red { --pc: #f26d6d; } .d3-part--mint { --pc: #3ddc97; } .d3-part--rose { --pc: #f472a8; }
.d3-hero__side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; }
.d3-wx { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-default); font: 500 13px var(--font-sans); color: var(--text-primary); }
.d3-wx[hidden] { display: none; }
.d3-wx svg { color: #f5b942; } .d3-wx b { font: 700 15px var(--font-display); }
.d3-hero__date { font-size: 13px; color: var(--text-secondary); }

/* показатели — чипы */
.d3-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 12px; }
.d3-chip { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: end; padding: 12px 14px; background: var(--bg-secondary); border: 1px solid var(--border-default); border-radius: 14px; color: inherit; text-decoration: none; transition: transform .15s, border-color .15s; }
.d3-chip:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.d3-chip:active { transform: scale(.97); }
.d3-chip__l { grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-secondary); }
.d3-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); flex: none; }
.d3-dot--red { background: #f26d6d; } .d3-dot--yellow { background: #f5b942; }
.d3-chip__v { font: 800 28px/1.05 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.d3-chip__v small { font: 500 13px var(--font-sans); color: var(--text-muted); margin-left: 3px; }
.d3-chip__n { grid-column: 1 / -1; font-size: 12px; color: var(--text-muted); }
.d3-chip__g { grid-column: 1 / -1; display: block; height: 24px; margin-top: 4px; }
.d3-spark { display: block; width: 100%; height: 24px; overflow: visible; }
.d3-chip__n--red { color: var(--text-secondary); } .d3-chip__n { display: flex; align-items: center; gap: 6px; }
.d3-trend { justify-self: end; font: 600 12px var(--font-mono); padding: 2px 7px; border-radius: 7px; color: var(--text-muted); background: var(--bg-panel-hover); }
.d3-trend--good { color: #3ddc97; background: rgba(61, 220, 151, .12); } .d3-trend--bad { color: #f26d6d; background: rgba(242, 109, 109, .12); }

/* решения: новая подача поверх прежних строк */
.d3-blk[data-block="decisions"] .hm-dec { margin: 0 -12px; padding-left: 12px; padding-right: 12px; border-radius: 12px; transition: background .15s, transform .15s; }
.d3-blk[data-block="decisions"] .hm-dec:hover { background: var(--bg-panel-hover); transform: translateY(-1px); }
.d3-blk[data-block="decisions"] .hm-btn { transition: box-shadow .15s, border-color .15s, transform .12s; }
.d3-blk[data-block="decisions"] .hm-dec:hover .hm-btn { border-color: var(--accent-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-primary) 18%, transparent); }
.d3-blk[data-block="decisions"] .hm-btn:active { transform: scale(.97); }

/* неделя */
.d3-week { display: flex; flex-direction: column; gap: 6px; }
.d3-day { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; background: var(--bg-panel-hover); border: 1px solid transparent; }
.d3-day--today { border-color: var(--accent-primary); background: color-mix(in srgb, var(--accent-primary) 8%, var(--bg-panel-hover)); }
.d3-day--empty { background: transparent; opacity: .7; }
.d3-day__d { display: flex; flex-direction: column; width: 34px; flex: none; font: 600 11px var(--font-mono); color: var(--text-muted); text-transform: uppercase; }
.d3-day__d b { font: 800 16px var(--font-display); color: var(--text-primary); }
.d3-day--today .d3-day__d b { color: var(--accent-primary); }
.d3-day__c { display: flex; flex-wrap: wrap; gap: 6px; }
.d3-pill { font-size: 12px; padding: 3px 9px; border-radius: 8px; border-left: 3px solid var(--pl, var(--accent-primary)); background: color-mix(in srgb, var(--pl, var(--accent-primary)) 16%, transparent); }
.d3-pill--red { --pl: #f26d6d; } .d3-pill--yellow { --pl: #f5b942; } .d3-pill--green { --pl: #3ddc97; }
.d3-next { margin-top: 12px; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg-panel-hover); color: inherit; text-decoration: none; }
.d3-next__t { font: 600 13px var(--font-mono); color: var(--accent-primary); }
.d3-next__x { display: flex; flex-direction: column; min-width: 0; } .d3-next__x small { color: var(--text-muted); font-size: 12px; }

/* кто в офисе */
.d3-office { display: block; color: inherit; text-decoration: none; }
.d3-count b { font: 800 30px/1 var(--font-display); letter-spacing: -.02em; }
.d3-faces { display: flex; flex-wrap: wrap; padding-left: 4px; margin: 4px 0 6px; }
.d3-face { position: relative; margin-left: -4px; display: inline-flex; animation: d3-pop .26s cubic-bezier(.2, .9, .3, 1.3) both; animation-delay: calc(var(--j, 0) * 45ms + .35s); }
.d3-face .av { --av: 36px; border: 2.5px solid var(--bg-secondary); transition: transform .15s; }
.d3-face:hover .av { transform: translateY(-3px); }
.d3-face--more { align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--bg-panel-hover); color: var(--text-secondary); font: 500 13px var(--font-mono); border: 2.5px solid var(--bg-secondary); }
@keyframes d3-pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
.d3-away { color: var(--text-muted); font-size: 12.5px; margin-top: 8px; }
.d3-bday { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: linear-gradient(90deg, rgba(244, 114, 168, .16), rgba(245, 185, 66, .08)); border: 1px solid rgba(244, 114, 168, .3); }
.d3-bday .av { --av: 38px; }
.d3-bday__t { display: flex; flex-direction: column; min-width: 0; flex: 1; } .d3-bday__t small { color: var(--text-secondary); font-size: 12px; }

/* «Бизнес» — только владельцу */
.d3-biz { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 12px; padding: 14px 16px; border-radius: 16px; border: 1px dashed rgba(185, 224, 91, .45); background: linear-gradient(90deg, rgba(185, 224, 91, .10), rgba(53, 211, 193, .06)); }
.d3-biz__k span { display: block; font-size: 12px; color: var(--text-secondary); } .d3-biz__k b { font: 800 24px/1.1 var(--font-display); color: var(--text-muted); }
.d3-biz__c { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding-left: 14px; border-left: 1px solid var(--border-strong); font-size: 12.5px; color: var(--text-secondary); }

/* телефон: одна колонка, порядок — по важности для дня (--po) */
@media (max-width: 860px) {
  .d3 { padding: 12px 14px 96px; gap: 12px; }
  .d3, .d3-top, .d3-cols, .d3-col { display: contents; }
  .d3 { display: flex; flex-direction: column; }
  .d3-preview { order: -1; }
  .d3-blk { order: var(--po, 50); }
  .d3-hero { grid-template-columns: auto 1fr; padding: 16px; gap: 14px; border-radius: 18px; }
  .d3-hero .d3-hero__av.av { --av: 52px; font-size: 18px; }
  .d3-hero__tx { min-width: 0; }
  .d3-hero__s { font-size: 17px; }
  .d3-part { white-space: normal; max-width: 100%; padding-right: 11px; }
  .d3-hero__side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; text-align: left; }
  .d3-strip { display: flex; overflow-x: auto; margin: 0 -14px; padding: 2px 14px; scroll-snap-type: x mandatory; }
  .d3-chip { min-width: 156px; scroll-snap-align: start; }
  .d3-biz { grid-template-columns: 1fr 1fr; } .d3-biz__c { grid-column: 1 / -1; border-left: 0; padding-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .d3-in, .d3-face { animation: none !important; }
  .d3-skel::after { animation: none !important; }
  .d3-part, .d3-chip, .d3-btn, .d3-blk[data-block="decisions"] .hm-dec { transition: none !important; }
}

/* новости: карточки 2×2 */
.d3-news { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.d3-nw { --h: 160; display: flex; gap: 12px; padding: 10px; border-radius: 12px; background: var(--bg-panel-hover); border: 1px solid transparent; color: inherit; text-decoration: none; transition: transform .15s, border-color .15s; animation: d3-rise .35s both; animation-delay: calc(var(--k, 0) * 60ms + .3s); }
.d3-nw:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.d3-nw:active { transform: scale(.98); }
.d3-nw__m { position: relative; flex: none; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: hsl(var(--h) 45% 32%); display: grid; place-items: center; }
.d3-nw__mono { font: 800 18px var(--font-display); color: hsl(var(--h) 80% 85%); }
.d3-nw__m img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.d3-nw__b { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.d3-nw__meta { display: flex; align-items: center; gap: 8px; font: 600 11px var(--font-mono); letter-spacing: .03em; text-transform: uppercase; color: hsl(var(--h) 70% 62%); min-width: 0; }
.d3-nw__src { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d3-nw__ago { color: var(--text-muted); text-transform: none; letter-spacing: 0; font: 400 12px var(--font-sans); flex: none; }
.d3-nw__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-primary); flex: none; animation: ak-pulse 1.8s 3; }
.d3-nw__t { font: 500 13.5px/1.38 var(--font-display); color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.d3-nw--new .d3-nw__t { color: var(--text-primary); font-weight: 700; }
.d3-new { color: var(--accent-primary); font-weight: 600; }
@media (max-width: 860px) { .d3-news { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .d3-nw { animation: none !important; transition: none !important; } .d3-nw__dot { animation: none !important; } }

/* календарь с заметками */
.c3-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.c3-title { flex: 1; font: 700 15px var(--font-display); text-align: center; }
.c3-arrow { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--border-default); background: transparent; color: var(--text-secondary); cursor: pointer; transition: transform .12s, background .15s; }
.c3-arrow:hover { background: var(--bg-panel-hover); color: var(--text-primary); } .c3-arrow:active { transform: scale(.94); }
.c3-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; transition: opacity .2s; }
.c3-busy .c3-grid { opacity: .5; }
.c3-wd { text-align: center; font: 600 11px var(--font-mono); color: var(--text-muted); text-transform: uppercase; padding: 4px 0; }
.c3-d { position: relative; aspect-ratio: 1 / 1; min-height: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--text-primary); cursor: pointer; transition: background .15s, transform .12s, border-color .15s; }
.c3-d:hover { background: var(--bg-panel-hover); } .c3-d:active { transform: scale(.95); }
.c3-d--out { color: var(--text-muted); opacity: .55; } .c3-d--we .c3-n { color: var(--text-secondary); }
.c3-n { font: 600 13.5px var(--font-display); font-variant-numeric: tabular-nums; }
.c3-d--today { border-color: var(--accent-primary); } .c3-d--today .c3-n { color: var(--accent-primary); }
.c3-d--sel { background: color-mix(in srgb, var(--accent-primary) 20%, transparent); border-color: var(--accent-primary); }
.c3-dots { display: flex; gap: 3px; height: 6px; align-items: center; }
.c3-dot { width: 5px; height: 5px; border-radius: 50%; } .c3-dot--red { background: #f26d6d; } .c3-dot--yellow { background: #f5b942; } .c3-dot--green { background: #3ddc97; }
.c3-note { width: 6px; height: 6px; border-radius: 2px; background: #a99bff; margin-left: 1px; }
.c3-day { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-default); display: flex; flex-direction: column; gap: 8px; }
.c3-day__h { font: 700 14px var(--font-display); }
.c3-ev { display: flex; gap: 10px; padding: 7px 10px; border-radius: 10px; background: var(--bg-panel-hover); border-left: 3px solid #3ddc97; }
.c3-ev--red { border-left-color: #f26d6d; } .c3-ev--yellow { border-left-color: #f5b942; } .c3-ev--past { opacity: .6; }
.c3-ev__t { font: 600 12.5px var(--font-mono); color: var(--accent-primary); min-width: 54px; }
.c3-ev__x { display: flex; flex-direction: column; min-width: 0; font-size: 13px; } .c3-ev__x small { color: var(--text-muted); font-size: 12px; }
.c3-notes { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.c3-notes__h { font: 600 11px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.c3-nt { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, #a99bff 12%, transparent); border-left: 3px solid #a99bff; font-size: 13.5px; line-height: 1.4; }
.c3-nt__x { flex: 1; min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.c3-nt__a { display: inline-flex; gap: 2px; opacity: 0; transition: opacity .15s; } .c3-nt:hover .c3-nt__a, .c3-nt:focus-within .c3-nt__a { opacity: 1; }
.c3-nt__b { width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 7px; background: none; color: var(--text-muted); cursor: pointer; } .c3-nt__b:hover { background: var(--bg-secondary); color: var(--text-primary); }
.c3-add { display: flex; gap: 8px; }
.c3-in { flex: 1; min-width: 0; padding: 7px 10px; border-radius: 9px; border: 1px solid var(--border-default); background: var(--bg-secondary); color: var(--text-primary); font: 13.5px var(--font-sans); }
.c3-in:focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-primary) 18%, transparent); }
@media (max-width: 860px) { .c3-nt__a { opacity: 1; } .c3-d { min-height: 38px; } }
@media (prefers-reduced-motion: reduce) { .c3-grid, .c3-d, .c3-arrow { transition: none !important; } }

/* решения: подвал как в макете */
.d3-dec-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 0 4px; border-top: 1px solid var(--border-default); color: var(--text-muted); font-size: 12.5px; }
.d3-dec-foot a { color: var(--accent-primary); font-weight: 500; text-decoration: none; }

/* «Присутствие»: вкладки */
.pr-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.pr-tab { padding: 7px 14px; border: 1px solid var(--border-default); border-radius: 999px; background: transparent; color: var(--text-secondary, var(--text-primary)); font: inherit; font-size: 13px; cursor: pointer; }
.pr-tab b { margin-left: 4px; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.pr-tab:hover { border-color: var(--accent-primary); }
.pr-tab--on { border-color: var(--accent-primary); background: color-mix(in srgb, var(--accent-primary) 14%, transparent); color: var(--accent-primary); font-weight: 600; }
.pr-tab:focus-visible { outline: 2px solid var(--border-focus, var(--accent-primary)); outline-offset: 2px; }
