/* Админ-панель: дополняет style.css */
body.admin { padding-bottom: calc(env(safe-area-inset-bottom) + 24px); }
.logo { text-decoration: none; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 12px; }
.stat {
  border: 0; text-align: left; background: var(--card); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow);
  transition: transform .15s var(--ease);
}
.stat:active { transform: scale(.97); }
.stat b { display: block; font-size: 28px; font-weight: 850; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--hint); }
.stat.warn-stat.has b { color: var(--warn); }

.add-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.add-grid input, .editor input:not([type]), .editor textarea, #search {
  width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px;
  background: var(--sunken); font: inherit; color: var(--text);
}
.editor textarea { resize: vertical; margin-top: 8px; }
#search { background: var(--card); box-shadow: var(--shadow); border: 0; }

.list-tools { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 12px; }

.user {
  display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center; width: 100%; border: 0;
  text-align: left; background: var(--card); border-radius: var(--r); padding: 14px; margin-bottom: 10px;
  box-shadow: var(--shadow); transition: transform .15s var(--ease);
}
.user:active { transform: scale(.985); }
.user.blocked { opacity: .65; }
.avatar {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: 17px;
  color: #fff; background: linear-gradient(135deg, var(--c1, #3b82f6), var(--c2, #8b5cf6)); grid-row: span 2;
}
.avatar.big { width: 54px; height: 54px; border-radius: 18px; font-size: 22px; }
.u-name { font-weight: 700; font-size: 15px; display: flex; gap: 6px; align-items: center; min-width: 0; }
.u-name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-sub { font-size: 12px; color: var(--hint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-chips { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.u-chips span { font-size: 11px; background: var(--sunken); color: var(--hint); border-radius: 6px; padding: 2px 7px; }
.u-chips span.on { background: var(--long-soft); color: var(--long); }
.u-chips span.off { background: var(--short-soft); color: var(--short); }
.u-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.u-actions .btn { padding: 10px; }

.st { font-size: 11px; font-weight: 750; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.st.active { background: var(--long-soft); color: var(--long); }
.st.pending { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.st.blocked { background: var(--short-soft); color: var(--short); }
.st.none { background: var(--sunken); color: var(--hint); }
.st.admin { background: var(--accent-soft); color: var(--accent); }

.log-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.log-item:first-child { border-top: 0; padding-top: 0; }
.log-item:last-child { padding-bottom: 0; }
.log-item small { color: var(--hint); font-size: 12px; }

/* редактор */
.editor { max-height: 92vh; overflow-y: auto; padding-top: 10px; }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; }
.ed-head { display: flex; gap: 14px; align-items: center; }
.ed-name { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.ed-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 4px; }
.ed-facts span { font-size: 12px; background: var(--sunken); border-radius: 8px; padding: 4px 9px; color: var(--hint); }
.ed-facts b { color: var(--text); font-weight: 650; }
.ed-section { margin-top: 18px; }
.ed-label { font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; color: var(--hint); margin-bottom: 10px; }
.editor .ctrl { flex-wrap: wrap; }
.editor .btn.block { margin-top: 10px; }
