.app-top { gap: 14px; }
.app-top select { width: auto; margin: 0; padding: 4px 8px; font-size: 0.78rem; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 20px clamp(12px, 3vw, 40px) 60px; max-width: 1400px; margin: 0 auto; }
.span2 { grid-column: span 2; }
.span3 { grid-column: span 3; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } .span2, .span3 { grid-column: auto; } }
.grid h3 { display: flex; align-items: center; gap: 10px; }

.crumbs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; font-size: 0.85rem; color: var(--muted); }
.crumbs button { font: inherit; background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0 2px; }

.drop { border: 2px dashed var(--line); border-radius: 10px; padding: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 0.85rem; position: relative; }
.drop.over { border-color: var(--accent); background: rgba(255, 180, 92, 0.07); }
.up { flex-basis: 100%; height: 18px; border: 1px solid var(--line); border-radius: 6px; position: relative; overflow: hidden; }
.up i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brown), #ffc83d); }
.up span { position: absolute; inset: 0; text-align: center; font-size: 0.7rem; line-height: 16px; color: #fff4dc; text-shadow: 0 0 3px #000; }

.diskbar { height: 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.07); margin: 12px 0 4px; overflow: hidden; }
.diskbar i { display: block; height: 100%; width: 0; background: var(--accent); }

.files { list-style: none; margin: 12px 0; padding: 0; max-height: 320px; overflow: auto; }
.files li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-bottom: 1px solid rgba(217, 160, 102, 0.1); border-radius: 6px; }
.files li:hover { background: rgba(255, 180, 92, 0.06); }
.files .nm { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: none; border: 0; font: inherit; color: var(--text); padding: 0; text-align: left; }
.files .nm.dir { color: var(--accent); cursor: pointer; }
.files .more { margin-left: 10px; flex: none; width: 28px; height: 28px; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--muted); font: inherit; cursor: pointer; line-height: 1; }
.files .more:hover, .files .more[aria-expanded="true"] { border-color: var(--line); color: var(--text); background: rgba(255, 255, 255, 0.05); }
.files .sz { margin-left: auto; color: var(--muted); font-size: 0.75rem; flex: none; }
.files .star { color: #ffc83d; flex: none; }
.files .empty { color: var(--muted); padding: 14px; }

.menu { position: fixed; z-index: 50; min-width: 190px; background: #1d130c; border: 1px solid rgba(217, 160, 102, 0.4); border-radius: 10px; padding: 5px; box-shadow: 0 12px 34px rgba(0, 0, 0, 0.6); }
.menu button { display: block; width: 100%; text-align: left; padding: 8px 12px; background: none; border: 0; border-radius: 6px; font: inherit; font-size: 0.85rem; color: var(--text); cursor: pointer; }
.menu button:hover { background: rgba(255, 180, 92, 0.14); }
.menu button.danger { color: var(--bad); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

.cmd { display: flex; gap: 8px; align-items: center; }
.cmd input { margin-top: 0; }
.hint { display: flex; align-items: center; gap: 8px; margin: 8px 0 14px; font-size: 0.76rem; min-height: 1.4em; color: var(--muted); }
.hint .dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px var(--good); }
.hint.warn .dot { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.hint.err .dot { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.hint.ok { color: var(--good); }
.hint.warn { color: var(--warn); }
.hint.err { color: var(--bad); }
.hint span { display: block; }
.grid label + label { margin-top: 12px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stats div { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.stats span { display: block; color: var(--muted); font-size: 0.75rem; }
.stats b { font-size: 1.2rem; color: var(--accent); }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
@media (max-width: 600px) { .charts { grid-template-columns: 1fr; } }
.charts .cap { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); }
.charts .cap b { color: var(--text); }
.charts canvas { width: 100%; height: 90px; display: block; border: 1px solid var(--line); border-radius: 8px; background: rgba(0, 0, 0, 0.35); }
.logs { margin: 0; height: 240px; overflow: auto; padding: 12px; background: #070504; border: 1px solid var(--line); border-radius: 8px; font-size: 0.78rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.logs .err { color: var(--bad); }
.logs .sys { color: var(--accent); }
.logs .t { color: #6d5740; margin-right: 8px; }

.ai-out { margin-top: 14px; display: grid; gap: 10px; }
.ai-out .card { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; background: rgba(0, 0, 0, 0.3); font-size: 0.85rem; }
.ai-out .card b { color: var(--accent); display: block; }
.ai-out .card.ok { border-color: rgba(126, 214, 122, 0.4); }

.botbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 16px clamp(12px, 3vw, 40px) 0; max-width: 1400px; margin: 0 auto; }
.bots { display: flex; flex-wrap: wrap; gap: 8px; }
.bots button { font: inherit; font-size: 0.85rem; padding: 7px 14px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, 0.04); color: var(--text); cursor: pointer; display: flex; gap: 8px; align-items: center; }
.bots button.on { border-color: var(--accent); background: rgba(255, 180, 92, 0.12); }
.bots .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.bots .dot.running { background: var(--good); box-shadow: 0 0 6px var(--good); }
.bots .dot.bad { background: var(--bad); }
.empty-app { text-align: center; padding: 80px 20px; }
.botinfo { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.botinfo div { display: grid; }
.botinfo b { color: var(--accent); }
.botinfo .btn { margin-left: auto; }
.terms { display: grid; gap: 8px; }
.terms label { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; color: var(--text); }
.terms input { width: auto; margin: 0; }
.terms .pr { margin-left: auto; color: var(--accent); }
.total { font-size: 1.1rem; }
.total b { color: var(--accent); }
.modal .up { height: 18px; border: 1px solid var(--line); border-radius: 6px; position: relative; overflow: hidden; }
.logs.empty { color: var(--muted); }

.console { height: 200px; }
.console .cline { color: var(--accent); }

/* ── Мобильная адаптация кабинета ── */
@media (max-width: 760px) {
  .app-top { gap: 8px; }
  .app-top .who { font-size: 0.72rem; }
  .botbar { gap: 8px; padding-top: 10px; }
  .bots { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
  .bots button { flex: none; white-space: nowrap; }
  .grid { padding: 12px 10px 40px; gap: 12px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stats b { font-size: 1rem; }
  .botinfo { gap: 10px; }
  .botinfo .btn { margin-left: 0; }
  .logs { height: 180px; font-size: 0.72rem; }
  .console { height: 160px; }
  .files { max-height: 240px; }
  .cmd input { font-size: 0.8rem; }
  .empty-app { padding: 40px 12px; }
}
