:root {
  --bg-color: #0c0e14;
  --card-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --primary-color: #5865f2;
  --primary-hover: #4752c4;
  --accent-color: #00d2ff;
  --text-color: #f1f3f5;
  --text-muted: #adb5bd;
  --success: #2ecc71;
  --error: #e74c3c;
  --warning: #f1c40f;
  --sidebar-width: 260px;
  --header-height: 70px;
  --font-main: "Outfit", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Background Animations */
.background-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  filter: blur(80px);
  opacity: 0.4;
}

.blob {
  position: absolute;
  border-radius: 50%;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: var(--primary-color);
  top: -100px;
  right: -100px;
}

.blob-2 {
  width: 400px;
  height: 400px;
  background: var(--accent-color);
  bottom: -100px;
  left: -100px;
}

.blob-3 {
  width: 300px;
  height: 300px;
  background: #9b59b6;
  top: 40%;
  left: 30%;
}

/* Layout */
.app-container {
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 1px;
}

.logo span {
  color: var(--accent-color);
  font-weight: 300;
}

.chain-selector {
  display: flex;
  align-items: center;
  gap: 1rem;
}

select {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  color: var(--text-color);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

select:focus {
  border-color: var(--accent-color);
}

select option {
  background-color: #1a1d26;
  color: white;
}

/* Fix for white dropdown on some systems */
#tx-token option[value="native"] {
  background-color: var(--primary-color);
  color: white;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--success);
}

.pulse {
  width: 8px;
  height: 8px;
  background-color: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(46, 204, 113, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
  }
}

/* Tabs */
.tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.8rem 1.5rem;
  font-size: 1.1rem;
  font-family: inherit;
  cursor: pointer;
  border-radius: 12px;
  transition: all 0.3s ease;
}

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

.tab-btn.active {
  background: var(--card-bg);
  color: var(--accent-color);
  box-shadow: inset 0 0 10px rgba(0, 210, 255, 0.1);
  border: 1px solid rgba(0, 210, 255, 0.2);
}

.tab-pane {
  display: none;
  animation: fadeIn 0.4s ease;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sub-tabs (inside a main tab) */
.subtabs {
  display: flex;
  gap: 0.5rem;
}

.subtab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.subtab-btn:hover {
  background: var(--card-bg);
  color: var(--text-color);
}

.subtab-btn.active {
  background: var(--card-bg);
  color: var(--accent-color);
  border-color: rgba(0, 210, 255, 0.2);
}

.subtab-pane {
  display: none;
}

.subtab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Event type badges */
.event-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.event-badge.staked {
  background: rgba(46, 204, 113, 0.15);
  color: var(--success);
}
.event-badge.unstaked {
  background: rgba(231, 76, 60, 0.15);
  color: var(--error);
}
.event-badge.inactivity {
  background: rgba(241, 196, 15, 0.2);
  color: var(--warning);
}
.event-badge.evicted {
  background: rgba(231, 76, 60, 0.2);
  color: var(--error);
}

/* Tokenomics summary */
#tokenomics-summary {
  grid-template-columns: repeat(2, 1fr);
}

/* Sections */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-header h2 {
  font-size: 1.8rem;
  font-weight: 600;
}

.glass {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
}

/* Tables */
.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
}

th {
  text-align: left;
  padding: 1rem;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--glass-border);
}

td {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.val {
  text-align: right;
}

.tag-badge {
  color: var(--success);
  font-weight: 500;
}

.address-cell {
  opacity: 0.7;
  cursor: pointer;
}

.address-cell:hover {
  opacity: 1;
  color: var(--accent-color);
}

/* Form */
.tx-form {
  margin-top: 2rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-grid-5 {
  grid-template-columns: repeat(5, 1fr);
  margin-bottom: 0;
}

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

.form-group-btn {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

input {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  color: var(--text-color);
  padding: 0.7rem 1rem;
  border-radius: 8px;
  outline: none;
}

input:focus {
  border-color: var(--accent-color);
}

.btn-send {
  width: 100%;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--accent-color)
  );
  border: none;
  color: white;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.btn-send:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

.btn-primary {
  background: var(--primary-color);
  border: none;
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}

.btn-primary:disabled {
  background: #555;
  color: #999;
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-warning {
  background: #f39c12;
  border: none;
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}

.btn-icon {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: white;
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: var(--card-bg);
}

.btn-icon svg {
  stroke: var(--text-muted);
}

.btn-icon:hover svg {
  stroke: white;
}

/* RPC Cards */
.rpc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.rpc-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.rpc-card h3 {
  text-transform: capitalize;
}

.rpc-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

/* Footer */
footer {
  margin-top: auto;
  padding: 1rem 0;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--glass-border);
}

/* Utilities */
.mt-2 {
  margin-top: 1rem;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 1000;
}

.toast {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  border-left: 4px solid var(--accent-color);
  padding: 1rem 1.5rem;
  border-radius: 4px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Loading Spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--accent-color);
  animation: spin 1s linear infinite;
  vertical-align: middle;
  margin-right: 0.8rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.modal.active {
  display: flex;
}

.modal-content {
  width: 100%;
  max-width: 500px;
  padding: 2.5rem;
}

.modal-content h2 {
  margin-bottom: 2rem;
  color: var(--accent-color);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}

.btn-secondary:hover {
  color: white;
  border-color: white;
}

.btn-warning {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  border: none;
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}

.btn-warning:hover {
  background: linear-gradient(135deg, #e67e22, #d35400);
}

.btn-warning.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

.btn-danger {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  border: none;
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #c0392b, #a93226);
}

.btn-danger.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

textarea {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  color: var(--text-color);
  padding: 0.7rem 1rem;
  border-radius: 8px;
  outline: none;
  resize: vertical;
  min-height: 80px;
  font-family: var(--font-mono);
}

textarea:focus {
  border-color: var(--accent-color);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: 8px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.checkbox-item input {
  cursor: pointer;
}

.mb-1 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 3rem;
}

/* Token Selector Row */
.token-selector-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.token-selector-row .label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.token-toggles {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.token-toggle {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.8rem;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.token-toggle:hover {
  border-color: var(--accent-color);
}

.token-toggle input {
  margin: 0;
  cursor: pointer;
}

.token-toggle.active {
  background: rgba(0, 210, 255, 0.1);
  border-color: var(--accent-color);
}

/* Account Actions */
.account-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

/* Inline spinner for table cells */
.cell-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--accent-color);
  animation: spin 0.8s linear infinite;
}

/* ===== CowSwap Styles ===== */
.swap-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  justify-content: center;
  padding: 2rem 0;
}

.swap-wrapper .table-container {
  width: 100%;
  max-width: 1200px;
}

#cowswap-master-table th:not(:first-child) {
  text-align: right;
}

#cowswap-master-table {
  table-layout: fixed;
  width: 100%;
}

.swap-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  width: 100%;
  max-width: 1200px;
}

@media (max-width: 900px) {
  .swap-cards-grid {
    grid-template-columns: 1fr;
  }
}

.wrap-balance-info {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.wrap-balance-info .balance-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  padding: 0.25rem 0;
}

.wrap-balance-info .balance-row .label {
  color: var(--text-muted);
}

.wrap-balance-info .balance-row .value {
  font-family: var(--font-mono);
  color: var(--accent-color);
}

.swap-container {
  padding: 2rem;
  width: 100%;
  max-width: 580px;
}

.swap-container h3 {
  margin: 0 0 1.5rem 0;
  font-size: 1.3rem;
  text-align: center;
}

.swap-mode-toggle {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--glass-border);
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.95rem;
}

.radio-item input[type="radio"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--glass-border);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

.radio-item input[type="radio"]:checked {
  border-color: var(--accent-color);
}

.radio-item input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: var(--accent-color);
  border-radius: 50%;
}

.swap-cards {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.swap-card {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1rem;
}

.swap-card.active {
  border-color: var(--accent-color);
  box-shadow: 0 0 10px rgba(0, 200, 150, 0.2);
}

.swap-card-header {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.6;
  margin-bottom: 0.75rem;
}

.swap-card select {
  width: 100%;
  margin-bottom: 0.75rem;
}

.swap-card-amount {
  display: flex;
  gap: 0.5rem;
}

.swap-card-amount input {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.swap-card-amount input[readonly] {
  opacity: 0.7;
  cursor: default;
  background: rgba(255, 255, 255, 0.02);
}

/* Hide number input spinners */
.no-spinners::-webkit-outer-spin-button,
.no-spinners::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.no-spinners {
  -moz-appearance: textfield;
}

.swap-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .swap-cards {
    flex-direction: column;
  }

  .swap-arrow {
    transform: rotate(90deg);
  }
}

.input-with-btn {
  display: flex;
  gap: 0.5rem;
}

.input-with-btn input {
  flex: 1;
  min-width: 0;
}

.btn-max {
  background: var(--accent-color);
  border: none;
  color: white;
  padding: 0 0.75rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.btn-max:hover {
  background: #00c8a0;
}

.btn-max:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

.btn-swap {
  width: 100%;
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  border: none;
  color: white;
  padding: 0.9rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  margin-top: 0.5rem;
}

.btn-swap:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
}

.btn-swap:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ===== Olas Services Styles ===== */
.olas-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
  gap: 1.5rem;
}

.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.service-card {
  padding: 1.5rem;
}

.service-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--glass-border);
}

.service-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
}

.service-id {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.9rem;
}

.chain-badge {
  background: rgba(0, 210, 255, 0.15);
  color: var(--accent-color);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
}

.service-accounts-table {
  width: 100%;
  margin-bottom: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.service-accounts-table th {
  padding: 0.6rem 0.8rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.service-accounts-table td {
  padding: 0.6rem 0.8rem;
}

.staking-info {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.2rem;
}

.staking-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.9rem;
}

.staking-row:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.staking-row .label {
  color: var(--text-muted);
}

.staking-row .value {
  font-weight: 500;
}

.staking-row .value.staked,
.staking-row .value.deployed {
  color: var(--success);
}

.staking-row .value.not-staked {
  color: var(--text-muted);
}

.staking-row .value.rewards {
  color: var(--accent-color);
}

.staking-row .value.passed {
  color: var(--success);
}

.staking-row .value.failed {
  color: var(--warning);
}

.staking-row .value.evicted {
  color: var(--error);
}

.staking-row .value.countdown {
  color: var(--accent-color);
}

.service-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn-checkpoint:disabled,
.btn-danger:disabled,
.btn-primary:disabled {
  background: #4a4a4a !important;
  color: #999999 !important;
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none !important;
  transform: none !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-sm {
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
}

.btn-primary.btn-sm:hover {
  transform: scale(1.02);
  box-shadow: 0 2px 10px rgba(88, 101, 242, 0.3);
}

.btn-warning.btn-sm:hover {
  transform: scale(1.02);
  box-shadow: 0 2px 10px rgba(243, 156, 18, 0.3);
}

.btn-secondary.btn-sm {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
}

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

@media (max-width: 500px) {
  .olas-services-grid {
    grid-template-columns: 1fr;
  }

  .service-actions {
    flex-direction: column;
  }

  .service-actions button {
    width: 100%;
  }
}

/* Liveness Progress Bar */
.liveness-progress {
  position: relative;
  flex: 1;
  height: 22px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  margin-left: 0.5rem;
}

.liveness-progress .progress-bar {
  height: 100%;
  width: var(--width, 0%);
  transition: width 0.3s ease;
  border-radius: 12px;
}

.liveness-progress .progress-bar.progress-success {
  background: linear-gradient(90deg, var(--success), #27ae60);
}

.liveness-progress .progress-bar.progress-warning {
  background: linear-gradient(90deg, var(--warning), #e67e22);
}

.liveness-progress .progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Olas Actions */
.olas-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.explorer-link {
  color: #ffffff !important;
  text-decoration: none;
  transition: color 0.2s;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.4);
}

.explorer-link:hover {
  color: var(--accent-color) !important;
  border-bottom: 1px solid var(--accent-color) !important;
  text-decoration: none !important;
}

/* Base Utility Classes */
.text-center {
  text-align: center !important;
}

.text-right {
  text-align: right !important;
}

.text-success {
  color: var(--success) !important;
}

.text-warning {
  color: var(--warning) !important;
}

.text-error {
  color: var(--error) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.opacity-30 {
  opacity: 0.3 !important;
}

.opacity-60 {
  opacity: 0.6 !important;
}

.hidden {
  display: none !important;
}

.w-100 {
  width: 100% !important;
}

.mb-1 {
  margin-bottom: 1rem !important;
}

.mb-2 {
  margin-bottom: 1.5rem !important;
}

.mb-3 {
  margin-bottom: 3rem !important;
}

/* Modal Widths */
.modal-sm {
  max-width: 380px !important;
}

.modal-md {
  max-width: 400px !important;
}

.modal-lg {
  max-width: 450px !important;
}

/* Olas Summary Header */
.olas-summary-header {
  margin: 0 auto 1rem auto;
  padding: 0.8rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 700px;
}

.olas-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}

.olas-summary-item-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.3rem;
}

.olas-summary-item-value {
  font-size: 1.3rem;
  font-weight: 600;
}

.olas-summary-item-value.accent {
  color: var(--accent-color);
}

.olas-summary-item-value.success {
  color: var(--success);
}

/* Progress Bars */
.progress-bar-container {
  position: relative;
  flex: 1;
  height: 22px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
}

/* Utils for JS generated content */
.flex-center-gap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-icon-sm {
  padding: 0.3rem !important;
}

.grayscale {
  filter: grayscale(100%);
}

.not-allowed {
  cursor: not-allowed;
}

.spinner-sm {
  width: 14px !important;
  height: 14px !important;
  border-width: 2px !important;
  margin-right: 0.5rem !important;
}

/* Recent Orders Table */
.recent-orders-section {
  width: 100%;
  max-width: 1200px;
}

.recent-orders-section h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

#recent-orders-table {
  width: 100%;
}

.order-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: capitalize;
}

.order-status.fulfilled {
  background: rgba(46, 204, 113, 0.2);
  color: var(--success);
}

.order-status.open {
  background: rgba(0, 210, 255, 0.2);
  color: var(--accent-color);
}

.order-status.expired,
.order-status.cancelled {
  background: rgba(231, 76, 60, 0.2);
  color: var(--error);
}

.order-progress {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.progress-bar-container {
  width: 100px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
  border-radius: 3px;
  transition: width 1s linear;
}

.progress-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Order Links */
.order-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* Rewards Tab */
.rewards-filters {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.rewards-filters select {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-color);
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  font-family: var(--font-main);
  font-size: 0.85rem;
}

.rewards-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.rewards-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1.2rem;
  backdrop-filter: blur(12px);
}

.rewards-card .card-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}

.rewards-card .card-value {
  font-size: 1.6rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

.rewards-card .card-value.accent {
  color: var(--accent-color);
}

.rewards-card .card-value.success {
  color: var(--success);
}

.rewards-chart-container {
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  min-height: 300px;
}

.rewards-trader-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.rewards-trader-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1rem;
  backdrop-filter: blur(12px);
}

.rewards-trader-card .trader-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: var(--accent-color);
}

.rewards-trader-card .trader-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem;
  font-size: 0.8rem;
}

.rewards-trader-card .stat-label {
  color: var(--text-muted);
}

.rewards-trader-card .stat-value {
  text-align: right;
  font-family: var(--font-mono);
  font-weight: 500;
}

#rewards-table .tx-link {
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

#rewards-table .tx-link:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

/* ─── Network (Subgraph) Tab ─── */
.subgraph-filters {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.form-select,
.form-input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-color);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-select:focus,
.form-input:focus {
  border-color: var(--accent-color);
}

.form-select option {
  background: #1a1d28;
  color: var(--text-color);
}

.form-input {
  width: 140px;
}

/* Hide number input spinners */
.form-input[type="number"]::-webkit-inner-spin-button,
.form-input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.form-input[type="number"] {
  -moz-appearance: textfield;
}

.section-badge {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* Scrollable tables: only tbody scrolls, thead stays fixed */
.table-scroll table {
  table-layout: fixed;
}

.table-scroll thead,
.table-scroll tbody {
  display: block;
}

.table-scroll tbody {
  max-height: 420px;
  overflow-y: auto;
}

.table-scroll thead tr,
.table-scroll tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.protocol-state-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.protocol-state-badge.state-0 {
  background: rgba(173, 181, 189, 0.15);
  color: var(--text-muted);
}
.protocol-state-badge.state-1 {
  background: rgba(0, 210, 255, 0.15);
  color: var(--accent-color);
}
.protocol-state-badge.state-2 {
  background: rgba(0, 210, 255, 0.2);
  color: var(--accent-color);
}
.protocol-state-badge.state-3 {
  background: rgba(241, 196, 15, 0.15);
  color: var(--warning);
}
.protocol-state-badge.state-4 {
  background: rgba(46, 204, 113, 0.15);
  color: var(--success);
}
.protocol-state-badge.state-5 {
  background: rgba(231, 76, 60, 0.15);
  color: var(--error);
}
