/* ── ADMIN LAYOUT ── */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.admin-wrap {
  display: flex;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
}

/* ── ADMIN SIDEBAR ── */
.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: #0D0D0D;
  border-right: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 50;
  transition: transform 0.3s;
}

.admin-sidebar-header {
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.admin-logo {
  font-size: 16px;
  font-weight: 900;
  color: #F5F5F5;
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-logo span { color: var(--lime); }
.admin-badge {
  font-size: 9px;
  font-weight: 800;
  background: var(--lime);
  color: #0D0D0D;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.admin-nav {
  flex: 1;
  padding: 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}
/* 섹션 헤더 라벨 (nav 직속) */
.admin-nav > .admin-nav-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.38);
  text-transform: uppercase;
  padding: 10px 8px 5px;
}
/* 메뉴 항목 안 텍스트는 부모(.admin-nav-item) 색을 따름 */
.admin-nav-item .admin-nav-label {
  font-size: 13px;
  font-weight: inherit;
  letter-spacing: normal;
  color: inherit;
  text-transform: none;
  padding: 0;
}
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.78);
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
  text-decoration: none;
}
.admin-nav-item:hover { color: #FFFFFF; background: rgba(255,255,255,0.06); }
.admin-nav-item.active {
  color: var(--lime);
  background: rgba(190,255,0,0.08);
  border-color: rgba(190,255,0,0.18);
  font-weight: 700;
}
.admin-nav-icon { font-size: 15px; flex-shrink: 0; width: 18px; text-align: center; }
.admin-nav-badge {
  margin-left: auto;
  background: #FF4D6A;
  color: white;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 20px;
  flex-shrink: 0;
}
.admin-nav-badge.lime {
  background: var(--lime);
  color: #0D0D0D;
}

.admin-sidebar-bottom {
  padding: 10px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.admin-sidebar-bottom .admin-nav-item { color: rgba(255,100,100,0.7); }
.admin-sidebar-bottom .admin-nav-item:hover { color: #FF6B6B; background: rgba(255,107,107,0.08); }

/* ── ADMIN MAIN ── */
.admin-main {
  flex: 1;
  margin-left: 220px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #0A0A0A;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.admin-topbar {
  height: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(13,13,13,0.8);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 40;
}
.admin-topbar-title { font-size: 15px; font-weight: 700; color: #F5F5F5; min-width: 0; }
.admin-topbar-right { display: flex; align-items: center; gap: 8px; }
.admin-member-dashboard-btn {
  height: 36px;
  padding: 0 13px;
  border-radius: 9px;
  border: 1px solid rgba(79,195,247,.42);
  background: rgba(79,195,247,.11);
  color: #72d2ff;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.admin-member-dashboard-btn:hover { background: rgba(79,195,247,.2); transform: translateY(-1px); }
.admin-icon-btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  color: #F5F5F5;
}
.admin-icon-btn:hover { background: rgba(255,255,255,0.09); }
.admin-notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 6px; height: 6px;
  background: #FF4D6A;
  border-radius: 50%;
}

.admin-hamburger {
  display: none;
  height: 40px;
  padding: 0 14px;
  gap: 7px;
  border-radius: 10px;
  background: rgba(190,255,0,0.12);
  border: 1px solid rgba(190,255,0,0.45);
  align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 20px;
  font-weight: 800;
  color: var(--lime);
  transition: transform .12s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.admin-hamburger .admin-hamburger-label { font-size: 15px; font-weight: 800; }
.admin-hamburger:active { transform: scale(0.94); background: rgba(190,255,0,0.22); }

/* ── ADMIN PAGE ── */
.admin-page { padding: 24px; flex: 1; display: none; min-width: 0; max-width: 100%; }
.admin-page.active { display: block; }

/* ── ADMIN SUMMARY CARDS ── */
.admin-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
  min-width: 0;
}
.admin-card {
  background: #141414;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 22px;
  position: relative;
  overflow: hidden;
  min-width: 0;
  transition: transform 0.22s cubic-bezier(.22,.61,.36,1), border-color 0.22s, box-shadow 0.22s;
}
.admin-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 80% -10%, var(--card-glow, rgba(190,255,0,0.10)), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.admin-card:hover {
  border-color: rgba(255,255,255,0.14);
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(0,0,0,0.4);
}
.admin-card:hover::after { opacity: 1; }
.admin-card:hover .admin-card-icon { opacity: 0.32; transform: scale(1.08) rotate(-4deg); }
.admin-card-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
}
.admin-card-icon { font-size: 30px; opacity: 0.16; position: absolute; top: 16px; right: 16px; transition: opacity 0.25s, transform 0.25s; }
.admin-card-label { font-size: 12.5px; color: rgba(255,255,255,0.48); font-weight: 600; margin-bottom: 7px; overflow-wrap: anywhere; }
.admin-card-value {
  font-size: clamp(23px, 2.9vw, 31px);
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 7px;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: keep-all;
}
.admin-card-change { font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.admin-card-change.up { color: var(--lime); }
.admin-card-change.down { color: #FF4D6A; }
.admin-card-change.neutral { color: rgba(255,255,255,0.3); }

/* ── ADMIN TABLE ── */
.admin-table-card {
  background: #141414;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
  min-width: 0;
  max-width: 100%;
}
.admin-table-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-table-title { font-size: 14px; font-weight: 700; color: #F5F5F5; overflow-wrap: anywhere; }
.admin-table-actions { display: flex; gap: 8px; align-items: center; }

.admin-search {
  background: #1A1A1A;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 9px;
  padding: 7px 13px;
  font-size: 12px;
  color: #F5F5F5;
  font-family: var(--font);
  outline: none;
  width: 180px;
  transition: border-color 0.2s;
}
.admin-search:focus { border-color: rgba(190,255,0,0.3); }
.admin-search::placeholder { color: rgba(255,255,255,0.2); }

.admin-filter-btn {
  padding: 7px 13px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #1A1A1A;
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.15s;
}
.admin-filter-btn:hover { color: #F5F5F5; border-color: rgba(255,255,255,0.15); }
.admin-filter-btn.active { color: var(--lime); border-color: rgba(190,255,0,0.3); background: rgba(190,255,0,0.06); }
.comm-category-filters { display:flex; flex-wrap:wrap; gap:8px; padding:0 2px 16px; }
.comm-more-wrap { display:flex; justify-content:center; padding:16px 2px 2px; }
.comm-more { display:none; }

.admin-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}
.admin-table thead tr { background: rgba(255,255,255,0.02); }
.admin-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  white-space: nowrap;
}
.admin-table td {
  padding: 13px 16px;
  font-size: 13px;
  color: #F5F5F5;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ── STATUS PILLS ── */
.status-active { background: rgba(190,255,0,0.1); color: var(--lime); border: 1px solid rgba(190,255,0,0.2); padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.status-pending { background: rgba(255,214,10,0.1); color: #FFD60A; border: 1px solid rgba(255,214,10,0.25); padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.status-rejected { background: rgba(255,77,106,0.1); color: #FF4D6A; border: 1px solid rgba(255,77,106,0.25); padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.status-done { background: rgba(79,195,247,0.1); color: #4FC3F7; border: 1px solid rgba(79,195,247,0.25); padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; }

/* ── ACTION BUTTONS ── */
.admin-action-btn {
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.15s;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent;
  color: rgba(255,255,255,0.5);
}
.admin-action-btn:hover { color: #F5F5F5; border-color: rgba(255,255,255,0.2); }
[data-theme="light"] .admin-action-btn {
  border-color: rgba(0,0,0,0.18);
  color: rgba(0,0,0,0.6);
}
[data-theme="light"] .admin-action-btn:hover {
  border-color: rgba(0,0,0,0.3);
  color: #0A0A0A;
  background: rgba(0,0,0,0.04);
}
.admin-action-btn.approve { border-color: rgba(190,255,0,0.3); color: var(--lime); }
.admin-action-btn.approve:hover { background: rgba(190,255,0,0.08); }
.admin-action-btn.reject { border-color: rgba(255,77,106,0.3); color: #FF4D6A; }
.admin-action-btn.reject:hover { background: rgba(255,77,106,0.08); }
.admin-action-btn.pay { border-color: rgba(79,195,247,0.3); color: #4FC3F7; }
.admin-action-btn.pay:hover { background: rgba(79,195,247,0.08); }
.admin-action-btn.dashboard { border-color: rgba(79,195,247,.42); color:#4FC3F7; font-weight:800; }
.admin-action-btn.dashboard:hover { background:rgba(79,195,247,.12); }
.partner-dashboard-entry { display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px;padding:14px 16px;border:1px solid rgba(79,195,247,.28);border-radius:12px;background:linear-gradient(135deg,rgba(79,195,247,.10),rgba(79,195,247,.03)); }
.partner-dashboard-entry div { display:flex;flex-direction:column;gap:4px; }
.partner-dashboard-entry b { color:#4FC3F7;font-size:14px; }
.partner-dashboard-entry span { color:var(--text2);font-size:12px;line-height:1.5; }
@media (max-width:640px) { .partner-dashboard-entry { align-items:stretch;flex-direction:column; } .partner-dashboard-entry button { width:100%; } }

/* ── ADMIN SECTION TITLE ── */
.admin-section-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.4);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 20px 0 10px;
}

/* ── MODAL ── */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.admin-modal-overlay.show { display: flex; }
.admin-modal {
  background: #141414;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  width: 100%;
  max-width: 460px;
  max-height: 85vh;
  overflow-y: auto;
  min-width: 0;
}
.admin-modal-campaign { max-width: 620px; }
.admin-modal-wide { max-width: 920px; }
.admin-modal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #141414;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-modal-title { font-size: 16px; font-weight: 800; color: #F5F5F5; }
.admin-modal-close {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.admin-modal-body { padding: 20px 24px; }
.admin-modal-footer {
  position: sticky;
  bottom: 0;
  background: #141414;
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  gap: 8px;
}

.partner-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.partner-detail-section {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 14px;
  background: rgba(255,255,255,0.025);
}
.partner-detail-section h4 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  color: var(--lime);
}
.partner-detail-field {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 13px;
}
.partner-detail-field:first-of-type { border-top: none; }
.partner-detail-field span,
.partner-detail-metric span {
  color: var(--text3);
  font-weight: 700;
}
.partner-detail-field b {
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}
.partner-detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.partner-detail-metric {
  min-height: 70px;
  padding: 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--lime) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--lime) 14%, transparent);
}
.partner-detail-metric b {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
  overflow-wrap: anywhere;
}
.partner-detail-recent { margin-top: 14px; }
.settle-hold-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.settle-hold-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255,77,106,0.1);
  border: 1px solid rgba(255,77,106,0.24);
  color: #FF4D6A;
  font-size: 11px;
  font-weight: 800;
}
.audit-detail-code {
  display: block;
  max-width: 520px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text2);
  font-size: 12px;
  line-height: 1.5;
}

/* 모달 모바일 */
@media (max-width: 768px) {
  .admin-modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .admin-modal {
    border-radius: 20px 20px 0 0;
    max-height: 94vh;
    max-width: 100%;
    width: 100%;
  }
  .admin-modal-header { padding: 16px 18px 14px; }
  .admin-modal-body { padding: 16px 18px; }
  .admin-modal-footer { padding: 14px 18px; }
  .partner-detail-grid { grid-template-columns: 1fr; }
  .partner-detail-metrics { grid-template-columns: 1fr; }
}

/* ── SETTLE INPUT ── */
.admin-input {
  width: 100%;
  background: #1A1A1A;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  color: #F5F5F5;
  font-family: var(--font);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.admin-input:focus { border-color: rgba(190,255,0,0.35); }
.admin-input::placeholder { color: rgba(255,255,255,0.2); }
.admin-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* ── NOTICE CENTER ── */
.notice-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}
.notice-form {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.notice-textarea {
  resize: vertical;
  min-height: 160px;
  line-height: 1.6;
}
.notice-target-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: 12px;
}
.notice-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 2px;
}
.notice-target-count {
  color: var(--text2);
  font-size: 13px;
  font-weight: 800;
}
.notice-recent-list {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.notice-recent-item {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 13px 14px;
  background: rgba(255,255,255,0.025);
}
.notice-recent-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.notice-recent-head b {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  overflow-wrap: anywhere;
}
.notice-recent-head span {
  color: var(--text3);
  font-size: 11px;
  white-space: nowrap;
}
.notice-recent-body {
  color: var(--text2);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 96px;
  overflow: hidden;
}
.notice-recent-meta {
  margin-top: 10px;
  color: var(--lime);
  font-size: 12px;
  font-weight: 800;
}

/* ── OVERLAY ── */
.admin-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 49;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .admin-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notice-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-sidebar-overlay.show { display: block; }
  .admin-main { margin-left: 0; }
  .admin-hamburger { display: flex; }
  .admin-page { padding: 14px; }
  .admin-summary { grid-template-columns: 1fr !important; gap: 10px; }
  .admin-card { padding: 16px; }
  .admin-card-value { font-size: clamp(23px, 7vw, 28px); }
  .admin-table-header { align-items: stretch; }
  .admin-table-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .admin-search {
    width: 100%;
    min-height: 42px;
  }
  .admin-filter-btn,
  .admin-action-btn,
  .comm-save {
    min-height: 40px;
  }
  .notice-target-grid { grid-template-columns: 1fr; }
  .notice-form-footer { align-items: stretch; flex-direction: column; }
  .notice-form-footer .comm-save { width: 100%; }
}
@media (max-width: 480px) {
  .admin-summary { grid-template-columns: 1fr !important; }
  .admin-topbar { padding: 0 14px; }
  .admin-topbar-title {
    max-width: 48vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .admin-topbar-right { gap: 6px; }
  .admin-member-dashboard-btn { width: 40px; padding: 0; justify-content: center; }
  .admin-member-dashboard-btn b { display: none; }
  .admin-icon-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }
  .admin-hamburger { height: 40px; padding: 0 12px; }
  .admin-page { padding: 12px; }
  .admin-table-header { padding: 14px 16px; }
  .admin-table th,
  .admin-table td {
    padding-left: 14px;
    padding-right: 14px;
  }
  .admin-modal {
    border-radius: 16px 16px 0 0;
    max-height: 96vh;
  }
  .admin-modal-footer { flex-direction: column; }
}

/* ── 라이트 모드 ── */
[data-theme="light"] .admin-main { background: #F4F4F0; }
[data-theme="light"] .admin-sidebar { background: #FFFFFF; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .admin-sidebar-header { border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .admin-logo { color: #0A0A0A; }
[data-theme="light"] .admin-nav > .admin-nav-label { color: rgba(0,0,0,0.4); }
[data-theme="light"] .admin-nav-item { color: rgba(0,0,0,0.72); }
[data-theme="light"] .admin-nav-item:hover { color: #0A0A0A; }
[data-theme="light"] .admin-nav-item { color: rgba(0,0,0,0.5); }
[data-theme="light"] .admin-nav-item:hover { background: rgba(0,0,0,0.05); color: #0A0A0A; }
[data-theme="light"] .admin-nav-item.active { background: rgba(190,255,0,0.1); color: var(--lime-dim); border-color: rgba(190,255,0,0.3); }
[data-theme="light"] .admin-topbar { background: rgba(244,244,240,0.85); border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .admin-topbar-title { color: #0A0A0A; }
[data-theme="light"] .admin-icon-btn { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.1); color: #0A0A0A; }
[data-theme="light"] .admin-card { background: #FFFFFF; border-color: rgba(0,0,0,0.08); box-shadow: 0 2px 12px rgba(0,0,0,0.05); }
[data-theme="light"] .admin-card-label { color: rgba(0,0,0,0.4); }
[data-theme="light"] .admin-table-card { background: #FFFFFF; border-color: rgba(0,0,0,0.08); box-shadow: 0 2px 12px rgba(0,0,0,0.05); }
[data-theme="light"] .admin-table-header { border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .admin-table-title { color: #0A0A0A; }
[data-theme="light"] .admin-table th { color: rgba(0,0,0,0.3); border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .admin-table td { color: #0A0A0A; border-color: rgba(0,0,0,0.04); }
[data-theme="light"] .admin-table tr:hover td { background: rgba(0,0,0,0.02); }
[data-theme="light"] .admin-search { background: #F4F4F0; border-color: rgba(0,0,0,0.1); color: #0A0A0A; }
[data-theme="light"] .admin-filter-btn { background: #F4F4F0; border-color: rgba(0,0,0,0.1); color: rgba(0,0,0,0.5); }
[data-theme="light"] .admin-filter-btn:hover { color: #0A0A0A; }
[data-theme="light"] .admin-filter-btn.active { background: rgba(190,255,0,0.1); border-color: rgba(190,255,0,0.3); color: var(--lime-dim); }
[data-theme="light"] .admin-page { background: #F4F4F0; }
[data-theme="light"] .admin-sidebar-bottom { border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .admin-modal { background: #FFFFFF; border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .admin-input { background: #F4F4F0; border-color: rgba(0,0,0,0.1); color: #0A0A0A; }
[data-theme="light"] .admin-input::placeholder { color: rgba(0,0,0,0.4); }
[data-theme="light"] .admin-modal-title { color: #0A0A0A; }
[data-theme="light"] .admin-modal-header { background: #FFFFFF; }
[data-theme="light"] .admin-modal-footer { background: #FFFFFF; }
[data-theme="light"] .admin-label { color: rgba(0,0,0,0.55); }
[data-theme="light"] .admin-modal-close { background: rgba(0,0,0,0.06); color: rgba(0,0,0,0.55); }
[data-theme="light"] .notice-recent-item { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .partner-detail-section { background: rgba(0,0,0,0.015); border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .partner-detail-field { border-color: rgba(0,0,0,0.05); }
[data-theme="light"] .partner-detail-metric { background: color-mix(in srgb, var(--lime-dim) 8%, transparent); border-color: color-mix(in srgb, var(--lime-dim) 18%, transparent); }

/* 라이트 모드 모바일 */
@media (max-width: 768px) {
  [data-theme="light"] .admin-sidebar { background: #FFFFFF; }
}

[data-theme="light"] .admin-modal-header { background: #FFFFFF; }
[data-theme="light"] .admin-modal-footer { background: #FFFFFF; }

/* ── 상품 마진 설정 행 ── */
.comm-row { display:flex; align-items:center; gap:14px; background:var(--dark3,#141414); border:1px solid var(--border,rgba(255,255,255,0.08)); border-radius:14px; padding:12px 14px; flex-wrap:wrap; min-width:0; }
.comm-thumb { width:52px; height:52px; border-radius:10px; background-size:cover; background-position:center; background-color:rgba(255,255,255,0.05); display:flex; align-items:center; justify-content:center; font-size:24px; flex-shrink:0; }
.comm-info { flex:1; min-width:140px; }
.comm-name { font-size:14px; font-weight:700; }
.comm-price { font-size:12px; color:var(--text2,rgba(255,255,255,0.5)); margin-top:3px; }
.comm-ctrl { display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.comm-range { width:150px; accent-color:var(--lime); cursor:pointer; }
.comm-rate-box { font-size:13px; color:var(--text2,rgba(255,255,255,0.5)); min-width:44px; display:flex; align-items:center; gap:3px; }
.comm-rate-val { font-size:18px; font-weight:900; color:var(--lime); }
.comm-rate-input {
  width:52px; background:var(--dark4,#222); border:1px solid var(--border,rgba(255,255,255,0.12));
  border-radius:8px; padding:6px 8px; font-size:16px; font-weight:900; color:var(--lime);
  font-family:var(--font); text-align:right; outline:none; transition:border-color 0.15s;
  -moz-appearance:textfield;
}
.comm-rate-input:focus { border-color:rgba(190,255,0,0.5); }
.comm-rate-input::-webkit-outer-spin-button,
.comm-rate-input::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
.comm-earn { font-size:12px; color:var(--text2,rgba(255,255,255,0.5)); min-width:100px; }
.comm-earn-val { color:var(--lime); font-weight:700; }
.comm-save { background:transparent; border:1px solid rgba(190,255,0,0.3); color:var(--lime); border-radius:9px; padding:8px 18px; font-size:13px; font-weight:700; cursor:pointer; font-family:var(--font); transition:all .15s; }
.comm-save:hover { background:rgba(190,255,0,0.1); }
.comm-save:active { transform:scale(.95); }
.comm-save.dirty { background:var(--lime); color:#0a0a0a; }
/* 가리기(파트너 카탈로그 숨김) */
.comm-hide-btn { background:transparent; border:1px solid rgba(255,255,255,0.18); color:var(--text2); border-radius:9px; padding:8px 14px; font-size:13px; font-weight:700; cursor:pointer; font-family:var(--font); transition:all .15s; white-space:nowrap; }
.comm-hide-btn:hover { border-color:#FF4D6A; color:#FF4D6A; }
.comm-hide-btn:active { transform:scale(.95); }
.comm-hide-btn.on { background:rgba(255,77,106,0.12); border-color:rgba(255,77,106,0.5); color:#FF4D6A; }
.comm-row.comm-hidden { opacity:.55; }
.comm-row.comm-hidden .comm-thumb { filter:grayscale(1); }
.comm-hidden-badge { display:inline-block; background:rgba(255,77,106,0.15); color:#FF4D6A; font-size:11px; font-weight:700; padding:2px 7px; border-radius:6px; margin-left:6px; vertical-align:middle; }
@media (max-width:640px){ .comm-ctrl{ width:100%; justify-content:space-between; } .comm-range{ width:min(160px,45vw); } .comm-save{ flex:1; } .comm-hide-btn{ flex:1; } }
[data-theme="light"] .comm-hide-btn { border-color:rgba(0,0,0,0.15); color:#666; }

/* 라이트 모드: 라임 텍스트 가독성(흰 배경) → 어두운 라임 */
[data-theme="light"] .comm-rate-val,
[data-theme="light"] .comm-rate-input,
[data-theme="light"] .comm-earn-val,
[data-theme="light"] .comm-save { color:#5a8a00; }
[data-theme="light"] .comm-range { accent-color:#5a8a00; }
[data-theme="light"] .comm-save { border-color:rgba(90,138,0,0.35); }
[data-theme="light"] .comm-save.dirty { background:#5a8a00; color:#fff; }
[data-theme="light"] .comm-rate-input { border-color:rgba(90,138,0,0.3); }

/* ══════════ 사이드바 관리자 프로필 ══════════ */
.admin-sidebar-profile {
  margin: 12px 12px 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(190,255,0,0.10), rgba(190,255,0,0.02));
  border: 1px solid rgba(190,255,0,0.16);
  display: flex;
  align-items: center;
  gap: 11px;
}
.admin-profile-avatar {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--lime);
  color: #0A0A0A;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 900;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(190,255,0,0.3);
}
.admin-profile-info { min-width: 0; }
.admin-profile-name { font-size: 14px; font-weight: 800; color: #F5F5F5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-profile-role { font-size: 11px; color: var(--lime); font-weight: 600; margin-top: 1px; }
[data-theme="light"] .admin-profile-name { color: #0A0A0A; }
[data-theme="light"] .admin-profile-role { color: var(--lime-dim); }

/* ══════════ 오버뷰 2열 레이아웃 ══════════ */
.adm-grid-2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; margin-bottom: 16px; min-width: 0; }
@media (max-width: 1000px){ .adm-grid-2 { grid-template-columns: 1fr; } }

/* 패널(카드) 공통 */
.adm-panel {
  background: #141414;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  overflow: hidden;
  min-width: 0;
}
.adm-panel-head {
  padding: 16px 20px 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.adm-panel-title { font-size: 14px; font-weight: 800; color: #F5F5F5; display: flex; align-items: center; gap: 7px; }
.adm-panel-sub { font-size: 12px; color: var(--text2); font-weight: 500; }
[data-theme="light"] .adm-panel { background: #FFFFFF; border-color: rgba(0,0,0,0.08); box-shadow: 0 2px 12px rgba(0,0,0,0.05); }
[data-theme="light"] .adm-panel-title { color: #0A0A0A; }

/* 수익 추이 차트 */
.adm-chart-card { padding-bottom: 14px; }
.adm-chart-legend { display: flex; gap: 16px; padding: 0 20px 10px; }
.adm-chart-legend .lg { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text2); font-weight: 600; }
.adm-chart-legend .lg i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.adm-chart-wrap { padding: 0 12px; }
.adm-chart-wrap svg { width: 100%; height: auto; display: block; }
.ac-area { fill: url(#acGrad); opacity: 0.9; }
.ac-line { fill: none; stroke: var(--lime); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* 리스트 (인기상품 / 최근활동) */
.adm-list { padding: 4px 10px 12px; display: flex; flex-direction: column; }
.adm-list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px;
  border-radius: 11px;
  transition: background 0.15s;
}
.adm-list-item:hover { background: rgba(255,255,255,0.04); }
[data-theme="light"] .adm-list-item:hover { background: rgba(0,0,0,0.03); }
.adm-rank {
  width: 26px; height: 26px; flex-shrink: 0;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 900;
  background: rgba(255,255,255,0.06); color: var(--text2);
}
.adm-rank.top { background: var(--lime); color: #0A0A0A; }
.adm-list-thumb {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 10px;
  background-size: cover; background-position: center;
  background-color: rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.adm-list-main { flex: 1; min-width: 0; }
.adm-list-name { font-size: 13.5px; font-weight: 700; color: #F5F5F5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-list-meta { font-size: 12px; color: var(--text2); margin-top: 2px; }
.adm-list-val { font-size: 13.5px; font-weight: 800; color: var(--lime); flex-shrink: 0; text-align: right; }
.adm-list-val small { display: block; font-size: 11px; color: var(--text3); font-weight: 600; }
[data-theme="light"] .adm-list-name { color: #0A0A0A; }
[data-theme="light"] .adm-list-val { color: var(--lime-dim); }

/* 최근활동 피드 아이콘 */
.adm-feed-ico {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.adm-feed-ico.click { background: rgba(255,107,53,0.12); }
.adm-feed-ico.conv { background: rgba(190,255,0,0.12); }
.adm-feed-ico.join { background: rgba(79,195,247,0.12); }
.adm-feed-ico.settle { background: rgba(179,136,255,0.12); }

/* 빈 상태 공통 */
.adm-empty { padding: 44px 20px; text-align: center; color: var(--text3); font-size: 13px; }
.adm-empty .ico { font-size: 34px; margin-bottom: 10px; opacity: 0.6; }
.adm-empty b { display: block; color: var(--text2); font-weight: 700; margin-bottom: 5px; font-size: 14px; }

/* 상태 pill (admin.js에서 사용) */
.status-pill { padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.status-pill.active { background: rgba(190,255,0,0.1); color: var(--lime); border: 1px solid rgba(190,255,0,0.22); }
.status-pill.paused { background: rgba(255,77,106,0.1); color: #FF4D6A; border: 1px solid rgba(255,77,106,0.25); }
.status-pill.pending { background: rgba(255,214,10,0.1); color: #FFD60A; border: 1px solid rgba(255,214,10,0.25); }
.status-pill.confirmed { background: rgba(79,195,247,0.1); color: #4FC3F7; border: 1px solid rgba(79,195,247,0.25); }
[data-theme="light"] .status-pill.active { color: var(--lime-dim); }

/* ══════════ 시즌 캠페인 ══════════ */
.campaign-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 14px; min-width: 0; }
.campaign-card {
  background: #141414;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 18px;
  position: relative;
  overflow: hidden;
  min-width: 0;
  transition: transform 0.22s cubic-bezier(.22,.61,.36,1), border-color 0.22s, box-shadow 0.22s;
}
.campaign-card:hover { transform: translateY(-4px); border-color: rgba(190,255,0,0.25); box-shadow: 0 14px 36px rgba(0,0,0,0.4); }
.campaign-card.inactive { opacity: 0.5; }
.campaign-card.has-orphan { border-color: rgba(255,176,32,0.45); }
[data-theme="light"] .campaign-card { background: #FFFFFF; border-color: rgba(0,0,0,0.08); box-shadow: 0 2px 12px rgba(0,0,0,0.05); }
/* 삭제된 상품 경고 (캠페인 카드 + 편집 모달) */
.camp-orphan-warn, .campaign-orphan-warn {
  margin-top: 10px; padding: 9px 11px; border-radius: 8px; font-size: 12px; font-weight: 700; line-height: 1.5;
  background: rgba(255,176,32,0.12); border: 1px solid rgba(255,176,32,0.4); color: #FFB020;
}
.campaign-orphan-warn { margin: 4px 0 10px; }
.camp-orphan-warn b, .campaign-orphan-warn b { color: #FF8A3D; }
[data-theme="light"] .camp-orphan-warn, [data-theme="light"] .campaign-orphan-warn {
  background: rgba(214,120,0,0.1); border-color: rgba(214,120,0,0.35); color: #B45309;
}
[data-theme="light"] .camp-orphan-warn b, [data-theme="light"] .campaign-orphan-warn b { color: #C2410C; }
.camp-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.camp-emoji { font-size: 34px; line-height: 1; }
.camp-bonus-badge {
  background: var(--lime); color: #0A0A0A;
  font-size: 14px; font-weight: 900;
  padding: 4px 12px; border-radius: 20px;
  box-shadow: 0 4px 14px rgba(190,255,0,0.3);
}
.camp-title { font-size: 16px; font-weight: 800; color: #F5F5F5; margin-bottom: 5px; }
[data-theme="light"] .camp-title { color: #0A0A0A; }
.camp-desc { font-size: 13px; color: var(--text2); line-height: 1.5; margin-bottom: 12px; min-height: 38px; }
.camp-meta { font-size: 12px; color: var(--text3); margin-bottom: 14px; line-height: 1.6; }
.camp-target-strong { color: var(--text2); font-weight: 800; }
.camp-product-summary { margin-top: 2px; color: var(--text2); }
.camp-product-summary summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--text2);
}
.camp-product-summary div {
  margin-top: 6px;
  color: var(--text3);
  line-height: 1.55;
}
.camp-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid rgba(255,255,255,0.06); padding-top: 12px; }
[data-theme="light"] .camp-footer { border-color: rgba(0,0,0,0.06); }
.camp-status { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.camp-status.live { background: rgba(190,255,0,0.12); color: var(--lime); }
.camp-status.scheduled { background: rgba(79,195,247,0.12); color: #4FC3F7; }
.camp-status.ended { background: rgba(255,255,255,0.06); color: var(--text3); }
[data-theme="light"] .camp-status.live { color: var(--lime-dim); }
.camp-actions { display: flex; gap: 6px; }
.camp-icon-btn {
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1); background: transparent;
  color: var(--text2); cursor: pointer; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; font-family: var(--font);
}
.camp-icon-btn:hover { color: #F5F5F5; border-color: rgba(255,255,255,0.25); }
.camp-icon-btn.del:hover { color: #FF4D6A; border-color: rgba(255,77,106,0.4); background: rgba(255,77,106,0.08); }
[data-theme="light"] .camp-icon-btn:hover { color: #0A0A0A; }
.campaign-guide-box {
  margin: -2px 0 14px;
  padding: 11px 12px;
  border: 1px solid var(--lime-border);
  border-radius: 12px;
  background: var(--lime-glow);
  color: var(--text2);
  font-size: 12.5px;
  line-height: 1.55;
}
.campaign-guide-box b { color: var(--text); }
.campaign-target-help {
  margin-top: 7px;
  min-height: 17px;
  color: var(--text3);
  font-size: 12px;
  line-height: 1.45;
}
.campaign-product-picker {
  margin: -2px 0 14px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
}
[data-theme="light"] .campaign-product-picker {
  border-color: rgba(0,0,0,0.08);
  background: rgba(0,0,0,0.02);
}
.campaign-picker-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.campaign-selected-count {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 800;
  color: var(--lime);
}
[data-theme="light"] .campaign-selected-count { color: var(--lime-dim); }
.campaign-category-filter {
  max-width: 190px;
  min-width: 150px;
}
.campaign-product-list {
  margin-top: 10px;
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}
.campaign-product-option {
  display: grid;
  grid-template-columns: 18px 44px minmax(0, 1fr) 98px;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  cursor: pointer;
  background: rgba(0,0,0,0.12);
}
.campaign-product-option:hover { border-color: rgba(255,255,255,0.16); }
[data-theme="light"] .campaign-product-option {
  border-color: rgba(0,0,0,0.07);
  background: #FFFFFF;
}
[data-theme="light"] .campaign-product-option:hover { border-color: rgba(0,0,0,0.16); }
.campaign-product-check {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.campaign-product-option input {
  width: 17px;
  height: 17px;
  accent-color: var(--lime);
}
.campaign-product-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  background-color: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
[data-theme="light"] .campaign-product-thumb { background-color: rgba(0,0,0,0.05); }
.campaign-product-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.campaign-product-name {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.campaign-product-name em {
  color: var(--text3);
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
}
.campaign-product-meta {
  color: var(--text3);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.campaign-product-rate {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}
.campaign-product-rate input {
  width: 72px;
  height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  font-family: var(--font);
  outline: none;
}
.campaign-product-rate input:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.campaign-product-rate span {
  color: var(--text3);
  font-size: 12px;
  font-weight: 800;
}
[data-theme="light"] .campaign-product-rate input {
  border-color: rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.03);
}
@media (max-width: 640px) {
  .campaign-product-option {
    grid-template-columns: 18px 44px minmax(0, 1fr);
  }
  .campaign-product-rate {
    grid-column: 3 / 4;
  }
}
.campaign-product-empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--text3);
  font-size: 13px;
}

/* ══════════ 광고 관리 ══════════ */
.ad-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 14px;
  min-width: 0;
}
.ad-admin-card {
  background: #141414;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  overflow: hidden;
  min-width: 0;
  transition: transform 0.22s cubic-bezier(.22,.61,.36,1), border-color 0.22s, box-shadow 0.22s;
}
.ad-admin-card:hover {
  transform: translateY(-4px);
  border-color: var(--lime-border);
  box-shadow: 0 14px 36px rgba(0,0,0,0.4);
}
.ad-admin-card.inactive { opacity: 0.58; }
[data-theme="light"] .ad-admin-card {
  background: #FFFFFF;
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.ad-admin-image {
  height: 150px;
  background-size: cover;
  background-position: center;
  background-color: rgba(255,255,255,0.06);
}
[data-theme="light"] .ad-admin-image { background-color: rgba(0,0,0,0.05); }
.ad-admin-body {
  padding: 15px;
}
.ad-admin-head,
.ad-admin-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ad-admin-order {
  color: var(--text3);
  font-size: 12px;
  font-weight: 800;
}
.ad-admin-title {
  margin-top: 12px;
  color: #F5F5F5;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
[data-theme="light"] .ad-admin-title { color: #0A0A0A; }
.ad-admin-sub {
  min-height: 38px;
  margin-top: 6px;
  color: var(--text2);
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ad-admin-meta {
  margin-top: 11px;
  color: var(--text3);
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.ad-admin-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
[data-theme="light"] .ad-admin-footer { border-color: rgba(0,0,0,0.06); }
.ad-toggle {
  display: inline-flex;
  cursor: pointer;
}
.ad-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.ad-toggle span {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.08);
  position: relative;
  transition: all 0.18s ease;
}
.ad-toggle span::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text3);
  transition: all 0.18s ease;
}
.ad-toggle input:checked + span {
  border-color: var(--lime-border);
  background: var(--lime-glow);
}
.ad-toggle input:checked + span::after {
  left: 21px;
  background: var(--lime);
}
.ad-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.ad-form-full {
  grid-column: 1 / -1;
}
.ad-active-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.ad-active-row input {
  width: 17px;
  height: 17px;
  accent-color: var(--lime);
}
.ad-preview-title {
  margin: 18px 0 8px;
  color: var(--text3);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.ad-preview {
  position: relative;
  min-height: 210px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.09);
  background: #0A0A0A;
}
[data-theme="light"] .ad-preview { border-color: rgba(0,0,0,0.09); }
.ad-preview-bg,
.ad-preview-shade {
  position: absolute;
  inset: 0;
}
.ad-preview-bg {
  background-size: cover;
  background-position: center;
  transition: transform 0.25s ease;
}
.ad-preview:hover .ad-preview-bg { transform: scale(1.05); }
.ad-preview-shade {
  background: linear-gradient(90deg, rgba(0,0,0,0.84) 0%, rgba(0,0,0,0.62) 48%, rgba(0,0,0,0.08) 100%);
}
.ad-preview-content {
  position: relative;
  z-index: 2;
  width: min(440px, calc(100% - 36px));
  padding: 22px;
}
.ad-preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--lime-border);
  background: rgba(0,0,0,0.42);
  color: var(--lime);
  font-size: 12px;
  font-weight: 900;
}
.ad-preview-badge span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  animation: adBlink 1s ease-in-out infinite;
}
.ad-preview-tag {
  display: inline-flex;
  margin-top: 13px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--lime);
  color: #0A0A0A;
  font-size: 11px;
  font-weight: 900;
}
.ad-preview h3 {
  margin: 10px 0 0;
  color: #FFFFFF;
  font-size: 25px;
  line-height: 1.18;
  font-weight: 900;
}
.ad-preview p {
  margin: 8px 0 0;
  color: rgba(255,255,255,0.72);
  font-size: 13px;
  line-height: 1.5;
}
.ad-preview button {
  margin-top: 14px;
  border: none;
  border-radius: 10px;
  background: var(--lime);
  color: #0A0A0A;
  padding: 9px 14px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 900;
}
@keyframes adBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}
@media (max-width: 720px) {
  .ad-form-grid { grid-template-columns: 1fr; }
}

/* ───────── 파트너 실적 리더보드 ───────── */
.lb-head { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; }
.lb-summary { display:flex; gap:24px; flex-wrap:wrap; }
.lb-sum-item { display:flex; flex-direction:column; gap:3px; }
.lb-sum-item span { font-size:12px; color:var(--text3); font-weight:600; }
.lb-sum-item b { font-size:21px; font-weight:900; }
.lb-sum-item b.lime { color:var(--lime); }
.lb-range { display:flex; gap:6px; }
.lb-range-btn { padding:9px 16px; border-radius:9px; border:1px solid var(--border); background:transparent; color:var(--text2); font-size:13px; font-weight:700; cursor:pointer; font-family:var(--font); transition:all .15s; }
.lb-range-btn:hover { border-color:var(--lime-border); }
.lb-range-btn.active { border-color:var(--lime); color:var(--lime); background:var(--lime-glow); }
.lb-table th.num, .lb-table td.num { text-align:right; }
.lb-table .lb-rank { font-size:16px; font-weight:800; width:64px; text-align:center; }
.lb-table .lb-name { font-weight:700; }
.lb-table .lb-earn { color:var(--lime); font-weight:800; }
.lb-table tr.lb-top { background:var(--lime-glow); }
.lb-table tr.lb-top .lb-name { font-weight:900; }
.lb-empty { text-align:center; padding:40px; color:var(--text3); }

/* ── 관리자 CSV 내보내기 버튼 ── */
.admin-csv-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 13px; border-radius: 9px;
  border: 1px solid rgba(190,255,0,0.25); background: rgba(190,255,0,0.08);
  color: var(--lime); font-size: 12px; font-weight: 800;
  cursor: pointer; font-family: var(--font); transition: all 0.15s; white-space: nowrap;
}
.admin-csv-btn:hover { background: var(--lime); color: #0D0D0D; transform: translateY(-1px); }
.admin-csv-btn:active { transform: scale(0.96); }

/* ── 기간별 리포트 막대 차트 ── */
.rp-chart { min-height: 180px; }
.rp-bars { display: flex; align-items: flex-end; gap: 10px; height: 200px; padding-top: 20px; }
.rp-bar-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.rp-bar-val { font-size: 10px; font-weight: 700; color: var(--lime); margin-bottom: 5px; white-space: nowrap; }
.rp-bar-track { width: 100%; max-width: 46px; flex: 1; display: flex; align-items: flex-end; }
.rp-bar-fill { width: 100%; background: linear-gradient(180deg, var(--lime), rgba(190,255,0,0.35)); border-radius: 6px 6px 0 0; min-height: 2px; transition: height 0.5s cubic-bezier(.22,.61,.36,1); }
.rp-bar-label { font-size: 11px; color: var(--text2); font-weight: 600; margin-top: 8px; }
.rp-table th.num, .rp-table td.num { text-align: right; }
.rp-table .lb-earn { color: var(--lime); font-weight: 800; }

/* ── 상품별 성과 테이블 ── */
.pp-table th.num, .pp-table td.num { text-align: right; }
.pp-table .lb-name { font-weight: 700; }
.pp-table .lb-earn { color: var(--lime); font-weight: 800; }

/* ── 전역 설정 폼 ── */
.settings-form { max-width: 720px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,0.07); }
.setting-info { min-width: 0; flex: 1; }
.setting-name { font-size: 14px; font-weight: 700; color: #F5F5F5; margin-bottom: 4px; }
.setting-desc { font-size: 12px; color: var(--text2); line-height: 1.5; }
.setting-input { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.setting-input input { background: #1A1A1A; border: 1px solid rgba(255,255,255,0.1); border-radius: 9px; padding: 10px 13px; font-size: 14px; color: #F5F5F5; font-family: var(--font); outline: none; width: 120px; text-align: right; transition: border-color 0.2s; }
.setting-input input[type="text"] { text-align: left; }
.setting-input input:focus { border-color: rgba(190,255,0,0.4); }
.setting-unit { font-size: 13px; color: var(--text2); font-weight: 600; }
.settings-actions { padding-top: 22px; }

/* ── 파트너 상세: 링크 삭제 버튼 ── */
.pd-link-del { padding: 5px 11px; border-radius: 8px; border: 1px solid rgba(255,77,106,0.3); background: rgba(255,77,106,0.08); color: #FF6B6B; font-size: 12px; font-weight: 700; cursor: pointer; font-family: var(--font); transition: all 0.15s; white-space: nowrap; }
.pd-link-del:hover { background: #FF4D6A; color: #fff; }
.pd-link-del:active { transform: scale(0.95); }
.pd-link-del:disabled { opacity: 0.6; cursor: wait; }

/* ── 파트너 삭제 버튼(정지보다 강조) ── */
.admin-action-btn.danger { border-color: rgba(255,77,106,0.5); color: #FF4D6A; font-weight: 700; }
.admin-action-btn.danger:hover { background: #FF4D6A; color: #fff; border-color: #FF4D6A; }
.admin-action-btn.danger:active { transform: scale(0.95); }
