/* TimbaGram · панель деплоя
   Стили повторяют язык мессенджера: зелёный акцент, мягкие карточки, крупные скругления,
   тёмная тема по системной настройке. Телефон — основной экран, поэтому вёрстка начинается
   с одной колонки, а боковое меню появляется только на широком экране. */

:root {
  --accent: #18c29c;
  --accent-strong: #0f9f7f;
  --accent-soft: color-mix(in srgb, var(--accent) 13%, transparent);
  --accent-text: #0b7d64;
  --danger: #ef4444;
  --danger-soft: #fef2f2;
  --warn: #f59e0b;
  --warn-soft: #fffbeb;
  --ok: #16a34a;
  --ok-soft: #f0fdf4;

  --bg: #f2f5f3;
  --bg-glow: radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%),
    radial-gradient(900px 500px at 110% 0%, #cfe9ff55, transparent 55%);
  --card: #ffffff;
  --card-2: #f7f9f8;
  --fill: #eef2f0;
  --text: #101614;
  --text-2: #6b7a74;
  --text-3: #98a5a0;
  --border: #e2e9e6;
  --border-strong: #d3ddd9;
  --shadow: 0 1px 2px rgba(16, 24, 21, 0.04), 0 12px 32px -18px rgba(16, 24, 21, 0.25);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 9px;
  --header-h: 64px;
  --tab-h: 64px;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1211;
    --bg-glow: radial-gradient(1100px 600px at 0% -10%, #18c29c22, transparent 60%),
      radial-gradient(900px 500px at 110% 0%, #0d4d6b55, transparent 55%);
    --card: #171c1b;
    --card-2: #1c2221;
    --fill: #222a28;
    --text: #eef4f1;
    --text-2: #9dabA5;
    --text-3: #6e7c76;
    --border: #28322f;
    --border-strong: #33403c;
    --accent-soft: color-mix(in srgb, var(--accent) 18%, transparent);
    --accent-text: #5fe3c3;
    --danger-soft: #2a1515;
    --warn-soft: #2a2110;
    --ok-soft: #12271a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -24px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

/* ---------- база ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg-glow), var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

a {
  color: var(--accent-text);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
p {
  margin: 0;
}

code,
pre,
.mono {
  font-family: var(--mono);
  font-size: 0.86em;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--card);
}

.skip-link:focus {
  left: 8px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}

.boot {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 22px;
}

.boot-logo {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(145deg, #22d3a8, #0f9f7f);
  box-shadow: 0 14px 30px -12px #0f9f7f88;
  animation: pop 0.5s var(--ease) both;
}

.boot-spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pop {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
}

/* ---------- вход ---------- */

.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 18px calc(24px + env(safe-area-inset-bottom));
}

.login-card {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: 30px 26px 24px;
  animation: rise 0.45s var(--ease) both;
}

@keyframes rise {
  from {
    transform: translateY(14px);
    opacity: 0;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(145deg, #22d3a8, #0f9f7f);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 17px;
  box-shadow: 0 8px 18px -10px #0f9f7f99;
  flex: none;
}

.brand small {
  font-weight: 600;
  font-size: 12px;
  color: var(--text-2);
  background: var(--fill);
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0;
}

.login h1 {
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 26px 0 8px;
}

.login .lead {
  color: var(--text-2);
  font-size: 14px;
  margin-bottom: 22px;
}

.code-field {
  display: grid;
  gap: 12px;
}

.code-input {
  width: 100%;
  border: 1.5px solid var(--border-strong);
  background: var(--card-2);
  border-radius: 16px;
  padding: 16px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.code-input::placeholder {
  letter-spacing: 0.3em;
  color: var(--text-3);
}

.code-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.login-error {
  color: var(--danger);
  font-size: 13.5px;
  min-height: 20px;
  margin-top: 10px;
}

.login .hint {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 12.5px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.login .hint svg {
  flex: none;
  margin-top: 1px;
}

/* ---------- каркас ---------- */

.shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: calc(var(--header-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 20px 0;
  display: flex;
  align-items: center;
  gap: 14px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--border);
}

.topbar .brand {
  margin-right: auto;
  min-width: 0;
}

.topbar .brand b {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
}

.conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 15%, transparent);
}

.conn.offline .conn-dot {
  background: var(--warn);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 15%, transparent);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--text-2);
  transition:
    background 0.15s,
    color 0.15s;
}

.icon-btn:hover {
  background: var(--fill);
  color: var(--text);
}

.icon-btn.spin svg {
  animation: spin 0.8s linear infinite;
}

.layout {
  flex: 1;
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 26px;
  padding: 26px 20px calc(34px + env(safe-area-inset-bottom));
}

.sidenav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: calc(var(--header-h) + 22px);
  align-self: start;
}

.sidenav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text-2);
  font-weight: 500;
  font-size: 14.5px;
  text-decoration: none;
  transition:
    background 0.15s,
    color 0.15s;
}

.sidenav a:hover {
  background: var(--card);
  color: var(--text);
  text-decoration: none;
}

.sidenav a.active {
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 600;
}

.sidenav a .count {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.sidenav .nav-sep {
  height: 1px;
  background: var(--border);
  margin: 10px 4px;
}

.sidenav .nav-note {
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  gap: 7px;
  align-items: center;
}

.tabbar {
  display: none;
}

.content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: fade 0.25s var(--ease) both;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.page-head h1 {
  font-size: 27px;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.page-head .sub {
  color: var(--text-2);
  font-size: 13.5px;
  margin-top: 4px;
}

.head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

/* ---------- карточки ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  min-width: 0;
}

.card.flush {
  padding: 0;
  overflow: hidden;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.card-head .title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 650;
  font-size: 16px;
  letter-spacing: -0.01em;
  min-width: 0;
}

.card-head .title svg {
  color: var(--accent-text);
  flex: none;
}

.card-head .spacer {
  margin-left: auto;
}

.card-sub {
  color: var(--text-2);
  font-size: 13px;
  margin: -8px 0 14px;
}

.dot-status {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-3);
  flex: none;
}

.dot-status.on {
  background: var(--ok);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 14%, transparent);
}

.dot-status.off {
  background: var(--danger);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 12%, transparent);
}

.dot-status.warn {
  background: var(--warn);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.pill.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.pill.bad {
  background: var(--danger-soft);
  color: var(--danger);
}

.pill.warn {
  background: var(--warn-soft);
  color: #b45309;
}

.pill.neutral {
  background: var(--fill);
  color: var(--text-2);
}

.pill.accent {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.sha {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--fill);
  color: var(--text-2);
  padding: 2px 7px;
  border-radius: 7px;
  white-space: nowrap;
}

.kv {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px 14px;
  font-size: 13.5px;
  margin: 2px 0 14px;
}

.kv dt {
  color: var(--text-2);
  white-space: nowrap;
}

.kv dd {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kv dd .muted {
  color: var(--text-2);
}

.health-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  background: var(--card-2);
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 14px;
}

.health-line.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.health-line.bad {
  background: var(--danger-soft);
  color: var(--danger);
}

.health-line svg {
  flex: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.actions.right {
  justify-content: flex-end;
}

/* ---------- кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
  background: var(--fill);
  color: var(--text);
  transition:
    transform 0.12s var(--ease),
    background 0.15s,
    border-color 0.15s,
    opacity 0.15s;
}

.btn svg {
  flex: none;
}

.btn:hover {
  background: var(--border);
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px -12px var(--accent);
}

.btn.primary:hover {
  background: var(--accent-strong);
}

.btn.outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.btn.outline:hover {
  background: var(--card-2);
}

.btn.ghost {
  background: transparent;
  color: var(--text-2);
}

.btn.ghost:hover {
  background: var(--fill);
  color: var(--text);
}

.btn.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.btn.danger:hover {
  background: color-mix(in srgb, var(--danger) 16%, var(--card));
}

.btn.small {
  height: 32px;
  padding: 0 11px;
  border-radius: 9px;
  font-size: 12.5px;
}

.btn.wide {
  width: 100%;
  height: 46px;
  font-size: 15px;
  border-radius: 14px;
}

.btn.link {
  padding: 0;
  height: auto;
  background: none;
  color: var(--accent-text);
  font-size: 13px;
}

.btn.link:hover {
  background: none;
  text-decoration: underline;
}

/* ---------- уведомления ---------- */

.notif {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.notif:last-child {
  border-bottom: 0;
}

.notif.unread {
  background: color-mix(in srgb, var(--accent) 4%, var(--card));
}

.notif-head {
  display: flex;
  gap: 12px;
  min-width: 0;
}

.commit-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-text);
  display: grid;
  place-items: center;
  flex: none;
}

.notif-main {
  min-width: 0;
  flex: 1;
}

.notif-title {
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-meta {
  margin-top: 3px;
  color: var(--text-2);
  font-size: 12.5px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
}

.notif-meta .sep {
  color: var(--text-3);
}

.notif-badge {
  align-self: flex-start;
  flex: none;
}

.notif-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.notif-actions .push {
  margin-left: auto;
}

.files {
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}

.files summary {
  cursor: pointer;
  color: var(--text-2);
  font-size: 12.5px;
  user-select: none;
}

.files ul {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 3px;
  max-height: 220px;
  overflow: auto;
}

.files li {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-2);
  overflow-wrap: anywhere;
}

/* ---------- деплои ---------- */

.dep {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.dep:last-child {
  border-bottom: 0;
}

.dep-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--fill);
  color: var(--text-2);
}

.dep-icon.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.dep-icon.bad {
  background: var(--danger-soft);
  color: var(--danger);
}

.dep-icon.run {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.dep-main {
  flex: 1;
  min-width: 0;
}

.dep-title {
  font-weight: 600;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.dep-meta {
  color: var(--text-2);
  font-size: 12.5px;
  margin-top: 3px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
}

.dep-error {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: 10px;
  padding: 8px 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.dep-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* ---------- устройства ---------- */

.device {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
}

.device:last-child {
  border-bottom: 0;
}

.device-icon {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--fill);
  color: var(--text-2);
  display: grid;
  place-items: center;
  flex: none;
}

.device-main {
  flex: 1;
  min-width: 0;
}

.device-name {
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.device-meta {
  color: var(--text-2);
  font-size: 12.5px;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.device-ua {
  color: var(--text-3);
  font-size: 11.5px;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60ch;
}

/* ---------- списки и мелочи ---------- */

.empty {
  padding: 38px 20px;
  text-align: center;
  color: var(--text-2);
  font-size: 14px;
}

.empty .emoji {
  font-size: 30px;
  display: block;
  margin-bottom: 8px;
}

.empty p {
  max-width: 42ch;
  margin: 4px auto 0;
  font-size: 13px;
  color: var(--text-3);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 650;
  margin-bottom: 12px;
}

.section-title .spacer {
  margin-left: auto;
}

.section-title .sub {
  font-weight: 400;
  color: var(--text-3);
  font-size: 12.5px;
}

.hint-card {
  display: flex;
  gap: 11px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-strong);
  background: var(--card-2);
  font-size: 13px;
  color: var(--text-2);
}

.hint-card svg {
  flex: none;
  color: var(--warn);
  margin-top: 1px;
}

.hint-card b {
  color: var(--text);
}

.hint-card code {
  background: var(--fill);
  padding: 1px 5px;
  border-radius: 5px;
  color: var(--text);
}

.accounts {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.account {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--card-2);
}

.account .name {
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account .creds {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-2);
  white-space: nowrap;
}

.gh-commit {
  display: flex;
  gap: 13px;
  align-items: flex-start;
}

.gh-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-text);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
  flex: none;
}

.gh-main {
  min-width: 0;
  flex: 1;
}

.gh-msg {
  font-weight: 600;
  font-size: 14.5px;
  overflow-wrap: anywhere;
}

.gh-meta {
  color: var(--text-2);
  font-size: 12.5px;
  margin-top: 2px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
}

.behind {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 600;
  background: var(--warn-soft);
  color: #b45309;
}

.behind.same {
  background: var(--ok-soft);
  color: var(--ok);
}

/* ---------- журнал операции ---------- */

.jobbar {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(760px, calc(100% - 24px));
  z-index: 40;
  background: color-mix(in srgb, var(--card) 94%, transparent);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
  overflow: hidden;
  animation: rise 0.3s var(--ease) both;
}

.jobbar-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
}

.jobbar-head .title {
  font-weight: 600;
  font-size: 13.5px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jobbar-head .status {
  margin-left: auto;
  flex: none;
}

.jobbar-body {
  border-top: 1px solid var(--border);
  max-height: min(38vh, 300px);
  overflow: auto;
  padding: 10px 14px 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--text-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--card-2);
}

.jobbar.collapsed .jobbar-body {
  display: none;
}

.jobbar .spin {
  animation: spin 0.9s linear infinite;
}

/* ---------- модальные окна ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(6, 14, 11, 0.5);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fade 0.18s ease both;
}

.sheet {
  width: min(560px, 100%);
  max-height: min(86dvh, 760px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: rise 0.24s var(--ease) both;
}

.sheet.wide {
  width: min(900px, 100%);
}

.sheet-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 12px;
}

.sheet-head h2 {
  font-size: 17px;
  letter-spacing: -0.01em;
  min-width: 0;
}

.sheet-head .spacer {
  margin-left: auto;
}

.sheet-body {
  padding: 4px 20px 20px;
  overflow: auto;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
}

.sheet-body p + p {
  margin-top: 8px;
}

.sheet-body b {
  color: var(--text);
}

.sheet-foot {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 14px 20px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.logs {
  margin: 0;
  padding: 12px;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  max-height: min(58dvh, 520px);
  overflow: auto;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text-2);
}

.confirm-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-text);
  flex: none;
}

.confirm-icon.bad {
  background: var(--danger-soft);
  color: var(--danger);
}

/* ---------- тосты ---------- */

.toasts {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 90;
  display: grid;
  gap: 8px;
  width: min(430px, calc(100% - 24px));
  pointer-events: none;
}

.toast {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--card) 96%, transparent);
  border: 1px solid var(--border-strong);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.45);
  font-size: 13.5px;
  color: var(--text);
  animation: rise 0.25s var(--ease) both;
  pointer-events: auto;
}

.toast svg {
  flex: none;
  margin-top: 1px;
  color: var(--ok);
}

.toast.error svg {
  color: var(--danger);
}

.toast.hide {
  animation: fade 0.2s ease both reverse;
}

/* ---------- телефон ---------- */

@media (max-width: 920px) {
  .layout {
    grid-template-columns: 1fr;
    padding-top: 18px;
    padding-bottom: calc(var(--tab-h) + 26px + env(safe-area-inset-bottom));
    gap: 16px;
  }

  .sidenav {
    display: none;
  }

  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: calc(var(--tab-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--card) 88%, transparent);
    backdrop-filter: saturate(160%) blur(18px);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    border-top: 1px solid var(--border);
  }

  .tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 10.5px;
    font-weight: 500;
    color: var(--text-3);
    text-decoration: none;
    position: relative;
  }

  .tabbar a.active {
    color: var(--accent-text);
  }

  .tabbar a .count {
    position: absolute;
    top: 7px;
    left: 50%;
    margin-left: 5px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: grid;
    place-items: center;
  }

  .topbar {
    padding-left: 14px;
    padding-right: 12px;
  }

  .topbar .conn .label {
    display: none;
  }

  .page-head h1 {
    font-size: 23px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .card {
    padding: 16px;
    border-radius: 17px;
  }

  .notif,
  .dep,
  .device {
    padding: 14px 15px;
  }

  .jobbar {
    bottom: calc(var(--tab-h) + 10px + env(safe-area-inset-bottom));
  }

  .toasts {
    bottom: calc(var(--tab-h) + 20px + env(safe-area-inset-bottom));
  }

  .sheet {
    width: 100%;
    max-height: 90dvh;
    border-radius: 22px 22px 0 0;
    align-self: end;
  }

  .overlay {
    padding: 0;
    align-items: end;
  }

  .notif-actions .push {
    margin-left: 0;
  }
}

@media (max-width: 420px) {
  .brand small {
    display: none;
  }

  .actions .btn {
    flex: 1 1 auto;
  }

  .notif-actions .btn {
    flex: 1 1 45%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- готовый к деплою коммит ---------- */

.card.ready {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--accent) 10%, var(--card)), var(--card) 60%);
}

.ready-main {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  flex: 1 1 280px;
}

.ready-title {
  font-weight: 650;
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.ready-sub {
  color: var(--text-2);
  font-size: 12.5px;
  margin-top: 3px;
}

.gh-foot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.accounts-title {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  font-weight: 650;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hint-list {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 5px;
  font-size: 12.5px;
}

.hint-list li::marker {
  color: var(--warn);
}

.hint-card svg {
  flex: none;
}

.banner-link {
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--fill);
  font-family: var(--mono);
  font-size: 0.9em;
}

@media (max-width: 560px) {
  .card.ready {
    align-items: stretch;
  }
  .card.ready > .btn {
    width: 100%;
  }
}
