/* ===== Tiktak Admin · страницы ===== */

/* ---------- вход ---------- */
body.login-page { display: grid; place-items: center; padding: 24px; }

.login-wrap {
  width: 100%;
  max-width: 940px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(13, 15, 23, 0.72);
  backdrop-filter: blur(22px);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
  animation: rise 0.6s var(--ease) both;
}

.login-art {
  padding: 42px 38px;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(124, 92, 255, 0.35), transparent 55%),
    radial-gradient(100% 100% at 100% 100%, rgba(0, 212, 255, 0.28), transparent 60%),
    rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.login-art::after {
  content: "";
  position: absolute;
  inset: -30% -30% auto auto;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  filter: blur(10px);
  animation: float 9s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-24px, 26px); }
}

.login-logo {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: var(--grad);
  display: grid;
  place-items: center;
  font-size: 32px;
  box-shadow: var(--shadow-glow);
}

.login-art h1 { margin: 0; font-size: 34px; font-weight: 850; letter-spacing: 0.5px; }
.login-art h1 span {
  background: linear-gradient(135deg, #fff, #c4b5ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-art p { margin: 0; color: rgba(255, 255, 255, 0.72); font-size: 14px; line-height: 1.6; }

.login-feats { display: flex; flex-direction: column; gap: 11px; margin-top: auto; position: relative; z-index: 1; }
.login-feat { display: flex; gap: 11px; align-items: center; font-size: 13.5px; color: rgba(255, 255, 255, 0.82); }
.login-feat i {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 17px;
}

.login-form { padding: 42px 38px; display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.login-form h2 { margin: 0; font-size: 22px; font-weight: 750; }
.login-form .sub { margin: 0; color: var(--muted); font-size: 13px; }

.pass-wrap { position: relative; }
.pass-wrap input { padding: 14px 46px 14px 44px; font-size: 15px; letter-spacing: 1px; }
.pass-wrap .lock { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); font-size: 16px; opacity: 0.75; }
.pass-wrap .eye {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  padding: 6px 8px;
  border-radius: 8px;
}
.pass-wrap .eye:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }

.login-error {
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(255, 77, 109, 0.14);
  border: 1px solid rgba(255, 77, 109, 0.4);
  color: #ffb3c1;
  font-size: 13.5px;
  animation: shake 0.4s var(--ease);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  75% { transform: translateX(7px); }
}

.login-foot { font-size: 11.5px; color: var(--dim); text-align: center; }

@media (max-width: 820px) {
  .login-wrap { grid-template-columns: 1fr; max-width: 460px; }
  .login-art { padding: 30px 26px; }
  .login-art h1 { font-size: 27px; }
  .login-form { padding: 28px 26px; }
}

/* ---------- дашборд ---------- */
.top-list { display: flex; flex-direction: column; gap: 12px; }
.top-row { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; }
.top-row .bar { height: 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.09); overflow: hidden; }
.top-row .bar span { display: block; height: 100%; background: var(--grad); border-radius: 999px; }
.top-row .cnt { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.top-row .nm { font-size: 13px; margin-bottom: 4px; }

.queue-row { display: flex; gap: 10px; flex-wrap: wrap; }
.queue-box {
  flex: 1 1 90px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.24);
  text-align: center;
}
.queue-box b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.queue-box span { font-size: 11.5px; color: var(--muted); }

.sysinfo { display: flex; flex-direction: column; gap: 9px; font-size: 13px; }
.sysinfo div { display: flex; justify-content: space-between; gap: 12px; }
.sysinfo span { color: var(--muted); }
.sysinfo b { font-weight: 600; text-align: right; }

/* ---------- лог ---------- */
.log-feed {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 12.5px;
  max-height: 620px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 4px;
}

.log-line {
  display: grid;
  grid-template-columns: 74px 22px 150px 1fr;
  gap: 10px;
  padding: 6px 9px;
  border-radius: 9px;
  border-left: 3px solid transparent;
  background: rgba(255, 255, 255, 0.025);
  animation: rise 0.25s var(--ease) both;
}
.log-line:hover { background: rgba(255, 255, 255, 0.07); }
.log-line .t { color: var(--dim); }
.log-line .s { color: #8de8ff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-line .m { word-break: break-word; white-space: pre-wrap; }
.log-line.INFO { border-left-color: rgba(0, 212, 255, 0.5); }
.log-line.DEBUG { border-left-color: rgba(255, 255, 255, 0.18); color: var(--muted); }
.log-line.WARNING { border-left-color: var(--amber); background: rgba(255, 190, 61, 0.07); }
.log-line.ERROR { border-left-color: var(--red); background: rgba(255, 77, 109, 0.09); }
.log-line.CRITICAL { border-left-color: var(--red); background: rgba(255, 77, 109, 0.18); }
.log-line .x { grid-column: 1 / -1; color: #ffa8ba; font-size: 11.5px; white-space: pre-wrap; opacity: 0.85; }

@media (max-width: 900px) {
  .log-line { grid-template-columns: 60px 20px 1fr; }
  .log-line .s { display: none; }
}

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

/* ---------- сценарий ---------- */
.blocks { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

.block {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.26);
  overflow: hidden;
  transition: transform 0.2s var(--ease), border-color 0.2s;
}
.block:hover { transform: translateY(-3px); border-color: var(--line-2); }
.block.copied { border-color: rgba(23, 227, 154, 0.45); }

.block-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.045);
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 650;
}
.block-head .spacer { margin-left: auto; }

.block-lines { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.block-line {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 13px;
}
.block-line .len {
  font-size: 10.5px;
  color: var(--dim);
  min-width: 22px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.block-line.over .len { color: var(--red); font-weight: 700; }
.block-line.over .txt { color: #ffb3c1; }
/* пустая строка внутри блока — граница смысловой группы */
.block-gap {
  height: 0;
  margin: 3px 0 3px 30px;
  border-top: 1px dashed var(--line);
}

.caption-box {
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.26);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tags { display: flex; gap: 7px; flex-wrap: wrap; }
.tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: #8de8ff;
  font-size: 12.5px;
}

/* ---------- тематики ---------- */
.acc-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rules-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }

.preview-box {
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.22);
  font-size: 13px;
}
.preview-box .row { display: flex; gap: 8px; justify-content: space-between; padding: 3px 0; }
.preview-box .row span { color: var(--muted); }

.test-out { display: none; margin-top: 12px; }
.test-out.on { display: block; animation: rise 0.35s var(--ease) both; }

.spinner {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- пул ключей: цвет строки по итогу проверки баланса ---------- */
.key-row td { transition: background 0.2s var(--ease); }
.key-row.ok td { background: rgba(23, 227, 154, 0.07); }
.key-row.empty td { background: rgba(255, 190, 61, 0.1); }
.key-row.dead td { background: rgba(255, 77, 109, 0.11); }
.key-row.ok td:first-child { box-shadow: inset 3px 0 0 var(--green); }
.key-row.empty td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
.key-row.dead td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.key-row input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: #7c5cff; }

/* ---------- провайдеры AI ---------- */
.prov-list { display: flex; flex-direction: column; gap: 12px; }
.prov-row {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  padding: 12px 14px 14px;
}
.prov-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.prov-head .spacer { margin-left: auto; }
.prov-name { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14.5px; }

/* ---------- служебные страницы ---------- */
.oops { text-align: center; padding: 70px 20px; }
.oops .big { font-size: 64px; }
.oops h1 { margin: 12px 0 6px; font-size: 26px; }
.oops p { color: var(--muted); margin: 0 0 20px; }

/* ---------- прочее ---------- */
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 14px; }
.mb { margin-bottom: 14px; }
.center { text-align: center; }
.fresh-codes { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }


