/* Admin — 캡쳐방지 해제 + 라이트 톤은 X, 메인과 같은 다크 네온 유지 */
.admin-body, .admin-body * {
  -webkit-user-select: text !important;
  user-select: text !important;
}
.admin-body img { pointer-events: auto; }

.admin-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Login */
#login-screen {
  align-items: center;
  justify-content: center;
}
.login-card {
  background: var(--bg-card);
  border: 1px solid var(--neon-red);
  border-radius: var(--radius-lg);
  padding: 48px 36px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 0 40px rgba(255,42,42,0.3);
}
.login-card .brand-line {
  font-family: var(--font-kr);
  font-size: 32px;
  color: var(--neon-red);
  text-shadow: var(--neon-red-glow);
  margin-bottom: 8px;
}
.admin-tag {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--text-muted);
  margin-bottom: 28px;
}
#login-form { display: grid; gap: 14px; }
#login-form input {
  padding: 14px;
  background: var(--bg-elev1);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 16px;
  text-align: center;
  letter-spacing: 4px;
}
#login-form button {
  padding: 14px;
  background: var(--neon-red);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 2px;
  border-radius: var(--radius-sm);
  font-size: 15px;
}
.error-msg { margin-top: 14px; color: var(--neon-red); font-size: 13px; min-height: 18px; }

/* Header */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-elev1);
}
.admin-header .brand {
  font-family: var(--font-kr);
  font-size: 22px;
  color: var(--neon-red);
  text-shadow: var(--neon-red-glow);
}
.admin-header .brand .admin-tag { margin: 0 0 0 12px; display: inline-block; }
.admin-header .link {
  margin-left: 12px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.5px;
  font-weight: 500;
}
.admin-header .link:hover { color: var(--neon-red); }

/* Nav */
.admin-nav {
  display: flex;
  gap: 4px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  background: var(--bg-elev1);
}
.admin-nav .tab {
  padding: 10px 16px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  border: 1px solid transparent;
}
.admin-nav .tab:hover { color: var(--text-secondary); }
.admin-nav .tab.is-active {
  background: rgba(255,42,42,0.12);
  border-color: var(--neon-red);
  color: var(--neon-red);
  text-shadow: 0 0 4px var(--neon-red);
}

/* Main */
.admin-main {
  flex: 1;
  padding: 32px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.panel-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.5px;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.panel-title::before {
  content: '/';
  color: var(--neon-red);
  margin-right: 12px;
  text-shadow: var(--neon-red-glow);
}

.admin-form {
  display: grid;
  gap: 16px;
  background: var(--bg-card);
  padding: 28px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}
.admin-form label {
  display: block;
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0;
  font-weight: 500;
  color: #c4c4cf;
  margin-bottom: 6px;
}
.admin-form input[type=text],
.admin-form input[type=number],
.admin-form input[type=url],
.admin-form input[type=password],
.admin-form textarea,
.admin-form select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-elev1);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font: inherit;
}
.admin-form textarea { min-height: 100px; resize: vertical; }
.admin-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-form .toggle-row { display: flex; align-items: center; gap: 12px; }
.admin-form .btn-primary {
  padding: 12px 28px;
  background: var(--neon-red);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  justify-self: start;
}
.admin-form .btn-primary:hover { box-shadow: 0 0 16px rgba(255,42,42,0.5); }

.admin-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}
.admin-list-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: grid;
  gap: 8px;
}
.admin-list-item .head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.admin-list-item .head .name {
  font-weight: 700;
  flex: 1;
}
.admin-list-item .head .meta {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
}
.admin-list-item .body { color: var(--text-secondary); font-size: 14px; white-space: pre-wrap; }
.admin-list-item .actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.admin-list-item .actions button {
  padding: 6px 14px;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  text-transform: uppercase;
}
.admin-list-item .actions button:hover { border-color: var(--neon-red); color: var(--neon-red); }
.admin-list-item .actions .danger { color: var(--neon-red); border-color: var(--neon-red); }
.admin-list-item .actions .danger:hover { background: var(--neon-red); color: #fff; }

.empty-state {
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
}

.success-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(0,240,255,0.15);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 12px;
  z-index: 200;
  animation: toast-in 0.3s ease;
}
@keyframes toast-in {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Mobile */
@media (max-width: 768px) {
  .admin-header { padding: 16px; }
  .admin-nav { padding: 8px 12px; }
  .admin-main { padding: 20px 16px; }
  .admin-form .row { grid-template-columns: 1fr; }
}

/* ============================================================
 * Dropzone — 드래그앤드랍 이미지 업로드 (제품/공지/QnA/후기 통일)
 * 2026-04-30
 * ============================================================ */
.dropzone {
  position: relative;
  display: block;
  margin-top: 6px;
  padding: 24px 16px;
  background: var(--bg-elev1);
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-sm);
  text-align: center;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}
.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--neon-cyan);
  background: rgba(0,240,255,0.05);
  outline: none;
}
.dropzone.is-drag {
  border-color: var(--neon-cyan);
  background: rgba(0,240,255,0.12);
  border-style: solid;
}
.dropzone .dz-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.dropzone .dz-cta {
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.dropzone .dz-icon {
  font-size: 28px;
  color: var(--neon-cyan);
  line-height: 1;
}
.dropzone .dz-msg {
  font-size: 14px;
  color: var(--text-primary);
}
.dropzone .dz-msg strong { font-weight: 600; }
.dropzone .dz-sub {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: .02em;
}
.dz-preview {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dz-thumb {
  position: relative;
  display: inline-block;
}
.dz-thumb img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  display: block;
}
.dz-thumb .dz-rm {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #000;
  color: #fff;
  font-size: 13px;
  line-height: 1;
  border: 1px solid #fff;
  cursor: pointer;
  padding: 0;
}
.dz-thumb .dz-badge {
  position: absolute;
  bottom: 4px;
  left: 4px;
  font-size: 10px;
  background: var(--neon-cyan);
  color: #000;
  padding: 1px 6px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .04em;
}
.dz-pending img { box-shadow: 0 0 0 2px var(--neon-cyan); }

/* === Floating Save Button (우측 하단) — 모든 admin 패널에서 즉시 저장 ===
   active 패널 안의 보이는 form 을 자동 감지해서 submit 트리거 */
#floating-save-btn {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9000;
  background: linear-gradient(135deg, var(--neon-amber, #ffaa00) 0%, var(--neon-red, #ff3838) 100%);
  color: #000;
  border: 0;
  border-radius: 999px;
  padding: 14px 24px;
  font-family: var(--font-display, system-ui), sans-serif;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(255,42,42,0.4), 0 2px 8px rgba(0,0,0,0.5);
  transition: transform .18s ease, box-shadow .18s ease;
  display: none; /* dashboard 진입 후 JS가 노출 */
  align-items: center;
  gap: 8px;
}
#floating-save-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(255,42,42,0.55), 0 4px 12px rgba(0,0,0,0.6);
}
#floating-save-btn:active { transform: translateY(0); }
#floating-save-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
#floating-save-btn::before { content: '💾'; font-size: 16px; filter: grayscale(1); }
@media (max-width: 540px) {
  #floating-save-btn { right: 14px; bottom: 14px; padding: 12px 18px; font-size: 13px; letter-spacing: 1.2px; }
}

/* 빠른 링크 프리셋 (긴급공지 패널) */
#u-preset-row .u-preset {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.15));
  color: var(--text-secondary, #cdd1d8);
  padding: 8px 14px;
  border-radius: 999px;
  font-family: var(--font-display, system-ui), sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 12.5px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
#u-preset-row .u-preset:hover {
  background: rgba(255,170,0,0.12);
  border-color: var(--neon-amber, #ffaa00);
  color: var(--neon-amber, #ffaa00);
}
