/* «Мой кабинет» (NIPI-013) */
.cabinet { display: flex; flex-direction: column; gap: 20px; }
.cab-hero { border-radius: 20px; padding: 24px; background: linear-gradient(120deg, #d9f2f5 0%, #e3ecfb 60%, #eef0fb 100%); display: flex; flex-direction: column; gap: 18px; }
.cab-hello h2 { font-size: 24px; font-weight: 700; }
.cab-hello p { margin: 4px 0 0; color: #5b6680; }
.cab-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.cab-widget { background: #fff; border-radius: 18px; padding: 18px 20px; box-shadow: 0 4px 18px rgba(31, 42, 68, .06); display: flex; flex-direction: column; gap: 18px; min-height: 140px; }
.cab-widget-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 17px; }
.cab-widget-icon { width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.cab-widget-icon .icon { width: 22px; height: 22px; stroke-width: 2.2; }
.tone-orange { background: #f7a928; }
.tone-red { background: #ef4b45; }
.tone-green { background: #2fb47c; }
.tone-violet { background: #9a6be8; }
.tone-blue { background: #4f7be8; }
.cab-widget-body { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.cab-num { font-size: 34px; font-weight: 700; line-height: 1; }
.cab-label { color: #5b6680; font-size: 13px; max-width: 150px; }
.cab-sep { width: 1px; height: 30px; background: #e3e7ef; margin: 0 6px; align-self: center; }

.cab-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.cab-side { display: flex; flex-direction: column; gap: 20px; }
.cab-tasks .card-header { margin-bottom: 8px; }
.cab-filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.cab-sources { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 5px 13px; font: inherit; font-size: 13px; cursor: pointer; color: #5b6680; }
.chip.active { background: var(--primary-soft); border-color: transparent; color: var(--primary); font-weight: 600; }
.cab-table td { vertical-align: top; }
.cab-table a { color: var(--text); text-decoration: none; }
.cab-table a:hover { color: var(--primary); }
.cab-context { font-size: 12px; margin-top: 4px; max-width: 280px; }
.cab-late { color: var(--danger); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.cab-late .icon { width: 15px; height: 15px; }
.cab-star-cell { width: 34px; }
.cab-star { border: none; background: none; padding: 2px; cursor: pointer; color: #c8cfdb; }
.cab-star:hover { color: #f2a516; }
.cab-star.on { color: #f2a516; }
.cab-star.on .icon { fill: #f7b731; stroke: #f2a516; }
.cab-empty { text-align: center; color: var(--muted); padding: 36px 12px; }
.cab-empty .icon { width: 40px; height: 40px; color: #b9e3cc; }
.cab-empty.small { padding: 18px 8px; }
.cab-empty.small .icon { width: 28px; height: 28px; }

/* Канбан */
.cab-kanban { display: grid; grid-template-columns: repeat(5, minmax(170px, 1fr)); gap: 12px; overflow-x: auto; }
.cab-col { background: #f6f8fc; border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 160px; }
.cab-col-head { font-weight: 700; font-size: 13px; display: flex; justify-content: space-between; padding: 2px 4px 6px; border-bottom: 3px solid #dfe4ee; }
.cab-col-overdue .cab-col-head { border-color: #ef4b45; }
.cab-col-not_started .cab-col-head { border-color: #a3abbd; }
.cab-col-in_progress .cab-col-head { border-color: #4f7be8; }
.cab-col-control .cab-col-head { border-color: #9a6be8; }
.cab-col-done .cab-col-head { border-color: #2fb47c; }
.cab-col-head .count { background: #fff; border-radius: 10px; padding: 0 7px; font-size: 11px; }
.cab-card { background: #fff; border-radius: 12px; padding: 10px 12px; box-shadow: 0 2px 8px rgba(31, 42, 68, .06); text-decoration: none; color: var(--text);
  display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.cab-card:hover { box-shadow: 0 6px 16px rgba(31, 42, 68, .12); }
.cab-card-top { display: flex; justify-content: space-between; align-items: center; }
.cab-card-top .icon { color: #f2a516; fill: #f7b731; width: 15px; height: 15px; }
.cab-card .pill { font-size: 11px; padding: 2px 8px; }
.cab-card-foot { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.cab-card-foot .icon { width: 14px; height: 14px; }
.cab-col-empty { color: #b4bccb; text-align: center; padding: 10px; }

/* Календарь */
.cab-cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cab-cal-head strong { min-width: 150px; text-align: center; text-transform: capitalize; }
.cab-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cab-dow { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; padding: 2px 6px; }
.cab-day { min-height: 92px; background: #f8f9fc; border-radius: 10px; padding: 6px; display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.cab-day.other { opacity: .45; }
.cab-day.today { background: var(--primary-soft); box-shadow: inset 0 0 0 1.5px var(--primary); }
.cab-day-num { font-size: 12px; font-weight: 600; color: #5b6680; }
.cab-event { display: block; font-size: 11.5px; background: #fff; border-left: 3px solid #4f7be8; border-radius: 6px; padding: 2px 6px; text-decoration: none; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cab-event.late { border-left-color: #ef4b45; }
.cab-event.done { border-left-color: #2fb47c; opacity: .8; }

/* Документы на обработке */
.cab-docs { display: flex; flex-direction: column; gap: 12px; }
.cab-doc { border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.cab-doc-top { display: flex; justify-content: space-between; align-items: center; }
.cab-doc-title { font-weight: 700; color: var(--text); text-decoration: none; line-height: 1.35; }
.cab-doc-title:hover { color: var(--primary); }
.cab-doc-foot { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; flex-wrap: wrap; border-top: 1px solid #eef1f6; padding-top: 8px; }
.cab-doc-foot span { display: inline-flex; align-items: center; gap: 4px; }
.cab-doc-foot .icon { width: 15px; height: 15px; }
.cab-doc-foot .btn { margin-left: auto; }

/* Лента событий и избранное */
.cab-feed { list-style: none; margin: 0; padding: 0; max-height: 520px; overflow-y: auto; }
.cab-feed li { display: flex; gap: 12px; position: relative; padding-bottom: 16px; }
.cab-feed li::before { content: ''; position: absolute; left: 5px; top: 14px; bottom: 0; width: 2px; background: #e9ecf5; }
.cab-feed li:last-child::before { display: none; }
.cab-dot { width: 12px; height: 12px; border-radius: 50%; background: #4f6cf0; margin-top: 4px; flex-shrink: 0; position: relative; z-index: 1; }
.cab-feed a { font-weight: 600; color: var(--text); text-decoration: none; }
.cab-feed a:hover { color: var(--primary); }
.cab-time { font-size: 12px; margin-top: 2px; }
.cab-fav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cab-fav li { display: flex; align-items: center; gap: 6px; }
.cab-fav a { flex: 1; color: var(--text); text-decoration: none; font-weight: 500; }
.cab-fav .muted { font-size: 12px; }
.card-title .icon { color: #f2a516; vertical-align: -3px; }

@media (max-width: 1200px) { .cab-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .cab-kanban { grid-template-columns: repeat(5, 220px); }
  .cab-day { min-height: 60px; }
  .cab-event { display: none; }
}

/* Административный интерфейс */
.admin-hero { background: linear-gradient(120deg, #e6ebf7 0%, #e9eefb 50%, #f0eefb 100%); }
.admin-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.admin-link { display: flex; gap: 14px; align-items: flex-start; text-decoration: none; color: var(--text); padding: 16px 18px; transition: box-shadow .15s, transform .15s; }
.admin-link:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.admin-link > .icon { width: 38px; height: 38px; padding: 9px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }
.admin-link strong { display: block; }
.admin-link small { color: var(--muted); }
.admin-subtitle { margin-top: 22px; }
.admin-data { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.admin-data div { background: #f8f9fc; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.admin-data span { color: var(--muted); font-size: 12.5px; }
.admin-data strong { font-size: 20px; }
.admin-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.admin-list li { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.audit-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.audit-filters label:first-child { flex: 1; min-width: 220px; }
.audit-details { max-width: 420px; overflow-wrap: anywhere; font-size: 13px; }
