/* ============================================================
   components.css — Reusable UI Components DSC Waqf
   Navbar, Buttons, Cards, Badges, Tables, Forms, Footer
   ============================================================ */

/* ══════════════════════════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(13, 31, 28, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(201, 168, 76, 0.15);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1600px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

.navbar-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.navbar-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.navbar-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.navbar-tagline {
  font-size: 10px;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-left: auto;
  margin-right: var(--space-4);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition), background var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  color: var(--accent);
}

.nav-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.navbar-actions .btn-accent {
  display: none !important;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  cursor: pointer;
}

.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all var(--transition);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: rgba(13, 31, 28, 0.98);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: var(--space-4);
  z-index: 999;
  flex-direction: column;
  gap: var(--space-2);
}

.mobile-menu.open { display: flex; }

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  font-size: var(--text-base);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all var(--transition);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--accent);
  background: rgba(201, 168, 76, 0.08);
}

/* ══════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: 4px;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(26, 107, 90, 0.5);
}

.btn-accent {
  background: var(--gradient-accent);
  color: var(--dark);
  font-weight: 700;
  box-shadow: var(--shadow-gold);
}

.btn-accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(201, 168, 76, 0.5);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(201, 168, 76, 0.06);
}

.btn-outline-accent {
  background: transparent;
  border: 1px solid rgba(201, 168, 76, 0.4);
  color: var(--accent);
}

.btn-outline-accent:hover {
  background: rgba(201, 168, 76, 0.1);
  border-color: var(--accent);
}

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

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  border-radius: 8px;
}

.btn-icon {
  padding: var(--space-3);
  border-radius: var(--radius-sm);
}

/* ══════════════════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border);
}

.card-glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.card-gold {
  background: var(--surface);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  position: relative;
  overflow: hidden;
}

.card-gold::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-accent);
}

/* Stat Card */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}

.stat-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-gold-line);
  opacity: 0;
  transition: opacity var(--transition);
}

.stat-card:hover {
  border-color: rgba(201, 168, 76, 0.25);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.stat-card:hover::after {
  opacity: 1;
}

.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  background: rgba(26, 107, 90, 0.15);
  color: var(--primary-light);
}

.stat-card-icon.gold {
  background: rgba(201, 168, 76, 0.12);
  color: var(--accent);
}

.stat-card-icon svg {
  width: 24px;
  height: 24px;
}

.stat-card-value {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.stat-card-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 500;
}

.stat-card-sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-2);
}

/* Chain Badge Mini */
.chain-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  border: 1px solid;
}

.chain-pill.eth {
  color: var(--eth-color);
  border-color: rgba(98, 126, 234, 0.3);
  background: rgba(98, 126, 234, 0.08);
}

.chain-pill.polygon {
  color: var(--matic-color);
  border-color: rgba(130, 71, 229, 0.3);
  background: rgba(130, 71, 229, 0.08);
}

.chain-pill.bsc {
  color: var(--bnb-color);
  border-color: rgba(243, 186, 47, 0.3);
  background: rgba(243, 186, 47, 0.08);
}

.chain-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ══════════════════════════════════════════════════════════
   WALLET ADDRESS BOX
   ══════════════════════════════════════════════════════════ */
.wallet-address-box {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: "Courier New", monospace;
  font-size: var(--text-sm);
  color: var(--accent);
  word-break: break-all;
  transition: all var(--transition);
  cursor: pointer;
  animation: goldGlow 3s ease-in-out infinite;
}

.wallet-address-box:hover {
  border-color: var(--accent);
  background: rgba(201, 168, 76, 0.06);
}

.wallet-address-box .copy-btn {
  flex-shrink: 0;
  padding: var(--space-1);
  color: var(--text-muted);
  transition: color var(--transition);
}

.wallet-address-box:hover .copy-btn {
  color: var(--accent);
}

.wallet-address-box svg {
  width: 16px;
  height: 16px;
}

/* ══════════════════════════════════════════════════════════
   TRANSACTION TABLE
   ══════════════════════════════════════════════════════════ */
.tx-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.tx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.tx-table thead tr {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-light);
}

.tx-table th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.tx-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background var(--transition-fast);
}

.tx-table tbody tr:last-child {
  border-bottom: none;
}

.tx-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.tx-table td {
  padding: var(--space-3) var(--space-4);
  color: var(--text-secondary);
  vertical-align: middle;
  white-space: nowrap;
}

.tx-type-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
}

.tx-type-badge.in {
  color: var(--success);
  background: var(--success-bg);
}

.tx-type-badge.out {
  color: var(--danger);
  background: var(--danger-bg);
}

.tx-hash {
  font-family: "Courier New", monospace;
  font-size: 12px;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  transition: color var(--transition);
}

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

.tx-hash svg {
  width: 12px;
  height: 12px;
  opacity: 0.7;
}

.tx-amount.in { color: var(--success); font-weight: 600; }
.tx-amount.out { color: var(--danger); font-weight: 600; }

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-light);
}

.pagination-info {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

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

.page-btn:hover {
  background: var(--surface-2);
  color: var(--text-primary);
}

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

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

/* ══════════════════════════════════════════════════════════
   FILTER BAR
   ══════════════════════════════════════════════════════════ */
.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border-light);
  background: var(--surface-2);
}

.filter-input,
.filter-select {
  background: var(--surface-3);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition);
}

.filter-input:focus,
.filter-select:focus {
  border-color: var(--primary);
}

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

.filter-select option {
  background: var(--surface-3);
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-input-wrapper svg {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.search-input-wrapper .filter-input {
  width: 100%;
  padding-left: var(--space-8);
}

/* ══════════════════════════════════════════════════════════
   FORM COMPONENTS
   ══════════════════════════════════════════════════════════ */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.form-control {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 107, 90, 0.15);
}

.form-control::placeholder {
  color: var(--text-muted);
}

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

select.form-control option {
  background: var(--surface-2);
}

/* ══════════════════════════════════════════════════════════
   PROGRESS BAR
   ══════════════════════════════════════════════════════════ */
.progress-bar-wrap {
  background: var(--surface-3);
  border-radius: var(--radius-full);
  height: 8px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--gradient-accent);
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-bar.success {
  background: linear-gradient(90deg, var(--primary), var(--success));
}

/* ══════════════════════════════════════════════════════════
   TOAST NOTIFICATION
   ══════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  animation: fadeInUp 0.3s ease;
  max-width: 360px;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--info); }

/* ══════════════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════════════ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-16) var(--space-6);
  text-align: center;
  color: var(--text-muted);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-4);
  opacity: 0.4;
}

.empty-state h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.empty-state p {
  font-size: var(--text-sm);
}

/* ══════════════════════════════════════════════════════════
   LOADER SPINNER
   ══════════════════════════════════════════════════════════ */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 3px;
}

.loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-12);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* ══════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════ */
.footer {
  background: var(--dark-2);
  border-top: 1px solid rgba(201, 168, 76, 0.1);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.footer-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
}

.footer-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-6);
}

.footer-social {
  display: flex;
  gap: var(--space-3);
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  transition: all var(--transition);
  text-decoration: none;
}

.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(201, 168, 76, 0.08);
}

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

.footer-col-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--space-5);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-link {
  font-size: var(--text-sm);
  color: var(--text-muted);
  transition: color var(--transition);
  text-decoration: none;
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-8);
  border-top: 1px solid var(--border-light);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.footer-wallet-mini {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: "Courier New", monospace;
  font-size: 11px;
  color: var(--text-muted);
}

.footer-wallet-mini .verified-icon {
  color: var(--success);
}

/* Responsive Footer */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }
  .mobile-menu-btn { display: flex; }
  .navbar-nav { display: none; }
  .navbar-actions .btn { display: none; }
}

/* ── Web3 Pill Filters ────────────────────────────────────── */
.filter-pills-group {
  display: flex;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 4px;
  gap: 4px;
}

.filter-pill {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.filter-pill:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}

.filter-pill.active {
  background: var(--surface-3);
  color: var(--text-primary);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.05);
}
