.mc, .mc *, .mc-sheet, .mc-sheet * { box-sizing: border-box; }
.mobile-bottom-menu { display: none !important; }
#toggleAddMenu { display: none !important; }
body { background: #F5F5F7; color: #1D1D1F; }
.mc, .mc-sheet, .mc-toast { font: 14px/1.45 -apple-system, "Segoe UI", BlinkMacSystemFont, Roboto, Arial, sans-serif; color: #1D1D1F; }
.mc { max-width: 1200px; flex: 1; min-width: 0; width: 100%; margin: 0 auto; padding: 24px 20px 80px; }
@media (min-width: 900px) { .container { max-width: 1400px !important; margin: auto; display: flex; flex-direction: row; flex-wrap: nowrap; align-items: flex-start; justify-content: space-around; width: 92%; padding: 0 4%; gap: 20px; } }
@media (max-width: 900px) { #pfSidebar { display: none; } .mc { padding: 16px 16px 80px; } }
.mc a { color: #1164bf; text-decoration: none; }
.mc-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.mc-head h1 { font-size: 24px; font-weight: 700; margin: 0; }
.mc-role { display: inline-block; margin-top: 4px; font-size: 12.5px; padding: 2px 10px; border-radius: 10px; background: #E9F9EC; color: #11770f; }
.mc-tabs { display: flex; gap: 22px; overflow-x: auto; border-bottom: 1px solid #E3E3E8; margin: 8px 0 18px; scrollbar-width: none; }
.mc-tabs::-webkit-scrollbar { display: none; }
.mc-tab { padding: 10px 0; border: 0; border-bottom: 3px solid transparent; background: none; font: inherit; font-weight: 500; color: #6E6E73; cursor: pointer; white-space: nowrap; }
.mc-tab:hover { color: #1D1D1F; }
.mc-tab.on { color: #1D1D1F; border-bottom-color: #4aaf4e; }
.mc-person.sm .mc-ava { width: 34px; height: 34px; font-size: 13px; }
.mc-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.mc-tools .sp { flex: 1; }
.mc-btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 16px; border-radius: 26px; border: 1px solid #D9D9DE; background: #fff; font: inherit; font-weight: 500; cursor: pointer; color: #1D1D1F; text-decoration: none; }
.mc-btn:hover { border-color: #1164bf; color: #1164bf; }
.mc a.mc-btn.green, .mc-btn.green { background: #11770f; border-color: #11770f; color: #fff; }
.mc a.mc-btn.green:hover, .mc-btn.green:hover { background: #0e620c; color: #fff; }
.mc-btn.blue { background: #1164bf; border-color: #1164bf; color: #fff; }
.mc-btn.small { padding: 5px 12px; font-size: 13px; }
.mc-btn.danger { border-color: transparent; background: none; color: #D70015; }
.mc-seg { display: inline-flex; border: 1px solid #D9D9DE; border-radius: 26px; overflow: hidden; background: #fff; }
.mc-seg button { border: 0; background: none; padding: 6px 14px; font: inherit; font-size: 13px; cursor: pointer; color: #6E6E73; }
.mc-seg button.on { background: #11770f; color: #fff; }
.mc-person { display: flex; gap: 12px; align-items: center; min-width: 0; }
.mc-ava { width: 46px; height: 46px; border-radius: 50%; background: #E3E8EF; display: grid; place-items: center; font-weight: 600; color: #4B5563; overflow: hidden; flex: 0 0 auto; }
.mc-ava img { width: 100%; height: 100%; object-fit: cover; }
.mc-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.mc-sub { display: block; font-size: 12.5px; color: #6E6E73; }
.mc-tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 8px; background: #EAF3FC; color: #1164bf; margin-top: 2px; }
.mc-tag.owner { background: #E9F9EC; color: #11770f; }
.mc-tag.ok { background: #E9F9EC; color: #11770f; }
.mc-tag.bad { background: #FDECEC; color: #C0392B; }
.mc-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mc-row select { padding: 5px 10px; border: 1px solid #D9D9DE; border-radius: 26px; font: inherit; font-size: 13px; background: #fff; }
.mc-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: #6E6E73; }
.mc-stats b { color: #1D1D1F; }
.mc-wrap { background: #fff; border: 1px solid #E3E3E8; border-radius: 16px; overflow-x: auto; }
.mc-table { width: 100%; border-collapse: collapse; }
.mc-table th { text-align: left; font-size: 12px; font-weight: 500; color: #6E6E73; padding: 10px 12px; border-bottom: 1px solid #E3E3E8; white-space: nowrap; }
.mc-table td { padding: 10px 12px; border-bottom: 1px solid #F5F5F7; vertical-align: top; font-size: 13.5px; }
.mc-table tr.click { cursor: pointer; }
.mc-table tr.click:hover td { background: #F6FBF6; }
.mc-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mc-table tfoot td { font-weight: 600; border-top: 1px solid #E3E3E8; }
.mc-thumb { width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; background: #EEF2EE center / cover no-repeat; }
.mc-state { padding: 40px; text-align: center; color: #6E6E73; }
.mc-h2 { font-size: 16px; margin: 26px 0 10px; }
.mc-com { padding: 10px 0; border-bottom: 1px solid #EEE; white-space: pre-wrap; word-break: break-word; }
.mc-list { list-style: none; margin: 0; padding: 0; }
.mc-list li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid #F0F0F3; font-size: 13.5px; }
.mc-list .k { flex: 0 0 96px; color: #6E6E73; font-size: 12.5px; }
.mc-list .t { flex: 1; min-width: 0; }
.mc-list .d { color: #6E6E73; font-size: 12.5px; white-space: nowrap; }
.mc-sheet { position: fixed; inset: 0; z-index: 1100; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(29,29,31,.38); }
.mc-sheet.open { display: flex; }
.mc-sheet-body { width: 100%; max-width: 760px; max-height: calc(100vh - 40px); overflow-y: auto; background: #fff; border-radius: 16px; padding: 20px; }
.mc-sheet h2 { font-size: 18px; margin: 0 0 4px; }
.mc-sheet label { display: grid; gap: 4px; font-size: 12px; color: #6E6E73; margin-top: 12px; }
.mc-sheet input, .mc-sheet select { width: 100%; padding: 9px 12px; border: 1px solid #D9D9DE; border-radius: 16px; font: inherit; color: #1D1D1F; background: #fff; }
.mc-sheet input:focus, .mc-sheet select:focus { outline: none; border-color: #4aaf4e; }
.mc-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.mc-hint { font-size: 12.5px; color: #6E6E73; margin: 8px 0 0; }
.mc-err { margin: 12px 0 0; padding: 8px 10px; border-radius: 8px; background: #FDEBEC; color: #D70015; font-size: 13px; }
.mc-err-debug { margin: 6px 0 0; font-size: 11px; color: #8E8E93; word-break: break-word; }
.mc-toast { position: fixed; left: 50%; bottom: 24px; z-index: 1200; transform: translateX(-50%); display: none; padding: 11px 16px; border-radius: 10px; background: #1D1D1F; color: #fff; font-size: 13.5px; }
@media (max-width: 700px) {
    .mc { padding: 8px 12px 80px; }
    .mc-sheet { align-items: flex-end; padding: 0; }
    .mc-sheet-body { border-radius: 16px 16px 0 0; max-width: none; }
    .mc-hide-m { display: none; }
    /* таблицы → карточки */
    .mc-wrap:has(.mc-table) { background: none; border: 0; overflow: visible; }
    .mc-table, .mc-table tbody, .mc-table tfoot, .mc-table tr, .mc-table td { display: block; width: 100%; }
    .mc-table thead { display: none; }
    .mc-table tr { background: #fff; border: 1px solid #E3E3E8; border-radius: 16px; padding: 8px 14px; margin-bottom: 10px; }
    .mc-table td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; text-align: left; }
    .mc-table td.num { text-align: right; }
    .mc-table td[data-l]::before { content: attr(data-l); color: #6E6E73; font-size: 12.5px; font-weight: 400; flex: 0 0 auto; }
    .mc-table td:empty { display: none; }
    .mc-table tfoot td { border-top: 0; }
}
.mc-tools select { padding: 7px 12px; border: 1px solid #D9D9DE; border-radius: 16px; font: inherit; font-size: 13px; background: #fff; max-width: 100%; }
.mc-tree { border: 0; background: none; padding: 0 6px 0 0; font: inherit; color: #1164bf; cursor: pointer; }
.mc-subs { font-size: 12.5px; }
.mc-table tr.mc-child td:first-child { padding-left: 40px; }
.mc-back { display: inline-block; margin-bottom: 10px; }
.mc-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 6px 0 8px; }
.mc-kpi { background: #fff; border: 1px solid #E3E3E8; border-radius: 16px; padding: 14px 16px; }
.mc-kpi .l { font-size: 12.5px; color: #6E6E73; }
.mc-kpi .n { font-size: 26px; font-weight: 700; line-height: 1.2; margin: 4px 0 2px; }
.mc-kpi .a { font-size: 12px; color: #6E6E73; }
.mc-card { background: #fff; border: 1px solid #E3E3E8; border-radius: 16px; padding: 16px 18px; margin-bottom: 14px; }
@media (max-width: 700px) {
    .mc-table tr.mc-child { margin-left: 16px; width: calc(100% - 16px); }
    .mc-table tr.mc-child td:first-child { padding-left: 0; }
    .mc-kpis { grid-template-columns: repeat(2, 1fr); }
}
/* поиск продукта вместо селекта (Аргументы, Демо опыты) */
.mc-pick{position:relative;display:inline-block;min-width:200px}
.mc-pick input{width:100%;box-sizing:border-box;padding:7px 30px 7px 12px;border:1px solid #D9D9DE;border-radius:16px;font-size:13px;background:#fff;outline:none}
.mc-pick input:focus,.mc-pick.set input{border-color:#000}
.mc-pick-x{position:absolute;right:8px;top:50%;transform:translateY(-50%);border:0;background:none;color:#8a8a8a;font-size:13px;cursor:pointer;padding:2px}
.mc-pick-list{position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:20;max-height:260px;overflow:auto;background:#fff;border:1px solid #eee;border-radius:12px;box-shadow:0 6px 20px rgba(0,0,0,.08);padding:4px}
.mc-pick-list button{display:block;width:100%;text-align:left;border:0;background:none;padding:7px 10px;border-radius:8px;font-size:13px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mc-pick-list button:hover{background:#f4f4f6}
.mc-pick-more{display:block;padding:6px 10px;font-size:12px;color:#8a8a8a}

/* дашборд сотрудника: роль бейджем у имени, кнопка ростом с переключатель периода, календарь задач */
.mc-head h1 .mc-badge { vertical-align: top; position: relative; top: -2px; margin: 0 0 0 8px; font-size: 12px; font-weight: 600; }
.mc-btn.seg-h { padding: 6px 14px; font-size: 13px; }
.mc-res { white-space: nowrap; }
.mc-num-p { color: #11770f; font-weight: 600; }
.mc-num-m { color: #C0392B; font-weight: 600; }
.mc-cal { background: #fff; border: 1px solid #E3E3E8; border-radius: 14px; padding: 14px; }
.mc-cal-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.mc-cal-top b { font-size: 16px; }
.mc-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.mc-cal-wd { font-size: 12px; color: #6E6E73; text-align: center; padding: 2px 0; }
.mc-cal-d { min-height: 64px; border: 1px solid #EFEFF2; border-radius: 10px; padding: 4px 5px; background: #FAFAFB; font: inherit; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mc-cal-d.out { visibility: hidden; }
.mc-cal-d.today { border-color: #4aaf4e; }
.mc-cal-d.on { background: #EAF3FC; border-color: #1164bf; }
.mc-cal-d .n { font-size: 12px; font-weight: 600; color: #1D1D1F; }
.mc-cal-d .t { font-size: 11px; line-height: 1.25; padding: 1px 4px; border-radius: 4px; background: #E9F9EC; color: #11770f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-cal-d .t.done { background: #F0F0F3; color: #8E8E93; text-decoration: line-through; }
.mc-cal-d .more { font-size: 11px; color: #6E6E73; }
.mc-cal-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.mc-cal-item { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: #FAFAFB; }
.mc-cal-item.done .txt { color: #8E8E93; text-decoration: line-through; }
.mc-cal-item .dot { width: 8px; height: 8px; border-radius: 50%; background: #4aaf4e; margin-top: 6px; flex: none; }
.mc-cal-item.done .dot { background: #C7C7CC; }
@media (max-width: 640px) {
    .mc-cal { padding: 10px; }
    .mc-cal-d { min-height: 44px; }
    .mc-cal-d .t { display: none; }
    .mc-cal-d.has::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #4aaf4e; }
}
/* единая панель фильтров вкладок: селекты и поиск продукта одной высоты и стиля, на ПК — в ряд */
.mc-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 14px; }
.mc-filters > select, .mc-filters > .mc-pick { flex: 0 1 240px; min-width: 180px; width: auto !important; max-width: 100%; margin: 0 !important; display: block; }
.mc-filters select, .mc-filters .mc-pick input { box-sizing: border-box; height: 38px; width: 100% !important; margin: 0; padding: 0 34px 0 14px; border: 1px solid #D9D9DE; border-radius: 12px; background-color: #fff; font: inherit; font-size: 13.5px; color: #1D1D1F; outline: none; box-shadow: none; transition: border-color .15s, box-shadow .15s, background-color .15s; }
.mc-filters select { -webkit-appearance: none; appearance: none; cursor: pointer; text-overflow: ellipsis; white-space: nowrap; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%236E6E73' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.mc-filters .mc-pick input { padding-left: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Ccircle cx='6' cy='6' r='4.3' fill='none' stroke='%236E6E73' stroke-width='1.5'/%3E%3Cpath d='m9.3 9.3 3 3' stroke='%236E6E73' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 12px center; }
.mc-filters select:hover, .mc-filters .mc-pick input:hover { border-color: #B8B8BE; }
.mc-filters select:focus, .mc-filters .mc-pick input:focus { border-color: #4aaf4e; box-shadow: 0 0 0 3px rgba(74, 175, 78, .15); }
.mc-filters select.set, .mc-filters .mc-pick.set input { border-color: #4aaf4e; background-color: #F3FAF3; }
.mc-filters .mc-pick-x { right: 10px; }
@media (max-width: 700px) {
    .mc-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
    .mc-filters > select, .mc-filters > .mc-pick { min-width: 0; }
}

/* Км подробно */
.mc-km-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0 10px; }
.mc-km-chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding: 10px 12px; margin-bottom: 14px; background: #fff; border: 1px solid #ECECF0; border-radius: 14px; }
.mc-km-chart span { flex: 1 1 0; min-width: 2px; background: #4aaf4e; border-radius: 3px 3px 0 0; opacity: .85; }
.mc-km-chart span:hover { opacity: 1; background: #11770f; }
.mc-km-bar { display: block; width: 120px; height: 8px; background: #F0F0F3; border-radius: 4px; overflow: hidden; }
.mc-km-bar i { display: block; height: 100%; background: #4aaf4e; border-radius: 4px; }
