/* Modern Dashboard Styles */
:root {
  --primary: #00ff9d;
  --primary-dark: #00c97a;
  --dark-bg: #0a0a0a;
  --dark-card: #121212;
  --dark-border: #1e1e1e;
  --light-bg: #f8f9fa;
  --light-card: #ffffff;
  --light-border: #e0e0e0;
  --text-dark: #e0e0e0;
  --text-light: #333333;
  --success: #00ff9d;
  --danger: #ff3860;
  --warning: #ffdd57;
  --info: #3298dc;
  --transition-speed: 0.3s;
}

/* Base Styles */
body {
  font-family: "Fira Code", "Courier New", monospace;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-speed) ease-in-out;
  background-color: var(--dark-bg);
  color: var(--text-dark);
  line-height: 1.6;
  position: relative;
}

/* Matrix Rain Background */
#matrix-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.3;
}

/* When in light theme, hide the matrix */
body.light-theme #matrix-container {
  display: none;
}

/* Modern Glassmorphism Effect */
.glass-card {
  background: rgb(18 18 18 / 19%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.36);
  border-radius: 12px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  letter-spacing: 1px;
}

h1 {
  color: var(--primary);
  text-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
  position: relative;
  display: inline-block;
}

h1::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
}

/* Dashboard Title Responsive */
.dashboard-title {
  font-size: 2rem;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .dashboard-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 576px) {
  .dashboard-title {
    font-size: 1.25rem;
  }
}

/* Buttons - Modern Flat Design with Hover Effects */
.btn,
.btn-sort,
.hack-mode-btn,
.btn-primary,
.btn-secondary {
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-transform: uppercase;
  letter-spacing: 1px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background-color: var(--primary);
  color: #000;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 255, 157, 0.2);
}

.btn-secondary {
  background-color: var(--dark-card);
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-secondary:hover {
  background-color: rgba(0, 255, 157, 0.1);
  transform: translateY(-2px);
}

/* Info Cards - New Mobile-Friendly Design */
.info-card {
  background: rgba(18, 18, 18, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 10px;
  transition: all var(--transition-speed) ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.info-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 255, 157, 0.1);
  border-color: var(--primary);
}

.info-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
}

.info-item:last-child {
  margin-bottom: 0;
  border-bottom: none;
}

.info-item i {
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.info-item span:not(:first-child) {
  font-weight: 600;
  text-align: right;
  min-width: 60px;
}

/* Total Info Panel */
.total-info {
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  background-color: var(--dark-card);
  border: 1px solid var(--dark-border);
  position: relative;
  overflow: hidden;
}

.total-info::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--info), var(--danger));
}

/* Default state: dashboard grid view */
.dashboard-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 10px;
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
  grid-auto-rows: min-content;
}

/* Default state: table view */
.table-container {
  padding: 15px;
  box-sizing: border-box;
  display: block;
}

/* Class to hide elements */
.hidden {
  display: none !important;
}

.dashboard-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 12px;
  padding: 20px;
  transition: all var(--transition-speed) ease;
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 200px;
  max-width: 100%;
  box-sizing: border-box;
  width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.dashboard-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
  transition: all var(--transition-speed) ease;
}

.dashboard-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 255, 157, 0.1);
  border-color: var(--primary);
}

.dashboard-item:hover::before {
  width: 8px;
}

/* Modern Input Styles */
.form-control {
  background-color: var(--dark-card);
  border: 1px solid var(--dark-border);
  color: var(--text-dark);
  border-radius: 8px;
  padding: 12px 15px;
  transition: all var(--transition-speed) ease;
  font-size: 16px; /* Better for mobile */
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.25rem rgba(0, 255, 157, 0.25);
  background-color: var(--dark-card);
  color: var(--text-dark);
}

.input-group-text {
  border-radius: 8px 0 0 8px;
  border: 1px solid var(--dark-border);
  background-color: var(--dark-card);
  color: var(--primary);
  padding: 12px 15px;
}

/* Dropdown Menu - Modern */
.dashboard-dropdown-menu {
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  border: none;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  min-width: 200px;
}

.dashboard-dropdown-item {
  padding: 12px 15px;
  transition: all var(--transition-speed) ease;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-dropdown-item:hover {
  padding-left: 20px;
  background-color: rgba(0, 255, 157, 0.1);
}

/* Modern Table Styles */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
}

.table th {
  background-color: var(--dark-card);
  color: var(--primary);
  font-weight: 600;
  padding: 15px;
  text-align: left;
  border-bottom: 2px solid var(--primary);
}

.table td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--dark-border);
  transition: all var(--transition-speed) ease;
}

.table tr:hover td {
  background-color: rgba(0, 255, 157, 0.05);
}

/* Modal Styles */
.modal {
  --bs-modal-zindex: 1055;
  --bs-modal-width: 500px;
  --bs-modal-padding: 1rem;
  --bs-modal-margin: 0.5rem;
  --bs-modal-color: ;
  --bs-modal-bg: var(--bs-body-bg);
  --bs-modal-border-color: var(--bs-border-color-translucent);
  --bs-modal-border-width: var(--bs-border-width);
  --bs-modal-border-radius: var(--bs-border-radius-lg);
  --bs-modal-box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --bs-modal-inner-border-radius: calc(var(--bs-border-radius-lg) - (var(--bs-border-width)));
  --bs-modal-header-padding-x: 1rem;
  --bs-modal-header-padding-y: 1rem;
  --bs-modal-header-padding: 1rem 1rem;
  --bs-modal-header-border-color: var(--bs-border-color);
  --bs-modal-header-border-width: var(--bs-border-width);
  --bs-modal-title-line-height: 1.5;
  --bs-modal-footer-gap: 0.5rem;
  --bs-modal-footer-bg: ;
  --bs-modal-footer-border-color: var(--bs-border-color);
  --bs-modal-footer-border-width: var(--bs-border-width);
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--bs-modal-zindex);
  display: none;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
}

.modal-content {
  border-radius: 16px;
  overflow: hidden;
  border: none;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  background-color: var(--dark-card);
  animation: fadeIn 0.5s ease forwards;
}

.modal-header {
  border-bottom: 1px solid var(--primary);
  padding: 20px;
  background-color: var(--dark-card);
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 600;
}

.modal-footer {
  border-top: 1px solid var(--primary);
  padding: 20px;
  background-color: var(--dark-card);
}

/* Apply dark theme specific colors */
body.dark-theme .modal-content {
  color: #ffffff;
  background-color: var(--dark-card);
}

body.dark-theme .modal-header {
  background-color: var(--dark-card);
  color: var(--primary);
  border-bottom-color: var(--primary);
}

body.dark-theme .modal-footer {
  background-color: var(--dark-card);
  border-top-color: var(--primary);
}

/* Light Theme Overrides for Modals */
body.light-theme .modal-content {
  background-color: var(--light-card);
  color: var(--text-light);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

body.light-theme .modal-header {
  background-color: var(--light-card);
  color: var(--text-light);
  border-bottom-color: var(--light-border);
}

body.light-theme .modal-footer {
  background-color: var(--light-card);
  border-top-color: var(--light-border);
}

/* Style for the close button */
.modal .btn-close {
  transition: all var(--transition-speed) ease;
}

/* Close button styles for Dark Theme */
body.dark-theme .modal .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* Close button styles for Light Theme */
body.light-theme .modal .btn-close {
  filter: none;
  color: var(--text-light);
}

.modal .btn-close:hover {
  opacity: 0.75;
  transform: rotate(90deg);
}

/* Ensure icons within buttons are styled for the dark theme */
.modal .btn i.fas {
  color: inherit;
}

/* Tabs - Modern */
.nav-tabs {
  border-bottom: 1px solid var(--dark-border);
}

.nav-tabs .nav-link {
  color: var(--text-dark);
  border: none;
  padding: 12px 20px;
  font-weight: 600;
  position: relative;
  background: none;
}

.nav-tabs .nav-link::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--primary);
  transition: width var(--transition-speed) ease;
}

.nav-tabs .nav-link:hover::after,
.nav-tabs .nav-link.active::after {
  width: 100%;
}

.nav-tabs .nav-link.active {
  color: var(--primary);
  background: none;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-transition {
  animation: fadeIn 0.5s ease forwards;
}

/* Status Indicators */
.text-success {
  color: var(--success) !important;
}

.text-danger {
  color: var(--danger) !important;
}

.text-warning {
  color: var(--warning) !important;
}

.text-info {
  color: var(--info) !important;
}

/* Price Text */
.price-text {
  font-weight: 700;
  position: relative;
  padding-left: 20px;
}

.price-text::before {
  content: "?";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
}

/* Light Theme Overrides */
.light-theme {
  background-color: var(--light-bg);
  color: var(--text-light);
}

.light-theme .dashboard-item,
.light-theme .total-info,
.light-theme .modal-content,
.light-theme .modal-header,
.light-theme .modal-footer,
.light-theme .info-card {
  background-color: var(--light-card);
  border-color: var(--light-border);
}

.light-theme .form-control {
  background-color: var(--light-card);
  border-color: var(--light-border);
  color: var(--text-light);
}

.light-theme .table th,
.light-theme .table td {
  border-color: var(--light-border);
}

.light-theme .nav-tabs {
  border-bottom-color: var(--light-border);
}

.light-theme .nav-tabs .nav-link {
  color: var(--text-light);
}

/* Enhanced Media Queries for Better Mobile Experience */
@media (max-width: 1400px) {
  .dashboard-container {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
  }
}

@media (max-width: 1200px) {
  .dashboard-container {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 15px;
  }
}

@media (max-width: 992px) {
  .dashboard-container {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
  }

  .info-card {
    padding: 12px;
  }

  .info-item {
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .dashboard-container {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    padding: 8px;
  }

  .dashboard-item {
    padding: 15px;
    min-height: 180px;
  }

  .glass-card {
    padding: 15px !important;
  }

  .btn {
    padding: 10px 15px;
    font-size: 13px;
    min-height: 44px;
  }

  .info-card {
    padding: 10px;
  }

  .info-item {
    font-size: 13px;
    padding: 6px 0;
  }

  .modal-dialog {
    margin: 10px;
  }

  .modal-content {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .dashboard-container {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    padding: 5px;
  }

  .dashboard-item {
    padding: 12px;
    min-height: 160px;
  }

  .glass-card {
    padding: 12px !important;
  }
}

@media (max-width: 400px) {
  .dashboard-container {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* Modern Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* Floating Action Button */
.floating-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0, 255, 157, 0.3);
  z-index: 1000;
  transition: all var(--transition-speed) ease;
  border: none;
  cursor: pointer;
}

.floating-btn:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 15px 30px rgba(0, 255, 157, 0.4);
}

@media (max-width: 768px) {
  .floating-btn {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }
}

/* Modern Loading Spinner */
.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(0, 255, 157, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Pulse Animation for Important Elements */
.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 255, 157, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 255, 157, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 255, 157, 0);
  }
}

/* Modern Tooltip */
.tooltip-inner {
  background-color: var(--dark-card);
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
}

.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before,
.bs-tooltip-top .tooltip-arrow::before {
  border-top-color: var(--primary);
}

/* Modern Checkbox */
.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* Modern Radio Buttons */
.form-check-input[type="radio"]:checked {
  background-color: transparent;
  border-color: var(--primary);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%2300ff9d'/%3e%3c/svg%3e");
}

/* Styles for tables within modals */
.modal .claim-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 20px;
  border-radius: 8px;
  overflow: hidden;
}

.modal .claim-table th,
.modal .claim-table td {
  text-align: left;
  padding: 12px 20px 12px 15px;
}

body.dark-theme .modal .claim-table th {
  background-color: rgba(0, 255, 157, 0.1);
  color: var(--primary);
  font-weight: 600;
  border-bottom: 1px solid var(--primary-dark);
}

body.dark-theme .modal .claim-table td {
  border-bottom: 1px solid var(--dark-border);
  color: #000000;
  transition: all var(--transition-speed) ease;
}

body.dark-theme .modal .claim-table tbody tr:last-child td {
  border-bottom: none;
}

body.dark-theme .modal .claim-table tbody tr:hover td {
  background-color: rgba(0, 255, 157, 0.05);
}

body.light-theme .modal .claim-table th {
  background-color: var(--light-border);
  color: var(--text-light);
  font-weight: 600;
  border-bottom: 1px solid var(--light-border);
}

body.light-theme .modal .claim-table td {
  border-bottom: 1px solid var(--light-border);
  color: var(--text-light);
  transition: all var(--transition-speed) ease;
}

body.light-theme .modal .claim-table tbody tr:last-child td {
  border-bottom: none;
}

body.light-theme .modal .claim-table tbody tr:hover td {
  background-color: rgba(0, 0, 0, 0.03);
}

body.light-theme .modal .claim-table td a,
body.light-theme .modal .claim-table td span {
  color: var(--text-light);
}

/* Styles for pagination within modals */
.modal .pagination-container {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.modal .pagination {
  margin-bottom: 0;
}

.modal .page-item .page-link {
  transition: all var(--transition-speed) ease;
}

body.dark-theme .modal .page-item .page-link {
  background-color: var(--dark-card);
  border: 1px solid var(--dark-border);
  color: var(--text-dark);
}

body.dark-theme .modal .page-item.active .page-link {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #000;
  font-weight: 600;
}

body.dark-theme .modal .page-item .page-link:hover:not(.disabled) {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #000;
}

body.dark-theme .modal .page-item.disabled .page-link {
  color: var(--text-dark);
  pointer-events: none;
  background-color: var(--dark-card);
  border-color: var(--dark-border);
  opacity: 0.5;
}

body.light-theme .modal .page-item .page-link {
  background-color: var(--light-card);
  border: 1px solid var(--light-border);
  color: var(--text-light);
}

body.light-theme .modal .page-item.active .page-link {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}

body.light-theme .modal .page-item .page-link:hover:not(.disabled) {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}

body.light-theme .modal .page-item.disabled .page-link {
  color: var(--text-light);
  pointer-events: none;
  background-color: var(--light-card);
  border-color: var(--light-border);
  opacity: 0.5;
}

/* Styles for the custom page buttons */
.modal .page-buttons {
  margin-top: 20px;
  text-align: center;
}

.modal .page-button {
  display: inline-block;
  padding: 10px 20px;
  margin: 0 5px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body.dark-theme .modal .page-button {
  background-color: var(--primary);
  color: #000;
}

body.dark-theme .modal .page-button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 255, 157, 0.2);
}

body.dark-theme .modal .page-button:disabled {
  background-color: var(--dark-border);
  color: var(--text-dark);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

body.light-theme .modal .page-button {
  background-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body.light-theme .modal .page-button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 255, 157, 0.2);
}

body.light-theme .modal .page-button:disabled {
  background-color: var(--light-border);
  color: var(--text-light);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Footer Styling */
#footer {
  background-color: var(--dark-card);
  color: var(--text-dark);
  padding: 20px 0;
  border-top: 1px solid var(--dark-border);
  margin-top: auto;
}

.light-theme #footer {
  background-color: #7f7f7f3d;
  color: var(--text-light);
  border-top-color: var(--light-border);
}

.footer-container {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

#footer .list-unstyled {
  margin-bottom: 1rem;
  gap: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

#footer .list-unstyled li {
  margin: 0;
  padding: 0;
}

#footer a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-speed) ease;
}

#footer a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

#footer strong {
  color: var(--primary);
}

#footer p {
  margin-bottom: 0.5rem;
}

/* Center only the version info text */
[data-attribute="version_info"] {
  text-align: center;
  display: block;
  margin: 0 auto;
  width: 100%;
}

/* Add this new rule for light theme */
body.light-theme .text-light {
  color: var(--text-light) !important;
}

/* Additional Mobile Optimizations */
@media (max-width: 480px) {
  .container-fluid {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .glass-card {
    padding: 10px !important;
  }

  .btn {
    padding: 6px 10px;
    font-size: 11px;
    min-height: 36px;
  }

  .info-card {
    padding: 6px;
  }

  .info-item {
    font-size: 11px;
    padding: 3px 0;
  }

  .dashboard-title {
    font-size: 1rem;
  }

  .total-info h5 {
    font-size: 0.9rem;
  }

  .floating-btn {
    bottom: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
  }
}

/* Dashboard refresh: calmer operations surface */
:root {
  --primary: #1fd19a;
  --primary-dark: #16a77a;
  --dark-bg: #030607;
  --dark-card: #090d10;
  --dark-card-raised: #0c1217;
  --dark-border: rgba(116, 141, 160, 0.2);
  --light-bg: #e9eef2;
  --light-card: #f7f9fb;
  --light-card-raised: #ffffff;
  --light-border: rgba(24, 38, 52, 0.18);
  --text-dark: #dce7ef;
  --text-muted-dark: #8ea1b2;
  --text-light: #14202b;
  --text-muted-light: #536574;
  --success: #36d399;
  --danger: #ff5d73;
  --warning: #f7c948;
  --info: #62b4ff;
}

body {
  background:
    radial-gradient(circle at 12% 0%, rgba(31, 209, 154, 0.05), transparent 26rem),
    linear-gradient(180deg, #020405 0%, #05090b 48%, #020405 100%);
  letter-spacing: 0;
}

body.light-theme {
  background:
    radial-gradient(circle at 12% 0%, rgba(31, 209, 154, 0.08), transparent 26rem),
    linear-gradient(180deg, #eef3f6 0%, #e4ebef 52%, #edf2f5 100%);
}

.transition-container.glass-card {
  width: 100%;
  min-height: 100vh;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 0;
}

.glass-card {
  background: rgba(9, 13, 16, 0.88);
  border: 1px solid var(--dark-border);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  border-radius: 10px;
}

body.light-theme .glass-card {
  background: rgba(247, 249, 251, 0.92);
  border-color: var(--light-border);
  box-shadow: 0 18px 42px rgba(22, 36, 50, 0.12);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  letter-spacing: 0;
}

h1 {
  text-shadow: none;
}

h1::after,
.total-info::after {
  display: none;
}

.dashboard-title {
  color: var(--text-dark);
  font-size: clamp(1.35rem, 2.2vw, 2.15rem);
}

body.light-theme .dashboard-title {
  color: var(--text-light);
}

.btn,
.btn-sort,
.hack-mode-btn,
.btn-primary,
.btn-secondary {
  border-radius: 8px;
  box-shadow: none;
  text-transform: none;
  letter-spacing: 0;
}

.btn-primary {
  background: var(--primary);
  color: #07110d;
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(21, 31, 40, 0.95);
  color: var(--text-dark);
  border: 1px solid var(--dark-border);
}

body.light-theme .btn-secondary {
  background: #f8fafc;
  color: var(--text-light);
  border-color: var(--light-border);
}

.pulse {
  animation: none;
}

#matrix-container {
  opacity: 0.08;
}

.total-info {
  background: var(--dark-card-raised);
  border-color: var(--dark-border);
}

.dashboard-sync-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: center;
  margin-top: -4px;
}

.dashboard-status,
.dashboard-updated {
  color: var(--text-muted-dark);
  font-size: 0.78rem;
}

.dashboard-status {
  align-items: center;
  display: inline-flex;
  gap: 7px;
}

.dashboard-status::before {
  background: var(--text-muted-dark);
  border-radius: 999px;
  content: "";
  height: 7px;
  width: 7px;
}

.dashboard-status[data-state="loading"]::before {
  animation: pulse 1.3s infinite;
  background: var(--info);
}

.dashboard-status[data-state="success"]::before {
  background: var(--success);
}

.dashboard-status[data-state="error"]::before {
  background: var(--danger);
}

.dashboard-status[data-state="empty"]::before {
  background: var(--warning);
}

.dashboard-toolbar {
  display: grid;
  gap: 2px;
}

.toolbar-title {
  align-items: center;
  display: flex;
  justify-content: center;
}

body.light-theme .total-info {
  background: var(--light-card-raised);
  border-color: var(--light-border);
}

.info-card {
  background: rgba(2, 4, 5, 0.32);
  border-color: var(--dark-border);
  box-shadow: none;
}

.info-card:hover,
.dashboard-item:hover {
  border-color: rgba(31, 209, 154, 0.42);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
}

.dashboard-container {
  grid-template-columns: repeat(auto-fill, minmax(260px, 320px));
  gap: 16px;
  justify-content: start;
  padding: 0;
  overflow: visible;
}

.dashboard-container[data-visible-count="1"] {
  justify-content: center;
}

.dashboard-notice {
  align-items: center;
  display: flex;
  gap: 14px;
  grid-column: 1 / -1;
  justify-content: center;
  min-height: 170px;
  padding: 26px;
  text-align: left;
}

.dashboard-notice > i {
  color: var(--primary);
  font-size: 1.3rem;
}

.dashboard-notice h3 {
  color: var(--text-dark);
  font-size: 1rem;
  margin: 0 0 4px;
}

.dashboard-notice p {
  color: var(--text-muted-dark);
  font-size: 0.86rem;
  margin: 0;
}

.dashboard-item {
  align-items: stretch;
  background: rgba(9, 13, 16, 0.96);
  border-color: var(--dark-border);
  border-radius: 10px;
  padding: 18px;
  min-height: 0;
  max-width: 320px;
  box-shadow: none;
  width: 100%;
}

.dashboard-item::before {
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), rgba(98, 180, 255, 0.72));
}

.dashboard-item:hover::before {
  width: 100%;
}

.node-card-content {
  display: grid;
  gap: 12px;
  width: 100%;
}

.node-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-top: 6px;
}

.node-card-eyebrow {
  color: var(--text-muted-dark);
  display: block;
  font-size: 0.72rem;
  line-height: 1.2;
}

.node-card-title {
  color: var(--text-dark);
  font-size: 1rem;
  line-height: 1.35;
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}

.node-card-title a {
  color: inherit;
  text-decoration: none;
}

.node-card-title a:hover {
  color: var(--primary);
}

.node-status-badge {
  border-radius: 999px;
  border: 1px solid currentColor;
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  padding: 7px 9px;
}

.table-status {
  display: inline-flex;
  white-space: nowrap;
}

.node-last-seen {
  border-radius: 8px;
  background: rgba(255, 93, 115, 0.09);
  color: #ff9aaa;
  font-size: 0.82rem;
  margin: 0;
  padding: 8px 10px;
}

.node-metric {
  align-items: center;
  border-top: 1px solid var(--dark-border);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin: 0;
  padding-top: 10px;
}

.node-metric-value {
  overflow-wrap: anywhere;
}

.node-metric-label,
.system-information .card-title {
  color: var(--text-muted-dark);
  font-size: 0.8rem;
  font-weight: 500;
}

.node-metric-value {
  color: var(--text-dark);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: right;
}

.system-information {
  border-top: 1px solid var(--dark-border);
  padding-top: 10px;
}

.system-information .card-title {
  margin-bottom: 6px;
}

.node-version {
  color: var(--text-muted-dark);
  font-size: 0.82rem;
  margin: 0;
  overflow-wrap: anywhere;
}

.table-container {
  overflow-x: auto;
}

.table {
  color: var(--text-dark);
  margin-bottom: 0;
}

.table th {
  background: var(--dark-card-raised);
  border-bottom: 1px solid var(--dark-border);
  color: var(--text-muted-dark);
  font-size: 0.8rem;
}

.table td {
  color: var(--text-dark);
  border-bottom-color: var(--dark-border);
}

#transactionModal .modal-dialog {
  max-width: min(560px, calc(100vw - 24px));
}

#transactionModal .modal-body {
  overflow-x: hidden;
}

.transaction-count-select {
  max-width: 300px;
  width: 100%;
}

.transactions-tab-content {
  padding-top: 14px;
}

.transaction-list {
  display: grid;
  gap: 10px;
  max-width: 100%;
}

.transaction-item {
  background: rgba(2, 4, 5, 0.28);
  border: 1px solid var(--dark-border);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 12px;
}

.transaction-index {
  align-items: center;
  border: 1px solid var(--dark-border);
  border-radius: 999px;
  color: var(--text-muted-dark);
  display: inline-flex;
  font-size: 0.78rem;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.transaction-body {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.transaction-row {
  align-items: baseline;
  display: grid;
  gap: 8px;
  grid-template-columns: 88px minmax(0, 1fr);
}

.transaction-label {
  color: var(--text-muted-dark);
  font-size: 0.78rem;
}

.tx-hash a {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-decoration: none;
  word-break: break-word;
}

.tx-hash a:hover {
  text-decoration: underline;
}

.form-control,
.input-group-text {
  background-color: rgba(8, 11, 15, 0.42) !important;
  border-color: var(--dark-border) !important;
}

.form-control:focus {
  box-shadow: 0 0 0 0.2rem rgba(31, 209, 154, 0.18);
}

.price-text::before {
  content: "";
}

body.light-theme .dashboard-item,
body.light-theme .info-card {
  background: var(--light-card-raised);
  border-color: var(--light-border);
  box-shadow: 0 14px 34px rgba(22, 36, 50, 0.08);
}

body.light-theme .node-card-title,
body.light-theme .node-metric-value,
body.light-theme .table,
body.light-theme .table td {
  color: var(--text-light);
}

body.light-theme .node-card-eyebrow,
body.light-theme .node-metric-label,
body.light-theme .system-information .card-title,
body.light-theme .node-version,
body.light-theme .table th,
body.light-theme .dashboard-status,
body.light-theme .dashboard-updated {
  color: var(--text-muted-light);
}

body.light-theme .dashboard-notice h3 {
  color: var(--text-light);
}

body.light-theme .dashboard-notice p {
  color: var(--text-muted-light);
}

body.light-theme .node-metric,
body.light-theme .system-information {
  border-top-color: var(--light-border);
}

body.light-theme .table th {
  background: #eef3f6;
  border-bottom-color: var(--light-border);
}

body.light-theme .transaction-item {
  background: #f8fafc;
  border-color: var(--light-border);
}

body.light-theme .transaction-index {
  border-color: var(--light-border);
  color: var(--text-muted-light);
}

body.light-theme .transaction-label {
  color: var(--text-muted-light);
}

body.light-theme .btn-primary {
  background: #22c993;
  color: #07110d;
}

body.light-theme .btn-primary:hover {
  background: #1cb382;
}

body.light-theme .dashboard-dropdown-menu {
  background: var(--light-card-raised);
  border: 1px solid var(--light-border);
}

body.light-theme .dashboard-dropdown-item {
  color: var(--text-light);
}

body.light-theme .dashboard-dropdown-item:hover {
  background: rgba(31, 209, 154, 0.12);
}

body.light-theme .form-control,
body.light-theme .input-group-text {
  background-color: #f8fafc !important;
  border-color: var(--light-border) !important;
}

@media (max-width: 768px) {
  .dashboard-container {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  .dashboard-item {
    max-width: none;
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .dashboard-container {
    grid-template-columns: 1fr;
  }

  .transaction-row {
    grid-template-columns: 1fr;
  }
}
