/* ==========================================================================
   COMPONENTS.CSS - Reusable Component Styles
   SYS Wallet Platform
   ========================================================================== */

/* ==========================================================================
   Sidebar Component (generated by Components.initSidebar)
   ========================================================================== */

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-brand .sidebar-logo {
  color: var(--accent-primary);
  flex-shrink: 0;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-heading);
  white-space: nowrap;
  letter-spacing: -0.02em;
}

.sidebar-close-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.sidebar-link:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.sidebar-link.active {
  color: var(--accent-primary);
  background: var(--accent-primary-bg);
  border-left-color: var(--accent-primary);
}

.sidebar-link-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-link-icon svg {
  width: 18px;
  height: 18px;
}

.sidebar-link-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--accent-primary-bg);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.sidebar-user-role {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: capitalize;
}

.sidebar-logout-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sidebar-logout-btn:hover {
  color: var(--accent-danger);
  border-color: var(--accent-danger);
  background: var(--accent-danger-bg);
}

.sidebar-toggle-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 4px;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-close-btn {
    display: flex;
  }
  .sidebar-toggle-btn {
    display: flex;
  }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-primary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
  position: relative;
  overflow: hidden;
}

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

.btn:active {
  transform: translateY(1px);
}

/* Primary */
.btn-primary {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

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

/* Success */
.btn-success {
  background: var(--accent-success);
  border-color: var(--accent-success);
  color: #ffffff;
}

.btn-success:hover {
  background: #16a34a;
  border-color: #16a34a;
}

/* Danger */
.btn-danger {
  background: var(--accent-danger);
  border-color: var(--accent-danger);
  color: #ffffff;
}

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

/* Warning */
.btn-warning {
  background: var(--accent-warning);
  border-color: var(--accent-warning);
  color: #000000;
}

.btn-warning:hover {
  background: #d97706;
  border-color: #d97706;
}

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

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

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

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

.btn-outline-danger {
  background: transparent;
  border-color: var(--accent-danger);
  color: var(--accent-danger);
}

.btn-outline-danger:hover {
  background: var(--accent-danger-bg);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: transparent;
}

/* Sizes */
.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 15px;
}

/* Icon Button */
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
}

.btn-icon.btn-sm {
  width: 28px;
  height: 28px;
}

.btn-icon.btn-lg {
  width: 44px;
  height: 44px;
}

/* Button Group */
.btn-group {
  display: inline-flex;
}

.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 + .btn {
  margin-left: -1px;
}

.btn-group .btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
  z-index: 1;
}

/* Disabled */
.btn:disabled,
.btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Loading */
.btn.loading {
  color: transparent;
  pointer-events: none;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-normal);
}

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

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

.card-header .card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-heading);
}

.card-header .card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.card-body {
  padding: 20px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
}

/* Stat Card */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all var(--transition-normal);
}

.stat-card:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}

.stat-card .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

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

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

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

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

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

.stat-card .stat-content {
  flex: 1;
  min-width: 0;
}

.stat-card .stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.stat-card .stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

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

.stat-card .stat-change.positive {
  background: var(--accent-success-bg);
  color: var(--accent-success);
}

.stat-card .stat-change.negative {
  background: var(--accent-danger-bg);
  color: var(--accent-danger);
}

.stat-card .stat-change.neutral {
  background: var(--bg-tertiary);
  color: var(--text-muted);
}

/* ==========================================================================
   Tables
   ========================================================================== */

.table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

.data-table th {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

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

.data-table .table-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
}

.data-table .table-actions .btn-icon {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: var(--text-muted);
}

.data-table .table-actions .btn-icon:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

/* Sortable columns */
.data-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.data-table th.sortable:hover {
  color: var(--text-primary);
}

.data-table th.sortable::after {
  content: '\2195';
  margin-left: 4px;
  opacity: 0.3;
}

.data-table th.sortable.asc::after {
  content: '\2191';
  opacity: 1;
  color: var(--accent-primary);
}

.data-table th.sortable.desc::after {
  content: '\2193';
  opacity: 1;
  color: var(--accent-primary);
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

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

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 9px 14px;
  font-family: var(--font-family);
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  outline: none;
}

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

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

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

.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 12 12'%3E%3Cpath fill='%238f93a2' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

/* Checkbox */
.form-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-primary);
  user-select: none;
}

.form-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  appearance: none;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  flex-shrink: 0;
}

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

.form-checkbox input[type="checkbox"]:checked::after {
  content: '\2713';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  color: #fff;
  font-weight: 700;
}

/* Toggle Switch */
.form-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-primary);
  user-select: none;
}

.form-toggle input[type="checkbox"] {
  appearance: none;
  width: 40px;
  height: 22px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  flex-shrink: 0;
}

.form-toggle input[type="checkbox"]::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-muted);
  top: 2px;
  left: 2px;
  transition: all var(--transition-fast);
}

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

.form-toggle input[type="checkbox"]:checked::after {
  background: #ffffff;
  left: 20px;
}

/* Input Group */
.input-group {
  display: flex;
  align-items: stretch;
}

.input-group .form-input {
  border-radius: 0;
}

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

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

.input-group-prepend,
.input-group-append {
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  white-space: nowrap;
}

.input-group-prepend {
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.input-group-append {
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

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

/* Search Input */
.search-input {
  position: relative;
}

.search-input .form-input {
  padding-left: 36px;
}

.search-input .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}

/* Form Error & Hint */
.form-error {
  font-size: 12px;
  color: var(--accent-danger);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

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

/* Error state */
.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: var(--accent-danger);
}

.form-input.error:focus,
.form-select.error:focus,
.form-textarea.error:focus {
  box-shadow: 0 0 0 3px var(--accent-danger-bg);
}

/* ==========================================================================
   Badges / Tags
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-full);
  white-space: nowrap;
  line-height: 1.4;
}

.badge-success {
  background: var(--accent-success-bg);
  color: var(--accent-success);
}

.badge-warning {
  background: var(--accent-warning-bg);
  color: var(--accent-warning);
}

.badge-danger {
  background: var(--accent-danger-bg);
  color: var(--accent-danger);
}

.badge-info {
  background: var(--accent-info-bg);
  color: var(--accent-info);
}

.badge-neutral {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.badge-primary {
  background: var(--accent-primary-bg);
  color: var(--accent-primary);
}

/* Sizes */
.badge-sm {
  padding: 1px 6px;
  font-size: 10px;
}

.badge-lg {
  padding: 5px 14px;
  font-size: 13px;
}

/* Dot Indicator */
.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.badge-dot.dot-success { background: var(--accent-success); }
.badge-dot.dot-warning { background: var(--accent-warning); }
.badge-dot.dot-danger { background: var(--accent-danger); }
.badge-dot.dot-info { background: var(--accent-info); }
.badge-dot.dot-neutral { background: var(--text-muted); }

.badge-dot.dot-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Network Badges */
.network-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.network-badge.ethereum {
  background: rgba(98, 126, 234, 0.12);
  color: #627eea;
}

.network-badge.tron {
  background: rgba(255, 0, 19, 0.1);
  color: #ff0013;
}

.network-badge.bitcoin {
  background: rgba(247, 147, 26, 0.1);
  color: #f7931a;
}

.network-badge.bsc {
  background: rgba(243, 186, 47, 0.1);
  color: #f3ba2f;
}

.network-badge .network-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

/* ==========================================================================
   Modal
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition-normal);
}

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

.modal-lg { max-width: 720px; }
.modal-xl { max-width: 960px; }
.modal-sm { max-width: 380px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.modal-header .modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-heading);
}

.modal-header .modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 18px;
}

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

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

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

/* ==========================================================================
   Toast / Notifications
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--text-muted);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 14px 18px;
  min-width: 320px;
  max-width: 420px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  pointer-events: auto;
  animation: toastSlideIn 0.3s ease forwards;
}

.toast.removing {
  animation: toastSlideOut 0.25s ease forwards;
}

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

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(40px);
  }
}

.toast-success { border-left-color: var(--accent-success); }
.toast-error { border-left-color: var(--accent-danger); }
.toast-warning { border-left-color: var(--accent-warning); }
.toast-info { border-left-color: var(--accent-info); }

.toast .toast-icon {
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1;
}

.toast-success .toast-icon { color: var(--accent-success); }
.toast-error .toast-icon { color: var(--accent-danger); }
.toast-warning .toast-icon { color: var(--accent-warning); }
.toast-info .toast-icon { color: var(--accent-info); }

.toast .toast-content {
  flex: 1;
  min-width: 0;
}

.toast .toast-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 2px;
}

.toast .toast-message {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.toast .toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  transition: color var(--transition-fast);
  flex-shrink: 0;
}

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

/* ==========================================================================
   Tabs
   ========================================================================== */

.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  gap: 0;
  overflow-x: auto;
}

.tab-item {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font-family);
}

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

.tab-item.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.tab-content {
  display: none;
  padding: 20px 0;
  animation: fadeIn 0.2s ease;
}

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

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-btn {
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-family);
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.page-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.page-info {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 8px;
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
}

.empty-state .empty-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

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

.empty-state .empty-description {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ==========================================================================
   Skeleton Loading
   ========================================================================== */

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-tertiary) 25%,
    var(--bg-hover) 50%,
    var(--bg-tertiary) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
  border-radius: 4px;
}

.skeleton-text:last-child {
  width: 60%;
}

.skeleton-heading {
  height: 24px;
  width: 40%;
  margin-bottom: 16px;
  border-radius: 4px;
}

.skeleton-card {
  height: 120px;
  border-radius: var(--radius-md);
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.skeleton-badge {
  width: 60px;
  height: 22px;
  border-radius: var(--radius-full);
}

.skeleton-btn {
  width: 100px;
  height: 36px;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Dropdown
   ========================================================================== */

.dropdown-container {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all var(--transition-fast);
}

.dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu.left {
  right: auto;
  left: 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-family);
}

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

.dropdown-item .dropdown-icon {
  width: 16px;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  flex-shrink: 0;
}

.dropdown-item.danger {
  color: var(--accent-danger);
}

.dropdown-item.danger .dropdown-icon {
  color: var(--accent-danger);
}

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

/* ==========================================================================
   Address Display
   ========================================================================== */

.address-display {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-tertiary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  max-width: 100%;
}

.address-display .address-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.address-display .address-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: var(--bg-hover);
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  font-size: 13px;
}

.address-display .address-copy:hover {
  background: var(--bg-primary);
  color: var(--accent-primary);
}

.address-display .address-copy.copied {
  color: var(--accent-success);
}

/* ==========================================================================
   Tooltips
   ========================================================================== */

[data-tooltip] {
  position: relative;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  pointer-events: none;
  z-index: 600;
}

[data-tooltip]:hover::before {
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   Alert / Info Boxes
   ========================================================================== */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid;
  font-size: 13px;
  line-height: 1.6;
}

.alert-info {
  background: var(--accent-info-bg);
  border-color: rgba(59, 130, 246, 0.2);
  color: var(--accent-info);
}

.alert-success {
  background: var(--accent-success-bg);
  border-color: rgba(34, 197, 94, 0.2);
  color: var(--accent-success);
}

.alert-warning {
  background: var(--accent-warning-bg);
  border-color: rgba(245, 158, 11, 0.2);
  color: var(--accent-warning);
}

.alert-danger {
  background: var(--accent-danger-bg);
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--accent-danger);
}

.alert .alert-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ==========================================================================
   Progress Bar
   ========================================================================== */

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar .progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--accent-primary);
  transition: width 0.5s ease;
}

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

/* ==========================================================================
   Tab Buttons (icon + label style)
   ========================================================================== */

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  font-family: var(--font-family);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.tab-btn.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.tab-btn svg {
  opacity: 0.6;
  transition: opacity var(--transition-fast);
}

.tab-btn.active svg,
.tab-btn:hover svg {
  opacity: 1;
}

.tab-panel {
  padding-top: 20px;
}

/* ==========================================================================
   Back Link
   ========================================================================== */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 8px;
  transition: color var(--transition-fast);
}

.back-link:hover {
  color: var(--accent-primary);
}

/* ==========================================================================
   Modal Backdrop (for showModal in components.js)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
}

.modal-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

body.modal-open {
  overflow: hidden;
}

/* ==========================================================================
   Table Responsive Wrapper (from buildTable)
   ========================================================================== */

.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-md);
}

.row-clickable {
  cursor: pointer;
}

.row-clickable:hover td {
  background: var(--bg-hover) !important;
}

.actions-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
  white-space: nowrap;
}

.cell-primary {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cell-primary strong {
  font-weight: 600;
  color: var(--text-heading);
}

/* ==========================================================================
   Small Icon Button (used inside address display, tx hash)
   ========================================================================== */

.btn-icon-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  padding: 0;
}

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

/* ==========================================================================
   Text Link
   ========================================================================== */

.text-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.text-link:hover {
  color: var(--accent-primary-hover);
  text-decoration: underline;
}

/* ==========================================================================
   Pagination Button (from buildPagination)
   ========================================================================== */

.pagination-btn {
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-family);
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pagination-btn:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.pagination-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  font-size: 14px;
  color: var(--text-muted);
}

.pagination-wrapper {
  display: flex;
  justify-content: center;
  padding: 16px 0;
}

/* ==========================================================================
   Filter Bar (from buildFilterBar)
   ========================================================================== */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
}

.filter-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.filter-input {
  padding: 7px 12px;
  font-size: 13px;
  font-family: var(--font-family);
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  outline: none;
  min-width: 0;
}

.filter-input:hover {
  border-color: var(--text-muted);
}

.filter-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-bg);
}

.filter-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 12 12'%3E%3Cpath fill='%238f93a2' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
  cursor: pointer;
}

.filter-date {
  color-scheme: dark;
}

.filter-actions {
  display: flex;
  align-items: flex-end;
  min-width: auto;
}

.filter-reset-btn {
  margin-top: auto;
}

/* ==========================================================================
   Skeleton Loading (from showLoading)
   ========================================================================== */

.skeleton-loading {
  padding: 16px 20px;
}

.skeleton-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  padding: 8px 0;
}

.skeleton-cell {
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    var(--bg-tertiary) 25%,
    var(--bg-hover) 50%,
    var(--bg-tertiary) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-cell-sm {
  width: 60px;
}

.skeleton-cell-md {
  width: 120px;
}

.skeleton-cell-lg {
  flex: 1;
  min-width: 160px;
}

/* ==========================================================================
   Form Validation (from setFormErrors)
   ========================================================================== */

.input-error {
  border-color: var(--accent-danger) !important;
}

.input-error:focus {
  box-shadow: 0 0 0 3px var(--accent-danger-bg) !important;
}

.field-error {
  font-size: 12px;
  color: var(--accent-danger);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   Form Layout Helpers
   ========================================================================== */

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.form-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

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

.form-info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: var(--accent-info-bg);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.6;
  color: var(--accent-info);
  margin-top: 4px;
}

.form-info svg {
  flex-shrink: 0;
  margin-top: 1px;
}

/* Confirm modal message */
.confirm-message {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
}

/* ==========================================================================
   Toggle Switch (compact inline toggle)
   ========================================================================== */

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  transition: all var(--transition-fast);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text-muted);
  top: 2px;
  left: 2px;
  transition: all var(--transition-fast);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.toggle-switch input:checked + .toggle-slider::before {
  background: #ffffff;
  transform: translateX(16px);
}

/* ==========================================================================
   Info Grid (wallet detail card)
   ========================================================================== */

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 24px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-item-full {
  grid-column: 1 / -1;
}

.info-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.info-value {
  font-size: 14px;
  color: var(--text-primary);
  word-break: break-word;
}

@media (max-width: 640px) {
  .info-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Transaction Detail Grid (modal)
   ========================================================================== */

.tx-detail-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.detail-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-width: 130px;
  flex-shrink: 0;
  padding-top: 2px;
}

.detail-value {
  font-size: 13px;
  color: var(--text-primary);
  word-break: break-word;
  flex: 1;
  min-width: 0;
}

/* ==========================================================================
   Transaction Confirm Summary
   ========================================================================== */

.tx-confirm-summary {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
}

.confirm-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

.confirm-row:last-child {
  border-bottom: none;
}

.confirm-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   TX Hash Cell (transactions table)
   ========================================================================== */

.tx-hash-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tx-hash {
  color: var(--accent-primary);
}

/* ==========================================================================
   Auto-refresh Indicator
   ========================================================================== */

.auto-refresh-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.auto-refresh-indicator svg {
  animation: spin 3s linear infinite;
  opacity: 0.5;
}

/* ==========================================================================
   Mnemonic Display
   ========================================================================== */

.mnemonic-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mnemonic-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.mnemonic-blur-wrapper {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.mnemonic-blur-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 17, 23, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 2;
  color: var(--text-muted);
  font-size: 13px;
  cursor: default;
  transition: all 0.3s ease;
}

.mnemonic-blur-wrapper.revealed .mnemonic-blur-overlay {
  opacity: 0;
  pointer-events: none;
}

.mnemonic-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.mnemonic-word {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.mnemonic-index {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 18px;
  text-align: right;
}

.mnemonic-value {
  font-family: var(--font-mono);
  color: var(--text-heading);
  font-weight: 500;
}

.mnemonic-actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .mnemonic-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .mnemonic-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

/* ==========================================================================
   Warning List (mnemonic confirmation)
   ========================================================================== */

.warning-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.warning-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
}

.warning-list li:last-child {
  border-bottom: none;
}

.warning-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-danger);
  flex-shrink: 0;
}

/* ==========================================================================
   Explorer Link (inside address display)
   ========================================================================== */

.explorer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.explorer-link:hover {
  color: var(--accent-primary);
}

/* ==========================================================================
   Header Actions Layout
   ========================================================================== */

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 768px) {
  .header-actions {
    flex-wrap: wrap;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-item {
    min-width: 100%;
  }

  .form-row {
    flex-direction: column;
  }

  .detail-row {
    flex-direction: column;
    gap: 4px;
  }

  .detail-label {
    min-width: auto;
  }

  .confirm-row {
    flex-direction: column;
    gap: 4px;
  }

  .auto-refresh-indicator {
    display: none;
  }
}

/* ==========================================================================
   Additional Components (Forwarder, Payments, API Keys, Settings pages)
   ========================================================================== */

/* Form Help Text */
.form-help {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* Font Weight Utility */
.font-medium {
  font-weight: 500;
}

/* Detail Grid Layout */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

/* Detail Section */
.detail-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}

.detail-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  padding-bottom: 20px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -21px;
  top: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
}

.timeline-item.timeline-active .timeline-dot {
  border-color: var(--accent-success);
}

.dot-success {
  background: var(--accent-success) !important;
  border-color: var(--accent-success) !important;
}

.dot-info {
  background: var(--accent-info) !important;
  border-color: var(--accent-info) !important;
}

.dot-danger {
  background: var(--accent-danger) !important;
  border-color: var(--accent-danger) !important;
}

.dot-muted {
  background: var(--bg-tertiary) !important;
  border-color: var(--text-muted) !important;
}

.timeline-content {
  padding-left: 4px;
}

.timeline-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.timeline-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* API Key Display */
.api-key-display {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-primary);
  border: 2px solid var(--accent-warning);
  border-radius: var(--radius-md);
  padding: 16px;
}

.api-key-value {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent-warning);
  word-break: break-all;
  line-height: 1.5;
}

/* Checkbox Group */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  transition: all var(--transition-fast);
}

.checkbox-item:hover {
  border-color: var(--accent-primary);
  background: var(--accent-primary-bg);
}

.checkbox-item input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--accent-primary);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.checkbox-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.3;
}

.checkbox-label strong {
  font-size: 13px;
  color: var(--text-primary);
}

.checkbox-label .text-xs {
  font-size: 12px;
}

/* Code Block (used outside of api-docs inline styles) */
.code-block {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-primary);
  overflow-x: auto;
  white-space: pre;
}

/* Alert Enhancements */
.alert-content {
  flex: 1;
}

.alert-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 4px;
}

.alert-message {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.alert-warning {
  background: var(--accent-warning-bg);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.alert-warning .alert-icon {
  color: var(--accent-warning);
  flex-shrink: 0;
}

/* Form Actions */
.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ==========================================================================
   v2.0 NEW COMPONENTS
   ========================================================================== */

/* Demo Banner */
.demo-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: linear-gradient(90deg, #f59e0b, #d97706);
  color: #000;
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.demo-banner ~ .sidebar { top: 36px; }
.demo-banner ~ .main-content { padding-top: 36px; }

/* Card Hover Effects */
.card, .stat-card, .panel {
  transition: transform var(--transition-normal, 250ms) ease, box-shadow var(--transition-normal, 250ms) ease;
}
.card:hover, .stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
.skeleton-text { height: 14px; margin-bottom: 8px; width: 80%; }
.skeleton-title { height: 20px; margin-bottom: 12px; width: 60%; }
.skeleton-circle { width: 40px; height: 40px; border-radius: 50%; }
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* OTP Input */
.otp-container {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 24px 0;
}
.otp-input {
  width: 52px;
  height: 60px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-heading);
  outline: none;
  transition: border-color 200ms;
}
.otp-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-bg);
}
.otp-countdown {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 8px;
}
.otp-countdown .time { color: var(--accent-warning); font-weight: 600; }

/* Approval Badge */
.approval-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.approval-badge--pending { background: var(--accent-warning-bg); color: var(--accent-warning); }
.approval-badge--approved { background: var(--accent-success-bg); color: var(--accent-success); }
.approval-badge--rejected { background: var(--accent-danger-bg); color: var(--accent-danger); }
.approval-badge--expired { background: rgba(107, 114, 128, 0.1); color: #6b7280; }

/* Activity Feed */
.activity-feed {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 8px;
}
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  transition: background 150ms;
}
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: var(--bg-hover); margin: 0 -12px; padding: 12px; border-radius: var(--radius-sm); }
.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}
.activity-icon--auth { background: var(--accent-info-bg); color: var(--accent-info); }
.activity-icon--wallet { background: var(--accent-primary-bg); color: var(--accent-primary); }
.activity-icon--transaction { background: var(--accent-success-bg); color: var(--accent-success); }
.activity-icon--security { background: var(--accent-danger-bg); color: var(--accent-danger); }
.activity-icon--system { background: var(--accent-warning-bg); color: var(--accent-warning); }
.activity-content { flex: 1; min-width: 0; }
.activity-title { font-size: 13px; color: var(--text-primary); font-weight: 500; }
.activity-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Tree View (Wallet Hierarchy) */
.tree-view { padding-left: 0; list-style: none; }
.tree-node {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
}
.tree-node::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}
.tree-node::after {
  content: '';
  position: absolute;
  left: 8px;
  top: 16px;
  width: 12px;
  height: 2px;
  background: var(--border-color);
}
.tree-node:last-child::before { bottom: 50%; }
.tree-root { padding-left: 0; }
.tree-root::before, .tree-root::after { display: none; }
.tree-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-primary);
}
.tree-label .network-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  font-weight: 600;
}
.tree-label .network-badge--ethereum { background: rgba(98, 126, 234, 0.15); color: #627eea; }
.tree-label .network-badge--tron { background: rgba(235, 0, 41, 0.15); color: #eb0029; }

/* Policy Card */
.policy-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: border-color 200ms;
}
.policy-card:hover { border-color: var(--accent-primary); }
.policy-card__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.policy-card__title { font-size: 15px; font-weight: 600; color: var(--text-heading); }
.policy-card__type {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 3px 8px; border-radius: var(--radius-full);
  background: var(--accent-primary-bg); color: var(--accent-primary); font-weight: 600;
}
.policy-card__detail { font-size: 13px; color: var(--text-secondary); margin-top: 8px; }

/* Gradient Border Card */
.gradient-border {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-md);
}
.gradient-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-info), var(--accent-primary));
  z-index: -1;
  opacity: 0.5;
  transition: opacity 300ms;
}
.gradient-border:hover::before { opacity: 1; }

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state__icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}
.empty-state__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.empty-state__text {
  font-size: 14px;
  max-width: 400px;
  margin: 0 auto 20px;
  line-height: 1.5;
}

/* Color Picker Input */
.color-picker-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.color-picker-group input[type="color"] {
  width: 40px;
  height: 40px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: none;
  padding: 2px;
}
.color-picker-group .color-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text-secondary);
}
