/* Веб-клиент Zelonka — тёмный стиль сайта (brand/zelonka/site, макет 09.10.2026). */
:root {
  --bg: #1c211c; --panel: #262c26; --ink: #e4eae0; --muted: #a6afa2; --line: #3a4438;
  --green: #accb8d; --green-hover: #bedb9f; --green-pressed: #99b97a; --on-green: #202c19; --soft: #303f29; --recent: #2a3526; --recent-line: #47573c;
  --notice: #302e23; --notice-line: #524b31; --notice-icon: #caba84; --error: #ffb1a9; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
[hidden] { display: none !important; }
a { color: var(--green); }
button { font: inherit; border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  border-radius: 8px; padding: 10px 16px; cursor: pointer; min-height: 44px; }
button:hover { background: var(--soft); }
button.primary { background: var(--green); border-color: var(--green); color: var(--on-green); font-weight: 600; }
button.primary:hover { filter: brightness(1.05); }
button.danger { color: var(--error); }
button:disabled { opacity: .6; cursor: default; }
/* Шапка — панель во всю ширину, как в приложении: росток и «Zelonka». */
.top { height: 48px; padding: 0 18px; display: flex; align-items: center; background: var(--panel); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
.mark { width: 26px; height: 26px; border-radius: 7px; background: var(--soft); color: var(--green); display: grid; place-items: center; }
.mark svg { width: 16px; height: 16px; }
.brand-name { font-size: 14px; font-weight: 600; }
.muted, .sub, .hint { color: var(--muted); }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 1.5px; color: var(--muted); margin: 0 0 13px; }
h1 { font-size: 29px; letter-spacing: -.8px; line-height: 1.25; margin: 0 0 10px; font-weight: 600; }
.card { max-width: 440px; margin: 7vh auto 40px; padding: 34px 32px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; }
.hint { font-size: 13px; margin: 20px 0 0; }
form { margin-top: 22px; }
label { display: block; margin-bottom: 16px; font-size: 13px; font-weight: 500; }
input { display: block; width: 100%; margin-top: 7px; padding: 10px 12px; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
input:focus { outline: 2px solid var(--green); outline-offset: 1px; }
form button.primary { width: 100%; margin-top: 6px; }
.error { color: var(--error); min-height: 1.2em; margin: 4px 0 8px; font-size: 13px; }
.error:empty { min-height: 0; margin: 0; }
.note { color: var(--green); margin: 4px 0 8px; font-size: 13px; }
.note:empty { margin: 0; }
svg { flex-shrink: 0; }

/* Рабочие места — страница по центру до 920, как в приложении. */
#places { max-width: 920px; margin: 0 auto; padding: 23px 44px 54px; }
/* Строка сервера и учётки прилипает к верху окна: «Выйти» видна, сколько бы ни было рабочих мест. */
.session-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 12px 0 17px; margin: -12px 0 22px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted);
  position: sticky; top: 0; z-index: 6; background: var(--bg); }
.session-bar > span { display: inline-flex; align-items: center; gap: 10px; }
.session-bar svg { width: 16px; height: 16px; }
.session-bar b { color: var(--ink); font-weight: 600; }
.session-bar .sep { width: 1px; height: 13px; background: var(--line); }
.ping { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.ping svg { width: 13px; height: 13px; }
button.link { display: inline-flex; align-items: center; gap: 7px; background: transparent; border: 0; color: var(--muted);
  padding: 4px 7px; min-height: 30px; font-size: 12px; }
button.link:hover { color: var(--green); background: var(--soft); }
.heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 105px; margin-bottom: 23px; }
.heading .sub { margin: 0; font-size: 14px; }
.meadow { position: relative; width: 232px; height: 108px; flex-shrink: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 25%, #000 88%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 25%, #000 88%, transparent);
  background: radial-gradient(ellipse at 66% 54%, #353b24, transparent 62%); }
.meadow i { position: absolute; display: block; border-radius: 50%; }
.meadow .sun { width: 32px; height: 32px; top: 19px; right: 64px; background: #757146; opacity: .65; }
.meadow .hill { width: 290px; height: 130px; }
.meadow .one { left: -65px; top: 64px; background: #435037; transform: rotate(-13deg); }
.meadow .two { left: 72px; top: 77px; background: #566c42; transform: rotate(13deg); }
.meadow .three { left: -10px; top: 99px; background: #6a8052; transform: rotate(-5deg); }
.notice { display: flex; gap: 13px; padding: 18px 19px; margin-bottom: 27px; background: var(--notice);
  border: 1px solid var(--notice-line); border-radius: 9px; }
.notice > svg { width: 19px; height: 19px; color: var(--notice-icon); margin-top: 2px; }
.notice > div { flex: 1; min-width: 0; }
.notice .label { font-size: 11px; color: var(--muted); margin-bottom: 5px; }
.notice .title { font-weight: 600; font-size: 14px; margin-bottom: 5px; }
.notice .body { white-space: pre-line; font-size: 13px; line-height: 1.6; }
.notice .foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--muted); }
.notice .foot button { min-height: 25px; padding: 0; background: transparent; border: 0; color: var(--ink); font-size: 12px; }
.listbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; font-size: 13px; }
.listbar b { font-weight: 600; }
.listbar .muted { margin-left: 8px; }
button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
button svg { width: 15px; height: 15px; }
#refresh { min-height: 36px; padding: 8px 15px; font-size: 14px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tiles.single { grid-template-columns: minmax(0, 1fr); }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 23px;
  display: flex; flex-direction: column; text-align: left; transition: background-color .12s, border-color .12s; }
.tile.off { opacity: .55; }
.tile .row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.tile .mark-box { width: 44px; height: 44px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg);
  display: grid; place-items: center; color: var(--green); }
.tile .mark-box svg { width: 24px; height: 24px; }
.tile .kind { color: var(--muted); font-size: 11px; }
.tile .name { font-weight: 600; font-size: 18px; letter-spacing: -.2px; margin-bottom: 5px; }
.tile .summary { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); margin: 20px 0; }
.tile .summary svg { width: 15px; height: 15px; }
.tile .actions { display: flex; justify-content: flex-end; margin-top: auto; }
.tile .connect { min-height: 36px; padding: 8px 12px; font-size: 13px; transition: background-color .12s, border-color .12s, transform .08s; }
.tile .connect:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
/* Все карточки в покое одинаковые. С мышью карточка под указателем светлеет и её «Подключиться» зеленеет;
   на касании наведения нет — «Подключиться» зелёная у всех (как в приложении для iPhone). */
@media (hover: hover) {
  .tile:not(.off):hover { background: var(--recent); border-color: var(--recent-line); }
  .tile:not(.off):hover .connect { background: var(--green); border-color: var(--green); color: var(--on-green); font-weight: 500; }
  .tile:not(.off):hover .connect:hover { background: var(--green-hover); border-color: var(--green-hover); }
}
@media (hover: none) {
  .tile:not(.off) .connect { background: var(--green); border-color: var(--green); color: var(--on-green); font-weight: 500; }
}
.tile:not(.off) .connect:active { background: var(--green-pressed); border-color: var(--green-pressed); color: var(--on-green); transform: scale(.97); }
.tiles.single .tile { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 28px; }
.tiles.single .tile .row { grid-column: 1 / -1; margin-bottom: 10px; }
.tiles.single .tile .summary { margin-bottom: 0; }
.tiles.single .tile .actions { grid-column: 2; grid-row: 2 / 5; align-self: center; margin: 0; }
.empty { color: var(--muted); text-align: center; padding: 36px 20px; grid-column: 1 / -1;
  border: 1px dashed var(--line); border-radius: 9px; background: var(--panel); }
dialog { max-width: 520px; width: calc(100% - 32px); background: var(--panel); color: var(--ink); border: 1px solid var(--line);
  border-radius: 12px; padding: 28px; }
dialog::backdrop { background: rgba(0, 0, 0, .55); }
dialog h2 { margin: 0 0 18px; font-size: 21px; font-weight: 600; }
dialog .msg { border-top: 1px solid var(--line); padding: 18px 0; }
dialog .msg:first-child { border-top: 0; padding-top: 0; }
dialog .msg .meta { font-size: 12px; color: var(--muted); }
dialog .msg .title { font-weight: 600; margin: 8px 0; font-size: 15px; }
dialog .msg .body { white-space: pre-line; color: var(--muted); font-size: 14px; }
dialog button.primary { width: 100%; margin-top: 16px; }
dialog .dialog-buttons { display: flex; gap: 10px; margin-top: 16px; }
/* Поддержка */
dialog.support { max-width: 600px; }
.support-head { display: flex; justify-content: space-between; align-items: center; }
.support-head h2 { margin: 0; }
#support-body { margin-top: 14px; max-height: 70vh; overflow: auto; }
#support-body textarea { width: 100%; min-height: 130px; resize: vertical; box-sizing: border-box; padding: 10px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--paper, var(--panel)); color: var(--ink); font: inherit; }
#support-body select { width: 100%; padding: 9px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; }
#support-body label.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); margin: 12px 0; }
.sp-ticket { display: block; width: 100%; text-align: left; padding: 14px; margin: 10px 0 0; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); color: var(--ink); cursor: pointer; font: inherit; }
.sp-ticket.unread { background: var(--recent); border-color: var(--recent-line); }
.sp-ticket .t { font-weight: 600; font-size: 15px; }
.sp-ticket .s { font-size: 12px; color: var(--muted); margin-top: 6px; }
.sp-ticket.unread .s { color: var(--green); }
.sp-ticket .q { font-size: 13px; margin-top: 6px; white-space: pre-line; }
.sp-msg { max-width: 82%; margin-top: 12px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.sp-msg.mine { margin-left: auto; background: var(--soft, var(--recent)); border-color: var(--recent-line); }
.sp-msg .w { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.sp-msg .b { white-space: pre-wrap; word-wrap: break-word; font-size: 14px; }
.sp-row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }
.sp-row button.primary { width: auto; margin-top: 0; }
.support-ping { display: flex; gap: 13px; align-items: center; width: 100%; text-align: left; padding: 14px 18px; margin-bottom: 27px;
  background: var(--recent); border: 1px solid var(--recent-line); border-radius: 10px; color: var(--ink); cursor: pointer; font: inherit; }
.support-ping svg { width: 20px; height: 20px; color: var(--green); flex: none; }
.support-ping > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); }
.support-ping b { color: var(--ink); font-size: 14px; }
.support-ping .go { color: var(--green); font-size: 13px; }
#support-open.has-reply { color: var(--green); }
#support-open.has-reply::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--error); margin-left: 4px; }
dialog .dialog-buttons button { flex: 1; margin-top: 0; padding: 11px 14px; }
dialog form .hint { margin: 0 0 8px; }
dialog > .sub:empty { display: none; }
@media (max-width: 720px) { #places { padding: 20px 24px 40px; } .meadow { width: 130px; } .tiles { grid-template-columns: minmax(0, 1fr); }
  .tiles.single .tile { display: flex; } .tiles.single .tile .actions { margin-top: 0; } }
@media (max-width: 520px) { #places { padding: 16px 16px 32px; } .meadow { display: none; } h1 { font-size: 26px; }
  .card { margin: 3vh 16px 30px; padding: 26px 22px; } }
/* Сеанс — без изменений: чёрный экран и выезжающая панель. */
#session { position: fixed; inset: 0; background: #000; z-index: 20; }
#screen-box, #screen-box iron-remote-desktop { position: absolute; inset: 0; display: block; }
#toolbar { position: absolute; top: 0; left: 50%; transform: translate(-50%, -100%); z-index: 10;
  display: flex; gap: 8px; align-items: center; padding: 8px 12px; background: rgba(28, 33, 28, .94);
  border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; transition: transform .15s; }
#toolbar.shown { transform: translate(-50%, 0); }
#toolbar button { background: var(--panel); padding: 6px 12px; white-space: nowrap; min-height: 0; }
#session-name { color: var(--muted); margin-right: 6px; white-space: nowrap; }
#status { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 5;
  color: var(--ink); font-size: 17px; text-align: center; padding: 20px; pointer-events: none; }
#status:empty { display: none; }
/* Срочное сообщение поверх рабочего стола: сверху по центру, ~40% ширины окна. Клавиатуру не забирает. */
.bubble { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 40;
  width: clamp(300px, 40vw, 640px); max-width: calc(100vw - 32px); padding: 14px 16px 12px;
  background: rgba(38, 44, 38, .97); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--green);
  border-radius: 12px; box-shadow: 0 10px 34px rgba(0, 0, 0, .45); font-size: 14px; }
.bubble.warning { border-left-color: var(--notice-icon); }
.bubble .head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.bubble .head span { flex: 1; }
.bubble .title { font-weight: 600; font-size: 15px; margin: 6px 0 4px; }
.bubble .body { white-space: pre-line; color: var(--ink); opacity: .9; max-height: 30vh; overflow: auto; }
.bubble .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.bubble button { min-height: 32px; padding: 5px 14px; font-size: 13px; }
.bubble .icon { min-height: 28px; width: 28px; padding: 0; border: 0; background: transparent; color: var(--muted); }
.bubble.collapsed { width: auto; padding: 6px 14px; cursor: pointer; border-radius: 0 0 12px 12px; top: 0; }
.bubble.collapsed .head, .bubble.collapsed .body, .bubble.collapsed .foot { display: none; }
.bubble.collapsed .title { margin: 0; font-size: 13px; max-width: 40vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
