/* R3-c14 «Рабочий стол» — layout after the two pictures approved by Olya on 13.11 */
[hidden] { display: none !important; }
:root { --ink: #182c37; --muted: #5b6f78; --line: #dbe5e8; --teal: #0d4a52; --teal2: #126a6d; --accent: #087b77; --bg: #f3f6f7; --soft: #e3f1ef; --bad: #b42318; --warn: #fff6dc; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); }
button, input, select, textarea, .button { font: inherit; }
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: var(--teal); color: #fff; padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; }
.side a { color: #e6f2f2; text-decoration: none; padding: 10px 14px; border-radius: 10px; font-size: 16px; }
.side a[aria-current=page] { background: #2f6a70; color: #fff; font-weight: 600; }
.side a:hover { background: #1f5b61; }
.side .logo { font-size: 28px; font-weight: 800; letter-spacing: .02em; padding: 4px 14px 18px; }
.side-more { margin-top: auto; border-top: 1px solid #2f6a70; padding-top: 10px; }
.side-more summary { cursor: pointer; color: #bfd9da; padding: 6px 14px; }
.side-more a { display: block; }
.side-more a { font-size: 13px; padding: 6px 14px; color: #bfd9da; }
.main { display: flex; flex-direction: column; min-width: 0; }
.top { display: flex; align-items: center; gap: 12px; padding: 14px 24px; background: #fff; border-bottom: 1px solid var(--line); }
.top h1 { margin: 0; font-size: 26px; }
.grow { flex: 1; }
.who { color: var(--muted); }
button, .button { min-height: 40px; padding: 0 14px; border: 1px solid #b9cdd3; border-radius: 9px; background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
button.primary, .button.primary { background: var(--teal2); border-color: var(--teal2); color: #fff; font-weight: 600; }
button.ghost { background: #fff; }
button.link { border: 0; min-height: 0; padding: 0; color: var(--accent); text-decoration: underline; background: none; }
.message { margin: 8px 24px 0; min-height: 1.2em; color: var(--accent); }
.message.bad, .bad { color: var(--bad); }
.counters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 12px 24px; }
.counters button { justify-content: space-between; min-height: 58px; padding: 0 18px; border-radius: 12px; border-color: var(--line); font-size: 16px; }
.counters button b { min-width: 30px; padding: 2px 8px; border-radius: 8px; background: var(--soft); color: var(--teal); }
.counters button[aria-pressed=true] { background: var(--teal2); color: #fff; border-color: var(--teal2); }
.counters button[aria-pressed=true] b { background: #2f8a8c; color: #fff; }
.work { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 16px; padding: 4px 24px 24px; align-items: start; }
.center, .right, .card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; min-width: 0; }
.right { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.right h2 { margin: 0 0 4px; font-size: 26px; }
.sub { margin: 0 0 10px; color: var(--muted); font-size: 16px; }
.center h2, .card h2 { margin: 0 0 14px; font-size: 24px; }
.schedule-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.schedule-head h2 { flex-basis: 100%; }
.daynav { display: flex; gap: 8px; align-items: center; }
.daynav input { min-height: 40px; border: 1px solid #b9cdd3; border-radius: 9px; padding: 0 10px; }
.seg { margin-inline-start: auto; display: inline-flex; border: 1px solid #b9cdd3; border-radius: 9px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; }
.seg button[aria-pressed=true] { background: var(--teal2); color: #fff; }
.dayline { color: var(--muted); font-weight: 600; font-size: 17px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; margin: 14px 0 6px; }
.crew { display: grid; grid-template-columns: 170px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; }
.crew-name { font-weight: 700; padding-top: 10px; }
.crew-tiles { display: grid; gap: 8px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; text-align: start; width: 100%; min-height: 64px; padding: 10px 16px; border: 2px solid transparent; border-radius: 10px; background: #e2f1f3; }
.tile strong { font-size: 16px; }
.tile span { color: var(--muted); }
.tile em { font-style: normal; font-size: 12px; color: var(--teal2); }
.tile em.warn { color: var(--bad); font-size: .875rem; line-height: 1.35; }
.tile.free { background: #fdf0d8; }
.tile.closed { background: #eef1f2; opacity: .8; }
.tile.on { border-color: var(--teal2); }
.week { display: grid; grid-template-columns: 150px repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.wk-h { font-weight: 600; text-align: center; min-height: 34px; }
.wk-h.today { background: var(--soft); border-color: var(--accent); }
.wk-c { display: grid; gap: 4px; align-content: start; min-height: 48px; border-top: 1px solid var(--line); padding-top: 4px; }
.week .tile { min-height: 0; padding: 6px 8px; font-size: 13px; }
.week .tile strong { font-size: 13px; }
.empty { padding: 20px 0; }
.split { display: grid; gap: 16px; }
.center:has(.split) { padding: 0; border: 0; background: none; }
.queue { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.queue button { width: 100%; justify-content: space-between; gap: 10px; text-align: start; padding: 12px 16px; min-height: 64px; border-color: transparent; background: #fff; }
.queue button.on, .queue button:hover { background: var(--soft); }
.queue strong { display: block; font-size: 16px; }
.queue small { color: var(--muted); font-size: 14px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 8px; background: var(--soft); color: var(--teal); font-size: 14px; font-weight: 600; }
.pill.ok { background: #e3f4ea; color: #146c2e; }
.pill.bad { background: #fde8e8; color: var(--bad); }
.mini-list { list-style: none; padding: 0; margin: 0 0 12px; }
.mini-list button { width: 100%; justify-content: start; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; text-align: start; }
.note { padding: 10px 12px; border-radius: 10px; background: var(--warn); margin: 10px 0; }
.note.bad { background: #fde8e8; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.stack { display: grid; gap: 10px; }
.stack .button, .stack button { min-height: 48px; font-size: 17px; }
.stack .menu > summary { min-height: 44px; }
.stack .menu-list { inset-inline: 0; }
.lines { margin: 4px 0; padding-inline-start: 20px; }
.photo-head { display: flex; justify-content: space-between; align-items: baseline; }
.photo-head h3 { margin: 0; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 10px 0; }
.photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; display: block; }
.photos .file { padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.photo-report-missing { color: var(--bad); font-weight: 700; }
.decide { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.decide input { grid-column: 1 / -1; }
.decide button { min-height: 48px; font-size: 16px; }
.decide input, .pay-row input, .pay-row select { min-height: 42px; border: 1px solid #b9cdd3; border-radius: 9px; padding: 0 10px; min-width: 0; }
.pay-row { display: grid; grid-template-columns: 1fr 140px auto; gap: 8px; align-items: center; margin: 6px 0; }
.pay-row small { grid-column: 1 / -1; }
.inline-row { display: flex; gap: 8px; margin: 8px 0; }
.inline-row input { flex: 1; min-height: 40px; border: 1px solid #b9cdd3; border-radius: 9px; padding: 0 10px; }
table.sites { width: 100%; border-collapse: collapse; margin-top: 10px; }
table.sites th, table.sites td { text-align: start; padding: 8px; border-bottom: 1px solid var(--line); }
dialog { border: 1px solid var(--line); border-radius: 14px; width: min(640px, 94vw); padding: 22px; }
dialog::backdrop { background: #0d2a2f99; }
dialog label { display: grid; gap: 4px; margin: 8px 0; }
dialog input, dialog select, dialog textarea { min-height: 40px; border: 1px solid #b9cdd3; border-radius: 9px; padding: 6px 10px; }
dialog .check { display: flex; align-items: center; gap: 8px; }
dialog .check input { min-height: 0; }
.row2 { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 2px 10px; }
fieldset { border: 1px solid var(--line); border-radius: 10px; }
.inline-new { margin: 6px 0; padding: 6px 12px; border: 1px dashed #87a9b2; border-radius: 10px; }
.inline-new summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.muted { color: var(--muted); }
@media (max-width: 1100px) { .work { grid-template-columns: 1fr; } .right { position: static; max-height: none; } .counters { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .shell { grid-template-columns: 1fr; } .side { flex-direction: row; flex-wrap: wrap; } .side-more { display: none; } }
/* R3-c20: narrow phone — the header wraps instead of widening the page (audit: 522 px on a 390 px screen) */
@media (max-width: 560px) { .top { flex-wrap: wrap; gap: 8px; padding: 10px 12px; } .top h1 { font-size: 22px; flex-basis: 100%; } .top .grow { display: none; } .top button { min-height: 44px; } .top .who { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; } }
.work.wide { grid-template-columns: minmax(0, 1fr) 300px; }
.week .tile { overflow: hidden; min-width: 0; width: 100%; }
.week .tile strong, .week .tile span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.week .tile em { display: none; }
/* R3-c15 «Сотрудники»: who has a phone login, issue / new password / close, profile and journal on the right */
.qrow { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; text-align: start; padding: 10px 14px; border: 2px solid transparent; border-radius: 10px; background: #f3f8f9; }
.qrow.on { border-color: var(--teal); background: #e2f1f3; }
.qrow.closed { opacity: .65; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 7px; background: #eef2f3; color: var(--muted); font-size: 13px; font-weight: 600; margin-inline-end: 4px; }
.tag.ok { background: #e2f3e7; color: #1f6b3a; }
.tag.bad { background: #fde8e8; color: var(--bad); }
.box { border-top: 1px solid var(--line); padding: 10px 0; }
.box h3 { margin: 4px 0 8px; font-size: 16px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px; padding: 3px 0; }
.kv span { color: var(--muted); }
.pw { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 22px; letter-spacing: 1px; user-select: all; }
.journal { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: 14px; }
.journal time { color: var(--muted); margin-inline-end: 6px; }
#pw-dialog { max-width: 460px; }
.money tr[data-money] { cursor: pointer; }
.money tr.on td { background: var(--soft); }
.money td, .money th { text-align: start; }
.money td .link { justify-content: flex-start; text-align: start; padding: 0; min-height: 0; }
/* R3-c17 first steps on an empty beta */
.setup { border: 2px solid var(--teal); border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; background: #f3f8f9; }
.setup h2 { margin: 0 0 6px; font-size: 18px; }
.setup ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.setup li.done { color: var(--muted); }
.customer-sign { max-width: 100%; height: auto; border: 1px solid #d5dde2; border-radius: .5rem; background: #fff; }
/* R3-c30 «Поиск работ» */
.search-form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin: 10px 0 14px; }
.search-form label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: #44606a; }
.search-form input, .search-form select { min-height: 38px; border: 1px solid #b9cdd3; border-radius: 9px; padding: 0 8px; font: inherit; color: #12303a; max-width: 230px; }
.search-form button { min-height: 38px; }
.search-table tbody tr { cursor: pointer; }
.search-table tbody tr:hover, .search-table tbody tr:focus { background: #eef6f8; outline: none; }
.search-table td:nth-child(5) { max-width: 320px; }
.search-table td:first-child, .search-table td:nth-child(6) { white-space: nowrap; }
.extra-card { border: 1px solid #e3d3a6; background: #fffaf0; border-radius: 12px; padding: 10px 12px; margin: 10px 0; } .extra-card p { margin: 4px 0; overflow-wrap: anywhere; }
.rep-card { border: 1px solid #e7c9c9; background: #fff7f7; border-radius: 12px; padding: 10px 12px; margin: 10px 0; } .rep-card p { margin: 4px 0; } .rep-card ul { margin: 6px 0 0 18px; padding: 0; } .rep-card li { margin: 3px 0; overflow-wrap: anywhere; }
.week .tile em.warn {display:block; overflow-wrap:anywhere;}
