/* ==============================================================================
   베이스 플랫폼 (Base Platform) - 모던 프리미엄 B2B SaaS 디자인 시스템
   ============================================================================== */

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

/* --------------------------------------------------------------------------
   1. 테마 변수 (Design Tokens)
   -------------------------------------------------------------------------- */
:root,
[data-theme="dark"],
body.theme-dark {
  /* 색상 토큰 (고급 다크 글래스모피즘 테마) */
  --bg-primary: #0b1120;
  --bg-secondary: #131c31;
  --bg-sidebar: rgba(15, 23, 42, 0.88);
  --bg-header: rgba(15, 23, 42, 0.82);
  --bg-card: rgba(30, 41, 59, 0.65);
  --bg-card-hover: rgba(51, 65, 85, 0.65);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.12);
  --border-focus: rgba(59, 130, 246, 0.6);

  /* 브랜드 포인트 색상 (일렉트릭 블루 & 인디고) */
  --accent-primary: #3b82f6;
  --accent-hover: #2563eb;
  --accent-light: rgba(59, 130, 246, 0.15);
  --accent-glow: rgba(59, 130, 246, 0.28);

  /* 상태 색상 */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-info: #0ea5e9;
  --color-purple: #8b5cf6;

  /* 텍스트 색상 */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --text-inverse: #0f172a;

  /* 글래스 효과 & 그림자 */
  --glass-blur: blur(14px);
  --glass-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --dropdown-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.7);
}

[data-theme="light"],
body.theme-light {
  /* 색상 토큰 (모던 클린 라이트 테마) */
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-sidebar: rgba(255, 255, 255, 0.92);
  --bg-header: rgba(255, 255, 255, 0.88);
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: #f8fafc;

  --border-subtle: rgba(0, 0, 0, 0.07);
  --border-card: rgba(0, 0, 0, 0.09);
  --border-focus: rgba(37, 99, 235, 0.5);

  --accent-primary: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: rgba(37, 99, 235, 0.09);
  --accent-glow: rgba(37, 99, 235, 0.18);

  --color-success: #059669;
  --color-warning: #d97706;
  --color-danger: #dc2626;
  --color-info: #0284c7;
  --color-purple: #7c3aed;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;

  --glass-blur: blur(14px);
  --glass-shadow: 0 8px 24px -6px rgba(15, 23, 42, 0.06);
  --dropdown-shadow: 0 16px 36px -8px rgba(15, 23, 42, 0.12);
}

/* --------------------------------------------------------------------------
   2. 글로벌 리셋 & 베이스 레이아웃
   -------------------------------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.06) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.5;
}

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   3. 상단 글로벌 네비게이션 헤더 (.app-header)
   -------------------------------------------------------------------------- */
.app-header {
  height: 64px;
  min-height: 64px;
  background: var(--bg-header);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 100;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.icon-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  border-radius: 8px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.2s ease;
}

.brand-logo:hover {
  opacity: 0.88;
}

.brand-icon {
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 8px var(--accent-glow));
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  margin-left: 0.5rem;
  padding-left: 1rem;
  border-left: 1px solid var(--border-subtle);
}

.bc-item {
  color: var(--text-muted);
}

.bc-item.active {
  color: var(--text-primary);
  font-weight: 600;
}

.bc-sep {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* 알림 센터 드롭다운 */
.notification-wrapper {
  position: relative;
}

.badge-count {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--color-danger);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 9999px;
  line-height: 1.2;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 340px;
  max-height: 440px;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  box-shadow: var(--dropdown-shadow);
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow: hidden;
  animation: dropdownSlide 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownSlide {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.notif-header {
  padding: 0.85rem 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9rem;
  font-weight: 600;
}

.notif-list {
  overflow-y: auto;
  max-height: 380px;
}

.notif-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.notif-item {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background 0.15s ease;
}

.notif-item:hover {
  background: var(--bg-card-hover);
}

.notif-item.unread {
  border-left: 3px solid var(--accent-primary);
  background: var(--accent-light);
}

.notif-item-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.notif-item-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.notif-item-body {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* 인증 / 유저 정보 헤더 */
.auth-section {
  display: flex;
  align-items: center;
}

.guest-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-profile-menu {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.user-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border-subtle);
  object-fit: cover;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   4. 본문 프레임 및 사이드바 (.app-body, .app-sidebar)
   -------------------------------------------------------------------------- */
.app-body {
  display: flex;
  flex: 1;
  height: calc(100vh - 64px);
  overflow: hidden;
  position: relative;
}

.app-sidebar {
  width: 250px;
  min-width: 250px;
  background: var(--bg-sidebar);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 50;
  overflow-x: hidden;
}

.app-sidebar.collapsed {
  width: 68px;
  min-width: 68px;
}

.app-sidebar.collapsed .menu-label,
.app-sidebar.collapsed .menu-text,
.app-sidebar.collapsed .sidebar-footer .status-text {
  display: none !important;
}

.app-sidebar.collapsed .menu-item {
  justify-content: center;
  padding: 0.75rem 0;
}

.app-sidebar.collapsed .sys-status {
  justify-content: center;
}

.sidebar-menu {
  padding: 1.25rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
  overflow-x: hidden;
}

.menu-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.menu-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 0.75rem 0.35rem;
  user-select: none;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 9px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.menu-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  transform: translateX(2px);
}

.menu-item.active {
  background: var(--accent-light);
  color: var(--accent-primary);
  font-weight: 600;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.menu-icon {
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 0.9rem 1.15rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.03);
}

.sys-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-indicator.online {
  background: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
}

/* --------------------------------------------------------------------------
   5. 메인 컨텐츠 영역 (.app-content)
   -------------------------------------------------------------------------- */
.app-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.75rem 2rem;
  background: transparent;
}

.content-tab {
  display: none;
  animation: fadeIn 0.22s ease-in-out;
}

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

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-title-wrap {
  margin-bottom: 1.5rem;
}

.page-title-wrap h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* --------------------------------------------------------------------------
   6. 대시보드 통계 그리드 (.stats-grid, .stat-card)
   -------------------------------------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.15rem;
  box-shadow: var(--glass-shadow);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-focus);
  box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.4);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  flex-shrink: 0;
}

.stat-icon.bg-blue {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.stat-icon.bg-green {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.stat-icon.bg-purple {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

.stat-icon.bg-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stat-value {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   7. 카드 및 고정 공지사항 목록 (.card)
   -------------------------------------------------------------------------- */
.card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  box-shadow: var(--glass-shadow);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.card-header {
  padding: 1.15rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.card-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-body {
  padding: 1.25rem 1.5rem;
}

.pinned-notices-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pinned-notice-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.15rem;
  background: var(--bg-card-hover);
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.2s ease;
}

.pinned-notice-item:hover {
  border-color: var(--accent-primary);
  transform: translateX(3px);
  background: var(--accent-light);
}

.notice-title {
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-date {
  color: var(--text-muted);
  font-size: 0.8rem;
  flex-shrink: 0;
}

.loading-spinner {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   8. 데이터 테이블 및 툴바 (.table-toolbar, .data-table)
   -------------------------------------------------------------------------- */
.table-toolbar {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.02);
}

.filters-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  width: 100%;
}

.filters-row .form-select {
  width: auto;
  min-width: 140px;
}

.filters-row .form-input {
  flex: 1;
  min-width: 200px;
}

.table-toolbar .form-input {
  flex: 1;
  max-width: 380px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: center;
}

.data-table th {
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.07);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.data-table td.text-left {
  text-align: left;
}

.data-table td.font-medium {
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
}

.data-table td.font-medium:hover {
  color: var(--accent-primary);
}

.data-table td.text-center {
  text-align: center;
}

.text-danger {
  color: var(--color-danger) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.p-3 {
  padding: 1rem !important;
}

/* 페이징 UI */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  padding: 1.25rem;
}

.page-btn {
  min-width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.page-btn:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.page-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  font-weight: 700;
  box-shadow: 0 2px 8px var(--accent-glow);
}

/* --------------------------------------------------------------------------
   9. 버튼 및 폼 컴포넌트 (.btn, .form-input, etc.)
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-decoration: none;
  outline: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 10px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 14px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-primary-sm {
  padding: 0.38rem 0.85rem;
  font-size: 0.8rem;
  background: var(--accent-primary);
  color: #ffffff;
  border-radius: 6px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.btn-primary-sm:hover {
  background: var(--accent-hover);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--accent-primary);
  background: var(--accent-light);
  color: var(--accent-primary);
}

.btn-outline-sm {
  padding: 0.38rem 0.85rem;
  font-size: 0.8rem;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}

.btn-outline-sm:hover {
  border-color: var(--accent-primary);
  background: var(--accent-light);
  color: var(--accent-primary);
}

.btn-outline-xs {
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.btn-outline-xs:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.btn-success-sm {
  padding: 0.28rem 0.65rem;
  font-size: 0.75rem;
  background: var(--color-success);
  color: #fff;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-weight: 500;
}

.btn-warning-sm {
  padding: 0.28rem 0.65rem;
  font-size: 0.75rem;
  background: var(--color-warning);
  color: #fff;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-weight: 500;
}

.btn-danger-sm {
  padding: 0.28rem 0.65rem;
  font-size: 0.75rem;
  background: var(--color-danger);
  color: #fff;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-weight: 500;
}

.btn-text {
  background: none;
  border: none;
  color: var(--accent-primary);
  font-size: 0.75rem;
  cursor: pointer;
  font-weight: 600;
}

.btn-group-sm {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  justify-content: center;
}

.form-input, .form-select, .form-textarea {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 0.55rem 0.85rem;
  font-size: 0.875rem;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group {
  margin-bottom: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group.flex-row {
  flex-direction: row;
  align-items: center;
  gap: 1.5rem;
}

.input-with-btn {
  display: flex;
  gap: 0.5rem;
}

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

.full-width {
  width: 100%;
}

.mt-4 {
  margin-top: 1.25rem !important;
}

.helper-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.settings-card {
  max-width: 640px;
  padding: 1.5rem;
}

/* --------------------------------------------------------------------------
   10. 뱃지 컴포넌트 (.badge)
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 6px;
  line-height: 1.3;
  border: 1px solid transparent;
}

.badge-admin {
  background: rgba(139, 92, 246, 0.18);
  color: #a78bfa;
  border-color: rgba(139, 92, 246, 0.35);
  cursor: pointer;
}

.badge-user {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.35);
  cursor: pointer;
}

.badge-pinned {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

.badge-status-approved {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

.badge-status-pending {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

.badge-status-rejected {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.35);
}

.badge-source {
  background: rgba(100, 116, 139, 0.18);
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}

.badge-level-INFO {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}

.badge-level-SUCCESS {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.badge-level-WARNING {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

.badge-level-ERROR {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

/* --------------------------------------------------------------------------
   11. 모달 팝업 (.modal-overlay, .modal-card)
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: modalZoom 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalZoom {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-card form {
  padding: 1.5rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.modal-footer-text {
  margin-top: 1.15rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.modal-footer-text a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
}

.modal-footer-text a:hover {
  text-decoration: underline;
}

.notice-meta {
  padding: 0.75rem 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.04);
}

.notice-content {
  padding: 1.5rem;
  font-size: 0.925rem;
  line-height: 1.6;
  color: var(--text-primary);
  min-height: 120px;
  max-height: 50vh;
  overflow-y: auto;
  white-space: pre-wrap;
}

/* --------------------------------------------------------------------------
   12. 토스트 알림 메시지 (.toast-container, .toast)
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 0.85rem 1.25rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.3s, transform 0.3s;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast.fade-out {
  opacity: 0;
  transform: translateY(12px);
}

.toast-info {
  background: rgba(37, 99, 235, 0.92);
  border: 1px solid rgba(96, 165, 250, 0.4);
}

.toast-success {
  background: rgba(5, 150, 105, 0.92);
  border: 1px solid rgba(52, 211, 153, 0.4);
}

.toast-warning {
  background: rgba(217, 119, 6, 0.92);
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.toast-error {
  background: rgba(220, 38, 38, 0.92);
  border: 1px solid rgba(248, 113, 113, 0.4);
}

/* --------------------------------------------------------------------------
   13. 모바일 반응형 처리 (Media Queries)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .app-header {
    padding: 0 1rem;
  }

  .breadcrumb {
    display: none;
  }

  .brand-name {
    font-size: 1rem;
  }

  .app-sidebar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    height: 100%;
    transform: translateX(-100%);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
  }

  .app-sidebar:not(.collapsed) {
    transform: translateX(0);
  }

  .app-content {
    padding: 1.25rem 1rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .table-toolbar .form-input {
    max-width: 100%;
  }

  .modal-card {
    max-width: 95%;
  }
}
