/* ===== Dashboard Theme Variables ===== */
:root {
  --bg-color: #f5f7fa;
  --text-color: #000000;
  --card-bg: #fff; 
  --primary: #00456d;
  --primary-hover: #007ab7;
  --accent-yellow: #997500;
  --accent-green: #0ecb81;
  --accent-red: #f6465d;
  --accent-blue: #007aff;
  --danger: #f21109;
  --shadow: rgba(0,0,0,0.08);
  --radius: 14px;
  --transition: 0.2s cubic-bezier(.4,0,.2,1);

  /* Aliases used by page-specific styles (withdrawal.css) */
  --header-bg: var(--card-bg);
  --text-primary: var(--text-color);
  --text-secondary: rgba(0,0,0,0.6);
  --border-color: rgba(0,0,0,0.08);
  --btn-hover-bg: rgba(0,0,0,0.05);
  --form-bg: var(--card-bg);
  --input-bg: #ffffff;
  --secondary-bg: #f0f0f0;
  --summary-bg: #f0f8ff;
  --detail-bg: #f9f9f9;
  --modal-bg: var(--card-bg);
  --warning-bg: #fff3cd;
  --disabled-bg: #cccccc;
  --primary-dark: var(--primary-hover);
  --success-color: var(--accent-green);
  --warning-color: var(--accent-yellow);
  --error-color: var(--accent-red);
}

[data-theme="dark"] {
  --bg-color: #000000;
  --text-color: #ffffff;
  --card-bg: #23262f;
  --primary: #85d6ff;
  --primary-hover: #1976d2;
  --accent-yellow: #00eeff;
  --accent-green: #0ecb81;
  --accent-red: #f6465d;
  --accent-blue: #007aff;
  --danger: #ff4d4d;
  --shadow: rgba(255,255,255,0.08);

  /* Aliases for withdrawal and page-specific CSS */
  --header-bg: var(--card-bg);
  --text-primary: var(--text-color);
  --text-secondary: rgba(255,255,255,0.75);
  --border-color: rgba(255,255,255,0.06);
  --btn-hover-bg: rgba(255,255,255,0.06);
  --form-bg: var(--card-bg);
  --input-bg: #2a2a2a;
  --secondary-bg: #333333;
  --summary-bg: #1e3a5f;
  --detail-bg: #252525;
  --modal-bg: var(--card-bg);
  --warning-bg: #332200;
  --disabled-bg: #444444;
  --primary-dark: var(--primary-hover);
  --success-color: var(--accent-green);
  --warning-color: var(--accent-yellow);
  --error-color: var(--accent-red);
}
/* Notification bell color variable */
:root {
  --notification-bell: #222;
}
[data-theme="dark"] {
  --notification-bell: #fff;
}

/* ===== Reset & Base ===== */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  box-sizing: border-box;
  touch-action: manipulation;
  overscroll-behavior: none;
  scroll-behavior: smooth;
  
}

*, *::before, *::after {
  box-sizing: inherit;
}

/* ===== Layout ===== */
body {
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}


.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 220px;
  background: var(--card-bg);
  box-shadow: 2px 0 16px var(--shadow);
  display: flex;
  flex-direction: column;
  z-index: 100;
  border-radius: 0 var(--radius) var(--radius) 0;
  transition: background var(--transition), color var(--transition);
}
/* Sidebar dark mode tweaks */
[data-theme="dark"] .sidebar {
  background: var(--card-bg);
  box-shadow: 2px 0 16px var(--shadow);
}

.sidebar-logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
  padding: 0 1.5rem 1rem 1.5rem;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
}

.sidebar-logo .logo-img {
  width: 170px;
  height: 100px;
  object-fit: contain;
  flex-shrink: 0;
}

.sidebar-logo span {
  flex: 1;
}

[data-theme="dark"] .sidebar-logo {
  color: var(--accent-yellow);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 1rem;
}

.sidebar-btn {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.05rem;
  font-weight: 500;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  transition: background var(--transition), color var(--transition); 
}

.sidebar-btn:hover,
.sidebar-btn.active {
  background: var(--primary);
  color: #fff;
}
[data-theme="dark"] .sidebar-btn:hover,
[data-theme="dark"] .sidebar-btn.active {
  background: var(--accent-yellow);
  color: #181a20;
}

.main-content {
  margin-left: 220px;
  margin-top: 64px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 64px);
  transition: margin var(--transition);
  position: relative;
  overflow-y: auto;
}
[data-theme="dark"] .main-content {
  background: var(--bg-color);
}

/* ===== Header ===== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 2rem 0.7rem 2rem;
  background: transparent;
  gap: 1.2rem;
  position: relative;
}
[data-theme="dark"] .header {
  background: var(--bg-color);
}

.profile-icon {
  order: 1;
  margin-right: auto;
}

.profile-icon img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  box-shadow: 0 2px 8px var(--shadow);
  object-fit: cover;
}

/* Mobile logo in header - centered */
.mobile-logo {
  position: absolute;
  left: 50%;
  top:10%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  order: 2;
}

.mobile-logo img {
  height: 40px;
  object-fit: contain;
}

.notification-btn {
  order: 3;
  margin-left: auto;
}

/* ===== Balance Section ===== */
.balance-section {
  margin: 0.2rem 2rem 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem
}

.balance-card {
  background: var(--card-bg);
  box-shadow: 0 2px 12px var(--shadow);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  gap: 2rem;
}
[data-theme="dark"] .balance-card {
  background: #23262f;
  box-shadow: 0 2px 12px var(--shadow);
}

.balance-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.balance-label {
  font-size: 0.80rem;
  color: var(--primary);
  font-weight: 500;
}
[data-theme="dark"] .balance-label {
  color: var(--text-color);
}

.balance-amount {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
  letter-spacing: 0px;
}
[data-theme="dark"] .balance-amount {
  color: var(--text-color);
}

.balance-chart {
  min-width: 60px;
  display: flex;
  align-items: center;
}

/* ===== Quick Actions ===== */
.balance-actions {
  display: flex;
  gap: 1.2rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  margin-left: 0.50rem;
  margin-top: -7px;
}

.action-btn-circle {
  background: var(--card-bg);
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 2px 8px var(--shadow);
  padding: 0.7rem 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  font-size: 0.97rem;
}

.action-btn-circle:hover {
  background: var(--primary-hover);
  color: #fff;
  transform: translateY(-2px) scale(1.04);
}

.action-icon svg {
  display: block;
  margin-bottom: 0.2rem;
}

.action-title {
  font-size: 0.95rem;
  font-weight: 500;
}

/* Slightly larger small action buttons on wider screens for easier click targets */
.action-btn-circle.small { padding: 0.6rem 0.9rem; }
@media (min-width: 900px) {
  .action-btn-circle.small { padding: 0.6rem 0.8rem; }
  .action-btn-circle.small .action-icon svg { width: 25px; height: 25px; }
  .action-btn-circle.small .action-title { font-size: 0.9rem; }
}


/* ===== Bottom Mobile Navigation ===== */
.bottom-nav {
  display: none;
}
[data-theme="dark"] .bottom-nav {
  background: #23262f;
  box-shadow: 0 -2px 12px var(--shadow);
}

/* Desktop-only elements */
@media (min-width: 901px) {
  .mobile-only {
    display: none !important;
  }
  
  .profile-icon {
    display: none !important;
  }
  
  .notification-btn {
    display: none !important;
  }
  
  .profile-sidebar {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    width: 64px;
    border-radius: 0;
    padding-top: 1rem;
  }
  
  .sidebar-logo {
    font-size: 1.1rem;
    padding: 1rem 0.5rem;
    text-align: center;
    justify-content: center;
    flex-direction: column;
  }
  
  .sidebar-logo span {
    display: none;
  }
  
  .sidebar-logo .logo-img {
    margin: 0;
    width: 32px;
    height: 32px;
  }
  
  .sidebar-nav {
    padding: 0 0.3rem;
  }
  
  .sidebar-btn {
    font-size: 1rem;
    padding: 0.7rem 0.3rem;
    justify-content: center;
  }
  
  .main-content {
    margin-left: 64px;
    padding: 0;
    margin-top: 0;
  }
  
  .header, .balance-section, .switch-section, .assets-section {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .top-nav {
    display: none;
  }
  
  .notification-btn-desktop {
    display: none;
  }
}

@media (max-width: 600px) {
  .sidebar {
    display: none;
  }
  .main-content {
    margin-left: 0;
  }
  .header {
    padding: 1rem 1rem 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Profile left, notification right */
  }
  .profile-icon {
    margin-right: auto;
    order: 1;
  }
  .notification-btn {
    margin-left: auto;
    order: 2;
  }
  .balance-section, .switch-section, .assets-section {
    margin: 0 0.5rem;
  }
  .balance-card, .assets-section, .news-announcement-card {
    padding: 1rem;
    border-radius: 10px;
  }
  .switch-section {
    gap: 0.5rem;
  }
  .assets-table th, .assets-table td {
    padding: 0.7rem 0.3rem;
    font-size: 0.97rem;
  }
  .news-announcement-card {
    max-width: 98vw;
    padding: 1rem 0.7rem;
  }
  .balance-actions {
    flex-direction: row !important;
    gap: 1.5rem;
    overflow-x: auto;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding-bottom: 0.5rem;
  }
  .action-btn-circle {
    min-width: 70px;
    max-width: 80px;
    padding: 0.4rem 0.3rem;
    font-size: 0.85rem;
    flex: 0 0 auto;
  }
  .action-title {
    font-size: 0.8rem;
  }
  .bottom-nav {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: rgb(255, 255, 255);
    box-shadow: 0 -2px 12px var(--shadow);
    border-radius: var(--radius) var(--radius) 0 0;
    z-index: 200;
    justify-content: space-around;
    align-items: center;
    padding: 0.3rem 0;
  }
  .nav-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    padding: 0.rem 0.7rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
  }
  .nav-btn.active,
  .nav-btn:hover {
    background: var(--primary);
    color: #fff;
  }
  [data-theme="dark"] .nav-btn.active,
  [data-theme="dark"] .nav-btn:hover {
    background: var(--accent-yellow);
    color: #181a20;
  }
  .nav-icon {
    font-size: 1.3rem;
  }
  .nav-label {
    font-size: 0.85rem;
    font-weight: 500;
  }
}

/* ===== Profile Sidebar ===== */
.profile-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: var(--card-bg);
  z-index: 9999;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
[data-theme="dark"] .profile-sidebar {
  background: #23262f;
}
.profile-sidebar.open {
  transform: translateX(0);
}
.profile-sidebar-header {
  display: flex;
  align-items: center;
  padding: 1.5rem 1rem 1rem 1.5rem;
  gap: 1rem;
  border-bottom: 1px solid #eee;
}
[data-theme="dark"] .profile-sidebar-header {
  border-bottom: 1px solid #23262f;
}
.profile-sidebar-header img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: 0 2px 8px var(--shadow, rgba(0,0,0,0.08));
  object-fit: cover;
}
.profile-sidebar-close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--danger, #e7261f);
  cursor: pointer;
  font-weight: 600;

}
  .profile-sidebar-close:hover {
    color: #ff6868;
}
.profile-sidebar-menu {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.5rem 1rem 1.5rem;
}
.profile-sidebar-menu button {
  background: none;
  border: none;
  color: var(--primary, #00456d);
  font-size: 1.08rem;
  font-weight: 500;
  padding: 0.9rem 1rem;
  border-radius: var(--radius, 14px);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s, color 0.2s;
}
[data-theme="dark"] .profile-sidebar-menu button {
  color: var(--accent-yellow);
}
.profile-sidebar-menu button:hover {
  background: var(--primary, #00456d);
  color: #fff;
}
[data-theme="dark"] .profile-sidebar-menu button:hover {
  background: var(--accent-yellow);
  color: #181a20;
}
.profile-sidebar-user {
  padding: 1.2rem 1.5rem;
  border-top: 1px solid #eee;
  font-size: 1.1rem;
  color: var(--primary, #00456d);
  text-align: left;
  font-weight: 600;
  background: var(--bg-color, #f5f7fa);
}
[data-theme="dark"] .profile-sidebar-user {
  background: #181a20;
  color: var(--accent-yellow);
}

/* Profile sidebar menu icons */
.profile-sidebar-menu button i {
  font-size: 1.15em;
  margin-right: 0.7em;
  min-width: 1.3em;
  color: var(--primary);
  transition: color 0.2s;
  vertical-align: middle;
  display: inline-block;
}

[data-theme="dark"] .profile-sidebar-menu button i {
  color: var(--accent-yellow);
}

/* Logout button red color */
#logoutBtn {
  color: #fff;
  background: var(--danger);
  border: none;
  transition: background 0.2s, color 0.2s;
}
#logoutBtn i {
  color: #fff !important;
}
#logoutBtn:hover {
  background: #b52a2a;
  color: #fff;
}

/* ===== Misc ===== */
input, button {
  font-size: 16px;
  touch-action: manipulation;
  border-radius: 6px;
  outline: none;
  border: none;
  transition: box-shadow var(--transition), background var(--transition), color var(--transition);
}
[data-theme="dark"] input, [data-theme="dark"] button {
  background: #23262f;
  color: #e9ecef;
}

input:focus, button:focus {
  box-shadow: 0 0 0 2px var(--primary-hover);
}

::-webkit-scrollbar {
  width: 8px;
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 8px;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: var(--accent-yellow);
}
.hidden { display: none !important; }


/* Account page specific styles for light and dark theme support */
/* Style for .main-content to add margin on desktop, full width on mobile */
.tl-main-content {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  padding: 2rem 2rem;
  box-sizing: border-box;
  width: 100%;
  margin-top: 1rem;
}
.tl-account-card {
  background: var(--card-bg);
  box-shadow: 0 2px 12px var(--shadow);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 600px;
  width: 100%;
  box-sizing: border-box;
  color: var(--text-color);
  transition: background var(--transition), color var(--transition);
}

.tl-account-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--primary);
  text-align: center;
  margin-top: -1.85rem;
}

.tl-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
}

.tl-avatar-container {
  position: relative;
  width: 120px;
  height: 120px;
}

.tl-avatar-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 8px var(--shadow);
  border: 3px solid var(--primary);
}

.tl-avatar-upload-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--primary);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border: 2px solid var(--card-bg);
  transition: background var(--transition);
  color: #fff;
}

.tl-avatar-upload-btn:hover {
  background: var(--primary-hover);
}

.tl-avatar-note {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.7;
}

.tl-account-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.tl-form-group {
  display: flex;
  flex-direction: column;
}

label {
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--primary);
}

input[type="text"],
input[type="email"],
input[type="tel"] {
  padding: 0.6rem 1rem;
  font-size: 1rem;
  border: 1.5px solid var(--primary);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text-color);
  transition: border-color var(--transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
  border-color: var(--primary-hover);
  outline: none;
  box-shadow: 0 0 6px var(--primary-hover);
}


/* Back button in header */
.header {
  display: flex;
  align-items: center;
  padding: 1rem 0.1rem;
  background: var(--bg-color);
}


.tl-back-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary);
  padding: 0;
  display: flex;
  align-items: center;
  transition: color var(--transition);
  margin: 0 0;
  font-weight: 700;
}

@media (min-width: 900px) {
  .tl-back-btn {
    display: none !important;
  }
}

.tl-back-btn:hover {
  color: var(--primary-hover);
}

.tl-uid-field {
  margin-top: 1rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.2rem;
}

.tl-uid-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
}

[data-theme="dark"] .tl-uid-value {
  background: none !important;
  color: var(--text-color) !important;
}
.tl-uid-value {
  background: #f0f4f8;
  color: var(--primary);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .tl-main-content {
    margin-left: 64px;
    padding: 1rem;
  }
  .tl-account-card {
    max-width: 100%;
    padding: 1.5rem;
  }
}

@media (max-width: 600px) {
  .tl-main-content {
    margin-left: 0;
    padding: 1rem;
  }
  .tl-account-card {
    border-radius: 10px;
    padding: 1rem;
  }
}
@media (min-width: 601px) {
  .header {
    justify-content: space-between !important;
  }
  .profile-icon {
    margin-right: auto !important;
    order: 1;
  }
  .notification-btn {
    margin-left: auto !important;
    order: 2;
  }
}

/* ===== Form Actions ===== */
.tl-form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.tl-edit-btn, .tl-save-btn, .tl-cancel-btn {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  padding: 0.8rem 1.2rem;
  border: none;
  border-radius: var(--radius, 14px);
  cursor: pointer;
  font-size: 1.1rem;
  transition: background var(--transition);
  width: 120px;
}

.tl-cancel-btn {
  background: #e0e7ef;
  color: #333;
}

.tl-cancel-btn:hover {
  background: #d1d5db;
}
.tl-edit-btn:hover, .tl-save-btn:hover {
  background: var(--primary-hover);
}

/* Hide selection and pointer for readonly fields unless editing */
input[readonly] {
  background: #f0f4f8 !important;
  color: #3d3d3d !important;
  border: 1.5px solid #e0e7ef !important;
  pointer-events: none;
  user-select: none;
  box-shadow: none !important;
  outline: none !important;
  cursor: default !important;
}

/* When editing, restore normal styles */
input:not([readonly]) {
  background: var(--card-bg);
  color: var(--text-color);
  pointer-events: auto;
}

.balance-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.balance-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.86rem;
  color: var(--primary);
  vertical-align: middle;
  transition: color 0.2s;
  margin: 0;
  padding: 0 0.2rem 0 0;
}
.balance-toggle-btn:hover {
  color: var(--primary-hover);
}

/* Add this to your CSS file */
.balance-amount.hidden-blur {
  filter: blur(0.18em);
  color: #ff0404 !important;
  user-select: none;
  opacity: 0.5;
  transition: filter 0.2s, color 0.2s, opacity 0.3s;
}

/* ===== Transaction History Styles (moved from History.html) ===== */
.history-main-content {
  max-width: 850px;
  margin: 10px auto 0 auto;
  padding: 0 32px 40px 32px;
  box-sizing: border-box;
  width: 100%;
}
.history-header {
  position: relative;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  padding: 8px 0 20px 0;
  min-height: 8px;
}
.history-title {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
  white-space: nowrap;
}

.filter-bar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 32px;
  margin: 0 auto 22px auto;
  max-width: 400px;
  padding: 0 10px;
}
.filter-btn {
  background: #fff;
  border: 2px solid #1a1a1a10;
  color: var(--primary);
  font-weight: 600;
  font-size: 1.08rem;
  border-radius: 10px;
  padding: 8px 28px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border 0.18s;
}
.filter-btn.active, .filter-btn:focus {
  background: #f5f8ff;
  color: #1976d2;
  border: 2px solid #1976d2;
}
.history-list {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 0 0 40px 0;
  width: 100%;
}
  .history-card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 2px 16px var(--shadow);
    padding: 22px 22px 18px 22px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    border-left: 5px solid var(--accent-green);
    transition: box-shadow 0.2s, border-color 0.2s, background 0.2s, color 0.2s;
    position: relative;
    color: var(--text-color);
  }

[data-theme="dark"] .history-card {
    background: #23262f;
    color: #fff;
    box-shadow: 0 2px 16px var(--shadow);
}
  .history-card.withdraw {
    border-left: 5px solid var(--accent-red);
  }
  .history-card.deposit {
    border-left: 5px solid var(--accent-green);
  }
.history-card .icon-type {
  font-size: 2rem;
  margin-right: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
}
.history-card.withdraw .icon-type {
  color: var(--accent-red);
}
.history-card.deposit .icon-type {
  color: var(--accent-green);
}
.history-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.history-type-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1px;
}
.history-type {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 1px;
}
.history-type.withdraw {
  color: var(--accent-red);
}
.history-type.deposit {
  color: var(--accent-green);
}
  .history-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    padding: 2px 12px;
    border-radius: 8px;
    min-width: 120px;
    text-align: right;
    transition: background 0.2s, color 0.2s;
  }
  .history-card.deposit .history-amount {
    color: var(--text-color);
  }
  .history-card.withdraw .history-amount {
    color: var(--text-color);
  }
  [data-theme="dark"] .history-amount {
    color: var(--card);
  }
  [data-theme="dark"] .history-card.deposit .history-amount {
    color: var(--accent-green);
  }
  [data-theme="dark"] .history-card.withdraw .history-amount {
    color: var(--text-primary);
  }
.history-date-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 7px;
}
.history-date {
  font-size: 1rem;
  color: #888;
  font-weight: 500;
}
.history-status {
  font-size: 0.90rem;
  font-weight: 600;
  text-align: right;
  letter-spacing: -0.2px;
  text-transform: uppercase;
}
.history-status.completed {
  color: var(--accent-green);
  
}
.history-status.failed {
  color: var(--accent-red);
}
.history-status.pending {
  color: #f0b90b;
}
  .no-history {
    text-align: center;
    padding: 40px 10px;
    font-size: 1.1rem;
    color: #718096;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 2px 16px var(--shadow);
    transition: background 0.2s, color 0.2s;
  }
  [data-theme="dark"] .no-history {
    background: #23262f;
    color: #b0b0b0;
  }
@media (max-width: 900px) {
  .history-main-content {
    max-width: 100vw;
    padding: 0 8px 30px 8px;
    margin-top: 0
  }
  .history-list {
    max-width: 100vw;
    padding: 0 0 30px 0;
  }
}
@media (max-width: 600px) {
  .history-header { font-size: 1.1rem; }
  .history-title { font-size: 1.1rem; }
  .filter-bar { gap: 6px; }
  .filter-btn { font-size: 0.98rem; padding: 10px 26px; }
  .history-main-content {
    padding: 0 2px 20px 2px;
    max-width: 100vw;
  }
  .history-list {
    padding: 0 0 20px 0;
    max-width: 97vw;
    margin-left: 1px;
    margin-right: auto;
  }
  .history-card {
    padding: 14px 6px 12px 6px;
    border-radius: 12px;
  }
  .history-amount { min-width: 80px; font-size: 1rem; }
}

/* Notification Panel Styles */
.notification-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 400px;
  max-width: 100vw;
  background: var(--card-bg);
  color: var(--text-color);
  box-shadow: 0 8px 32px var(--shadow);
  border-radius: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  opacity: 1;
  overflow: hidden;
  transition: opacity 0.2s, transform 0.2s;
}
.notification-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  font-size: 1.2rem;
  font-weight: 700;
  border-bottom: 1px solid #eee;
  background: var(--bg-color);
  min-height: 64px;
}
.notification-panel-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}
#clearNotificationsBtn {
  background: none;
  border: none;
  color: var(--danger, #d9534f);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-left: 1rem;
  transition: color 0.2s;
}
#clearNotificationsBtn:hover {
  color: #b52a2a;
}
.notification-list {
  flex: 1 1 0;
  overflow-y: auto;
  padding: 0.5rem 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: var(--card-bg);
}

.notification-item {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  border-radius: 0.2em;
  background: var(--card-bg);
  font-size: 1.04rem;
  font-weight: 500;
  color: var(--text-color);
  box-shadow: none;
  margin: 0 0.2em;
}

.notification-item.unread {
  background: #000000;
  font-weight: 700;
  color: white;
  border-left: 4px solid var(--accent-blue);
}

.notification-item.read {
  background: inherit;
  color: #5a5a5a;
  font-weight: 400;
}

[data-theme="dark"] .notification-item.read {
  background: var(--card-bg);
  color: #888;
}

.notification-item:hover {
  background: var(--primary-hover);
  box-shadow: 0 2px 8px var(--shadow);
}

.notification-title {
  font-size: 1.09rem;
  font-weight: 600;
  margin-bottom: 0.2em;
}

.notification-date {
  font-size: 0.92rem;
  color: #d3d3d3;
}

.notification-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.1rem;
  border-radius: 50%;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  margin-top: -10px;
}

.notification-btn:hover {
  background: var(--primary-hover);
  color: #fff;
}

.notification-btn:hover svg {
  stroke: #fff;
}

.notification-dot {
  position: absolute;
  top: -3px;
  right: 17px;
  width: 13px;
  height: 13px;
  background: var(--accent-red, #f6465d);
  border-radius: 50%;
  z-index: 2;
  border: 2px solid #fff;
  display: none;
}

.notification-detail-content {
  padding: 0.61rem 0.57rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-color);
}

.notification-btn.has-unread .notification-dot {
  display: block;
}

@media (max-width: 600px) {
  .notification-item {
    padding: 0.8rem 0.7rem;
    font-size: 0.97rem;
  }
}



/* Top navigation styles */
.top-nav {
  display: none; /* Hidden by default */
}

@media (min-width: 901px) {
  .top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 2rem;
    background: var(--card-bg);
    border-bottom: 1px solid var(--shadow);
    position: fixed;
    top: 0;
    right: 0;
    left: 220px; /* Account for sidebar width */
    z-index: 99;
    height: 64px;
    box-shadow: 0 2px 8px var(--shadow);
  }

  .top-nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 auto; /* Center the menu items */
  }

  .top-nav-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.05rem;
    font-weight: 500;
    padding: 0.7rem 1.2rem;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all var(--transition);
  }

  .top-nav-btn i {
    font-size: 1.2em;
    color: var(--primary);
    transition: color var(--transition);
  }

  .top-nav-btn:hover {
    background: var(--primary);
    color: #fff;
  }

  .top-nav-btn:hover i {
    color: #fff;
  }

  .top-nav-btn.active {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
  }

  .top-nav-btn.active i {
    color: #fff;
  }

  .top-nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  .notification-btn-desktop {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: var(--radius);
    transition: background var(--transition);
  }

  .notification-btn-desktop:hover {
    background: var(--primary);
    color: white;
  }

  .notification-btn-desktop:hover svg {
    stroke: #fff;
  }

  [data-theme="dark"] .notification-btn-desktop:hover {
    background: var(--accent-yellow);
  }

  [data-theme="dark"] .notification-btn-desktop:hover svg {
    stroke: #181a20;
  }

  .notification-btn-desktop .notification-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 14px;
    height: 14px;
    background: var(--accent-red);
    border-radius: 50%;
    z-index: 2;
    border: 2px solid var(--card-bg);
    display: none;
  }
  
  /* Add this to ensure the dot shows when there are unread notifications */
  .notification-btn-desktop.has-unread .notification-dot {
    display: block;
  }

  .notification-btn-desktop:hover .notification-dot {
    border-color: var(--primary);
  }

  [data-theme="dark"] .notification-btn-desktop .notification-dot {
    border-color: var(--card-bg);
  }

  [data-theme="dark"] .notification-btn-desktop:hover .notification-dot {
    border-color: var(--accent-yellow);
  }

  /* Ensure notification dot is always visible when there are unread notifications */
  .notification-btn-desktop.has-unread .notification-dot {
    display: block;
    animation: pulse 2s infinite;
  }

  @keyframes pulse {
    0% {
      transform: scale(1);
      opacity: 1;
    }
    50% {
      transform: scale(1.2);
      opacity: 0.8;
    }
    100% {
      transform: scale(1);
      opacity: 1;
    }
  }

  .mobile-only {
    display: none;
  }

  [data-theme="dark"] .top-nav-btn i {
    color: var(--accent-yellow);
  }

  [data-theme="dark"] .top-nav-btn:hover,
  [data-theme="dark"] .top-nav-btn.active {
    background: var(--accent-yellow);
    color: #181a20;
  }

  [data-theme="dark"] .top-nav-btn:hover i,
  [data-theme="dark"] .top-nav-btn.active i {
    color: #181a20;
  }

  /* Logout button styling */
  .sidebar-btn.logout-btn {
    color: #fff;
    background: var(--danger);
  }

  .sidebar-btn.logout-btn i {
    color: #fff !important;
  }

  .sidebar-btn.logout-btn:hover {
    background: #b52a2a;
  }

  [data-theme="dark"] .sidebar-btn.logout-btn {
    background: var(--danger);
    color: #fff;
  }

  [data-theme="dark"] .sidebar-btn.logout-btn:hover {
    background: #cc0000;
  }

  .top-nav-btn:hover {
    background: var(--primary);
    color: #fff;
  }

  .top-nav-btn i {
    font-size: 1.1em;
  }

  /* Hide profile sidebar on desktop */
  .profile-sidebar {
    display: none;
  }

  /* Adjust main content to account for top nav */
  .main-content {
    margin-top: 60px;
  }

  /* Theme toggle in top nav */
  .top-nav-theme {
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--shadow);
  }
}

/* Dark theme adjustments */
[data-theme="dark"] .top-nav {
  background: var(--card-bg);
  border-color: rgba(255,255,255,0.1);
}

[data-theme="dark"] .top-nav-btn {
  color: var(--accent-yellow);
}

[data-theme="dark"] .top-nav-btn:hover {
  background: var(--accent-yellow);
  color: #181a20;
}

@media (min-width: 901px) {
  .mobile-only {
    display: none !important;
  }
  
  .profile-icon {
    display: none !important;
  }
  
  .notification-btn {
    display: none !important;
  }
  
  .profile-sidebar {
    display: none !important;
  }
  
  .bottom-nav {
    display: none !important;
  }

  .top-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 2rem;
    background: var(--card-bg);
    border-bottom: 1px solid var(--shadow);
    position: fixed;
    top: 0;
    right: 0;
    left: 220px;
    z-index: 99;
    height: 64px;
    box-shadow: 0 2px 8px var(--shadow);
  }

  .main-content {
    margin-left: 220px;
    margin-top: 64px;
  }
}



