/* Стиль в духе интерфейса Битрикс24 */
:root {
    --text: #333;
    --muted: #828b95;
    --line: #e6e9ec;
    --bg-soft: #f5f7f8;
    --accent: #2fc6f6;
    --accent-dark: #11a9d8;
    --old: #c0392b;
    --old-bg: #fdf0ef;
    --new: #1e8e3e;
    --new-bg: #eef8f0;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
    margin: 0;
    font: 14px/1.45 "Open Sans", "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: #fff;
}
h1 { font-size: 22px; font-weight: 600; margin: 0 0 12px; }
h2 { font-size: 16px; font-weight: 600; margin: 24px 0 8px; }
.page { max-width: 760px; padding: 24px; }
.muted { color: var(--muted); }
.error { color: var(--old); }
.card { background: var(--bg-soft); border-radius: 8px; padding: 12px 16px; }
.card p { margin: 4px 0; }

.tab { padding: 16px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.toolbar .spacer { flex: 1; }
select, input[type=search] {
    height: 34px; padding: 0 10px; border: 1px solid #c6cdd3; border-radius: 4px;
    font: inherit; background: #fff; color: var(--text); min-width: 150px;
}
input[type=search] { min-width: 200px; }
.btn {
    height: 34px; padding: 0 16px; border: 1px solid #c6cdd3; border-radius: 4px;
    background: #fff; color: var(--text); font: inherit; cursor: pointer;
}
.btn:hover { border-color: var(--accent); color: var(--accent-dark); }
#summary { margin: 4px 0 10px; font-size: 13px; }
.state { padding: 32px; text-align: center; color: var(--muted); background: var(--bg-soft); border-radius: 8px; }

.small { font-size: 12px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); color: #fff; }
.btn.small { height: 28px; padding: 0 10px; font-size: 12px; }
.btn:disabled { opacity: .55; cursor: default; }
.notice { background: #fff6e5; color: #8a5a00; border-radius: 6px; padding: 8px 12px; font-size: 13px; }
.ok-msg { background: var(--new-bg); color: var(--new); border-radius: 6px; padding: 10px 14px; font-size: 13px; margin-top: 12px; }
.err-msg { background: var(--old-bg); color: var(--old); border-radius: 6px; padding: 10px 14px; font-size: 13px; margin-top: 12px; }
.page { max-width: 1200px; }
.spacer { flex: 1; }
.grow { flex: 1; min-width: 0; }
.danger { color: var(--old); border-color: #f1c4c0; }
.danger:hover { color: #fff; background: var(--old); border-color: var(--old); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab { border: 0; background: none; padding: 10px 14px; font: inherit; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.on { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.ava { border-radius: 50%; object-fit: cover; flex: none; display: inline-block; }
.ava.ini { display: inline-flex; align-items: center; justify-content: center; background: #dfe5ea; color: #525c69; font-weight: 600; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 11px; color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.none { background: #f1f3f5; color: var(--muted); font-weight: 400; }
.note { font-size: 12px; color: #525c69; overflow-wrap: anywhere; }

/* история */
.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; }
.grid th { text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.grid td { padding: 7px 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
.grid .num { text-align: right; }
.who { display: inline-flex; align-items: center; gap: 8px; }
.toolbar input[type=month] { height: 34px; padding: 0 8px; border: 1px solid #c6cdd3; border-radius: 4px; font: inherit; }
.box { background: var(--bg-soft); border-radius: 10px; padding: 14px 16px; }
.box p { margin: 0 0 8px; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; margin: 6px 0; }
.check input { width: 16px; height: 16px; }
.icon-btn { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; font: inherit; color: var(--muted); flex: none; }
.actions { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.toolbar input[type=date], .toolbar select { height: 34px; padding: 0 8px; border: 1px solid #c6cdd3; border-radius: 4px; font: inherit; background: #fff; }
.warn { color: var(--old); font-weight: 600; }
h3 { font-size: 15px; margin: 22px 0 10px; }
.link { border: 0; background: none; color: #2067b0; font: inherit; font-size: 13px; padding: 4px 0; cursor: pointer; border-bottom: 1px dashed #2067b0; align-self: flex-start; }

body.side { background: #fff; }
body.side .page { padding: 10px 12px 24px; max-width: none; }
.sp { flex: 1; }
.ib { width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; font: inherit; font-size: 14px; color: var(--muted); flex: none; display: inline-flex; align-items: center; justify-content: center; }
.ib:hover { background: #eef2f4; color: var(--text); }
.ib.danger:hover { color: var(--old); }
.ava { border-radius: 50%; object-fit: cover; flex: none; display: inline-block; }
.ava.ini { display: inline-flex; align-items: center; justify-content: center; background: #dfe5ea; color: #525c69; font-weight: 600; }
.who { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #525c69; }
.small { font-size: 12px; }

/* шапка панели */
.top { display: flex; align-items: center; gap: 2px; padding: 4px 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.ttl { min-width: 0; }
.ttl b { font-size: 15px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* блоки */
.blk { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px 10px; margin-bottom: 10px; background: #fff; }
.b-note { background: #fffbea; border-color: #f4e7b3; }
.b-decisions { border-left: 3px solid #7b61ff; }
.b-check { border-left: 3px solid #2fbf71; }
.bh { display: flex; align-items: center; gap: 6px; min-height: 28px; }
.bi { font-size: 15px; }
.bt { cursor: text; font-size: 14px; }
.bmenu { display: none; }
.blk:hover .bmenu, .blk:focus-within .bmenu { display: inline-flex; }
@media (hover: none) { .bmenu { display: inline-flex; } }
.cnt { font-size: 12px; color: var(--muted); background: #f1f3f5; border-radius: 10px; padding: 1px 8px; }
.tin { flex: 1; height: 28px; border: 1px solid #c6cdd3; border-radius: 4px; padding: 0 8px; font: inherit; font-weight: 600; }
.rich { font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.rich p { margin: 0; }
.rich ul { margin: 2px 0; padding-left: 18px; }
.rich .gap { height: 6px; }
.rich a { color: #2067b0; }
.click { cursor: text; border-radius: 6px; padding: 2px 4px; margin: 2px -4px 0; }
.click:hover { background: rgba(0, 0, 0, .03); }
.empty { border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; padding: 6px 0; cursor: pointer; }
textarea { width: 100%; box-sizing: border-box; border: 1px solid #c6cdd3; border-radius: 6px; padding: 8px; font: inherit; font-size: 13px; line-height: 1.5; resize: vertical; margin-top: 4px; }
.acts { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.btn.small { height: 28px; padding: 0 12px; font-size: 12px; }
.add { border: 0; background: none; color: #2067b0; font: inherit; font-size: 13px; padding: 6px 0 0; cursor: pointer; }
.add.big { display: block; width: 100%; padding: 10px; border: 1px dashed #c6cdd3; border-radius: 10px; text-align: center; margin-top: 4px; }

/* пункты */
.items { display: flex; flex-direction: column; margin-top: 4px; }
.it { display: flex; gap: 8px; align-items: flex-start; padding: 6px 2px; border-top: 1px solid #f1f3f5; font-size: 13px; }
.it:first-child { border-top: 0; }
.it.chk input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: #2fbf71; flex: none; cursor: pointer; }
.itb { flex: 1; min-width: 0; cursor: pointer; }
.itt { overflow-wrap: anywhere; }
.it.done .itt { text-decoration: line-through; color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-top: 3px; font-size: 12px; }
.due { font-size: 11px; padding: 1px 7px; border-radius: 9px; background: #f1f3f5; color: #525c69; }
.due.today { background: #fff4d6; color: #a86b00; font-weight: 600; }
.due.over { background: #fde8e8; color: #c92a2a; font-weight: 600; }
.it.dec, .it.ppl { flex-direction: column; gap: 0; cursor: pointer; }
.role { font-weight: 600; }
.it.lnk a { color: #2067b0; overflow-wrap: anywhere; }
.it.dt { align-items: center; cursor: pointer; }
.it.dt.past { opacity: .55; }
.dd { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 40px; }
.cd { font-size: 11px; color: var(--muted); white-space: nowrap; }
.cd.today { color: #a86b00; font-weight: 600; }
.ied { background: #f5f7f8; border-radius: 8px; padding: 8px; margin: 4px 0; }
.irow { display: flex; flex-wrap: wrap; gap: 6px; }
.irow input { height: 30px; border: 1px solid #c6cdd3; border-radius: 4px; padding: 0 8px; font: inherit; font-size: 13px; min-width: 0; }
.irow input.wide { flex: 1 1 100%; }
.irow input[type=date] { width: 140px; }
.uchip { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 8px; border: 1px dashed #c6cdd3; border-radius: 15px; background: #fff; cursor: pointer; font-size: 12px; }
.uchip .ib { width: 18px; height: 18px; font-size: 11px; }

/* выбор шаблона, подразделы */
.choose h2 { margin: 6px 0; }
.tpls { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.tpl { text-align: left; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: 2px; }
.tpl:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
.tpl .muted { font-size: 12px; }
.sub .subh { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.check { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; font-size: 13px; cursor: pointer; }
.check input { margin-top: 2px; }
.tplsave { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 10px; }
.tplsave .row { display: flex; gap: 6px; }
.tplsave input { flex: 1; height: 28px; border: 1px solid #c6cdd3; border-radius: 4px; padding: 0 8px; font: inherit; }
.log { display: flex; flex-direction: column; gap: 10px; }
.lrow { display: flex; gap: 8px; font-size: 13px; }

/* страница приложения */
.howto { background: var(--bg-soft); border-radius: 10px; padding: 12px 14px; }
.howto p { margin: 4px 0 0; }
.mgroup { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; }
.mchat { font-weight: 600; margin-bottom: 4px; }
.tlist { display: flex; flex-direction: column; gap: 6px; }
.trow { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; }
