/* Admin panel — builds on style.css tokens */
[hidden] { display: none !important; }
.admin-bar { grid-template-columns: auto auto; justify-content: space-between; }
.admin-actions { display: flex; gap: 10px; }
.admin { padding: 30px 16px 60px; }
.muted { color: var(--muted); }
.view h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: -.03em; line-height: 1.1; }

/* Auth */
.auth { max-width: 520px; margin: 30px auto; padding: clamp(22px, 5vw, 36px); display: grid; gap: 16px; }
.help { padding: 14px 18px; box-shadow: 3px 3px 0 var(--shadow-c); }
.help summary { font-weight: 700; cursor: pointer; }
.help ol { padding-left: 20px; margin: 10px 0; display: grid; gap: 6px; }
.help a { font-weight: 700; text-decoration: underline; }
code { background: var(--yellow); color: #111; padding: 1px 6px; border-radius: 6px; border: 2px solid var(--line); font-size: .9em; }

/* Forms */
.form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 700; font-size: .92rem; }
input:not([type="checkbox"]):not([type="color"]):not([type="file"]), textarea {
  width: 100%; padding: 11px 14px; font: inherit; font-weight: 500; color: var(--text);
  background: var(--surface); border: var(--bw) solid var(--line); border-radius: 12px; outline: none;
  box-shadow: 3px 3px 0 var(--shadow-c); transition: box-shadow .12s;
}
input:focus, textarea:focus { box-shadow: 4px 4px 0 var(--blue) !important; }
input:read-only { background: var(--bg); color: var(--muted); }
textarea { resize: vertical; }
input[type="color"] { width: 100%; height: 46px; border: var(--bw) solid var(--line); border-radius: 12px; background: var(--surface); padding: 4px; cursor: pointer; }
.check { display: flex; align-items: center; gap: 10px; }
.check input { width: 22px; height: 22px; accent-color: var(--green); }
.error { color: #d92d20; font-weight: 700; min-height: 1em; }
.linkish { background: none; border: 0; cursor: pointer; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; justify-self: start; padding: 0; }

/* Dashboard */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.admin-list { display: grid; gap: 14px; }
.a-row { display: flex; align-items: center; gap: 14px; padding: 14px; }
.a-row .info { flex: 1; min-width: 0; }
.a-row h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-row .btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.a-row .btn { padding: 8px 14px; font-size: .88rem; }
.btn-danger { background: #ff5a4f; color: #111; }
.status { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 8px; border: 2px solid var(--line); border-radius: 999px; margin: 4px 6px 0 0; }
.status.ok { background: var(--green); color: #fff; }
.status.no { background: var(--surface); color: var(--muted); }

/* App form */
.app-form { display: grid; gap: 22px; }
.form-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; }
.fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.span2 { grid-column: 1 / -1; }
.drop {
  display: grid; place-items: center; gap: 4px; text-align: center; padding: 30px 16px; cursor: pointer;
  border: var(--bw) dashed var(--line); border-radius: var(--radius); background: var(--bg); transition: background .15s, transform .15s;
}
.drop span { color: var(--muted); font-size: .88rem; }
.drop:hover, .drop:focus-visible { background: var(--surface); outline: none; }
.drop.over { background: var(--yellow); color: #111; transform: scale(1.01); }
.drop.over span { color: #111; }
.drop-small { flex: 1; padding: 20px 12px; }
.icon-row { display: flex; gap: 16px; align-items: center; }
.icon-big { width: 96px; height: 96px; border-radius: 24px; }
.file-info { margin-top: 12px; font-weight: 600; word-break: break-all; }
.file-info .x { margin-left: 8px; }
.shot-list { display: flex; gap: 14px; overflow-x: auto; padding: 16px 6px 10px 2px; }
.shot-item { position: relative; flex: 0 0 auto; width: 120px; aspect-ratio: 9 / 19; border: var(--bw) solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 3px 3px 0 var(--shadow-c); background: var(--surface); }
.shot-item img { width: 100%; height: 100%; object-fit: cover; }
.shot-item .tools { position: absolute; inset: auto 4px 4px 4px; display: flex; gap: 4px; justify-content: center; }
.mini-btn { width: 30px; height: 30px; display: grid; place-items: center; border: 2px solid #111; border-radius: 8px; background: #fff; color: #111; font-weight: 700; cursor: pointer; }
.mini-btn.del { background: #ff5a4f; }
.publish-bar { display: flex; justify-content: flex-end; }
.publish-bar .btn { padding: 14px 30px; font-size: 1.05rem; }

/* Progress */
.progress { margin-top: 22px; }
.bar-track { height: 22px; border: var(--bw) solid var(--line); border-radius: 999px; overflow: hidden; background: var(--bg); margin: 8px 0 16px; }
.bar-fill { height: 100%; width: 0; background: var(--green); transition: width .3s; }
.log { padding-left: 22px; display: grid; gap: 6px; font-weight: 500; }
.log li.done::marker { color: var(--green); }
.log li.err { color: #d92d20; font-weight: 700; }
.log a { text-decoration: underline; font-weight: 700; }

@media (max-width: 760px) {
  .admin-bar { grid-template-columns: 1fr auto; }
  .admin-actions .btn { padding: 8px 12px; font-size: .85rem; }
  .form-grid, .fields { grid-template-columns: 1fr; }
  .a-row { flex-wrap: wrap; }
  .a-row .btns { width: 100%; justify-content: stretch; }
  .a-row .btns .btn { flex: 1; }
  .publish-bar .btn { width: 100%; }
}
