* { box-sizing: border-box; }
body { margin: 0; padding: 16px; font: 14px/1.45 var(--ui-font-family-primary, "Helvetica Neue", Arial, sans-serif); color: #333; background: #f5f7f8; }
h1 { font-size: 20px; margin: 0 0 12px; }
.tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid #dfe3e6; }
.tab { padding: 8px 14px; cursor: pointer; border-bottom: 2px solid transparent; color: #525c69; }
.tab.active { color: #0b66c3; border-color: #0b66c3; font-weight: 600; }
.bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
input[type=text], input[type=number], input[type=date], input[type=password], select { padding: 6px 8px; border: 1px solid #c6cdd3; border-radius: 4px; background: #fff; font: inherit; }
button { padding: 6px 14px; border: 0; border-radius: 4px; cursor: pointer; background: #2fc6f6; color: #fff; font: inherit; }
button.secondary { background: #fff; color: #525c69; border: 1px solid #c6cdd3; }
button.danger { background: #e0463a; }
button:disabled { opacity: .5; cursor: default; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 4px; overflow: hidden; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #eef0f2; vertical-align: top; }
th { background: #eef2f4; font-weight: 600; color: #525c69; }
td.pre { white-space: pre-line; }
.pager { margin-top: 10px; display: flex; gap: 8px; align-items: center; }
.card { background: #fff; padding: 16px; border-radius: 4px; max-width: 760px; }
.card h3 { margin: 16px 0 8px; font-size: 15px; }
.card h3:first-child { margin-top: 0; }
.row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.row label.l { width: 260px; color: #525c69; }
.note { background: #fff8e1; border: 1px solid #f3dd9a; padding: 10px 12px; border-radius: 4px; margin: 10px 0; color: #6b5a1e; }
.msg { margin: 8px 0; padding: 8px 12px; border-radius: 4px; }
.msg.ok { background: #e6f7e9; color: #2a7a3b; }
.msg.err { background: #fde8e6; color: #b3281d; }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: flex-start; justify-content: center; padding: 30px 16px; overflow: auto; z-index: 10; }
.modal { background: #fff; border-radius: 6px; padding: 20px; max-width: 760px; width: 100%; }
.modal .full { white-space: pre-wrap; line-height: 1.6; margin: 12px 0; }
.muted { color: #828b95; font-size: 12px; }

/* ---- занятость ---- */
.lv0 { background: #f1f3f5; color: #9aa3ac; } .lv1 { background: #d7efdb; } .lv2 { background: #a9dfb1; }
.lv3 { background: #6fc67f; } .lv4 { background: #3aa655; color: #fff; } .lv5 { background: #1f7a3b; color: #fff; }
.heat { overflow-x: auto; background: #fff; border-radius: 4px; }
.heat table { border-radius: 0; width: auto; min-width: 100%; }
.heat th, .heat td { padding: 4px 6px; text-align: center; border: 1px solid #fff; font-size: 12px; white-space: nowrap; }
.heat td.name { text-align: left; position: sticky; left: 0; background: #fff; cursor: pointer; color: #0b66c3; min-width: 160px; z-index: 1; }
.heat th.we { background: #e4e8eb; }
.heat td.cell { min-width: 34px; cursor: pointer; }
.heat td.cell.empty { cursor: default; }
.monthbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.monthbar .ttl { min-width: 150px; text-align: center; font-weight: 600; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dow { text-align: center; color: #828b95; font-size: 12px; padding: 2px; }
.cal .day { min-height: 74px; border-radius: 4px; padding: 5px 6px; font-size: 12px; cursor: pointer; background: #f1f3f5; }
.cal .day.blank { background: transparent; cursor: default; }
.cal .day .n { font-weight: 600; opacity: .7; }
.cal .day .b { font-size: 14px; font-weight: 600; margin-top: 4px; }
.cal .day .a { opacity: .8; }
.stack { display: flex; height: 5px; margin-top: 5px; border-radius: 3px; overflow: hidden; background: rgba(255,255,255,.5); }
.stack i { display: block; height: 100%; }
.c-crm { background: #2fc6f6; } .c-tasks { background: #ffa900; } .c-calls { background: #9b59b6; } .c-other { background: #999; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0; font-size: 12px; color: #525c69; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.strip { position: relative; height: 28px; background: #eef0f2; border-radius: 4px; margin: 14px 0 22px; }
.strip .seg { position: absolute; top: 0; bottom: 0; background: #3aa655; opacity: .85; border-radius: 3px; }
.strip .tick { position: absolute; top: -4px; bottom: -4px; width: 2px; background: #0b66c3; }
.strip .hr { position: absolute; top: 30px; font-size: 10px; color: #828b95; transform: translateX(-50%); }
.kpis { display: flex; gap: 20px; flex-wrap: wrap; margin: 8px 0; }
.kpi b { display: block; font-size: 18px; }
.dur td { padding: 5px 8px; }
.dur input { width: 70px; }
