body { overflow-y: auto; height: auto; min-height: 100%; }
.adm { max-width: 640px; margin: 0 auto; padding: 0 16px 40px; }
.adm-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; position: sticky; top: 0; background: var(--bg); z-index: 5; }
.back { color: var(--teal); text-decoration: none; font-size: 14px; }
.refresh { width: 36px; height: 36px; border-radius: 10px; background: var(--panel); font-size: 18px; }
.small { font-size: 13px; }
.box { background: var(--panel); border-radius: 16px; padding: 14px; margin-bottom: 12px; }
.box-title { font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.box-sub { font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
.mode { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--panel2); border-radius: 99px; transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--amber); }
.switch input:checked + span::before { transform: translateX(22px); }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.tile { background: var(--panel2); border-radius: 12px; padding: 10px; }
.tile b { display: block; font-size: 18px; }
.tile span { font-size: 11px; color: var(--muted); }
@media (max-width: 380px) { .tiles { grid-template-columns: repeat(2, 1fr); } }

.chart { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; align-items: end; height: 110px; }
.chart .col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 3px; }
.chart .bar-v { width: 100%; background: var(--teal); border-radius: 4px 4px 0 0; min-height: 2px; }
.chart .n { font-size: 10px; color: var(--muted); }
.chart .d { font-size: 9px; color: var(--muted); }

.add-row { display: flex; gap: 6px; margin: 10px 0; flex-wrap: wrap; }
.add-row input { flex: 1 1 140px; }
input:not([type]), input[inputmode] { background: var(--panel2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 10px 12px; font: inherit; min-width: 0; outline: none; }
input:focus { border-color: var(--teal); }
.box .item { background: var(--panel2); }
.tag { font-size: 11px; padding: 2px 6px; border-radius: 6px; background: #0f3d38; color: var(--teal); margin-left: 4px; }
.tag.warn { background: #3d300f; color: var(--amber); }
.x { width: 32px; height: 32px; border-radius: 8px; background: var(--panel); color: var(--red); flex: none; }

.danger { box-shadow: inset 0 0 0 1px #f8717155; }
.danger input:not([type=checkbox]) { width: 100%; margin-top: 10px; }
.check input { width: 18px; height: 18px; flex: none; accent-color: var(--red); }
.check { display: flex; gap: 8px; align-items: center; margin-top: 10px; font-size: 14px; }
.btn.red { background: var(--red); color: #2b0606; width: 100%; margin-top: 10px; }

.medal-img { width: 44px; height: 44px; flex: none; object-fit: contain; display: grid; place-items: center; font-size: 30px; }
.sheet label.lbl { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 4px; }
.sheet .field, .sheet select { width: 100%; background: var(--panel2); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 10px 12px; font: inherit; outline: none; }
.sheet textarea.field { resize: vertical; min-height: 60px; }
.img-pick { display: flex; gap: 12px; align-items: center; }
.img-pick .medal-img { width: 72px; height: 72px; background: var(--panel2); border-radius: 14px; font-size: 40px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mini-btns { display: flex; gap: 6px; flex: none; }
.mini-btns button { width: 32px; height: 32px; border-radius: 8px; background: var(--panel); }
.off { opacity: .5; }
.sheet .btn { width: 100%; margin-top: 14px; }
