button:not(:disabled),
[role="button"]:not(:disabled) {
  cursor: pointer;
}

*,
*::before,
*::after {
  border-color: var(--color-border);
}

#message-modal a {
  text-decoration: underline;
}

.glass-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .glass-card {
  background: rgba(44, 44, 46, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
}

.input-field {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 12px 16px;
  transition: all 0.2s ease;
  color: var(--color-heading);
}

.input-field:focus {
  outline: none;
  border-color: #007aff;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.dark .input-field {
  background: rgba(44, 44, 46, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
}

.dark .input-field:focus {
  border-color: #0a84ff;
}

.dark .input-field::placeholder {
  color: #8e8e93;
}

.btn-primary {
  background: linear-gradient(135deg, #007aff 0%, #0056b3 100%);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 122, 255, 0.2);
  color: #007aff;
}

.btn-secondary:hover {
  background: rgba(0, 122, 255, 0.1);
}

.dark .btn-secondary {
  background: rgba(44, 44, 46, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
}

.dark .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.price-history-table-scroll {
  max-height: min(55vh, calc(90vh - 260px));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.price-history-table-min {
  min-width: 900px;
}

.nav-item {
  position: relative;
  transition: all 0.2s ease;
}

.nav-item.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: #007aff;
  border-radius: 1px;
}

nav {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

nav::-webkit-scrollbar {
  height: 4px;
}

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

nav::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

nav::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

.tab-content {
  min-height: 0;
  overflow-y: auto;
}

.tab-content::-webkit-scrollbar {
  width: 6px;
}

.tab-content::-webkit-scrollbar-track {
  background: transparent;
}

.tab-content::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.tab-content::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
}

button.status-badge {
  cursor: pointer;
  border: none;
}

button.status-badge:hover {
  filter: brightness(1.06);
}

button.status-badge:focus-visible {
  outline: 2px solid var(--color-primary, #3b82f6);
  outline-offset: 2px;
}

.status-active {
  background: linear-gradient(135deg, #34c759 0%, #30a46c 100%);
  color: white;
}

.status-paused {
  background: linear-gradient(135deg, #8e8e93 0%, #636366 100%);
  color: white;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.badge-success,
.badge-warning,
.badge-error,
.badge-info {
  color: white;
}

.badge-success {
  background: #34c759;
}

.badge-warning {
  background: #ff9500;
}

.badge-error {
  background: #ff3b30;
}

.badge-info {
  background: #007aff;
}

.badge-pending {
  background: linear-gradient(135deg, #8e8e93 0%, #636366 100%);
  color: white;
}

.badge-expired {
  background: linear-gradient(135deg, #af52de 0%, #9d4edd 100%);
  color: white;
}

.badge-timeout {
  background: linear-gradient(135deg, #ff6b00 0%, #ff5500 100%);
  color: white;
}

.badge-accepted {
  background: linear-gradient(135deg, #32d74b 0%, #28cd41 100%);
  color: white;
}

.badge-enroute {
  background: linear-gradient(135deg, #5ac8fa 0%, #0a84ff 100%);
  color: white;
}

.badge-unknown {
  background: linear-gradient(135deg, #aeaeb2 0%, #8e8e93 100%);
  color: white;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.btn-icon:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-icon:active {
  transform: translateY(0);
}

.btn-icon-edit {
  background: linear-gradient(135deg, #007aff 0%, #0056b3 100%);
  color: white;
}

.btn-icon-edit:hover {
  background: linear-gradient(135deg, #0056b3 0%, #004299 100%);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.btn-icon-delete {
  background: linear-gradient(135deg, #ff3b30 0%, #e34850 100%);
  color: white;
}

.btn-icon-delete:hover {
  background: linear-gradient(135deg, #e34850 0%, #d32f2f 100%);
  box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
}

.btn-icon-add {
  background: linear-gradient(135deg, #34c759 0%, #30a46c 100%);
  color: white;
}

.btn-icon-add:hover {
  background: linear-gradient(135deg, #30a46c 0%, #28a745 100%);
  box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3);
}

.btn-icon-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 12px;
}

.btn-icon-small:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn-icon-small:active {
  transform: translateY(0);
}

.btn-icon-small.btn-icon-add {
  background: linear-gradient(135deg, #34c759 0%, #30a46c 100%);
  color: white;
}

.btn-icon-small.btn-icon-add:hover {
  background: linear-gradient(135deg, #30a46c 0%, #28a745 100%);
  box-shadow: 0 2px 6px rgba(52, 199, 89, 0.3);
}

.btn-icon-small.btn-icon-delete {
  background: linear-gradient(135deg, #ff3b30 0%, #e34850 100%);
  color: white;
}

.btn-icon-small.btn-icon-delete:hover {
  background: linear-gradient(135deg, #e34850 0%, #d32f2f 100%);
  box-shadow: 0 2px 6px rgba(255, 59, 48, 0.3);
}

.notification {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  color: #1c1c1e;
  animation: slideInRight 0.3s ease-out;
}

.notification-success {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.2);
  color: #166534;
}

.notification-error {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.2);
  color: #991b1b;
}

.notification-info {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.2);
  color: #1d4ed8;
}

.notification.slide-out {
  animation: slideOutRight 0.2s ease-in;
}

.dark .notification {
  background: rgba(44, 44, 46, 0.95);
  border-color: rgba(255, 255, 255, 0.1);
}

#message-details * {
  max-width: 100%;
  overflow-wrap: break-word;
}

.diff-removed {
  background-color: #fecaca;
  color: #991b1b;
  text-decoration: line-through;
}

.diff-added {
  background-color: #bbf7d0;
  color: #166534;
}

.dark .diff-removed {
  background-color: #7f1d1d;
  color: #fecaca;
}

.dark .diff-added {
  background-color: #14532d;
  color: #bbf7d0;
}

.dark {
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.dark ::-webkit-scrollbar {
  width: 6px;
  height: 4px;
}

.dark ::-webkit-scrollbar-track {
  background: transparent;
}

.dark ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

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

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

.dashboard-shell {
  min-height: calc(100dvh - 130px);
}

.table-scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.clients-table-min {
  min-width: 920px;
}

.responsive-header {
  flex-wrap: wrap;
  align-items: flex-start;
}

.responsive-actions {
  width: 100%;
  max-width: none;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.responsive-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
}

.responsive-filter-item {
  flex: 1 1 100%;
  min-width: 0;
}

.filter-multiselect.responsive-filter-item,
.stats-group-by-dropdown.responsive-filter-item {
  min-width: 0;
}

.responsive-filter-actions {
  display: flex;
  gap: 8px;
  width: 100%;
}

.responsive-filter-actions > button {
  flex: 1 1 auto;
}

@media (min-width: 768px) {
  .responsive-actions {
    width: auto;
    max-width: 32rem;
    margin-left: auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
  }
}

@media (min-width: 1200px) {
  .responsive-filters {
    flex-wrap: wrap;
    overflow-x: visible;
    overflow-y: visible;
  }

  .responsive-filter-item {
    flex: 1 1 0;
    min-width: 8.5rem;
  }

  .responsive-filter-actions {
    flex: 0 0 auto;
    width: auto;
  }

  .responsive-filter-actions > button {
    flex: none;
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .tab-content {
    padding: 12px;
  }

  .tab-content h2 {
    font-size: 1.25rem;
    line-height: 1.4;
  }

  .btn-icon {
    width: 40px;
    height: 40px;
  }
}
