.admin-body {
  background-color: #f8fafc;
  color: #1e293b;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-navbar {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-logo a {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-logo span {
  font-size: 0.75rem;
  background: #e65129;
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.admin-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-container {
  max-width: 1200px;
  margin: 24px auto 60px auto;
  padding: 0 20px;
  flex: 1;
  width: 100%;
}

/* 폼 컨트롤 스타일 (로그인 폼, 모달 폼, 등록 폼 공통) */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
  text-align: left;
}

.form-group label {
  font-size: 13.5px;
  font-weight: 600;
  color: #334155;
  user-select: none;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  color: #0f172a;
  background-color: #ffffff;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #e65129;
  box-shadow: 0 0 0 3px rgba(230, 81, 41, 0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #94a3b8;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-error {
  color: #ef4444;
  font-size: 13px;
  margin-top: 6px;
  line-height: 1.4;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 6px;
}

/* 관리자 로그인 카드 */
.login-card {
  max-width: 420px;
  margin: 80px auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
}

.login-card-header {
  margin-bottom: 26px;
  text-align: center;
}

.login-card-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}

.login-card-header p {
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.4;
}

/* 통계 카드 */
.stat-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.stat-label {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
}
/* 탭 바 & 패널 */
.admin-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.admin-tabs::-webkit-scrollbar {
  display: none;
}

.admin-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.admin-tab-btn:hover {
  color: #0f172a;
}

.admin-tab-btn.active {
  color: #e65129;
  border-bottom-color: #e65129;
}

.admin-tab-content {
  display: none;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.admin-tab-content.active {
  display: block;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.panel-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

/* 테이블 & 필터 바 */
.admin-filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.admin-filter-bar input {
  flex: 1;
  padding: 9px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13.5px;
  outline: none;
}

.admin-filter-bar select {
  padding: 9px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13.5px;
  outline: none;
  background-color: #ffffff;
}

.admin-table-wrapper {
  overflow-x: auto;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
}

.admin-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.admin-data-table th,
.admin-data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  vertical-align: middle;
}

.admin-data-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

.admin-prod-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.table-actions {
  display: flex;
  gap: 6px;
}

.btn-edit {
  background: #eff6ff;
  color: #2563eb;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  transition: background 0.15s;
}

.btn-edit:hover {
  background: #dbeafe;
}

.btn-delete {
  background: #fee2e2;
  color: #ef4444;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  transition: background 0.15s;
}

.btn-delete:hover {
  background: #fecaca;
}

/* 자동 등록 탭 */
.create-card {
  max-width: 650px;
}

.input-with-btn {
  display: flex;
  gap: 8px;
}

.input-with-btn input {
  flex: 1;
}

.preview-box {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
}

.preview-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
}

.preview-thumb {
  aspect-ratio: 1;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-inputs {
  display: flex;
  flex-direction: column;
}

/* 카테고리 관리 */
.cat-create-row {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  max-width: 480px;
}

.cat-create-row input {
  flex: 1;
  padding: 9px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
}

.category-manage-list {
  list-style: none;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  max-width: 480px;
  overflow: hidden;
}

.category-manage-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  font-weight: 500;
}

.category-manage-list li:last-child {
  border-bottom: none;
}

.settings-form {
  max-width: 600px;
}

.platform-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 11.5px;
  font-weight: 700;
}

/* 모달 오버레이 및 팝업 (기본: 완전 숨김, active일 때만 표시) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  display: none !important;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex !important;
}

.modal-card {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: all 0.15s;
}

.modal-close-btn:hover {
  color: #0f172a;
  background-color: #f1f5f9;
}

.modal-body {
  padding: 24px;
  max-height: 75vh;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .stat-cards-grid {
    grid-template-columns: 1fr;
  }
  .preview-layout {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .admin-tab-content {
    padding: 16px;
  }
}
