/* ===== CloudGuard Components（1:1 对齐 JwhooOpen 玻璃拟态组件）===== */

/* ---- Buttons（胶囊形 + 品牌渐变，对齐 JwhooOpen .keyword_add）---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  height: 40px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  border-radius: var(--theme-radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition-base), box-shadow var(--transition-base), background-color var(--transition-base), border-color var(--transition-base);
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
}

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

.btn-sm {
  padding: 0 14px;
  height: 32px;
  font-size: 12px;
}

.btn-lg {
  padding: 0 28px;
  height: 48px;
  font-size: 16px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--theme-brand) 0%, var(--theme-accent) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--theme-shadow-brand);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--theme-shadow-brand-lg);
  color: #fff;
}

.btn-primary:active {
  transform: translateY(0) scale(0.97);
}

.btn-secondary {
  background: var(--theme-surface-solid);
  color: var(--theme-brand-strong);
  border-color: var(--theme-border-strong);
  box-shadow: none;
}

.btn-secondary:hover {
  background: var(--theme-surface-highlight);
  border-color: rgba(217, 21, 45, 0.3);
  color: var(--theme-brand-strong);
}

.btn-outline {
  background: transparent;
  color: var(--theme-brand);
  border-color: var(--theme-brand);
}

.btn-outline:hover {
  background: var(--theme-brand-light);
  color: var(--theme-brand-strong);
  border-color: var(--theme-brand-strong);
}

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

.btn-ghost:hover {
  background: var(--theme-surface-highlight);
  color: var(--theme-brand);
}

.btn-danger {
  background: linear-gradient(135deg, var(--theme-danger), #f44336);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(229, 57, 53, 0.18);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #d32f2f, #e53935);
  color: #fff;
  transform: translateY(-2px);
}

.btn-success {
  background: linear-gradient(135deg, var(--theme-success), #1bbc9b);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(0, 163, 117, 0.18);
}

.btn-success:hover {
  background: linear-gradient(135deg, #009060, #14b88a);
  color: #fff;
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
}

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

/* ---- Form Elements（18px 圆角 + 红色 focus 光晕，对齐 JwhooOpen 输入框）---- */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--theme-text);
  margin-bottom: 8px;
}

.form-label .required {
  color: var(--theme-danger);
  margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-size: 14px;
  background: var(--theme-surface-strong);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-sm);
  color: var(--theme-text);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  outline: none;
  box-sizing: border-box;
}

.form-textarea {
  height: auto;
  padding: 12px 14px;
  min-height: 96px;
  resize: vertical;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  border-color: var(--theme-border-strong);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: rgba(217, 21, 45, 0.42);
  box-shadow: 0 0 0 4px rgba(217, 21, 45, 0.08);
  background: var(--theme-surface-solid);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--theme-text-muted);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: var(--theme-danger);
  box-shadow: 0 0 0 4px var(--theme-danger-light);
}

.form-input.success,
.form-select.success,
.form-textarea.success {
  border-color: var(--theme-success);
  box-shadow: 0 0 0 4px var(--theme-success-light);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235a5f6d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-checkbox,
.form-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}

.form-checkbox input[type="checkbox"],
.form-radio input[type="radio"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--theme-border-strong);
  border-radius: 5px;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  position: relative;
  accent-color: var(--theme-brand);
}

.form-radio input[type="radio"] {
  border-radius: var(--theme-radius-round);
}

.form-checkbox input[type="checkbox"]:checked {
  background: var(--theme-brand);
  border-color: var(--theme-brand);
}

.form-checkbox input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.form-radio input[type="radio"]:checked {
  border-color: var(--theme-brand);
}

.form-radio input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  inset: 4px;
  background: var(--theme-brand);
  border-radius: var(--theme-radius-round);
}

.form-hint {
  font-size: 12px;
  color: var(--theme-text-muted);
  margin-top: 6px;
}

.form-error {
  font-size: 12px;
  color: var(--theme-danger);
  margin-top: 6px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row > .form-group {
  flex: 1;
}

.form-input-group {
  display: flex;
  align-items: center;
}

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

.form-input-group .input-group-btn {
  border-radius: 0 var(--theme-radius-sm) var(--theme-radius-sm) 0;
  margin-left: -1px;
}

/* ---- Switch Toggle ---- */
.form-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.form-switch input {
  appearance: none;
  width: 42px;
  height: 24px;
  background: var(--theme-border-strong);
  border-radius: var(--theme-radius-pill);
  cursor: pointer;
  transition: background var(--transition-fast);
  position: relative;
  flex-shrink: 0;
}

.form-switch input::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: var(--theme-radius-round);
  transition: transform var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.form-switch input:checked {
  background: var(--theme-brand);
}

.form-switch input:checked::after {
  transform: translateX(18px);
}

/* ---- Tables（渐变表头 + 46px 行高，对齐 JwhooOpen .keyword_table）---- */
.table-container {
  overflow-x: auto;
  border-radius: var(--theme-radius-md);
  border: 1px solid var(--theme-border);
  background: var(--theme-surface-solid);
}

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

.table thead {
  background: linear-gradient(180deg, rgba(248, 249, 250, 0.96), rgba(243, 244, 246, 0.92));
}

.table th {
  padding: 0 16px;
  height: 46px;
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--theme-text-soft);
  border-bottom: 1px solid var(--theme-border);
  white-space: nowrap;
}

.table td {
  padding: 0 16px;
  height: 46px;
  border-top: 1px solid var(--theme-border);
  color: var(--theme-text-soft);
}

.table tbody tr {
  background: #fff;
  transition: background var(--transition-fast);
}

.table tbody tr:hover {
  background: #f8f9fa;
}

html.dark .table tbody tr {
  background: var(--theme-surface-solid);
}

html.dark .table tbody tr:hover {
  background: var(--theme-surface-hover);
}

.table-striped tbody tr:nth-child(even) {
  background: rgba(248, 249, 250, 0.6);
}

.table-striped tbody tr:nth-child(even):hover {
  background: #f8f9fa;
}

/* ---- Cards（玻璃面板）---- */
.card {
  background: linear-gradient(180deg, var(--theme-surface-strong), var(--theme-surface-soft));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-md);
  box-shadow: var(--theme-shadow-soft);
  transition: box-shadow var(--transition-base);
}

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

.card-body {
  padding: 24px;
}

.card-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--theme-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--theme-border);
}

.card-title {
  font-size: 16px;
  font-weight: 700;
}

/* ---- Stats Panel / Metric Cards（玻璃卡片 + 左侧色条，对齐 JwhooOpen .stat-item）---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: linear-gradient(180deg, var(--theme-surface-strong), var(--theme-surface-soft));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-md);
  padding: 22px 24px;
  box-shadow: var(--theme-shadow-soft);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--theme-shadow-lg);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: 0 2px 2px 0;
}

.stat-card.brand::before  { background: var(--theme-brand); }
.stat-card.success::before { background: var(--theme-success); }
.stat-card.warning::before { background: var(--theme-warning); }
.stat-card.danger::before  { background: var(--theme-danger); }
.stat-card.info::before    { background: var(--theme-info); }

/* 渐变背景变体（关键指标用，白字）*/
.stat-card.solid {
  background: linear-gradient(135deg, var(--theme-brand) 0%, var(--theme-accent) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--theme-shadow-brand);
}

.stat-card.solid::before { display: none; }

.stat-card.solid .stat-card-label,
.stat-card.solid .stat-card-value {
  color: #fff;
}

.stat-card.solid .stat-card-change.up {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.stat-card-label {
  font-size: 13px;
  color: var(--theme-text-soft);
  margin-bottom: 8px;
  font-weight: 500;
}

.stat-card-value {
  font-size: 30px;
  font-weight: 700;
  color: var(--theme-text);
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.stat-card-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: var(--theme-radius-pill);
}

.stat-card-change.up {
  color: var(--theme-success);
  background: var(--theme-success-light);
}

.stat-card-change.down {
  color: var(--theme-danger);
  background: var(--theme-danger-light);
}

.stat-card-icon {
  position: absolute;
  right: 20px;
  top: 20px;
  width: 44px;
  height: 44px;
  border-radius: var(--theme-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  opacity: 0.12;
}

.stat-card.brand .stat-card-icon { color: var(--theme-brand); }
.stat-card.success .stat-card-icon { color: var(--theme-success); }
.stat-card.warning .stat-card-icon { color: var(--theme-warning); }
.stat-card.danger .stat-card-icon { color: var(--theme-danger); }
.stat-card.info .stat-card-icon { color: var(--theme-info); }

/* ---- Pagination（胶囊按钮 + 渐变激活态）---- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 0;
}

.pagination-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: var(--theme-radius-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--theme-text-soft);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: 1px solid transparent;
  background: var(--theme-surface-solid);
}

.pagination-item:hover {
  background: var(--theme-surface-highlight);
  color: var(--theme-brand);
  border-color: var(--theme-border);
}

.pagination-item.active {
  background: linear-gradient(135deg, var(--theme-brand), var(--theme-accent));
  color: #fff;
  font-weight: 600;
  box-shadow: var(--theme-shadow-brand);
  border-color: transparent;
}

.pagination-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination-info {
  color: var(--theme-text-muted);
  font-size: 13px;
  margin-left: 16px;
}

/* ---- Modal / Dialog（毛玻璃遮罩 + 32px 圆角弹窗）---- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(23, 24, 29, 0.42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--z-modal-backdrop);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
  padding: 20px;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: linear-gradient(180deg, var(--theme-surface-strong), var(--theme-surface));
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-lg);
  box-shadow: var(--theme-shadow-xl);
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: transform var(--transition-slow);
}

.modal.active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  border-bottom: 1px solid var(--theme-border);
  background: linear-gradient(135deg, var(--theme-surface-strong), var(--theme-surface));
  border-radius: var(--theme-radius-lg) var(--theme-radius-lg) 0 0;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--theme-radius-round);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--theme-text-soft);
  font-size: 18px;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.modal-close:hover {
  background: var(--theme-surface-highlight);
  color: var(--theme-brand);
}

.modal-body {
  padding: 20px 24px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--theme-border);
}

.modal-sm .modal-content { max-width: 360px; }
.modal-lg .modal-content { max-width: 640px; }
.modal-xl .modal-content { max-width: 840px; }

/* ---- Notifications / Toasts ---- */
.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: var(--z-notification);
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  width: 100%;
  pointer-events: none;
}

.notification {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: var(--theme-surface-strong);
  border-radius: var(--theme-radius-sm);
  box-shadow: var(--theme-shadow-lg);
  border: 1px solid var(--theme-border);
  pointer-events: auto;
  animation: slideInRight 0.35s ease;
  transition: all var(--transition-base);
}

.notification.removing {
  animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideOutRight {
  to { opacity: 0; transform: translateX(100%); }
}

.notification-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  font-size: 16px;
  margin-top: 1px;
}

.notification-body {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.notification-message {
  font-size: 13px;
  color: var(--theme-text-soft);
  line-height: 1.4;
}

.notification-close {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--theme-text-muted);
  cursor: pointer;
  font-size: 14px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

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

.notification.success { border-left: 3px solid var(--theme-success); }
.notification.success .notification-icon { color: var(--theme-success); }
.notification.error   { border-left: 3px solid var(--theme-danger); }
.notification.error .notification-icon { color: var(--theme-danger); }
.notification.warning { border-left: 3px solid var(--theme-warning); }
.notification.warning .notification-icon { color: var(--theme-warning); }
.notification.info    { border-left: 3px solid var(--theme-info); }
.notification.info .notification-icon { color: var(--theme-info); }

/* ---- Badges（胶囊）---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--theme-radius-pill);
  line-height: 1.5;
}

.badge-primary { background: var(--theme-brand-light); color: var(--theme-brand); }
.badge-success { background: var(--theme-success-light); color: var(--theme-success); }
.badge-warning { background: var(--theme-warning-light); color: var(--theme-warning); }
.badge-danger  { background: var(--theme-danger-light); color: var(--theme-danger); }
.badge-info    { background: var(--theme-info-light); color: var(--theme-info); }

.badge-ghost {
  background: var(--theme-surface);
  color: var(--theme-text-soft);
  border: 1px solid var(--theme-border);
}

/* ---- Avatar ---- */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--theme-radius-round);
  object-fit: cover;
  flex-shrink: 0;
}

.avatar-sm { width: 28px; height: 28px; }
.avatar-lg { width: 48px; height: 48px; }
.avatar-xl { width: 64px; height: 64px; }

.avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--theme-brand), var(--theme-accent));
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

/* ---- Dropdown（玻璃菜单）---- */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: var(--theme-surface-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-sm);
  box-shadow: var(--theme-shadow-lg);
  z-index: var(--z-dropdown);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: all var(--transition-fast);
  padding: 6px;
}

.dropdown-menu.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--theme-text);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  border-radius: var(--theme-radius-sm);
}

.dropdown-item:hover {
  background: var(--theme-surface-highlight);
  color: var(--theme-brand);
}

.dropdown-divider {
  height: 1px;
  background: var(--theme-border);
  margin: 4px 0;
}

/* ---- Loading / Spinner ---- */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--theme-border);
  border-top-color: var(--theme-brand);
  border-radius: var(--theme-radius-round);
  animation: spin 0.7s linear infinite;
}

.spinner-sm { width: 14px; height: 14px; border-width: 1.5px; }
.spinner-lg { width: 32px; height: 32px; border-width: 3px; }

.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  z-index: 10;
}

html.dark .loading-overlay {
  background: rgba(0, 0, 0, 0.4);
}

/* ---- Empty State ---- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.empty-state-icon {
  font-size: 48px;
  opacity: 0.2;
  margin-bottom: 16px;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--theme-text);
  margin-bottom: 8px;
}

.empty-state-desc {
  font-size: 14px;
  color: var(--theme-text-soft);
  max-width: 300px;
}

/* ---- Progress Bar ---- */
.progress {
  width: 100%;
  height: 8px;
  background: var(--theme-border);
  border-radius: var(--theme-radius-pill);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: var(--theme-radius-pill);
  background: linear-gradient(90deg, var(--theme-brand), var(--theme-accent));
  transition: width var(--transition-slow);
}

.progress-bar.success { background: var(--theme-success); }
.progress-bar.warning { background: var(--theme-warning); }
.progress-bar.danger { background: var(--theme-danger); }

/* ---- Tooltip ---- */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  background: var(--theme-text);
  color: #fff;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-fast);
  z-index: var(--z-tooltip);
}

[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---- Tabs ---- */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--theme-border);
  gap: 0;
  margin-bottom: 20px;
}

.tab-item {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--theme-text-soft);
  cursor: pointer;
  position: relative;
  transition: color var(--transition-fast);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab-item:hover {
  color: var(--theme-brand);
}

.tab-item.active {
  color: var(--theme-brand);
  border-bottom-color: var(--theme-brand);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* ---- Divider ---- */
.divider {
  display: flex;
  align-items: center;
  color: var(--theme-text-muted);
  font-size: 13px;
  gap: 12px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--theme-border);
}

/* ---- Alert ---- */
.alert {
  padding: 14px 18px;
  border-radius: var(--theme-radius-sm);
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  animation: fadeIn 0.3s ease;
}

.alert-success { background: var(--theme-success-light); color: var(--theme-success); border: 1px solid var(--theme-success); }
.alert-warning { background: var(--theme-warning-light); color: var(--theme-warning); border: 1px solid var(--theme-warning); }
.alert-danger  { background: var(--theme-danger-light); color: var(--theme-danger); border: 1px solid var(--theme-danger); }
.alert-info    { background: var(--theme-info-light); color: var(--theme-info); border: 1px solid var(--theme-info); }

html.dark .alert-warning { color: var(--theme-warning); }
html.dark .alert-info { color: var(--theme-info); }
