.admin-body {
  min-height: 100vh;
}

.login-card, .access, .editor, aside {
  background: rgba(18, 22, 30, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
}

.login-card {
  width: min(380px, calc(100% - 32px));
  margin: 12vh auto;
  padding: 28px;
}

h1, h2 { margin: 0 0 16px; font-weight: 600; }

label {
  display: block;
  margin: 12px 0;
  color: var(--muted);
  font-size: 14px;
}

input[type="text"], input[type="password"], input[type="url"], input:not([type]) {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0e1218;
  color: var(--text);
  font: inherit;
}

button, .file-btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  background: #d7e4f8;
  color: #12161c;
  font: inherit;
  cursor: pointer;
}

.form-error { color: #ff8f9a; min-height: 1.2em; }
.form-ok { color: #9be7b2; min-height: 1.2em; }
.muted { color: var(--muted); font-size: 13px; }

.admin { padding: 18px; }
.admin-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.admin-bar a { color: #c9d7ee; }

.admin-layout {
  display: grid;
  grid-template-columns: 280px 1fr 280px;
  gap: 16px;
  align-items: start;
}

aside, .editor, .access { padding: 16px; }
.aside-head, .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

#tile-list { list-style: none; margin: 12px 0 0; padding: 0; }
#tile-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
}
#tile-list li.active { background: rgba(255, 255, 255, 0.06); }
#tile-list li.over { outline: 1px dashed rgba(255, 255, 255, 0.35); }
.grip { cursor: grab; color: var(--muted); }

.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; }

.crop-stage {
  position: relative;
  margin: 10px 0;
  background: #07090d;
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
  min-height: 80px;
}
.crop-stage img {
  display: block;
  width: 100%;
  height: auto;
}
.crop-frame {
  position: absolute;
  border: 2px solid #fff;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
  cursor: move;
}
.crop-handle {
  position: absolute;
  right: -7px;
  bottom: -7px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 3px;
  cursor: nwse-resize;
}
.result-tile {
  width: 260px;
  margin: 8px 0 16px;
}
.result-tile .icon-wrap { width: 260px; }

.presets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
  margin: 8px 0 16px;
}
.preset {
  background: transparent;
  color: var(--text);
  border: 1px solid transparent;
  padding: 8px 4px;
  font-size: 12px;
}
.preset.selected { border-color: rgba(255, 255, 255, 0.4); }
.preset .icon-wrap { width: 100%; aspect-ratio: 16 / 9; height: auto; margin: 0 auto 6px; }
.preset .icon { border-radius: 8px; }
.preset .snake { inset: -5px; width: calc(100% + 10px); height: calc(100% + 10px); }

.danger { background: #3a2024; color: #ffd0d4; }

@media (max-width: 980px) {
  .admin-layout { grid-template-columns: 1fr; }
}
