/* BEATX admin */
.admin-body { background: var(--bg); }
.admin-shell { min-height: 100vh; position: relative; z-index: 1; }
.admin-head { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
  padding: 14px 28px; background: var(--topbar-1); border-bottom: 1px solid var(--line); backdrop-filter: blur(20px); }
.admin-logo b { display: block; font-size: 20px; letter-spacing: .14em; }
.admin-logo span { display: block; font-size: 11px; color: var(--muted); letter-spacing: .05em; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.admin-tabs button { padding: 9px 14px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 700; }
.admin-tabs button:hover { background: var(--panel); color: var(--text); }
.admin-tabs button.active { background: var(--mint-soft); color: var(--mint); }
.admin-head-right { display: flex; gap: 8px; }
.admin-main { max-width: 1240px; margin: 0 auto; padding: 30px 26px 70px; }
.admin-main h1 { margin: 0 0 4px; font-size: 30px; letter-spacing: -.04em; }
.admin-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 16px; }
.admin-toolbar input[type=search] { min-width: 240px; padding: 11px 14px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); outline: none; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 22px 0 34px; }
.stat { padding: 20px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.stat b { display: block; font-size: 34px; letter-spacing: -.04em; }
.stat span { color: var(--muted); font-size: 13px; }
.table-wrap { overflow: auto; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); }
table { width: 100%; border-collapse: collapse; min-width: 620px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
th { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; position: sticky; top: 0; background: var(--solid); }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: var(--panel); }
td img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
td .cell-title { font-weight: 700; }
td .cell-sub { color: var(--muted); font-size: 11px; }
.row-btns { display: flex; gap: 6px; }
.err-text { color: #ff8ba7; min-height: 20px; font-size: 13px; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; position: relative; z-index: 1; }
.login-card { width: min(420px, 100%); padding: 34px; border-radius: 24px; background: var(--panel-2);
  border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(20px); }
.login-card h1 { margin: 18px 0 20px; font-size: 26px; }
.login-card label { display: block; margin-bottom: 14px; color: var(--muted); font-size: 13px; }
.login-card input { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); outline: none; }
.login-card input:focus { border-color: var(--mint); }
.login-card button { width: 100%; }
.checkbox-line { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.checkbox-line input { width: auto; }
.file-drop { display: block; padding: 16px; border: 1px dashed var(--line); border-radius: 12px;
  text-align: center; color: var(--muted); cursor: pointer; }
.file-drop:hover { border-color: var(--mint); color: var(--text); }
.file-drop input { display: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }
.admin-main .field { margin-bottom: 12px; }
.admin-main .field label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.admin-main input, .admin-main select, .admin-main textarea {
  width: 100%; padding: 11px 13px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); outline: none; font: inherit; }
.admin-main input:focus, .admin-main select:focus, .admin-main textarea:focus { border-color: var(--mint); }
.admin-main .checkbox-line input { width: auto; }
.radio-line { display: flex; flex-wrap: wrap; gap: 18px; }
.radio-line label { display: inline-flex; align-items: center; gap: 7px; margin: 0; color: var(--text); font-size: 13px; font-weight: 500; }
.radio-line input { width: auto; margin: 0; accent-color: var(--mint); }
.import-area { min-height: 210px; resize: vertical; font: 13px/1.65 ui-monospace, Consolas, monospace; }
.import-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.import-result { margin-top: 18px; }
.import-summary { margin-bottom: 10px; color: var(--muted); font-size: 13px; }
.code-line { display: block; padding: 10px 12px; border-radius: 10px; background: var(--surface);
  border: 1px solid var(--line); color: var(--muted); font: 12px/1.6 ui-monospace, Consolas, monospace; word-break: break-all; }
.status-added, .status-new { color: var(--mint); }
.status-exists, .status-limit { color: #ffb057; }
.status-error { color: #ff8ba7; }

/* Темы оформления */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 22px 0 30px; }
.theme-card { padding: 14px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.theme-card.active { border-color: var(--mint); box-shadow: 0 0 0 2px var(--mint-soft); }
.theme-preview { height: 82px; border-radius: 12px; margin-bottom: 12px; padding: 12px; display: flex; flex-direction: column; gap: 7px; }
.theme-preview i { display: block; height: 8px; border-radius: 6px; opacity: .9; }
.theme-preview i:nth-child(1) { width: 68%; }
.theme-preview i:nth-child(2) { width: 44%; }
.theme-preview i:nth-child(3) { width: 84%; }
.theme-card h3 { margin: 0 0 2px; font-size: 15px; }
.theme-meta { color: var(--muted); font-size: 11px; }
.theme-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.theme-card.active .theme-actions .btn.primary { opacity: .8; }
.theme-editor { margin-top: 10px; }
.theme-editor .form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.theme-editor input[type=color] { height: 44px; padding: 4px; cursor: pointer; }
.checkbox-line { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 13px; }
.checkbox-line input { width: auto; }
.code-area { min-height: 130px; resize: vertical; font: 12px/1.6 ui-monospace, Consolas, monospace; }
.ad-slot { min-height: 1px; }
