  :root {
      --bg-primary: #f8fafc;
      --bg-secondary: #ffffff;
      --bg-tertiary: #f1f5f9;
      --text-primary: #0f172a;
      --text-secondary: #475569;
      --text-tertiary: #94a3b8;
      --border-color: #e2e8f0;
      --glass-bg: rgba(255, 255, 255, 0.85);
      --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08);
      --sidebar-width: 260px;
      --sidebar-collapsed: 80px;
      --header-height: 72px;
  }

  html.dark {
      --bg-primary: #0a0e1a;
      --bg-secondary: #111827;
      --bg-tertiary: #1a2035;
      --text-primary: #f1f5f9;
      --text-secondary: #94a3b8;
      --text-tertiary: #64748b;
      --border-color: rgba(255, 255, 255, 0.08);
      --glass-bg: rgba(17, 24, 39, 0.85);
  }

  * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
  }

  html {
      scroll-behavior: smooth;
      -webkit-text-size-adjust: 100%;
  }

  body {
      font-family: 'Inter', sans-serif;
      background-color: var(--bg-primary);
      color: var(--text-primary);
      overflow-x: hidden;
      line-height: 1.5;
      -webkit-font-smoothing: antialiased;
  }

  ::-webkit-scrollbar {
      width: 6px;
      height: 6px;
  }

  ::-webkit-scrollbar-track {
      background: transparent;
  }

  ::-webkit-scrollbar-thumb {
      background: var(--text-tertiary);
      border-radius: 10px;
  }

  .crypto-card {
      background: var(--bg-secondary);
      border: 1px solid var(--border-color);
      border-radius: 16px;
      transition: all 0.3s ease;
      position: relative;
      overflow: hidden;
  }

  .crypto-card:hover {
      transform: translateY(-2px);
      box-shadow: var(--shadow-xl);
      border-color: rgba(59, 130, 246, 0.2);
  }

  .sidebar {
      width: var(--sidebar-width);
      transition: width 0.3s ease, transform 0.3s ease;
      z-index: 60;
      position: fixed;
      left: 0;
      top: 0;
      height: 100vh;
  }

  .sidebar.collapsed {
      width: var(--sidebar-collapsed);
  }

  .sidebar.collapsed .sidebar-label,
  .sidebar.collapsed .sidebar-logo-text,
  .sidebar.collapsed .sidebar-badge,
  .sidebar.collapsed .sidebar-section-title,
  .sidebar.collapsed .sidebar-pro-card {
      display: none;
  }

  .sidebar.collapsed .sidebar-item {
      justify-content: center;
      padding-left: 0;
      padding-right: 0;
  }

  .sidebar-item {
      display: flex;
      align-items: center;
      padding: 10px 16px;
      border-radius: 12px;
      cursor: pointer;
      transition: all 0.2s ease;
      color: var(--text-secondary);
      position: relative;
      margin: 2px 0;
      gap: 12px;
      text-decoration: none;
      font-size: 14px;
      font-weight: 500;
  }

  .sidebar-item:hover {
      background: rgba(59, 130, 246, 0.08);
      color: var(--text-primary);
  }

  .sidebar-item.active {
      background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.1));
      color: #3b82f6;
      font-weight: 600;
  }

  .sidebar-item.active::before {
      content: '';
      position: absolute;
      left: 0;
      top: 50%;
      transform: translateY(-50%);
      width: 3px;
      height: 24px;
      background: linear-gradient(180deg, #3b82f6, #8b5cf6);
      border-radius: 0 4px 4px 0;
  }

  @media (max-width: 1023px) {
      .sidebar {
          width: 280px !important;
          transform: translateX(-100%);
          box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
      }

      .sidebar.mobile-open {
          transform: translateX(0);
      }

      .sidebar.collapsed {
          width: 280px !important;
      }

      .sidebar.collapsed .sidebar-label,
      .sidebar.collapsed .sidebar-logo-text,
      .sidebar.collapsed .sidebar-badge,
      .sidebar.collapsed .sidebar-section-title,
      .sidebar.collapsed .sidebar-pro-card {
          display: block;
      }

      .sidebar.collapsed .sidebar-item {
          justify-content: flex-start;
          padding-left: 16px;
          padding-right: 16px;
      }

      .main-content {
          margin-left: 0 !important;
      }
  }

  .sidebar-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.6);
      backdrop-filter: blur(4px);
      z-index: 55;
      opacity: 0;
      visibility: hidden;
      transition: all 0.3s ease;
  }

  .sidebar-overlay.show {
      opacity: 1;
      visibility: visible;
  }

  .main-header {
      height: var(--header-height);
      background: var(--glass-bg);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border-bottom: 1px solid var(--border-color);
      z-index: 40;
      position: sticky;
      top: 0;
  }

  .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 10px 20px;
      border-radius: 12px;
      font-weight: 600;
      font-size: 14px;
      cursor: pointer;
      transition: all 0.3s ease;
      border: none;
      outline: none;
      position: relative;
      overflow: hidden;
      white-space: nowrap;
  }

  .btn-primary {
      background: linear-gradient(135deg, #3b82f6, #2563eb);
      color: white;
      box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
  }

  .btn-primary:hover {
      transform: translateY(-1px);
      box-shadow: 0 8px 25px rgba(59, 130, 246, 0.45);
  }

  .btn-ghost {
      background: transparent;
      color: var(--text-secondary);
      border: 1px solid var(--border-color);
  }

  .btn-ghost:hover {
      background: var(--bg-tertiary);
      color: var(--text-primary);
  }

  .ripple {
      position: absolute;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.35);
      transform: scale(0);
      animation: ripple-animation 0.6s linear;
      pointer-events: none;
  }

  @keyframes ripple-animation {
      to {
          transform: scale(4);
          opacity: 0;
      }
  }

  .badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 4px 10px;
      border-radius: 8px;
      font-size: 12px;
      font-weight: 600;
      line-height: 1;
  }

  .badge-green {
      background: rgba(16, 185, 129, 0.12);
      color: #10b981;
  }

  .badge-red {
      background: rgba(239, 68, 68, 0.12);
      color: #ef4444;
  }

  .badge-blue {
      background: rgba(59, 130, 246, 0.12);
      color: #3b82f6;
  }

  .badge-yellow {
      background: rgba(245, 158, 11, 0.12);
      color: #f59e0b;
  }

  .badge-purple {
      background: rgba(139, 92, 246, 0.12);
      color: #8b5cf6;
  }

  .badge-cyan {
      background: rgba(6, 182, 212, 0.12);
      color: #06b6d4;
  }

  .badge-pink {
      background: rgba(236, 72, 153, 0.12);
      color: #ec4899;
  }

  .dropdown-menu {
      position: absolute;
      top: calc(100% + 8px);
      right: 0;
      min-width: 220px;
      background: var(--bg-secondary);
      border: 1px solid var(--border-color);
      border-radius: 16px;
      box-shadow: var(--shadow-xl);
      opacity: 0;
      visibility: hidden;
      transform: translateY(-10px) scale(0.95);
      transition: all 0.2s ease;
      z-index: 100;
      padding: 8px;
  }

  .dropdown-menu.show {
      opacity: 1;
      visibility: visible;
      transform: translateY(0) scale(1);
  }

  .dropdown-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 12px;
      border-radius: 10px;
      cursor: pointer;
      transition: all 0.2s ease;
      color: var(--text-secondary);
      font-size: 14px;
      font-weight: 500;
  }

  .dropdown-item:hover {
      background: var(--bg-tertiary);
      color: var(--text-primary);
  }

  .notification-panel {
      position: fixed;
      top: 0;
      right: -400px;
      width: 380px;
      max-width: 100vw;
      height: 100vh;
      background: var(--bg-secondary);
      border-left: 1px solid var(--border-color);
      z-index: 200;
      transition: right 0.3s ease;
      overflow-y: auto;
  }

  .notification-panel.open {
      right: 0;
  }

  .notification-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.5);
      z-index: 199;
      opacity: 0;
      visibility: hidden;
      transition: all 0.3s ease;
  }

  .notification-overlay.show {
      opacity: 1;
      visibility: visible;
  }

  .search-modal,
  .modal-backdrop {
      position: fixed;
      inset: 0;
      z-index: 300;
      display: flex;
      align-items: flex-start;
      justify-content: center;
      padding-top: 10vh;
      opacity: 0;
      visibility: hidden;
      transition: all 0.3s ease;
  }

  .modal-backdrop {
      align-items: center;
      padding: 16px;
      z-index: 250;
  }

  .search-modal.show,
  .modal-backdrop.show {
      opacity: 1;
      visibility: visible;
  }

  .search-modal-overlay,
  .modal-overlay {
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.6);
      backdrop-filter: blur(8px);
  }

  .search-modal-content,
  .modal-content {
      position: relative;
      width: 90%;
      max-width: 640px;
      background: var(--bg-secondary);
      border: 1px solid var(--border-color);
      border-radius: 20px;
      box-shadow: var(--shadow-xl);
      transform: translateY(-20px) scale(0.95);
      transition: all 0.3s ease;
      overflow: hidden;
  }

  .modal-content {
      max-width: 560px;
      max-height: 90vh;
      overflow-y: auto;
  }

  .search-modal.show .search-modal-content,
  .modal-backdrop.show .modal-content {
      transform: translateY(0) scale(1);
  }

  .tab-btn {
      padding: 8px 16px;
      border-radius: 10px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.3s ease;
      color: var(--text-secondary);
      background: transparent;
      border: none;
      white-space: nowrap;
  }

  .tab-btn.active {
      background: linear-gradient(135deg, #3b82f6, #2563eb);
      color: white;
      box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  }

  .tab-btn:not(.active):hover {
      background: var(--bg-tertiary);
      color: var(--text-primary);
  }

  .tab-content {
      display: none;
      animation: fadeIn 0.3s ease;
  }

  .tab-content.active {
      display: block;
  }

  @keyframes fadeIn {
      from {
          opacity: 0;
          transform: translateY(4px);
      }

      to {
          opacity: 1;
          transform: translateY(0);
      }
  }

  .data-table {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
  }

  .data-table thead th {
      background: var(--bg-tertiary);
      padding: 12px 16px;
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--text-tertiary);
      text-align: left;
      white-space: nowrap;
  }

  .data-table thead th:first-child {
      border-radius: 10px 0 0 10px;
  }

  .data-table thead th:last-child {
      border-radius: 0 10px 10px 0;
  }

  .data-table tbody tr {
      transition: all 0.2s ease;
  }

  .data-table tbody tr:hover {
      background: var(--bg-tertiary);
  }

  .data-table tbody td {
      padding: 14px 16px;
      font-size: 13px;
      border-bottom: 1px solid var(--border-color);
      white-space: nowrap;
  }

  .theme-switch {
      width: 46px;
      height: 26px;
      border-radius: 13px;
      background: var(--bg-tertiary);
      border: 1px solid var(--border-color);
      cursor: pointer;
      position: relative;
      transition: all 0.3s ease;
      flex-shrink: 0;
  }

  .theme-switch-thumb {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: linear-gradient(135deg, #3b82f6, #8b5cf6);
      position: absolute;
      top: 2px;
      left: 2px;
      transition: all 0.3s ease;
      display: flex;
      align-items: center;
      justify-content: center;
  }

  html.dark .theme-switch-thumb {
      left: 22px;
  }

  .ticker-bar {
      overflow: hidden;
      white-space: nowrap;
  }

  .ticker-content {
      display: inline-flex;
      animation: ticker 40s linear infinite;
  }

  @keyframes ticker {
      from {
          transform: translateX(0);
      }

      to {
          transform: translateX(-50%);
      }
  }

  @media (max-width: 768px) {
      .notification-panel {
          width: 100vw;
          right: -100vw;
      }

      :root {
          --header-height: 64px;
      }
  }

  body.no-scroll {
      overflow: hidden;
  }

  html.dark .apexcharts-tooltip {
      background: #1e293b !important;
      border-color: rgba(255, 255, 255, 0.1) !important;
      color: #f1f5f9 !important;
  }

  .crypto-logo {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      object-fit: contain;
      background: white;
      padding: 2px;
      flex-shrink: 0;
  }

  html.dark .crypto-logo {
      background: rgba(255, 255, 255, 0.9);
  }

  .crypto-logo-sm {
      width: 16px;
      height: 16px;
      border-radius: 50%;
      object-fit: contain;
      flex-shrink: 0;
  }

  .crypto-logo-md {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      object-fit: contain;
      background: white;
      padding: 1.5px;
      flex-shrink: 0;
  }

  html.dark .crypto-logo-md {
      background: rgba(255, 255, 255, 0.9);
  }

  .stat-icon {
      width: 44px;
      height: 44px;
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
  }

  .search-input-wrapper {
      position: relative;
  }

  .search-input-wrapper input {
      width: 100%;
      padding: 10px 14px 10px 40px;
      background: var(--bg-tertiary);
      border: 1px solid var(--border-color);
      border-radius: 12px;
      font-size: 14px;
      color: var(--text-primary);
      outline: none;
      transition: all 0.2s ease;
  }

  .search-input-wrapper input:focus {
      border-color: #3b82f6;
  }

  .search-input-wrapper svg {
      position: absolute;
      left: 14px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--text-tertiary);
  }

  .price-tag {
      font-family: 'JetBrains Mono', monospace, 'Inter';
  }

  .filter-chip {
      padding: 6px 14px;
      border-radius: 20px;
      font-size: 12px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s ease;
      background: var(--bg-tertiary);
      color: var(--text-secondary);
      border: 1px solid transparent;
      white-space: nowrap;
  }

  .filter-chip.active {
      background: linear-gradient(135deg, #3b82f6, #2563eb);
      color: white;
  }

  .filter-chip:not(.active):hover {
      border-color: var(--border-color);
      color: var(--text-primary);
  }

  /* ===== HISTORY SPECIFIC ===== */
  .history-hero {
      background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(6, 182, 212, 0.06) 50%, rgba(16, 185, 129, 0.05) 100%);
      border: 1px solid rgba(59, 130, 246, 0.12);
      position: relative;
      overflow: hidden;
  }

  .history-hero::before {
      content: '';
      position: absolute;
      top: -30%;
      right: -10%;
      width: 400px;
      height: 400px;
      background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
      border-radius: 50%;
      pointer-events: none;
  }

  /* Timeline */
  .timeline {
      position: relative;
      padding-left: 32px;
  }

  .timeline::before {
      content: '';
      position: absolute;
      left: 15px;
      top: 8px;
      bottom: 8px;
      width: 2px;
      background: linear-gradient(180deg, var(--border-color) 0%, var(--border-color) 100%);
      border-radius: 2px;
  }

  .timeline-item {
      position: relative;
      padding: 12px 16px;
      margin-bottom: 12px;
      background: var(--bg-secondary);
      border: 1px solid var(--border-color);
      border-radius: 12px;
      transition: all 0.2s ease;
      cursor: pointer;
  }

  .timeline-item:hover {
      border-color: rgba(59, 130, 246, 0.3);
      transform: translateX(3px);
  }

  .timeline-dot {
      position: absolute;
      left: -24px;
      top: 50%;
      transform: translateY(-50%);
      width: 12px;
      height: 12px;
      border-radius: 50%;
      border: 3px solid var(--bg-primary);
      z-index: 1;
  }

  .timeline-dot.buy {
      background: #10b981;
      box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
  }

  .timeline-dot.sell {
      background: #ef4444;
      box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
  }

  .timeline-dot.deposit {
      background: #3b82f6;
      box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
  }

  .timeline-dot.withdraw {
      background: #f59e0b;
      box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
  }

  .timeline-dot.swap {
      background: #06b6d4;
      box-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
  }

  .timeline-dot.staking {
      background: #8b5cf6;
      box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
  }

  .timeline-dot.login {
      background: #94a3b8;
      box-shadow: 0 0 8px rgba(148, 163, 184, 0.5);
  }

  /* Group header */
  .date-group-header {
      display: flex;
      align-items: center;
      gap: 12px;
      margin: 20px 0 12px;
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--text-tertiary);
  }

  .date-group-header::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--border-color);
  }

  .date-group-header:first-child {
      margin-top: 0;
  }

  /* Activity type icons */
  .activity-icon {
      width: 40px;
      height: 40px;
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      position: relative;
  }

  .activity-icon .coin-overlay {
      position: absolute;
      bottom: -3px;
      right: -3px;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      border: 2px solid var(--bg-secondary);
      background: white;
  }

  /* Toast */
  .toast {
      position: fixed;
      bottom: 24px;
      right: 24px;
      padding: 12px 20px;
      background: var(--bg-secondary);
      border: 1px solid var(--border-color);
      border-radius: 12px;
      box-shadow: var(--shadow-xl);
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 14px;
      font-weight: 500;
      z-index: 999;
      transform: translateY(120%);
      opacity: 0;
      transition: all 0.3s ease;
  }

  .toast.show {
      transform: translateY(0);
      opacity: 1;
  }

  .toast.success {
      border-color: rgba(16, 185, 129, 0.3);
  }

  .toast.success svg {
      color: #10b981;
  }

  /* Pagination */
  .page-btn {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
      background: transparent;
      color: var(--text-secondary);
      border: 1px solid var(--border-color);
  }

  .page-btn:hover:not(:disabled) {
      background: var(--bg-tertiary);
      color: var(--text-primary);
  }

  .page-btn.active {
      background: linear-gradient(135deg, #3b82f6, #2563eb);
      color: white;
      border-color: transparent;
  }

  .page-btn:disabled {
      opacity: 0.4;
      cursor: not-allowed;
  }

  /* Form */
  .form-input,
  .form-select {
      width: 100%;
      padding: 10px 14px;
      background: var(--bg-tertiary);
      border: 1px solid var(--border-color);
      border-radius: 10px;
      font-size: 14px;
      color: var(--text-primary);
      outline: none;
      transition: all 0.2s ease;
  }

  .form-input:focus,
  .form-select:focus {
      border-color: #3b82f6;
  }

  .form-select {
      appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2394a3b8' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 12px center;
      padding-right: 36px;
  }

  /* View toggle */
  .view-toggle-btn {
      padding: 8px 10px;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.2s ease;
      color: var(--text-tertiary);
      background: transparent;
      border: none;
  }

  .view-toggle-btn:hover {
      color: var(--text-primary);
      background: var(--bg-tertiary);
  }

  .view-toggle-btn.active {
      background: linear-gradient(135deg, #3b82f6, #2563eb);
      color: white;
  }

  /* Status badge */
  .status-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      display: inline-block;
      flex-shrink: 0;
  }

  /* Empty state */
  .empty-state {
      text-align: center;
      padding: 40px 20px;
  }

  /* Hash monospace */
  .hash-mono {
      font-family: 'JetBrains Mono', monospace, 'Inter';
      font-size: 11px;
      color: var(--text-tertiary);
  }

  /* Copy button */
  .copy-btn {
      padding: 3px;
      border-radius: 4px;
      transition: all 0.2s ease;
      color: var(--text-tertiary);
      background: transparent;
      border: none;
      cursor: pointer;
  }

  .copy-btn:hover {
      color: #3b82f6;
      background: rgba(59, 130, 246, 0.1);
  }

  @media (max-width: 480px) {
      .crypto-card {
          border-radius: 12px;
      }

      .btn {
          padding: 8px 16px;
          font-size: 13px;
      }
  }

  .main-content {
      flex: 1;
      width: 100%;
      min-width: 0;
      overflow-x: hidden;
  }

  .main-wrapper {
      display: flex;
      width: 100%;
      min-width: 0;
  }

  @media (min-width:1024px) {
      .main-content {
          margin-left: var(--sidebar-width);
          width: calc(100% - var(--sidebar-width));
      }
  }