@import url('https://api.fontshare.com/v2/css?f[]=general-sans@600,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=JetBrains+Mono&display=swap');

:root {
  /* Vibrant Colors */
  --color-primary: #0969da;
  --color-primary-hover: #0550ae;
  --color-secondary: #2da44e;
  --color-accent: #bf3989;

  /* Semantic */
  --color-success: #2da44e;
  --color-warning: #bf8700;
  --color-error: #cf222e;

  /* Neutrals for Light Mode */
  --color-bg-base: #f8fafc;
  --color-bg-gradient: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  --color-surface: rgba(255, 255, 255, 0.8);
  --color-surface-solid: #ffffff;
  --color-surface-hover: rgba(0, 0, 0, 0.03);
  --color-text-primary: #0f172a;
  --color-text-secondary: #64748b;
  --color-border: rgba(0, 0, 0, 0.08);
  --color-border-solid: #e2e8f0;

  /* Typography */
  --font-display: 'General Sans', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --font-code: 'JetBrains Mono', monospace;

  /* Spacing */
  --spacing-1: 4px;
  --spacing-2: 8px;
  --spacing-3: 12px;
  --spacing-4: 16px;
  --spacing-5: 20px;
  --spacing-6: 24px;
  --spacing-8: 32px;
  --spacing-10: 40px;
  --spacing-12: 48px;
  --spacing-16: 64px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
  --color-primary: #818cf8;
  --color-primary-hover: #6366f1;
  --color-secondary: #34d399;
  --color-accent: #c084fc;

  --color-success: #34d399;
  --color-warning: #fbbf24;
  --color-error: #f87171;

  --color-bg-base: #020617;
  --color-bg-gradient: radial-gradient(circle at top left, #0f172a, #020617);
  --color-surface: rgba(30, 41, 59, 0.6);
  --color-surface-solid: #0f172a;
  --color-surface-hover: rgba(255, 255, 255, 0.05);
  --color-text-primary: #f8fafc;
  --color-text-secondary: #94a3b8;
  --color-border: rgba(255, 255, 255, 0.1);
  --color-border-solid: #334155;
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Background Effects */
body {
  font-family: var(--font-body);
  background: var(--color-bg-gradient);
  background-attachment: fixed;
  color: var(--color-text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
}

/* Removed body gradients for cleaner style */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

.display {
  font-size: clamp(40px, 4vw, 56px);
  letter-spacing: -0.04em;
}

.headline {
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.section-heading {
  font-size: clamp(20px, 2.5vw, 28px);
}

.subhead {
  font-size: 20px;
  font-weight: 600;
}

.body-text {
  font-size: 16px;
}

.small-text {
  font-size: 14px;
  color: var(--color-text-secondary);
}

.caption {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.overline {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-text-secondary);
  letter-spacing: 0.05em;
}

/* Layout */
.container {
  width: 92%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-6);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--spacing-8);
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 var(--spacing-16);
  }
}

.section {
  padding: var(--spacing-10) 0;
}

@media (min-width: 768px) {
  .section {
    padding: var(--spacing-16) 0;
  }
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--color-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-glass);
}

/* Sidebar & Layout */
.app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  width: 100%;
}

.sidebar {
  position: sticky;
  top: 0;
  background: var(--color-surface-solid);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.sidebar .nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 var(--spacing-4);
  height: 64px;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: none;
  flex-direction: column;
  padding: var(--spacing-4);
  gap: var(--spacing-2);
  background: var(--color-surface-solid);
  border-bottom: 1px solid var(--color-border);
}

.sidebar-bottom {
  display: none;
}

.nav-links.active {
  display: flex;
  animation: slideDown 0.3s ease;
}

.nav-links.active + .sidebar-bottom {
  display: flex !important;
  flex-direction: row;
  gap: 8px;
  animation: slideDown 0.3s ease;
  padding: var(--spacing-4);
  background: var(--color-surface-solid);
  border-bottom: 1px solid var(--color-border);
}

.nav-links.active + .sidebar-bottom > * {
  width: auto !important;
  flex: 1;
  margin-bottom: 0 !important;
  justify-content: center !important;
  padding: 8px !important;
  font-size: 13px !important;
}

.nav-links.active + .sidebar-bottom svg {
  margin-right: 4px !important;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-text-secondary);
  font-size: 15px;
  font-weight: 500;
  padding: var(--spacing-3) var(--spacing-4);
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
  background-color: rgba(139, 92, 246, 0.15);
}

/* Mobile Nav Toggle */
.mobile-menu-btn {
  display: block;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--color-text-primary);
  cursor: pointer;
}

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

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

@media (min-width: 1024px) {
  .app-wrapper {
    flex-direction: row;
  }

  .sidebar {
    width: 260px;
    height: 100vh;
    border-bottom: none;
    border-right: 1px solid var(--color-border);
  }

  .sidebar .nav-container {
    justify-content: flex-start;
    padding: var(--spacing-6) var(--spacing-6) 0 var(--spacing-6);
    height: auto;
  }

  .mobile-menu-btn {
    display: none;
  }

  .nav-links {
    display: flex;
    flex: 1;
    background: transparent;
    border-bottom: none;
    padding: var(--spacing-6);
    margin-top: var(--spacing-4);
  }

  .sidebar-bottom {
    display: block;
    padding: var(--spacing-6);
    border-top: 1px solid var(--color-border);
    margin-top: auto;
  }
}

/* Cards */
.card {
  background: var(--color-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-header {
  padding: var(--spacing-4) var(--spacing-5);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-base);
  border-top-left-radius: 11px;
  border-top-right-radius: 11px;
}

.card-body,
.card-footer {
  padding: var(--spacing-5) var(--spacing-6);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--spacing-6);
}

@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  border: none;
  position: relative;
  overflow: hidden;
  padding: 0 16px;
  height: 36px;
  font-size: 14px;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
  color: #fff;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--color-surface-solid);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: var(--color-surface);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

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

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

.btn-destructive {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-error);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-destructive:hover {
  background: var(--color-error);
  color: #ffffff;
}

.btn-sm {
  padding: 0 12px;
  height: 32px;
  font-size: 13px;
}

.btn-md {
  padding: 0 16px;
  height: 36px;
  font-size: 14px;
  font-weight: 500;
}

.btn-lg {
  padding: 0 24px;
  height: 42px;
  font-size: 16px;
}

/* Inputs */
.form-group {
  margin-bottom: var(--spacing-5);
}

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

.form-control {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-family: var(--font-body);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background-color: var(--color-surface-solid);
  color: var(--color-text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.form-control::placeholder {
  color: #64748B;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  background-color: var(--color-surface-solid);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

/* TomSelect Overrides */
.ts-wrapper.form-control {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.ts-wrapper .ts-control {
  border-radius: 10px;
  border: 1px solid var(--color-border);
  padding: 10px 16px;
  background-color: var(--color-surface-solid);
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--color-text-primary);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}

.ts-wrapper.focus .ts-control {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

.ts-dropdown {
  border-radius: 10px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  margin-top: 4px;
  background-color: var(--color-surface-solid);
  color: var(--color-text-primary);
}

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.chip-primary {
  background: rgba(139, 92, 246, 0.15);
  color: var(--color-primary);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.chip-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.chip-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--color-warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.chip-error {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-error);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.chip-info {
  background: rgba(14, 165, 233, 0.15);
  color: #0284c7;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

/* Lists */
.list-group {
  list-style: none;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-4) var(--spacing-6);
  border-bottom: 1px solid var(--color-border);
  transition: all 0.2s ease;
  flex-wrap: wrap;
  gap: var(--spacing-4);
}

.list-item:last-child {
  border-bottom: none;
}

.list-item:hover {
  background-color: var(--color-surface-hover);
}

/* Utilities */
.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.mb-2 {
  margin-bottom: var(--spacing-2);
}

.mb-4 {
  margin-bottom: var(--spacing-4);
}

.mb-6 {
  margin-bottom: var(--spacing-6);
}

.mt-2 {
  margin-top: var(--spacing-2);
}

.mt-4 {
  margin-top: var(--spacing-4);
}

.mt-6 {
  margin-top: var(--spacing-6);
}

.flex {
  display: flex;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.justify-between {
  justify-content: space-between;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.gap-2 {
  gap: var(--spacing-2);
}

.gap-4 {
  gap: var(--spacing-4);
}

.gap-6 {
  gap: var(--spacing-6);
}

.w-full {
  width: 100%;
}

@media (max-width: 768px) {
  .flex-responsive {
    flex-direction: column;
    align-items: stretch;
  }

  .flex-responsive>* {
    margin-bottom: var(--spacing-4);
    width: 100%;
  }
}

/* Alerts */
.alert {
  padding: var(--spacing-4);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: var(--spacing-4);
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Responsive Utilities */
.desktop-only {
  display: inline-block;
}
.mobile-only {
  display: none;
}
@media (max-width: 768px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: inline-block !important; }
}

/* Auth Container */
.auth-container {
  max-width: 440px;
  margin: 8vh auto;
  padding: 0 var(--spacing-4);
}

.auth-container .card {
  box-shadow: 0 25px 50px -12px rgba(31, 38, 135, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-content {
    background: var(--color-surface-solid);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px var(--color-border);
    width: 100%;
    max-width: 500px;
    margin: 20px;
    padding: 24px;
    border: 1px solid var(--color-border);
    animation: modalSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: scale(0.95) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-text-secondary);
    line-height: 1;
    padding: 0;
}
.close-modal:hover {
    color: var(--color-text);
}

/* Modern Quick Action Modal Specific Styling */
.quick-action-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: quickModalFadeIn 0.2s ease-out;
}

@keyframes quickModalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.quick-action-card {
    width: 100%;
    max-width: 440px;
    background: var(--color-surface-solid);
    border-radius: 24px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--color-border);
    overflow: hidden;
    animation: quickCardPop 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    border: 1px solid var(--color-border);
}

@keyframes quickCardPop {
    from { opacity: 0; transform: scale(0.93) translateY(16px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.quick-action-header {
    padding: 20px 24px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--color-border);
}

.quick-action-header .header-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.quick-action-header .header-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}

.quick-action-header .close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
}

.quick-action-header .close-btn:hover {
    background: var(--color-surface-hover);
    color: var(--color-text-primary);
}

.quick-action-body {
    padding: 24px;
}

.quick-summary-box {
    background: var(--color-bg-base);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 16px 18px;
    margin-bottom: 20px;
}

.quick-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-bottom: 10px;
}

.quick-summary-row:last-child {
    margin-bottom: 0;
}

.quick-progress-track {
    width: 100%;
    height: 6px;
    background: var(--color-border);
    border-radius: 100px;
    overflow: hidden;
    margin: 12px 0;
}

.quick-progress-fill {
    height: 100%;
    border-radius: 100px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-input-container {
    position: relative;
    margin-bottom: 16px;
}

.quick-input-box {
    display: flex;
    align-items: center;
    background: var(--color-surface-solid);
    border: 2px solid var(--color-border);
    border-radius: 14px;
    padding: 4px 6px 4px 16px;
    transition: all 0.2s ease;
}

.quick-input-box:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(9, 105, 218, 0.12);
}

.quick-input-box input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-primary);
    min-width: 0;
}

.quick-input-box input::placeholder {
    color: var(--color-text-secondary);
    opacity: 0.5;
    font-weight: 400;
}

.quick-pill-btn {
    border: 1px solid var(--color-border);
    background: var(--color-bg-base);
    color: var(--color-text-primary);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.quick-pill-btn:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    transform: translateY(-1px);
}

.quick-action-presets {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 24px;
}

.quick-preset-tag {
    flex: 1;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    border: 1px dashed var(--color-border);
    background: transparent;
    color: var(--color-text-secondary);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.quick-preset-tag:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(9, 105, 218, 0.05);
}

.quick-footer-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Modern Transaction Card & Action Decluttering */
.tx-card {
  width: 100% !important;
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  box-sizing: border-box !important;
  padding: 16px 20px !important;
  border-bottom: 1px solid var(--color-border);
  transition: background-color 0.15s ease;
  gap: 16px;
}

.tx-card:hover {
  background-color: var(--color-surface-hover);
}

.tx-card:last-child {
  border-bottom: none;
}

.tx-card-left {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.tx-card-title-row {
  display: flex;
  align-items: baseline;
  gap: 8px 12px;
}

.tx-card-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.tx-client-badge {
  color: var(--color-primary);
  font-weight: 700;
  font-size: 17px;
}

.tx-amount-display {
  font-weight: 700;
  font-size: 17px;
  color: var(--color-text-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tx-amount-arrow {
  color: var(--color-text-secondary);
  font-size: 13px;
  opacity: 0.7;
}

.tx-meta {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-top: 4px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.tx-meta-item {
  display: inline-flex;
  align-items: center;
}

.tx-progress-detail {
  font-size: 13px;
  margin-top: 6px;
  color: var(--color-text-secondary);
  opacity: 0.95;
}

.tx-card-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  justify-content: flex-end;
}

.tx-chips-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tx-action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tx-manage-btns {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

@media (min-width: 769px) {
  .tx-manage-btns.desktop-only {
    display: flex !important;
  }
}

.tx-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-solid);
  color: var(--color-text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
}

.tx-icon-btn:hover {
  background: var(--color-surface-hover);
  color: var(--color-text-primary);
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

.tx-icon-btn.danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-error);
  border-color: rgba(239, 68, 68, 0.3);
}

.tx-btn-collect {
  border-color: rgba(234, 179, 8, 0.5) !important;
  color: var(--color-warning) !important;
  background: rgba(234, 179, 8, 0.08) !important;
  font-weight: 600;
  transition: all 0.2s ease;
}

.tx-btn-collect:hover {
  background: rgba(234, 179, 8, 0.18) !important;
  border-color: var(--color-warning) !important;
  color: var(--color-warning) !important;
  transform: translateY(-1px);
}

.tx-btn-transfer {
  border-color: rgba(9, 105, 218, 0.5) !important;
  color: var(--color-primary) !important;
  background: rgba(9, 105, 218, 0.08) !important;
  font-weight: 600;
  transition: all 0.2s ease;
}

.tx-btn-transfer:hover {
  background: rgba(9, 105, 218, 0.18) !important;
  border-color: var(--color-primary) !important;
  color: var(--color-primary) !important;
  transform: translateY(-1px);
}

/* Mobile specific neatness */
@media (max-width: 768px) {
  .tx-card {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 14px 16px !important;
    gap: 12px !important;
  }
  .tx-card-left {
    width: 100%;
  }
  .tx-card-title-row {
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
  }
  .tx-manage-btns.mobile-only {
    display: flex !important;
  }
  .tx-card-right {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 10px;
  }
  .tx-chips-wrap {
    width: 100%;
  }
  .tx-chips-wrap .chip {
    padding: 5px 12px;
    font-size: 11.5px;
  }
  .tx-action-buttons {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
  }
  .tx-action-buttons .btn {
    width: 100%;
    justify-content: center;
    height: 38px;
    font-size: 13px;
    font-weight: 600;
    padding: 0 12px;
  }
}

/* ==========================================================================
   Mobile Bottom Navigation Bar & Native App Menu Styles
   ========================================================================== */

/* Mobile Top Header */
.mobile-top-header {
  display: none;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: 58px;
  background: var(--color-surface-solid);
  border-bottom: 1px solid var(--color-border);
  padding: 0 var(--spacing-4);
  align-items: center;
  justify-content: space-between;
  z-index: 998;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.mobile-brand .logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mobile-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-bg-base);
  border: 1px solid var(--color-border);
  padding: 4px 12px 4px 5px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-user-pill:hover,
.mobile-user-pill:active {
  background: var(--color-surface-hover);
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

.user-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.user-name-short {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
  max-width: 90px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mobile Bottom Navigation Bar (Dock) */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  min-height: 64px;
  background: var(--color-surface-solid);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.07);
  z-index: 1000;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--color-text-secondary);
  background: transparent;
  border: none;
  padding: 6px 0 4px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  -webkit-tap-highlight-color: transparent;
  height: 100%;
}

.bottom-nav-item:active {
  transform: scale(0.9);
}

.nav-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 28px;
  border-radius: 14px;
  transition: all 0.25s ease;
}

.nav-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 2px;
  transition: all 0.2s ease;
}

.bottom-nav-item.active {
  color: var(--color-primary);
}

.bottom-nav-item.active .nav-icon-wrap {
  color: var(--color-primary);
  background: rgba(9, 105, 218, 0.12);
}

[data-theme="dark"] .bottom-nav-item.active .nav-icon-wrap {
  background: rgba(129, 140, 248, 0.2);
}

.bottom-nav-item.active .nav-label {
  color: var(--color-primary);
  font-weight: 700;
}

/* Mobile Account Bottom Sheet / Action Drawer */
.mobile-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: sheetFadeIn 0.2s ease-out;
}

@keyframes sheetFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mobile-sheet-card {
  width: 100%;
  max-width: 500px;
  background: var(--color-surface-solid);
  border-top-left-radius: 26px;
  border-top-right-radius: 26px;
  padding: 12px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 45px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--color-border);
  border-bottom: none;
  animation: sheetSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes sheetSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.sheet-drag-handle {
  width: 42px;
  height: 5px;
  background: var(--color-border);
  border-radius: 100px;
  margin: 0 auto 16px;
}

.sheet-profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 12px;
}

.sheet-avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(9, 105, 218, 0.25);
}

.sheet-profile-details {
  flex: 1;
  min-width: 0;
}

.sheet-user-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.sheet-user-sub {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: 1px;
}

.sheet-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--color-bg-base);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s ease;
}

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

.sheet-menu-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sheet-menu-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: none;
  background: transparent;
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
}

.sheet-menu-btn:hover,
.sheet-menu-btn:active {
  background: var(--color-surface-hover);
}

.sheet-menu-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.sheet-menu-danger {
  color: var(--color-error);
}

.sheet-menu-danger:hover,
.sheet-menu-danger:active {
  background: rgba(239, 68, 68, 0.08);
}

/* Viewport Specific Navigation Visibility */
@media (max-width: 1023px) {
  .sidebar.desktop-sidebar {
    display: none !important;
  }
  .mobile-top-header {
    display: flex !important;
  }
  .mobile-bottom-nav {
    display: grid !important;
  }
  .main-content {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (min-width: 1024px) {
  .mobile-top-header {
    display: none !important;
  }
  .mobile-bottom-nav {
    display: none !important;
  }
  .mobile-sheet-backdrop {
    display: none !important;
  }
}