/* ============================================
   미래N마케팅 - Modern UI Theme
   ============================================ */

/* --- CSS Variables --- */
:root {
  --primary: #4f46e5;
  --primary-light: #6366f1;
  --primary-dark: #3730a3;
  --primary-bg: rgba(79, 70, 229, 0.08);
  --sidebar-bg: #0f172a;
  --sidebar-active: rgba(99, 102, 241, 0.15);
  --surface: #ffffff;
  --surface-hover: #f8fafc;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Global Overrides --- */
body {
  font-family: 'Pretendard', 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: #f1f5f9;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app-wrapper {
  background-color: #f1f5f9;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ============================================
   Sidebar Navigation
   ============================================ */
nav {
  background: linear-gradient(180deg, #0f172a 0%, #131c31 100%);
  width: 15rem;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 4px 0 32px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
}

nav .app-logo {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

nav .app-logo .logo img {
  max-height: 36px;
  filter: brightness(1.1);
}

nav .app-nav {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 1rem;
}

/* --- Nav Section --- */
.nav-section {
  padding: 0 0.75rem;
}

.nav-section-label {
  padding: 1.5rem 0.75rem 0.6rem;
  font-size: 0.675rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 700;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent);
}

/* --- Nav Menu Items --- */
nav .app-nav .main-nav,
nav .nav-menu {
  padding: 0;
  margin: 0;
  list-style: none;
}

nav .app-nav .main-nav > li,
nav .nav-menu > li {
  padding: 0;
  flex-direction: column;
  background-color: transparent;
  border-radius: 10px;
  margin-bottom: 2px;
  transition: var(--transition);
  overflow: hidden;
  position: relative;
}

nav .app-nav .main-nav > li::before,
nav .nav-menu > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 60%;
  background: linear-gradient(180deg, var(--primary-light), var(--primary));
  border-radius: 0 3px 3px 0;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

nav .app-nav .main-nav > li:hover,
nav .nav-menu > li:hover {
  background-color: rgba(99, 102, 241, 0.08);
}

nav .app-nav .main-nav > li.active,
nav .nav-menu > li.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(99, 102, 241, 0.06) 100%);
}

nav .app-nav .main-nav > li.active::before,
nav .nav-menu > li.active::before {
  transform: translateY(-50%) scaleY(1);
}

nav .app-nav .main-nav > li.active > a,
nav .nav-menu > li.active > a {
  color: #c7d2fe;
  font-weight: 600;
}

nav .app-nav .main-nav > li.active > a .nav-icon,
nav .nav-menu > li.active > a .nav-icon {
  background: rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
}

nav .app-nav .main-nav > li:not(.menu-title) > a,
nav .nav-menu > li > a {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.85rem;
  padding: 0.625rem 0.75rem;
  font-weight: 500;
  border-radius: 10px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

nav .app-nav .main-nav > li:not(.menu-title) > a:hover,
nav .nav-menu > li > a:hover {
  color: #f1f5f9;
}

nav .app-nav .main-nav > li:not(.menu-title) > a:hover .nav-icon,
nav .nav-menu > li > a:hover .nav-icon {
  background: rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
}

/* --- Nav Icon --- */
.nav-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.6);
  transition: var(--transition);
  flex-shrink: 0;
}

.nav-icon i {
  font-size: 1.15rem;
  margin: 0;
  line-height: 1;
}

/* --- Nav Text --- */
.nav-text {
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* legacy icon fallback */
nav .app-nav .main-nav > li:not(.menu-title) > a i {
  margin-right: 0;
  font-size: 1.15rem;
  opacity: 0.8;
  width: 20px;
  text-align: center;
}

/* --- Nav Footer (User Info) --- */
.nav-footer {
  padding: 0.875rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background: rgba(0, 0, 0, 0.15);
}

.nav-footer-avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0;
}

.nav-footer-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nav-footer-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-footer-role {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.nav-footer-logout {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.4);
  transition: var(--transition);
  flex-shrink: 0;
}

.nav-footer-logout:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.nav-footer-logout i {
  font-size: 1.1rem;
}

.toggle-semi-nav {
  background: rgba(99, 102, 241, 0.15) !important;
  color: #818cf8 !important;
  border-radius: 8px !important;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Sidebar Scrollbar --- */
nav .app-nav::-webkit-scrollbar {
  width: 3px;
}

nav .app-nav::-webkit-scrollbar-track {
  background: transparent;
}

nav .app-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

nav .app-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ============================================
   Header
   ============================================ */
.header-main {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 0 1.5rem;
  height: 64px;
}

.header-main .header-toggle i {
  font-size: 1.25rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.header-main .header-toggle:hover i {
  color: var(--primary);
}

.header-main .head-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--primary-bg);
  color: var(--primary);
  transition: var(--transition);
}

.header-main .head-icon:hover {
  background: var(--primary);
  color: white;
}

.header-profile-canvas {
  border-left: 1px solid var(--border) !important;
  box-shadow: var(--shadow-lg) !important;
}

.header-profile-canvas .offcanvas-body ul li a {
  padding: 0.5rem 0;
  color: var(--text-primary);
  transition: var(--transition);
  border-radius: var(--radius-sm);
}

.header-profile-canvas .offcanvas-body ul li a:hover {
  color: var(--primary);
}

/* ============================================
   Cards
   ============================================ */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
  background: var(--surface);
}

.card:hover {
  box-shadow: var(--shadow);
}

.card-header {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border-light);
  padding: 1rem 1.5rem;
}

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

/* ============================================
   Tables
   ============================================ */
.table {
  font-size: 0.875rem;
}

.table thead th {
  background: #f8fafc;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.875rem 1rem;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.table tbody td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}

.table-hover tbody tr {
  transition: var(--transition);
}

.table-hover tbody tr:hover {
  background-color: rgba(79, 70, 229, 0.04) !important;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(248, 250, 252, 0.5);
}

.table-striped tbody tr:nth-of-type(odd):hover {
  background-color: rgba(79, 70, 229, 0.04) !important;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  transition: var(--transition);
  letter-spacing: -0.01em;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 1px 2px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
  transform: translateY(-1px);
}

.btn-light-primary {
  background: var(--primary-bg);
  color: var(--primary);
  border: 1px solid transparent;
}

.btn-light-primary:hover {
  background: var(--primary);
  color: white;
}

.btn-outline-secondary {
  border-color: var(--border);
  color: var(--text-secondary);
}

.btn-outline-secondary:hover {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: white;
}

.btn-dark {
  background: var(--text-primary);
  border-color: var(--text-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.btn-dark:hover {
  background: #0f172a;
  border-color: #0f172a;
}

.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  border-radius: 6px;
}

.btn-group .btn {
  border-radius: 0;
}

.btn-group .btn:first-child {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.btn-group .btn:last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.btn-group .btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px !important;
}

.btn-info.icon-btn {
  background: rgba(59, 130, 246, 0.1);
  border-color: transparent;
  color: var(--info);
}

.btn-info.icon-btn:hover {
  background: var(--info);
  color: white;
}

.btn-success.icon-btn {
  background: rgba(16, 185, 129, 0.1);
  border-color: transparent;
  color: var(--success);
}

.btn-success.icon-btn:hover {
  background: var(--success);
  color: white;
}

.btn-danger.icon-btn {
  background: rgba(239, 68, 68, 0.1);
  border-color: transparent;
  color: var(--danger);
}

.btn-danger.icon-btn:hover {
  background: var(--danger);
  color: white;
}

/* ============================================
   Form Controls
   ============================================ */
.form-control,
.form-select {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: var(--transition);
  background-color: var(--surface);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-label {
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
}

.form-select-sm {
  font-size: 0.8125rem;
  padding: 0.375rem 2rem 0.375rem 0.75rem;
}

.input-group .form-control {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.input-group .btn {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.b-r-left {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important;
}

.b-r-right {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
}

/* ============================================
   Badges
   ============================================ */
.badge {
  font-weight: 500;
  font-size: 0.7rem;
  padding: 0.3em 0.65em;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.text-bg-primary {
  background-color: rgba(79, 70, 229, 0.12) !important;
  color: var(--primary) !important;
}

.text-bg-info {
  background-color: rgba(59, 130, 246, 0.12) !important;
  color: var(--info) !important;
}

.text-bg-warning {
  background-color: rgba(245, 158, 11, 0.12) !important;
  color: #b45309 !important;
}

.text-bg-light {
  background-color: rgba(100, 116, 139, 0.1) !important;
  color: var(--text-secondary) !important;
}

.text-bg-success {
  background-color: rgba(16, 185, 129, 0.12) !important;
  color: #059669 !important;
}

.text-bg-danger {
  background-color: rgba(239, 68, 68, 0.12) !important;
  color: var(--danger) !important;
}

.badge-notification {
  font-size: 0.7rem;
  padding: 0.2em 0.5em;
  border-radius: 10px;
  min-width: 20px;
}

/* ============================================
   Modals
   ============================================ */
.modal-content {
  border: none;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.modal-header.bg-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important;
}

.modal-title {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  gap: 0.5rem;
}

.modal-backdrop.show {
  backdrop-filter: blur(4px);
}

.btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.7;
}

.btn-close:hover {
  opacity: 1;
}

/* ============================================
   Main Title / Breadcrumb
   ============================================ */
.main-title {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  position: relative;
  padding-left: 1rem;
}

.main-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 2px;
}

/* ============================================
   List Table Header / Toolbar
   ============================================ */
.list-table-header {
  padding: 0.75rem 0;
  gap: 0.75rem;
  align-items: center;
}

.list-table-header + .list-table-header {
  border-top: 1px solid var(--border-light);
}

/* ============================================
   Footer
   ============================================ */
footer {
  background: transparent;
  border-top: 1px solid var(--border);
  padding: 1rem 0;
}

footer .footer-text p,
footer .footer-text a {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ============================================
   Pagination
   ============================================ */
.app-pagination .page-item .page-link {
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  padding: 0.4rem 0.75rem;
  margin: 0 2px;
  border-radius: 6px !important;
  transition: var(--transition);
  font-weight: 500;
}

.app-pagination .page-item:hover .page-link {
  background: var(--primary-bg);
  border-color: var(--primary-light);
  color: var(--primary);
}

.app-pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.app-pagination .page-item.disabled .page-link {
  background: var(--surface-hover);
  color: var(--text-muted);
  border-color: var(--border-light);
}

.table-footer {
  padding: 1rem 0;
}

/* ============================================
   Checkbox
   ============================================ */
.check-box .checkmark {
  border-radius: 5px;
  border: 2px solid var(--border);
  transition: var(--transition);
}

.check-box input:checked ~ .checkmark {
  background: var(--primary);
  border-color: var(--primary);
}

/* ============================================
   Dropdown Menu
   ============================================ */
.dropdown-menu {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  min-width: 180px;
}

.dropdown-item {
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: var(--transition);
}

.dropdown-item:hover {
  background: var(--primary-bg);
  color: var(--primary);
}

.dropdown-item i {
  margin-right: 0.5rem;
  font-size: 1.1rem;
}

/* ============================================
   Offcanvas
   ============================================ */
.offcanvas {
  border-left: 1px solid var(--border) !important;
  box-shadow: var(--shadow-lg);
}

.offcanvas-header {
  border-bottom: 1px solid var(--border-light);
  padding: 1.25rem 1.5rem;
}

.offcanvas-header h5 {
  font-weight: 600;
}

/* ============================================
   Loader
   ============================================ */
.loader-wrapper {
  background: var(--surface);
}

.app-loader span {
  background: var(--primary);
}

/* ============================================
   Status Indicator
   ============================================ */
.bg-success.h-20.w-20 {
  width: 10px !important;
  height: 10px !important;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* ============================================
   Login Page
   ============================================ */
.login-form-container {
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  position: relative;
}

.login-form-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(79, 70, 229, 0.6) 100%);
  z-index: 0;
}

.login-form-container > * {
  position: relative;
  z-index: 1;
}

.login-form-container .form_container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 420px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-form-container .form_container .form-label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.8125rem;
}

.login-form-container .form_container .form-control {
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-size: 0.9rem;
}

.login-form-container .form_container .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.login-form-container .form_container .btn-light-primary,
.login-form-container .form_container .btn {
  padding: 0.7rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border: none;
  color: white;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
  transition: var(--transition);
}

.login-form-container .form_container .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

/* ============================================
   Dashboard Welcome
   ============================================ */
.dashboard-welcome {
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.dashboard-welcome::before {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.dashboard-welcome::after {
  content: '';
  position: absolute;
  right: 60px;
  bottom: -60px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.dashboard-welcome h3 {
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.dashboard-welcome p {
  opacity: 0.85;
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* Dashboard stat cards */
.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.stat-card .stat-icon.primary {
  background: var(--primary-bg);
  color: var(--primary);
}

.stat-card .stat-icon.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.stat-card .stat-icon.warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.stat-card .stat-icon.info {
  background: rgba(59, 130, 246, 0.1);
  color: var(--info);
}

.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

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

/* ============================================
   Toast Notification (replaces alert)
   ============================================ */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
}

.modern-toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 300px;
  animation: slideInRight 0.3s ease-out;
}

.modern-toast.success {
  border-left: 4px solid var(--success);
}

.modern-toast.error {
  border-left: 4px solid var(--danger);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ============================================
   Divider
   ============================================ */
.app-divider-v {
  border-bottom: 1px dashed var(--border);
}

/* ============================================
   Select Group (Radio buttons styled)
   ============================================ */
.form-selectgroup .select-items .select-box {
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  padding: 0.4rem 1rem;
  transition: var(--transition);
}

.form-selectgroup .select-items .select-input:checked + .select-box {
  background: var(--primary-bg);
  border-color: var(--primary);
  color: var(--primary);
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
  .main-title {
    font-size: 1.25rem;
  }

  .card-body {
    padding: 1rem;
  }

  .table thead th {
    font-size: 0.75rem;
    padding: 0.625rem 0.5rem;
  }

  .table tbody td {
    font-size: 0.8125rem;
    padding: 0.5rem;
  }

  .list-table-header {
    flex-direction: column;
  }

  .btn-sm {
    font-size: 0.75rem;
    padding: 0.3rem 0.625rem;
  }
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

main .card {
  animation: fadeInUp 0.4s ease-out;
}

.modal.show .modal-dialog {
  animation: fadeInUp 0.3s ease-out;
}

/* ============================================
   Utility Additions
   ============================================ */
.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hover-lift {
  transition: var(--transition);
}

.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ============================================
   Slot Page - Dynamic UI
   ============================================ */

/* --- Staggered Row Animation --- */
.slot-table tbody tr {
  animation: slotRowIn 0.4s ease-out both;
}

.slot-table tbody tr:nth-child(1)  { animation-delay: 0.02s; }
.slot-table tbody tr:nth-child(2)  { animation-delay: 0.04s; }
.slot-table tbody tr:nth-child(3)  { animation-delay: 0.06s; }
.slot-table tbody tr:nth-child(4)  { animation-delay: 0.08s; }
.slot-table tbody tr:nth-child(5)  { animation-delay: 0.10s; }
.slot-table tbody tr:nth-child(6)  { animation-delay: 0.12s; }
.slot-table tbody tr:nth-child(7)  { animation-delay: 0.14s; }
.slot-table tbody tr:nth-child(8)  { animation-delay: 0.16s; }
.slot-table tbody tr:nth-child(9)  { animation-delay: 0.18s; }
.slot-table tbody tr:nth-child(10) { animation-delay: 0.20s; }
.slot-table tbody tr:nth-child(n+11) { animation-delay: 0.22s; }

@keyframes slotRowIn {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* --- Row Selection Highlight --- */
.slot-table tbody tr.row-selected {
  background: rgba(79, 70, 229, 0.06) !important;
  box-shadow: inset 3px 0 0 var(--primary);
}

.slot-table tbody tr.row-selected td:first-child {
  position: relative;
}

/* --- Status Pulse Indicator --- */
.slot-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.8125rem;
}

.slot-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.slot-status-dot.active {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  animation: statusPulse 2s ease-in-out infinite;
}

.slot-status-dot.empty {
  background: var(--text-muted);
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.15);
}

.slot-status-dot.error {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
  animation: statusPulse 1.5s ease-in-out infinite;
}

.slot-status-dot.expiring {
  background: var(--warning);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
  animation: statusPulse 1.5s ease-in-out infinite;
}

.slot-status-dot.expired {
  background: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.15);
}

@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); }
  50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.08); }
}

/* --- D-Day Progress Bar --- */
.slot-dday {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 100px;
}

.slot-dday-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slot-dday-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.slot-dday-badge.safe {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.slot-dday-badge.warn {
  background: rgba(245, 158, 11, 0.1);
  color: #b45309;
}

.slot-dday-badge.danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.slot-dday-badge.expired {
  background: rgba(100, 116, 139, 0.1);
  color: var(--text-muted);
}

.slot-progress-track {
  height: 4px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
}

.slot-progress-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 2px;
}

.slot-progress-bar.safe { background: linear-gradient(90deg, #10b981, #34d399); }
.slot-progress-bar.warn { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.slot-progress-bar.danger { background: linear-gradient(90deg, #ef4444, #f87171); }
.slot-progress-bar.expired { background: #94a3b8; }

/* --- Filter Tabs --- */
.slot-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0.75rem 0;
}

.slot-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.slot-filter-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: var(--primary-bg);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.12);
}

.slot-filter-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-color: transparent;
  color: white;
  box-shadow: 0 2px 12px rgba(79, 70, 229, 0.3);
  transform: translateY(-1px);
}

.slot-filter-btn .filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 5px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

.slot-filter-btn .filter-count {
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
}

.slot-filter-btn.active .filter-count {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

/* --- Floating Selection Bar --- */
.slot-selection-bar {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--sidebar-bg);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(16px);
}

.slot-selection-bar.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.slot-selection-bar .sel-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 700;
}

.slot-selection-bar .sel-label {
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0.9;
}

.slot-selection-bar .sel-actions {
  display: flex;
  gap: 6px;
  margin-left: 0.5rem;
  padding-left: 1rem;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.slot-selection-bar .sel-actions .btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 8px;
}

.slot-selection-bar .sel-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: var(--transition);
  font-size: 1.1rem;
}

.slot-selection-bar .sel-close:hover {
  color: white;
}

/* --- Rank Link Icons --- */
.rank-links {
  display: inline-flex;
  gap: 4px;
  margin-top: 4px;
}

.rank-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--primary-bg);
  color: var(--primary);
  transition: var(--transition);
  font-size: 0.9rem;
}

.rank-links a:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.1);
}

/* --- Action Buttons Group --- */
.slot-actions {
  display: flex;
  gap: 4px;
}

.slot-actions .btn {
  opacity: 0.7;
  transform: scale(0.95);
  transition: all 0.2s ease;
}

.slot-table tbody tr:hover .slot-actions .btn {
  opacity: 1;
  transform: scale(1);
}

/* --- Toolbar Enhancement --- */
.slot-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0.75rem 0;
}

.slot-toolbar-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 4px;
}

/* --- Slot Code Cell --- */
.slot-code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.8125rem;
  background: var(--border-light);
  padding: 3px 10px;
  border-radius: 6px;
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* --- Rank Display --- */
.slot-rank {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.slot-rank-value {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.slot-rank-chart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.08);
  color: var(--info);
  cursor: pointer;
  transition: var(--transition);
}

.slot-rank-chart:hover {
  background: var(--info);
  color: white;
  transform: scale(1.1);
}

/* --- Click Count with mini bar --- */
.slot-click-cell {
  position: relative;
}

.slot-click-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border-light);
  border-radius: 0 0 4px 4px;
}

.slot-click-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 0 0 4px 4px;
  transition: width 0.5s ease;
}

/* --- Delete Modal Enhanced --- */
.delete-modal-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  animation: deleteShake 0.5s ease-in-out;
}

.delete-modal-icon i {
  font-size: 2rem;
  color: var(--danger);
}

@keyframes deleteShake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-8deg); }
  50% { transform: rotate(8deg); }
  75% { transform: rotate(-4deg); }
}

/* --- Keyword Cell --- */
.slot-keyword {
  font-weight: 600;
  color: var(--text-primary);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot-keyword:hover {
  color: var(--primary);
}

/* --- User Cell --- */
.slot-user {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.slot-user-id {
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--text-primary);
}

.slot-user-name {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- Empty State --- */
.slot-empty {
  text-align: center;
  padding: 4rem 2rem;
}

.slot-empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  color: var(--text-muted);
}

.slot-empty h5 {
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.slot-empty p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* --- MID Cell --- */
.slot-mid {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Number Cell with color --- */
.slot-num {
  font-weight: 700;
  font-size: 0.9rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.slot-num.zero {
  color: var(--text-muted);
}

.slot-num.positive {
  color: var(--primary);
}

/* ============================================
   Select2 Custom Theme
   ============================================ */
.select2-container--default .select2-selection--single {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  height: 38px;
  padding: 0.3rem 0.5rem;
  font-size: 0.875rem;
  background-color: var(--surface);
  transition: var(--transition);
}

.select2-container--default .select2-selection--single:hover {
  border-color: var(--primary-light);
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  outline: none;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--text-primary);
  line-height: 28px;
  padding-left: 4px;
  font-size: 0.875rem;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: var(--text-muted);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 36px;
  right: 6px;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
  margin-right: 4px;
  font-size: 1.1rem;
  color: var(--text-muted);
}

.select2-container--default .select2-selection--single .select2-selection__clear:hover {
  color: var(--danger);
}

/* Dropdown */
.select2-dropdown {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 1060;
}

.select2-container--default .select2-search--dropdown {
  padding: 8px;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition);
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

.select2-results__options {
  max-height: 240px;
  padding: 4px;
}

.select2-container--default .select2-results__option {
  padding: 8px 10px;
  font-size: 0.85rem;
  border-radius: 6px;
  margin-bottom: 1px;
  transition: background 0.15s ease;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: var(--primary-bg);
  color: var(--primary);
}

.select2-container--default .select2-results__option[aria-selected=true] {
  background: rgba(79, 70, 229, 0.06);
  color: var(--primary);
}

.select2-container--default .select2-results__message {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 12px;
  text-align: center;
}

/* Custom user item template */
.select2-user-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.select2-user-id {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.select2-user-name {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* Highlighted state item colors */
.select2-container--default .select2-results__option--highlighted .select2-user-id {
  color: var(--primary);
}

.select2-container--default .select2-results__option--highlighted .select2-user-name {
  color: var(--primary-light);
}

/* ============================================
   모니터링 페이지
   ============================================ */

/* 통계 카드 */
.monitor-stat-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.monitor-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 16px 16px 0 0;
}

.monitor-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.monitor-stat-card.pending::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.monitor-stat-card.active::before { background: linear-gradient(90deg, #10b981, #34d399); }
.monitor-stat-card.processing::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.monitor-stat-card.init::before { background: linear-gradient(90deg, #94a3b8, #cbd5e1); }

.monitor-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.monitor-stat-card.pending .monitor-stat-icon { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.monitor-stat-card.active .monitor-stat-icon { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.monitor-stat-card.processing .monitor-stat-icon { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.monitor-stat-card.init .monitor-stat-icon { background: rgba(148, 163, 184, 0.1); color: #94a3b8; }

.monitor-stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 0.25rem;
}

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

/* 상태 배지 */
.monitor-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.monitor-status-badge.pending { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.monitor-status-badge.active { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.monitor-status-badge.processing { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.monitor-status-badge.init { background: rgba(148, 163, 184, 0.1); color: #94a3b8; }

/* 타입 배지 */
.monitor-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--border-light);
  color: var(--text-secondary);
}

/* 워커 표시 */
.monitor-workers {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 12px;
}

.monitor-workers-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 4px;
}

.monitor-worker-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
}

.monitor-worker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
  animation: pulse 2s infinite;
}

.monitor-worker-count {
  background: rgba(245, 158, 11, 0.15);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #f59e0b;
}

.monitor-worker-inline {
  font-size: 0.8rem;
  font-weight: 500;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
  padding: 2px 8px;
  border-radius: 6px;
}

/* 자동 새로고침 토글 */
.monitor-auto-refresh {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.monitor-auto-refresh input { display: none; }

.monitor-toggle-slider {
  position: relative;
  width: 36px;
  height: 20px;
  background: var(--border);
  border-radius: 20px;
  transition: all 0.3s ease;
}

.monitor-toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.monitor-auto-refresh input:checked ~ .monitor-toggle-slider {
  background: var(--primary);
}

.monitor-auto-refresh input:checked ~ .monitor-toggle-slider::after {
  left: 18px;
}

.monitor-toggle-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.monitor-refresh-indicator {
  color: var(--primary);
  font-size: 1rem;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
/* ── Confirm Modal ── */
.confirm-modal .modal-body {
  padding: 2rem 1.5rem;
  text-align: center;
}

.confirm-modal .confirm-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.confirm-modal .confirm-icon.warning {
  background: #fef3c7;
  color: #f59e0b;
}

.confirm-modal .confirm-icon.danger {
  background: #fee2e2;
  color: #ef4444;
}

.confirm-modal .confirm-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.confirm-modal .confirm-message {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 1.5rem;
}

.confirm-modal .modal-footer {
  border-top: none;
  justify-content: center;
  padding: 0 1.5rem 1.5rem;
  gap: 0.5rem;
}

/* ── Button Loading ── */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.75;
}

.btn-loading .btn-text {
  visibility: hidden;
}

.btn-loading .btn-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ── Footer ── */
.footer-version {
  color: #94a3b8;
}

/* ── Toast (login page standalone) ── */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ── Login Form Validation ── */
.form-control.is-invalid-custom {
  border-color: #ef4444;
}

.invalid-feedback-custom {
  color: #ef4444;
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: none;
}

.form-control.is-invalid-custom + .invalid-feedback-custom {
  display: block;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #94a3b8;
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state p {
  font-size: 0.9rem;
  margin: 0;
}

/* ── Table container (member list) ── */
.table-container {
  height: calc(100vh - 400px);
  overflow-y: auto;
}

.table-container::-webkit-scrollbar {
  width: 5px;
}

.table-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

/* ── Dashboard Status Grid ── */
.dashboard-status-item {
  text-align: center;
  padding: 1rem;
  background: var(--surface-hover);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.dashboard-status-item:hover {
  background: var(--primary-bg);
}

.dashboard-status-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

