.admin-card {
  max-width: 640px;
}

.admin-head {
  margin-bottom: 24px;
}

.admin-head h1 {
  margin: 8px 0 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.back {
  color: var(--text-dim);
  font-size: 13px;
  text-decoration: none;
}

.back:hover {
  color: var(--text-muted);
}

.foot-link {
  color: var(--text-dim);
  text-decoration: none;
}

.foot-link:hover {
  color: var(--text-muted);
}

.view[hidden] { display: none; }

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > span,
.field > legend {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-elev-hover);
}

.field textarea {
  resize: vertical;
  min-height: 56px;
  font-family: inherit;
}

.row {
  display: flex;
  gap: 12px;
}

.flex-1 { flex: 1; }
.w-20 { width: 110px; flex-shrink: 0; }

.badge-field {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.badge-field legend {
  padding: 0 6px;
  margin-left: -6px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}

.check input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

.links-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.links-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.link-row {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
}

.link-row-grid {
  display: grid;
  grid-template-columns: 140px 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}

@media (max-width: 560px) {
  .link-row-grid {
    grid-template-columns: 1fr 1fr;
  }
  .link-row-grid .url { grid-column: 1 / -1; }
  .link-row-grid .row-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

.link-row select,
.link-row input {
  padding: 8px 10px;
  font-size: 13px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
}

.link-row select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%239a9aa3' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

.row-actions {
  display: flex;
  gap: 4px;
}

.icon-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover {
  color: var(--text);
  background: var(--bg-elev-hover);
  border-color: var(--border-hover);
}

.icon-btn.delete:hover {
  color: #fca5a5;
  border-color: rgba(252, 165, 165, 0.4);
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.btn {
  padding: 11px 18px;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  background: var(--bg-elev-hover);
  border-color: var(--border-hover);
}

.btn:active {
  transform: translateY(1px);
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  border-color: transparent;
  box-shadow: 0 10px 30px -10px rgba(167, 139, 250, 0.5);
}

.btn-primary:hover {
  border-color: transparent;
  filter: brightness(1.1);
}

.btn-ghost {
  background: transparent;
}

.error {
  margin: 0;
  color: #fca5a5;
  font-size: 13px;
}

.status {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.status.success { color: #86efac; }
.status.error { color: #fca5a5; }
