/* ============================================
   HUB ADMIN — Common styles
   통합관리자페이지: 다중 워드프레스 사이트 연동 관리
   ============================================ */

/*@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css");*/

:root {
  /* Color */
  --c-primary: #0f9c8d;
  --c-primary-dark: #0a7a6f;
  --c-primary-light: #e3f5f2;
  --c-navy: #1f2937;
  --c-text: #23303d;
  --c-text-muted: #7c8a97;
  --c-text-faint: #a9b3bc;
  --c-border: #e4e9ec;
  --c-border-strong: #d3dade;
  --c-bg: #f4f7f7;
  --c-surface: #ffffff;
  --c-danger: #e2574c;
  --c-warning: #e8a13d;
  --c-success: #0f9c8d;
  --c-info: #4c8dee;

  /* Chart palette (kept distinct from UI accents) */
  --chart-1: #0f9c8d;
  --chart-2: #4c8dee;
  --chart-3: #e8a13d;
  --chart-4: #c96b9e;
  --chart-5: #7c8a97;

  /* Type */
  --font-sans: "Pretendard", -apple-system, BlinkMacSystemFont, "Malgun Gothic",
    "Apple SD Gothic Neo", sans-serif;

  /* Radius / shadow */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --shadow-card: 0 1px 2px rgba(23, 43, 45, 0.04), 0 2px 8px rgba(23, 43, 45, 0.05);

  /* Layout */
  --gnb-height: 60px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  color: var(--c-text);
  background: var(--c-bg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
}
/* ---------- Top GNB ---------- */
.gnb {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--gnb-height);
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
}

.gnb__inner {
    height: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    gap: 36px;
}

.gnb__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.gnb__mark {
    width: 48px;
    height: 32px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--c-primary) 0%, #58c2b3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: -0.02em;
}

.gnb__title {
    font-weight: 700;
    font-size: 15px;
    color: var(--c-navy);
    white-space: nowrap;
}

.gnb__title small {
    display: block;
    font-weight: 500;
    font-size: 11px;
    color: var(--c-text-muted);
    margin-top: 1px;
}

/* ---------- GNB Navigation ---------- */
.gnb__nav {
    display: flex;
    align-items: stretch;
    gap: 4px;
    flex: 1;
    height: 100%;
    overflow: visible;
}

/* 1depth를 감싸는 영역 */
.gnb__item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: stretch;
}

/* 1depth */
.gnb__link {
    position: relative;
    padding: 0 14px;
    height: var(--gnb-height);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 500;
    color: var(--c-text-muted);
    white-space: nowrap;
    transition: color 0.15s ease, background-color 0.15s ease;
}

/* 일반 1depth hover */
.gnb__link:hover {
    color: var(--c-navy);
}

/* 현재 활성 메뉴 */
.gnb__link.is-active {
    color: var(--c-navy);
    font-weight: 700;
}

.gnb__link.is-active svg{
    color: var(--c-navy);
    font-weight: 700;
}

.gnb__link.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--c-navy);
}

/* dropdown용 button */
.gnb__link--dropdown {
    border: 0;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
}

.gnb__arrow {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    color: var(--c-text-faint);
    transition:
            transform 0.15s ease,
            color 0.15s ease;
}

.gnb__item:hover .gnb__arrow {
    color: var(--c-navy);
    transform: rotate(180deg);
    font-weight: 700;
}

/* ---------- 2depth Dropdown ---------- */
.gnb__dropdown {
    position: absolute;
    top: calc(100% - 1px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);

    min-width: 180px;
    padding: 8px;

    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: 0 8px 24px rgba(23, 43, 45, 0.10);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
            opacity 0.15s ease,
            transform 0.15s ease,
            visibility 0.15s ease;
}

/* hover 시 2depth 표시 */
.gnb__item:hover .gnb__dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* 2depth 목록 */
.gnb__depth2 {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
}

/* 2depth item */
.gnb__depth2-item {
    margin: 0;
    padding: 0;
}

/* 2depth link */
.gnb__depth2-link {
    display: flex;
    align-items: center;

    min-height: 38px;
    padding: 0 14px;

    border-radius: var(--radius-sm);

    color: var(--c-text-muted);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;

    transition:
            color 0.15s ease,
            background-color 0.15s ease;
}

.gnb__depth2-link:hover {
    color: var(--c-navy);
    background: var(--c-bg);
    font-weight: 600;
}

/* ---------- User ---------- */
.gnb__user {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    font-size: 13px;
    color: var(--c-text-muted);
}

.gnb__user strong {
    color: var(--c-text);
}

.gnb__logout {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--c-text-muted);
    font-size: 13px;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
}

.gnb__logout:hover {
    background: var(--c-bg);
    color: var(--c-text);
}

.gnb__user-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--c-text-muted);
    font-size: 13px;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    cursor: pointer;
    line-height: 1;
}

.gnb__user-btn:hover {
    background: var(--c-bg);
    color: var(--c-text);
}

/* ---------- Page shell ---------- */
.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 28px 70px;
}

.page__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
}

.page__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--c-navy);
  margin: 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--c-text-faint);
}

.breadcrumb .is-current {
  color: var(--c-text-muted);
  font-weight: 600;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--c-border-strong);
  background: var(--c-surface);
  color: var(--c-text);
  transition: all 0.15s ease;
  line-height: 1;
}

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

.btn--primary {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
  border-color: transparent;
  color: #fff;
}

.btn--primary:hover {
  filter: brightness(1.06);
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
}

.btn--ghost {
  background: transparent;
  border-color: var(--c-border);
  color: var(--c-text-muted);
}

.btn--danger {
  color: var(--c-danger);
  border-color: var(--c-border);
}

.btn--danger:hover {
  background: #fdecea;
  border-color: #f6c7c2;
}

.btn--sm {
  height: 30px;
  padding: 0 12px;
  font-size: 12.5px;
}

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

.btn .spinner {
  display: none;
}

.btn.is-loading .spinner {
  display: inline-block;
}

.btn.is-loading .btn__label {
  opacity: 0.7;
}

.spinner {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Card ---------- */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--c-border);
}

.card__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-navy);
  margin: 0;
}

.card__body {
  padding: 20px;
}

/* ---------- Form controls ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field__label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--c-text-muted);
}

.field__label .req {
  color: var(--c-danger);
  margin-left: 2px;
}

.input,
.select {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-family: inherit;
  color: var(--c-text);
  background: var(--c-surface);
  width: 100%;
  transition: border-color 0.15s ease;
}

.input:focus,
.select:focus {
  border-color: var(--c-primary);
  outline: none;
}

.input::placeholder {
  color: var(--c-text-faint);
}

.checkbox,
.radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--c-text);
  cursor: pointer;
  user-select: none;
}

.checkbox input,
.radio input {
  accent-color: var(--c-primary);
  width: 16px;
  height: 16px;
}

/* ---------- Table ---------- */
.table-wrap {
  overflow-x: auto;
}

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

table.grid thead th {
  background: #f7f9f9;
  color: var(--c-text-muted);
  font-weight: 600;
  text-align: center;
  padding: 12px 10px;
  border-top: 1px solid var(--c-border-strong);
  border-bottom: 1px solid var(--c-border-strong);
  white-space: nowrap;
}

table.grid tbody td {
  padding: 12px 10px;
  text-align: center;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text);
}

table.grid tbody tr:hover {
  background: #fafcfc;
}

table.grid a.link {
  color: var(--c-info);
  font-weight: 600;
}

table.grid a.link:hover {
  text-decoration: underline;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}

.badge--on {
  background: var(--c-primary-light);
  color: var(--c-primary-dark);
}

.badge--off {
  background: #f1f2f3;
  color: var(--c-text-muted);
}

.badge--warn {
  background: #fdf3e5;
  color: #b5761f;
}

.badge--danger {
  background: #fdecea;
  color: #c0392b;
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 22px;
}

.pagination button {
  min-width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--c-text-muted);
  font-size: 13px;
}

.pagination button:hover {
  background: var(--c-bg);
}

.pagination button.is-active {
  background: var(--c-navy);
  color: #fff;
  font-weight: 700;
}

.pagination button[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 12px);
  background: var(--c-navy);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 999;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Utility ---------- */
.u-flex {
  display: flex;
  align-items: center;
}

.u-gap-8 {
  gap: 8px;
}

.u-gap-12 {
  gap: 12px;
}

.u-muted {
  color: var(--c-text-muted);
}

@media (max-width: 960px) {
  .gnb__nav {
    display: none;
  }
  .page {
    padding: 20px 16px 48px;
  }
}

/* Hub Footer - Light & Compact Style */
.hub-footer {
    display: block;
    width: 100%;
    position: fixed;
    bottom: 0;
    margin-top: 20px;

    padding: 4px 0;
    border-top: 1px solid var(--border-color, #f1f5f9);
    background: #ffffff;
    font-size: 0.775rem;
    color: var(--txt-muted, #94a3b8);
}
.hub-footer__inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

.hub-footer__meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hub-footer__brand {
    font-weight: 600;
    color: var(--txt-muted, #64748b);
    letter-spacing: -0.2px;
}

.hub-footer__divider {
    color: #cbd5e1;
}

.hub-footer__copy {
    color: #94a3b8;
}

/* 초록색 작은 점 하나만 깔끔하게 */
.hub-footer__status {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #64748b;
    font-size: 0.75rem;
    padding-right: 8px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #10b981;
}

@media (max-width: 615px) {
    .hub-footer {
        display: none;
    }
}