/* Add Dancing Script font */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&display=swap');

/* Base Styles */
:root {
  --primary-color: #1b6875;
  --text-color: #333;
  --border-color: #ccc;
  --hover-color: #165761;
  --bg-color: #f7f7f7;
  --white: #fff;
  --accent-color: #ff3b30;
  --modal-shadow: 0 10px 30px rgba(0,0,0,0.2);
  --highlight-color: #ffea8a;
}

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

html {
  height: 100%;
}

body {
  font-family: 'Lato', sans-serif;
  background: url('images/page_background.jpg') no-repeat center center fixed;
  background-size: cover;
  color: #3f3f43;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  padding-bottom: 100px; /* Reduced from 150px for less space below content on desktop */
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Main wrapper provides the primary spacing */
.main-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 2rem auto; /* Consistent vertical spacing */
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex: 1 0 auto; /* Allows content to grow and push footer */
  padding: 0 1rem;
}

/* System banner specific spacing (only applies when banner exists) */
.system-banner {
  width: calc(100% - 2rem); /* Match exact width accounting for padding */
  max-width: 1000px; /* Match the max-width of content */
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin: 1.5rem auto 1rem; /* Added 1.5rem top margin globally */
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
  max-height: 500px;
  opacity: 1;
  position: relative;
  z-index: 100;
}

.system-banner.hidden {
  margin-bottom: 0;
  max-height: 0;
  opacity: 0;
  border: none;
  /* No extra margin needed, wrapper provides consistent space */
}

/* Content area inherits spacing from main-wrapper */
.content {
  flex: 1;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 2rem;
  margin: 0;
  max-width: 800px;
  overflow-x: hidden;
}

/* For pages without side banner, content should be centered */
.main-wrapper:not(.with-side-banner) .content {
  max-width: 1000px;
  margin: 0 auto;
}

.content h2 {
  color: #3f3f43;
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  font-weight: normal;
}

.content h3 {
  color: var(--text-color);
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

/* Footer stays at bottom */
.site-footer {
  background: rgba(28, 28, 28, 0.9);
  color: white;
  padding: 1.25rem 0;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  border-top: 4px solid #8dc63f;
  overflow: hidden;
  clear: both;
  z-index: 50; /* Added z-index to ensure footer stays above content */
}

.footer-content {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  box-sizing: border-box;
}

.footer-left {
  text-align: left;
  flex: 1;
  min-width: 0; /* Allows text to wrap instead of forcing container wider */
}

.footer-left a {
  color: white;
  text-decoration: none;
}

.footer-left a:hover {
  text-decoration: underline;
}

.footer-left p {
  margin: 0.5rem 0 0 0;
  opacity: 0.9;
  white-space: normal;
  word-wrap: break-word;
}

.footer-right {
  display: flex;
  align-items: center;
  margin-left: 1rem;
  flex-shrink: 0;
}

.equal-housing {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.equal-housing-icon {
  width: 30px;
  height: 30px;
  margin-right: 5px;
}

@media (max-width: 991px) {
  .footer-content {
    padding: 0 1rem;
  }
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
    padding: 0 1rem;
    gap: 1rem;
  }

  .footer-left {
    text-align: center;
    width: 100%;
  }

  .footer-right {
    justify-content: center;
    margin-left: 0;
    width: 100%;
  }

  body {
    padding-bottom: 180px; /* Increased padding for smaller screens */
  }
}

/* Top Bar */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  padding: 0.5rem 2rem;
  border-bottom: 1px solid var(--border-color);
  height: 60px;
}

.top-left img {
  height: 40px;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Icons and Badges */
.icon-bell {
  display: none;
}

.badge {
  background-color: var(--accent-color);
  color: var(--white);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.top-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  position: relative;
}

.top-circle.has-notifications::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  background-color: var(--accent-color);
  border-radius: 50%;
  border: 2px solid white;
}

/* Mobile Navigation */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 400px;
  height: 100vh;
  background: var(--white);
  z-index: 2000;
  transition: right 0.3s ease;
  overflow-y: auto;
  box-shadow: -2px 0 10px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
}

.mobile-nav.open {
  right: 0;
}

/* Mobile Navigation Header */
.mobile-nav-header {
  padding: 1rem;
  background: var(--white);
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-nav-header .user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-nav-header .top-circle {
  background: #fff;
  color: #3f3f43;
  border: 1px solid #e0e0e0;
  width: 44px;
  height: 44px;
}

.close-nav {
  background: none;
  border: none;
  color: #333;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 2001;
  pointer-events: auto;
}

.close-nav:hover {
  opacity: 0.8;
}

.mobile-menu {
  flex: 1;
  overflow-y: auto;
  list-style: none;
}

.mobile-menu a {
  display: block;
  padding: 1rem;
  color: var(--text-color);
  text-decoration: none;
  border-bottom: 1px solid var(--border-color);
}

.mobile-menu > li > a {
  background: #fff;
  color: #3f3f43;
  border-bottom: 1px solid #e0e0e0;
}

.mobile-menu > li > a i {
  width: 20px;
  text-align: center;
  margin-right: 1rem;
}

.mobile-menu .submenu {
  display: none;
  background: var(--white);
  transition: all 0.3s ease;
}

.mobile-menu .submenu a {
  padding-left: 2rem;
  color: #3f3f43;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
}

.mobile-menu .submenu .submenu a {
  padding-left: 3rem;
}

.mobile-menu .has-submenu > a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-menu .has-submenu > a::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.8rem;
  transition: transform 0.3s ease;
  margin-left: auto;
}

.mobile-menu .has-submenu.active > a::after {
  transform: rotate(180deg);
}

/* Mobile Menu Bottom Links */
.mobile-utility-links {
  margin-top: auto;
  padding: 1rem;
  background: #f5f5f5;
  border-top: 1px solid #eee;
}

.mobile-utility-links a {
  display: block;
  padding: 0.75rem 0;
  color: #333;
  text-decoration: none;
  font-size: 0.9rem;
}

.mobile-utility-links a:not(:last-child) {
  border-bottom: 1px solid #eee;
}

/* Desktop Navigation */
.nav-bar {
  display: none;
}

@media (min-width: 992px) {
  .nav-bar {
    display: block;
    background: var(--primary-color);
    border-bottom: 1px solid var(--hover-color);
  }

  .nav-menu {
    display: flex;
    list-style: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    gap: 2rem;
  }

  .nav-menu > li > a {
    color: var(--white);
    padding: 1rem 0;
    display: flex;
    align-items: center;
    text-decoration: none;
    white-space: nowrap;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.5px;
  }

  .nav-menu > li:hover > a {
    background: transparent;
    opacity: 0.8;
  }

  .nav-menu .submenu {
    position: absolute;
    display: none;
    background: var(--white);
    min-width: 220px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 4px;
    z-index: 1000;
    margin-top: 0;
    list-style: none;
    padding-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  .nav-menu > li {
    position: relative;
    padding-bottom: 0.5rem;
  }

  .nav-menu > li:hover > .submenu {
    display: block;
    opacity: 1;
    visibility: visible;
  }

  .nav-menu .submenu::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: 0;
    right: 0;
    height: 0.5rem;
    background: transparent;
  }

  .nav-menu .submenu .submenu {
    left: 100%;
    top: -0.5rem;
    list-style: none;
  }

  .nav-menu .submenu li {
    position: relative;
  }

  .nav-menu .submenu li:hover > .submenu {
    display: block;
    opacity: 1;
    visibility: visible;
  }

  .nav-menu .submenu a {
    padding: 0.75rem 1rem;
    color: #3f3f43;
    text-decoration: none;
    display: block;
  }

  .nav-menu .submenu a:hover {
    background: #1b6875;
    color: #fff;
  }

  .nav-menu > li.has-submenu > a::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.7rem;
    margin-left: 0.3rem;
    opacity: 0.8;
  }

  .nav-menu > li:not(.has-submenu) > a::after {
    content: '';
  }

  .mobile-nav {
    display: none !important;
  }
  
  .hamburger {
    display: none !important;
  }
}

/* Desktop Header Items */
.desktop-only {
  display: none;
}

@media (min-width: 992px) {
  .desktop-only {
    display: flex;
    align-items: center;
    gap: 1.5rem;
  }

  .desktop-only a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
  }

  .desktop-only a:hover {
    color: var(--primary-color);
  }

  .user-name-container {
    pointer-events: auto;
    cursor: pointer;
  }

  .user-name-container strong {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    user-select: none;
  }

  .user-name-container strong i {
    display: inline-block;
    font-size: 0.8rem;
    margin-left: 0.3rem;
    transition: transform 0.2s ease;
  }

  .user-name-container.active strong i {
    transform: rotate(180deg);
  }
}

/* Notifications Pane */
.notifications-pane {
  /* HIDE the pane permanently */
  display: none !important; 
  /* Keep original styles commented out for reference if needed */
  /*
  position: fixed;
  top: 0;
  right: -400px;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: var(--white);
  z-index: 2001;
  transition: right 0.3s ease;
  box-shadow: -2px 0 10px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  */
}

/* Remove rule that depends on the pane being open */
/*
.notifications-pane.open {
  right: 0;
}
*/

.notifications-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--primary-color);
  color: white;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.notifications-header h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 1.1rem;
}

.close-notifications {
  background: none;
  border: none;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
}

.notifications-list {
  flex: 1;
  overflow-y: auto;
  list-style: none;
  padding: 1rem;
  margin: 0;
}

.notification-item {
  background: #f9f9f9;
  border-radius: 8px;
  margin-bottom: 1rem;
  padding: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.notification-item:hover {
  background: #f0f0f0;
}

.notification-item:last-child {
  margin-bottom: 0;
}

.notification-header {
  display: flex;
  margin-bottom: 0.5rem;
  align-items: center;
}

.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e9e9e9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  color: var(--primary-color);
  font-size: 1.25rem;
}

.notification-title {
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0;
  color: var(--text-color);
}

.notification-content {
  color: #666;
  margin-bottom: 0.5rem;
}

.notification-time {
  color: #999;
  font-size: 0.85rem;
}

.user-menu a .badge {
  margin-left: auto;
}

/* Read notification styling */
.notification-item.read {
  opacity: 0.7;
  background-color: rgba(240, 240, 240, 0.5);
}

.notification-item.read .notification-icon {
  color: #999;
}

.notification-item.read .notification-title {
  font-weight: normal;
}

/* Mark All as Read button */
.mark-all-read {
  display: block;
  width: 100%;
  padding: 0.75rem;
  margin-top: 1rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.mark-all-read:hover {
  background-color: var(--hover-color);
}

/* Table Styles */
.table-container {
  overflow-x: auto;
  width: 100%;
}

@media (max-width: 600px) {
  .table-container td[colspan="8"] {
    text-align: center;
    white-space: normal;
    overflow: hidden;
  }
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  margin: 0;
  table-layout: fixed;
}

thead th {
  background: #f2f2f2;
  padding: 0.7rem 0.5rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-color);
  border-bottom: 2px solid #ddd;
  white-space: normal;
  font-size: 0.85rem;
  word-wrap: break-word;
}

tbody td {
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid #eee;
  background: var(--white);
  font-size: 0.85rem;
  word-wrap: break-word;
}

/* Column widths for better fit */
table th:nth-child(1), /* Account Nickname */
table td:nth-child(1) {
  width: 15%;
}

table th:nth-child(2), /* Account Description */
table td:nth-child(2) {
  width: 19%;
}

table th:nth-child(3), /* Account Number */
table td:nth-child(3) {
  width: 8%;
}

table th:nth-child(4), /* Balance */
table td:nth-child(4),
table th:nth-child(5), /* Available Balance */
table td:nth-child(5),
table th:nth-child(6), /* Amount Due */
table td:nth-child(6) {
  width: 13%;
  text-align: right;
}

table th:nth-child(7), /* Date Due / Maturity Date */
table td:nth-child(7) {
  width: 10%;
  text-align: right; /* Right-align date due column */
  white-space: nowrap; /* Prevent dates from wrapping to two lines */
}

/* All tables now have the same 7-column structure, so deposit accounts use the same styling */

.account-nickname {
  color: var(--primary-color);
  font-weight: 500;
}

tfoot {
  background: #f2f2f2;
  font-weight: 600;
}

tfoot td {
  padding: 0.7rem 0.5rem;
  border-top: 2px solid #ddd;
}

/* Right-align financial data and totals in footer */
tfoot td[data-label="Totals"],
tfoot td[data-label="Balance"],
tfoot td[data-label="Available Balance"],
tfoot td[data-label="Amount Due"],
tfoot td[data-label="Maturity Date"],
tfoot td[data-label="Date Due"] {
  text-align: right;
}

/* Mobile Table Styles */
@media (max-width: 991px) {
  .content {
    padding: 1rem;
  }

  .table-container {
    /* Ensure horizontal scrolling on mobile */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -1rem 1rem; /* Adjust negative margin to match content padding */
    padding: 0 1rem; /* Add padding back inside */
    box-shadow: none;
    background: transparent;
    border: none; /* Remove potential borders */
    border-radius: 0; /* Remove potential radius */
  }

  table {
    /* Revert block display, allow natural table layout */
    display: table;
    width: 100%; /* Allow table to shrink/grow */
    min-width: 600px; /* Set a min-width to force scrolling if needed */
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 4px;
    border-collapse: collapse; /* Ensure borders work */
    table-layout: auto; /* Let browser decide column widths */
  }

  thead {
    /* Show table header */
    display: table-header-group;
  }

  tbody {
    /* Revert block display */
    display: table-row-group;
  }

  tr {
    /* Revert block display */
    display: table-row;
    margin-bottom: 0; /* Remove margin */
    background: none; /* Remove individual row background */
    border-radius: 0; /* Remove individual row radius */
    box-shadow: none; /* Remove individual row shadow */
    border-bottom: 1px solid #eee; /* Add border between rows */
  }
  tr:last-child {
      border-bottom: none; /* Remove border for last row */
  }

  td {
    /* Revert block display */
    display: table-cell;
    padding: 0.75rem; /* Restore padding */
    text-align: left; /* Align text left */
    border: none; /* Remove individual cell borders */
    border-bottom: none; /* Ensure no bottom border here */
    width: auto !important; /* Override any fixed widths */
    white-space: nowrap; /* Prevent wrapping inside cells initially */
  }

  /* Allow specific cells to wrap if needed */
  td.account-nickname,
  td[data-label="Description"] {
    white-space: normal;
  }
  
  /* Right align financial columns */
  td[data-label="Balance"],
  td[data-label="Available Balance"],
  td[data-label="Amount Due"],
  td[data-label="Date Due"] {
    text-align: right;
  }

  /* Re-style specific cells if needed, e.g., make nicknames wrap */
  td.account-nickname {
    white-space: normal;
  }
  /* Add styles for specific columns if needed */
   td[data-label="Balance"],
   td[data-label="Available Balance"],
   td[data-label="Amount Due"],
   td[data-label="Date Due"] {
      text-align: right; /* Right-align currency and dates */
   }


  /* Remove the ::before pseudo-elements */
  td::before {
    content: none;
    display: none;
  }

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

  tfoot {
    display: table-footer-group; /* Show footer */
    background: #f2f2f2;
    font-weight: 600;
  }

  tfoot tr {
    display: table-row;
    background: none;
    box-shadow: none;
  }

  tfoot td {
    display: table-cell;
    padding: 0.7rem 0.5rem;
    border-top: 2px solid #ddd;
    width: auto !important; /* Override fixed widths */
    white-space: nowrap;
  }
  tfoot td[data-label="Balance"],
  tfoot td[data-label="Available Balance"],
  tfoot td[data-label="Amount Due"],
  tfoot td[data-label="Maturity Date"],
  tfoot td[data-label="Date Due"] {
      text-align: right;
  }


  /* Align Totals label to the right to match financial columns */
  td[data-label="Totals"] {
      text-align: right; /* Right-align Totals label to match financial data */
  }

  tfoot td:empty {
      /* Keep empty cells if needed for layout, or hide */
      /* display: none; */
  }
}

/* Small Mobile Styles */
@media (max-width: 767px) {
  .content {
    padding: 1rem 0.5rem;
  }

  td {
    padding: 0.75rem;
  }
}

/* Account specific mobile styles */
@media (max-width: 991px) {
  td[data-label="Nickname"],
  td[data-label="Description"] {
    color: var(--text-color);
  }

  td[data-label="Nickname"]::before,
  td[data-label="Description"]::before {
    color: var(--primary-color);
  }

  td[data-label="Balance"],
  td[data-label="Available Balance"],
  td[data-label="Amount Due"] {
    text-align: right;
  }
  
  td[data-label="Date Due"] {
    text-align: right;
    white-space: nowrap; /* Prevent dates from wrapping in mobile view */
  }

  .account-nickname {
    color: var(--primary-color);
    font-weight: 500;
  }
}

/* Enhance mobile responsiveness further */
@media (max-width: 767px) {
  table td {
    font-size: 0.85rem;
    padding: 0.6rem 0.75rem;
  }
  
  thead th {
    font-size: 0.85rem;
    padding: 0.6rem 0.75rem;
  }
  
  .table-container {
    margin-bottom: 1.5rem;
  }
}

/* Mobile Styles */
@media (max-width: 991px) {
  body {
    padding-top: 60px; /* Add padding to clear fixed header */
    padding-bottom: 180px; /* Maintain existing bottom padding for footer */
  }

  .top-bar {
    /* Styles for fixed top bar */
    padding: 0.5rem 1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
  }

  .site-footer {
    /* Ensure footer is below the padded content */
    position: absolute;
  }
  
  /* Reset conflicting margin from previous attempts */
  .content {
    margin-top: 0;
    margin-bottom: 0; /* Let wrapper handle bottom margin */
    padding: 1rem;
  }
  
  /* Remove specific main-wrapper margin rules inside this media query */
  /* The general rule outside will apply */
}

/* Hamburger Button */
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-color);
  padding: 0.5rem;
  z-index: 1600;
  position: relative; /* Added for notification dot positioning */
}

/* User Profile and Dropdown */
.user-name-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  pointer-events: auto;
}

.user-name-container strong {
  display: none;
}

/* Show name in desktop view */
@media (min-width: 992px) {
  .user-name-container {
    pointer-events: auto;
    cursor: pointer;
  }

  .user-name-container strong {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    user-select: none;
  }

  .user-name-container strong i {
    display: inline-block;
    font-size: 0.8rem;
    margin-left: 0.3rem;
    transition: transform 0.2s ease;
  }

  .user-name-container.active strong i {
    transform: rotate(180deg);
  }
}

/* Remove the coming soon tooltip */
.user-name-container::after {
  display: none;
}

/* Mobile nav specific styles */
.mobile-nav-header .user-profile strong {
  color: #3f3f43;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--white);
  min-width: 220px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  border-radius: 4px;
  display: none;
  z-index: 1500;
  border: 1px solid var(--border-color);
  margin-top: 0.5rem;
}

.user-dropdown.show {
  display: block;
}

.user-menu {
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
}

.user-menu li {
  position: relative;
}

.user-menu a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: #3f3f43;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.user-menu a i {
  width: 16px;
  text-align: center;
}

.user-menu a:hover,
.user-menu .has-submenu.active > a.menu-trigger,
.user-menu a.text-banking-toggle.active {
  background: #1b6875;
  color: #fff;
}

.user-menu a:hover i,
.user-menu a:hover .badge,
.user-menu .has-submenu.active > a.menu-trigger i,
.user-menu a.text-banking-toggle.active i {
  color: #fff;
}

.user-menu .has-submenu > a.menu-trigger {
  justify-content: space-between;
}

.user-menu .has-submenu > a.menu-trigger i:last-child {
  margin-left: auto;
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

.user-menu .has-submenu.active > a.menu-trigger i:last-child {
  transform: rotate(180deg);
}

.user-menu .submenu {
  background: #fff;
  display: none;
  list-style: none;
  padding: 0;
  border-top: 1px solid #e0e0e0;
}

.user-menu .submenu a {
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  color: #3f3f43;
  font-size: 0.85rem;
}

.user-menu .submenu a:hover {
  background: #1b6875;
  color: #fff;
}

.user-menu .has-submenu.active .submenu {
  display: block;
}

/* Submenu Styles */

/* Footer Styles */
.site-footer {
  background: rgba(28, 28, 28, 0.9);
  color: white;
  padding: 1.25rem 0;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  border-top: 4px solid #8dc63f;
  overflow: hidden;
  clear: both;
  z-index: 50; /* Added z-index to ensure footer stays above content */
}

.footer-content {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  box-sizing: border-box;
}

.footer-left {
  text-align: left;
  flex: 1;
  min-width: 0; /* Allows text to wrap instead of forcing container wider */
}

.footer-left a {
  color: white;
  text-decoration: none;
}

.footer-left a:hover {
  text-decoration: underline;
}

.footer-left p {
  margin: 0.5rem 0 0 0;
  opacity: 0.9;
  white-space: normal;
  word-wrap: break-word;
}

.footer-right {
  display: flex;
  align-items: center;
  margin-left: 1rem;
  flex-shrink: 0;
}

.equal-housing {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.equal-housing-icon {
  width: 30px;
  height: 30px;
  margin-right: 5px;
}

@media (max-width: 991px) {
  .footer-content {
    padding: 0 1rem;
  }
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
    padding: 0 1rem;
    gap: 1rem;
  }

  .footer-left {
    text-align: center;
    width: 100%;
  }

  .footer-right {
    justify-content: center;
    margin-left: 0;
    width: 100%;
  }

  body {
    padding-bottom: 180px; /* Increased padding for smaller screens */
  }
}

/* Start Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.start-modal {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--modal-shadow);
  width: 90%;
  max-width: 550px;
  max-height: 90vh; /* Limit modal height */
  display: flex; /* Use flexbox for layout */
  flex-direction: column; /* Stack header, content */
  overflow: hidden; /* Hide overflow from modal container itself */
  animation: modalFadeIn 0.3s ease forwards;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.start-modal .modal-header {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  padding: 0.75rem 1.5rem 0.75rem 2rem;
}

.start-modal .modal-header h2 {
  color: #eaf6fa; /* lighter, less teal */
  font-size: 1.5rem;
  font-weight: normal;
  margin: 0;
}

.modal-logo {
  height: 40px;
  margin-bottom: 1rem;
}

.modal-content {
  padding: 1.5rem 2rem;
  overflow-y: auto; /* Make content scrollable if it overflows */
  flex-grow: 1; /* Allow content to take available space */
}

.modal-content p {
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--text-color);
  line-height: 1.6;
}

.option-container {
  display: flex;
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (max-width: 768px) {
  .option-container {
    flex-direction: column;
    gap: 1rem; /* Reduce gap slightly */
  }
}

.option {
  flex: 1;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.option:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.option.selected {
  border-color: var(--primary-color);
  background-color: rgba(27, 104, 117, 0.05);
}

.option i {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.option h3 {
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.option p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

.start-button {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  padding: 1rem;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
  outline: none; /* Add this to remove focus outline */
}

.start-button:hover:not(:disabled) {
  background-color: var(--hover-color);
  border: none; /* Explicitly ensure no border on hover */
  outline: none; /* Remove outline on hover */
}

.start-button:focus,
.start-button:active {
  border: none; /* Explicitly ensure no border on focus/active */
  outline: none; /* Remove outline on focus/active */
  box-shadow: none; /* Remove any box shadow that might appear */
}

.start-button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  border: none; /* Ensure no border when disabled */
  outline: none; /* Remove outline when disabled */
}

/* eStatements Page */
.estatements-container {
  margin-bottom: 30px;
  width: 100%;
}

.year-selector {
  position: relative;
  margin-bottom: 20px;
  max-width: 200px;
}

.year-selector select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  appearance: none;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="6"><path d="M0 0l6 6 6-6z" fill="%23333"/></svg>') no-repeat;
  background-position: right 10px center;
  background-color: #fff;
}

.estatements-table {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
  display: block;
}

.estatements-list {
  width: 100%;
  border-collapse: collapse;
  min-width: 300px;
}

.estatements-list th,
.estatements-list td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.estatements-list th {
  background-color: #F5F5F5;
  font-weight: 600;
}

.estatements-list tr:hover {
  background-color: #f9f9f9;
}

.view-link {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
}

.view-link:hover {
  text-decoration: underline;
}

/* Custom dropdown for year selector */
.year-selector-wrapper {
  position: relative;
  width: 100%;
  max-width: 200px;
}

.selected-value {
  width: 100%;
  padding: 10px 35px 10px 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fff;
  cursor: pointer;
  position: relative;
}

.selected-value::after {
  content: '';
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #333;
}

.dropdown-options {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
  background-color: #fff;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 4px 4px;
  z-index: 10;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dropdown-options.show {
  display: block;
}

.dropdown-option {
  padding: 10px 15px;
  cursor: pointer;
}

.dropdown-option:hover {
  background-color: #f5f5f5;
}

.dropdown-option.selected {
  background-color: #f0f0f0;
  font-weight: 600;
}

/* Mobile responsiveness for eStatements */
@media (max-width: 768px) {
  .estatements-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .estatements-list {
    min-width: 100%;
    width: 100%;
  }
  
  .estatements-list th,
  .estatements-list td {
    padding: 8px 10px;
  }
  
  .year-selector {
    max-width: 100%;
    margin-bottom: 15px;
  }
  
  .year-selector-wrapper {
    max-width: 100%;
  }
}

/* Ensure proper table overflow fix for all screen sizes */
@media (max-width: 480px) {
  .estatements-container {
    margin: 0;
    width: 100%;
  }
  
  .estatements-table {
    padding: 0;
    border: 1px solid #eee;
    border-radius: 4px;
  }
}

/* Statement Page */
.statement-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  background-color: white;
}

.statement-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #000;
}

.statement-logo {
  max-width: 200px;
}

.statement-address {
  font-size: 0.9rem;
  line-height: 1.4;
}

.statement-info {
  text-align: right;
}

.statement-info-table {
  border-collapse: collapse;
  width: 100%;
}

.statement-info-table th,
.statement-info-table td {
  padding: 0.5rem;
  text-align: left;
  border: 1px solid #000;
}

.statement-info-table th {
  background-color: #000;
  color: white;
  font-weight: normal;
}

.account-summary-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.account-summary-table th,
.account-summary-table td {
  padding: 0.5rem;
  text-align: right;
  border: 1px solid #000;
}

.account-summary-table th {
  background-color: #000;
  color: white;
  font-weight: normal;
}

.account-summary-table th:first-child,
.account-summary-table td:first-child {
  text-align: left;
}

.account-detail-section {
  margin: 1.5rem 0;
}

.account-detail-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.account-detail-arrow {
  margin-right: 0.5rem;
  font-weight: bold;
}

.account-detail-table {
  width: 100%;
  border-collapse: collapse;
}

.account-detail-table th,
.account-detail-table td {
  padding: 0.5rem;
  border: 1px solid #000;
}

.account-detail-table th {
  text-align: left;
  font-weight: normal;
}

@media (max-width: 768px) {
  .statement-header {
    flex-direction: column;
  }
  
  .statement-info {
    text-align: left;
    margin-top: 1rem;
  }
}

/* eStatement Preference Page */
.content-wrap {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  width: 100%;
}

.content-main {
  flex: 1;
  min-width: 0;
}

.estatement-preference-container {
  margin-top: 1.5rem;
}

.preference-options {
  max-width: 500px;
}

/* Custom Checkbox Styling */
.checkbox-option {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

/* Standard checkbox styling for form-checkbox class */
.checkbox-wrapper input[type="checkbox"].form-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #8a8a8a;
  cursor: pointer;
}

.checkbox-wrapper input[type="checkbox"].form-checkbox:checked {
  background-color: #8a8a8a;
  border-color: #8a8a8a;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-option input[type="checkbox"].custom-checkbox {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-option input[type="checkbox"].custom-checkbox + label {
  position: relative;
  padding-left: 35px;
  cursor: pointer;
  font-size: 1.1rem;
  user-select: none;
  display: inline-block;
}

.checkbox-option input[type="checkbox"].custom-checkbox + label:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border: 1px solid #ccc;
  background-color: white;
  border-radius: 3px;
}

.checkbox-option input[type="checkbox"].custom-checkbox:checked + label:before {
  background-color: #8a8a8a;
  border-color: #8a8a8a;
}

.checkbox-option input[type="checkbox"].custom-checkbox:checked + label:after {
  content: '';
  position: absolute;
  left: 7px;
  top: 3px;
  width: 6px;
  height: 12px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.submit-button {
  font-size: 1rem;
  font-weight: bold;
  min-width: 136px;
  min-height: 2.5rem;
  max-width: 100%;
  border-radius: 4px;
  padding: 6px 20px;
  line-height: 1.5rem;
  text-align: center;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: normal;
  vertical-align: super;
  touch-action: manipulation;
  font-family: 'Lato', sans-serif;
  box-sizing: border-box;
  display: inline-block;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  background-color: #1b6875;
  color: #fff;
  border: 2px solid transparent;
}

.submit-button:hover:not(:disabled) {
  background-color: #15505a;
  color: #fff;
}

.submit-button:disabled {
  background-color: #8a8a8a;
  cursor: not-allowed;
}

/* Side Banner */
.side-banner {
  width: 350px;
  background-color: #1b6875;
  color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  flex-shrink: 0;
  align-self: flex-start;
  margin: 0;
}

.note-header {
  font-size: 2.8rem;
  font-weight: 300;
  padding: 1.5rem 1.5rem 1rem;
  font-family: 'Dancing Script', cursive;
  position: relative;
  border-bottom: 2px solid rgba(255, 234, 138, 0.5);
  line-height: 1;
}

.note-header::after {
  content: '!';
  position: absolute;
  right: 0.5rem;
  top: -0.5rem;
  font-size: 12rem;
  opacity: 0.15;
  font-family: 'Lato', sans-serif;
  font-weight: bold;
  pointer-events: none;
  color: rgba(255, 255, 255, 0.8);
}

.note-content {
  padding: 1.5rem 1.5rem 2rem;
  font-size: 1.1rem;
  line-height: 1.4;
}

.note-content p {
  margin-bottom: 1.25rem;
}

.note-content p:last-child {
  margin-bottom: 0;
  color: var(--highlight-color);
  font-size: 1rem;
}

.note-content .highlight {
  color: var(--highlight-color);
  font-weight: normal;
}

/* Success Notification */
.success-notification {
  position: fixed;
  top: 30px;
  right: 30px;
  background-color: #fff;
  border-left: 4px solid #28a745;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  padding: 15px 20px;
  z-index: 1000;
  transform: translateX(120%);
  transition: transform 0.3s ease-in-out;
  max-width: 420px;
  width: calc(100% - 60px);
}

.success-notification.show {
  transform: translateX(0);
}

.notification-icon {
  color: #28a745;
  font-size: 22px;
  margin-right: 15px;
}

.notification-message {
  flex: 1;
  color: #333;
}

.close-notification {
  background: none;
  border: none;
  color: #777;
  cursor: pointer;
  font-size: 16px;
  margin-left: 10px;
  padding: 0;
}

.close-notification:hover {
  color: #333;
}

/* Download notification specific styles */
#downloadSuccessNotification {
  border-left-color: #19647E;
  background-color: #f7fbfd;
}

#downloadSuccessNotification .notification-icon {
  color: #19647E;
  font-size: 24px;
}

.download-notification-message {
  font-size: 14px;
  line-height: 1.5;
  color: #333;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
  .main-wrapper {
    max-width: 100%;
    padding: 0 1rem;
  }
}

@media (max-width: 950px) {
  .main-wrapper {
    flex-direction: column;
    align-items: center;
  }
  
  .content {
    width: 100%;
    max-width: none;
  }
  
  .side-banner {
    width: 100%;
    margin-top: 2rem;
  }
}

@media (max-width: 600px) {
  .main-wrapper {
    margin: 1rem auto;
    padding: 0 0.5rem;
  }
  
  .content {
    padding: 1.5rem;
  }
}

/* Transfer Review Styles */
.review-section h3 {
  margin-bottom: 1.5rem;
  color: var(--text-color);
  font-size: 1.25rem;
  font-weight: 600;
}

.review-display {
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #f8f9fa;
  color: var(--text-color);
  font-size: 1rem;
  min-height: 1.5rem;
  display: flex;
  align-items: center;
}

.form-group .btn {
  margin-right: 1rem;
  margin-top: 1rem;
}

.form-group .btn:last-child {
  margin-right: 0;
}

.edit-transfer-link {
  margin-bottom: 1rem;
  text-align: left;
}

.edit-transfer-link a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.edit-transfer-link a:hover {
  text-decoration: underline;
}

.button-group {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
}

/* Stop Payment Styles */
.stop-payment-container {
  margin-top: 1.5rem;
}

.stop-payment-history {
  margin-bottom: 2rem;
}

.stop-payment-history a {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 1.1rem;
}

.stop-payment-history a:hover {
  text-decoration: underline;
}

.stop-payment-form {
  max-width: 800px;
}

.form-section {
  margin-bottom: 1.5rem;
}

.form-section h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}

.form-label.required::before {
  content: "* ";
  color: #666;
  font-weight: 400;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: white;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(27, 104, 117, 0.2);
}

.form-control::placeholder {
  color: #aaa;
}

/* Date input specific styling */
.form-control[type="date"] {
  padding: 0.75rem;
  font-family: inherit;
  cursor: pointer;
}

.form-control[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  padding: 4px;
  border-radius: 3px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.form-control[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

.form-select {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: white;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23131313%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem top 50%;
  background-size: 0.65rem auto;
}

.form-select option {
  padding-right: 20px;
}

.form-text {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: #6c757d;
}

.radio-group {
  padding: 0.5rem 0;
}

.radio-option {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  position: relative;
}

.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.radio-option input[type="radio"] + label {
  position: relative;
  padding-left: 35px;
  cursor: pointer;
  line-height: 24px;
  font-size: 1.1rem;
}

.radio-option input[type="radio"] + label:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border-color);
  border-radius: 100%;
  background: white;
}

.radio-option input[type="radio"]:checked + label:before {
  border-color: var(--primary-color);
}

.radio-option input[type="radio"]:checked + label:after {
  content: '';
  width: 12px;
  height: 12px;
  background: var(--primary-color);
  position: absolute;
  top: 6px;
  left: 6px;
  border-radius: 100%;
}

.radio-option input[type="radio"]:focus + label:before {
  box-shadow: 0 0 0 3px rgba(27, 104, 117, 0.1);
}

.radio-fieldset {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background-color: #f9f9f9;
}

.radio-fieldset legend {
  padding: 0 0.5rem;
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--text-color);
}

.input-group {
  display: flex;
  align-items: center;
}

.input-group-text {
  padding: 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-color);
  text-align: center;
  white-space: nowrap;
  background-color: #e9ecef;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-group .form-control {
  position: relative;
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.submit-button {
  font-size: 1rem;
  font-weight: bold;
  min-width: 136px;
  min-height: 2.5rem;
  max-width: 100%;
  border-radius: 4px;
  padding: 6px 20px;
  line-height: 1.5rem;
  text-align: center;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: normal;
  vertical-align: super;
  touch-action: manipulation;
  font-family: 'Lato', sans-serif;
  box-sizing: border-box;
  display: inline-block;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  background-color: #1b6875;
  color: #fff;
  border: 2px solid transparent;
}

.submit-button:hover:not(:disabled) {
  background-color: #15505a;
  color: #fff;
}

.submit-button:disabled {
  background-color: #8a8a8a;
  cursor: not-allowed;
}

.draft-range-fields {
  display: none;
}

.draft-range-fields.show {
  display: block;
}

.single-draft-fields {
  display: none;
}

.single-draft-fields.show {
  display: block;
}

/* Stop Payment Content Layout */
.stop-payment-wrap {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  width: 100%;
}

.stop-payment-main {
  flex: 1;
  min-width: 0;
}

/* Stop Payment Side Banner */
.stop-payment-side-banner {
  width: 350px;
  background-color: #990000;
  color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  flex-shrink: 0;
  align-self: flex-start;
  margin: 0;
}

.stop-note-header {
  font-size: 2.8rem;
  font-weight: 300;
  padding: 1.5rem 1.5rem 1rem;
  font-family: 'Dancing Script', cursive;
  position: relative;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  line-height: 1;
}

.stop-note-header::after {
  content: '!';
  position: absolute;
  right: 0.5rem;
  top: -0.5rem;
  font-size: 12rem;
  opacity: 0.15;
  font-family: 'Lato', sans-serif;
  font-weight: bold;
  pointer-events: none;
  color: rgba(255, 255, 255, 0.8);
}

.stop-note-content {
  padding: 1.5rem 1.5rem 2rem;
  font-size: 1.1rem;
  line-height: 1.4;
}

.stop-note-content p {
  margin-bottom: 1.25rem;
}

.stop-note-content p:last-child {
  margin-bottom: 0;
}

.stop-note-content .highlight {
  color: #ffcc00;
  font-weight: bold;
}

/* Responsive Adjustments for Stop Payment Page */
@media (max-width: 950px) {
  .stop-payment-wrap {
    flex-direction: column;
  }
  
  .stop-payment-side-banner {
    width: 100%;
    margin-top: 2rem;
  }
}

/* Stop Payment History Page */
.back-link {
  margin-bottom: 20px;
}

.back-link a {
  color: #4a7995;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
}

.back-link a:hover {
  text-decoration: underline;
}

.stop-payment-history-form {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-end;
  margin-bottom: 30px;
}

.search-button {
  background-color: #2f6b8e;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 30px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.search-button:hover {
  background-color: #1d5170;
}

.search-results {
  margin-top: 20px;
}

/* Stop Payment History Search Results */
.results-header {
  width: 100%;
  background-color: #f8f8f8;
  border-bottom: 1px solid #ddd;
  margin-bottom: 5px;
}

.header-row {
  display: flex;
  padding: 10px 0;
  font-weight: 500;
  color: #333;
}

.header-cell {
  flex: 1;
  padding: 0 15px;
  display: flex;
  align-items: center;
}

.header-cell i {
  margin-left: 5px;
  font-size: 14px;
  color: #666;
}

.no-results-message {
  text-align: center;
  padding: 20px;
  color: #666;
  font-size: 16px;
}

/* Transfer & Payment Styles */
.transfer-container {
  margin-top: 1.5rem;
}

.transfer-options {
  max-width: 600px;
}

.manage-link {
  display: block;
  color: var(--primary-color);
  text-decoration: none;
  font-size: 1rem;
  margin-bottom: 2rem;
}

.manage-link:hover {
  text-decoration: underline;
}

/* Custom Select for Transfer Page */
.custom-select-wrapper {
  position: relative;
  width: 100%;
  user-select: none;
  margin-bottom: 1.5rem;
}

.custom-select-wrapper.active .selected-value {
  border-color: var(--primary-color);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.custom-select-wrapper .selected-value {
  display: block;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
  position: relative;
  padding-right: 30px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.custom-select-wrapper .selected-value::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #666;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.custom-select-wrapper .dropdown-options {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: 0;
  overflow: hidden;
  background-color: white;
  border: 1px solid var(--border-color);
  border-top: none;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  z-index: 100;
  visibility: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

.custom-select-wrapper .dropdown-options.show {
  max-height: 400px;
  visibility: visible;
  opacity: 1;
  overflow-y: auto;
}

.custom-select-wrapper .dropdown-option {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.custom-select-wrapper .dropdown-option:last-child {
  border-bottom: none;
}

.custom-select-wrapper .dropdown-option:hover {
  background-color: var(--primary-color);
  color: white;
}

.custom-select-wrapper .dropdown-option.selected {
  background-color: var(--primary-color);
  color: white;
  font-weight: 500;
}

.custom-select-wrapper .dropdown-option.selected:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Transfer Side Banner */
.transfer-banner {
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-radius: 8px;
}

.transfer-banner .side-banner-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.transfer-banner .side-banner-header h3 {
  font-size: 1.75rem;
  color: #333;
  margin: 0;
  font-weight: 400;
}

.transfer-banner .side-banner-content {
  padding: 1.5rem;
}

.transfer-banner .side-banner-content p {
  margin-bottom: 1.25rem;
  color: #333;
  font-size: 1rem;
  line-height: 1.5;
}

.transfer-banner .side-banner-content strong {
  font-weight: 600;
}

.link-highlight {
  color: var(--primary-color);
  text-decoration: none;
}

.link-highlight:hover {
  text-decoration: underline;
}

.important-header {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #333;
}

.important-list {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 0;
}

.important-list li {
  margin-bottom: 1rem;
  line-height: 1.5;
  color: #333333;
}

.important-list li:last-child {
  margin-bottom: 0;
}

/* Info Icon */
.form-label i {
  font-size: 1rem;
  color: #666;
  margin-left: 0.3rem;
  cursor: pointer;
}

/* Continue Button */
.transfer-options .submit-button {
  min-width: 150px;
}

/* Error Message */
.error-message {
  color: #d9534f;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
}

.error-message i {
  margin-right: 0.5rem;
  font-size: 1rem;
}

/* Info Box */
.info-box {
  display: none;
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 20px;
  border-left: 4px solid #b9be10;
}

.info-box.show {
  display: flex;
}

.info-icon {
  color: #b9be10;
  font-size: 1.5rem;
  margin-right: 15px;
  display: flex;
  align-items: center;
}

.info-content {
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #333;
}

/* Date picker field */
.form-group {
  position: relative;
}

.date-picker-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-3px);
  color: #666;
  font-size: 1.2rem;
  pointer-events: none;
}

.notification-option {
  margin-top: 20px;
  margin-bottom: 30px;
}

.notification-option .checkbox-option {
  margin-bottom: 0;
}

/* Info Button and Tooltip */
.info-tooltip {
  position: relative;
  display: inline-block;
}

.info-tooltip .fa-circle-info {
  font-size: 1rem;
  color: #666;
  margin-left: 0.3rem;
  cursor: pointer;
}

.info-tooltip .fa-circle-info:hover {
  color: #333;
}

.tooltip-content {
  position: absolute;
  width: 300px;
  background-color: #333;
  color: white;
  padding: 15px;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.2s, opacity 0.2s;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}

.tooltip-content.top {
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  margin-bottom: 10px;
}

.tooltip-content.top::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

.tooltip-content.bottom {
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  margin-top: 10px;
}

.tooltip-content.bottom::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px;
  border-style: solid;
  border-color: transparent transparent #333 transparent;
}

.tooltip-content.right {
  left: 100%;
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  margin-left: 5px;
  width: 200px; /* Narrower width for right-aligned tooltips */
}

.tooltip-content.right::after {
  content: '';
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-width: 8px;
  border-style: solid;
  border-color: transparent #333 transparent transparent;
}

.tooltip-content.left {
  right: 100%;
  top: 50%;
  transform: translateY(-50%) translateX(-10px);
  margin-right: 5px;
}

.tooltip-content.left::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-width: 8px;
  border-style: solid;
  border-color: transparent transparent transparent #333;
}

.tooltip-content.active,
.tooltip-content.show {
  visibility: visible;
  opacity: 1;
}

/* Bottom right tooltip positioning */
.tooltip-content.bottom.right {
  top: 100%;
  left: auto;
  right: 0;
  transform: translateY(10px);
  margin-top: 10px;
}

.tooltip-content.bottom.right::after {
  bottom: 100%;
  left: auto;
  right: 20px;
  transform: translateX(0);
  border-color: transparent transparent #333 transparent;
}

/* Adjust position for various form elements */
.form-label .info-tooltip .tooltip-content {
  width: 350px;
}

/* External Accounts Page */
.external-accounts-container {
  width: 100%;
  margin-top: 1.5rem;
}

.add-account-container {
  margin-bottom: 1.5rem;
}

.add-account-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.add-account-button:hover {
  background-color: var(--hover-color);
}

/* Table Header */
.external-accounts-table {
  width: 100%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border-radius: 4px;
  overflow: hidden;
  background-color: white;
  margin-bottom: 2rem;
}

.external-accounts-table .table-header {
  display: flex;
  background-color: #f5f5f5;
  padding: 1rem;
  font-weight: 500;
  border-bottom: 1px solid #e0e0e0;
  position: relative;
  padding-left: 2.5rem; /* Add padding to account for chevron width */
}

.external-accounts-table .header-column:first-child {
  margin-left: 0.5rem; /* Add margin to the first column header */
}

.external-accounts-table .nickname-column {
  width: 15%;
  min-width: 120px;
}

.external-accounts-table .financial-institution-column {
  width: 25%;
  min-width: 180px;
}

.external-accounts-table .account-type-column {
  width: 12%;
  min-width: 100px;
}

.external-accounts-table .account-column {
  width: 12%;
  min-width: 100px;
}

.header-column {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
}

.header-column .fa-sort,
.header-column .fa-sort-up,
.header-column .fa-sort-down {
  color: #999;
  font-size: 0.8rem;
  transition: color 0.2s ease;
}

.header-column.sortable {
  cursor: pointer;
  user-select: none;
}

.header-column.sortable:hover .fa-sort,
.header-column.sortable:hover .fa-sort-up,
.header-column.sortable:hover .fa-sort-down {
  color: #666;
}

.header-column .fa-sort-up,
.header-column .fa-sort-down {
  color: #007bff;
}

/* Verification modal input styling */
.verification-input {
  width: 100%;
}

.verification-modal-content .form-group {
  margin-bottom: 1.5rem;
}

.verification-modal-content .input-group {
  width: 100%;
}

.verification-modal-content .input-group .form-control {
  border: 1px solid #ced4da;
  border-radius: 0 4px 4px 0;
  flex: 1;
}

.verification-modal-content .input-group-text {
  border: 1px solid #ced4da;
  border-right: none;
  border-radius: 4px 0 0 4px;
  background-color: #e9ecef;
}

/* Column widths */
.nickname-column {
  width: 20%;
}

.financial-institution-column {
  width: 25%;
}

.account-type-column {
  width: 15%;
}

.account-column {
  width: 15%;
}

.status-column {
  width: 15%;
}

.action-column {
  width: 10%;
  justify-content: flex-end;
}

/* Account Rows */
.account-row {
  border-bottom: 1px solid #e0e0e0;
}

.account-row:last-child {
  border-bottom: none;
}

.account-summary {
  display: flex;
  padding: 1rem;
  cursor: pointer;
  align-items: center;
  transition: background-color 0.2s ease;
}

.account-summary:hover {
  background-color: #f9f9f9;
}

.expand-icon {
  margin-right: 1rem;
  color: #666;
  transition: transform 0.2s ease;
}

.expand-icon i.expanded {
  transform: rotate(0deg);
}

.account-info {
  display: flex;
  align-items: center;
}

/* Account Details */
.account-details {
  background-color: #f9f9f9;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}

.account-details.expanded {
  max-height: 500px; /* Large enough for any account details */
  border-top: 1px solid #e0e0e0;
}

.details-section {
  position: relative;
  padding: 1.5rem;
}

.details-section h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: #333;
  font-size: 1.1rem;
  font-weight: 600;
}

.close-details {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  line-height: 1;
  color: #999;
  cursor: pointer;
  transition: color 0.2s ease;
}

.close-details:hover {
  color: #333;
}

.detail-item {
  display: flex;
  margin-bottom: 0.75rem;
}

.detail-label {
  width: 30%;
  color: #666;
}

.detail-value {
  width: 70%;
  font-weight: 500;
}

.detail-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 1.5rem;
}

.detail-action {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.detail-action:hover {
  color: var(--hover-color);
  text-decoration: underline;
}

/* Status and Actions */
.account-info span {
  font-weight: 500;
}

.status-column span {
  display: inline-block;
  padding: 0.25rem 0;
  color: #333333; /* Dark gray for all status text */
  font-weight: 500;
}

/* Only Error status is red */
.account-row[data-account="testing-jesus"] .status-column span {
  color: #d32f2f;
}

.verify-button {
  color: #1b6875; /* Teal color for verify buttons */
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.verify-button:hover {
  color: #165761;
  text-decoration: underline;
}

.error-icon {
  color: #666; /* Gray color for error icon */
  cursor: pointer;
}

/* Mobile Styles */
@media (max-width: 991px) {
  .add-account-container {
    text-align: center;
  }
  
  .table-header {
    display: none;
  }
  
  .account-summary {
    flex-wrap: wrap;
    padding: 0.75rem;
  }
  
  .expand-icon {
    order: 1;
    margin-right: 0.5rem;
  }
  
  .nickname-column {
    order: 2;
    width: calc(100% - 4rem);
    font-weight: 600;
    color: var(--primary-color);
  }
  
  .financial-institution-column {
    order: 3;
    width: 100%;
    padding: 0.5rem 0 0.5rem 2rem;
    font-size: 0.9rem;
  }
  
  .account-type-column {
    order: 4;
    width: 50%;
    padding: 0 0 0 2rem;
    font-size: 0.9rem;
  }
  
  .account-column {
    order: 5;
    width: 50%;
    padding: 0;
    font-size: 0.9rem;
    text-align: right;
  }
  
  .status-column {
    order: 6;
    width: 50%;
    padding: 0.5rem 0 0 2rem;
    font-size: 0.9rem;
  }
  
  .action-column {
    order: 7;
    width: 50%;
    justify-content: flex-end;
    padding: 0.5rem 0 0 0;
  }
  
  .details-section {
    padding: 1rem;
  }
  
  .detail-item {
    flex-direction: column;
    margin-bottom: 1rem;
  }
  
  .detail-label {
    width: 100%;
    margin-bottom: 0.25rem;
    color: #333;
    font-weight: 600;
  }
  
  .detail-value {
    width: 100%;
    font-weight: normal;
  }
  
  .detail-actions {
    flex-direction: column;
    gap: 1rem;
  }
  
  .detail-action {
    display: block;
    padding: 0.5rem 0;
  }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
  .external-accounts-container {
    margin-top: 1rem;
  }
  
  .add-account-button {
    display: block;
    text-align: center;
  }
  
  .account-summary {
    padding: 0.5rem;
  }
  
  .account-type-column,
  .account-column {
    width: 50%;
    font-size: 0.85rem;
  }
  
  .status-column,
  .action-column {
    width: 50%;
    font-size: 0.85rem;
  }
}

/* Status text colors - direct approach without :contains */
.status-column span {
  color: #333333; /* Make all status text dark gray by default */
  font-weight: 500;
}

.account-row[data-account="testing-jesus"] .status-column span {
  color: #d32f2f; /* Only Error status is red */
}

.verify-button {
  color: #1b6875; /* Teal color for verify buttons */
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.verify-button:hover {
  color: #165761;
  text-decoration: underline;
}

.error-icon {
  color: #666; /* Gray color for error icon */
  cursor: pointer;
}

/* Remove the old selectors */
/* Custom status colors for specific accounts */

/* External Accounts specific tooltip styles */
.account-row .info-tooltip {
  position: relative;
  display: inline-block;
}

.account-row .info-tooltip .tooltip-content {
  width: 250px; /* Narrower width for account error tooltip */
  background-color: #333;
  color: white;
  text-align: center;
  padding: 12px;
  position: absolute;
  z-index: 10;
  right: 30px; /* Position to the left of the icon */
  top: 50%;
  transform: translateY(-50%);
  border-radius: 4px;
  font-size: 14px;
  font-weight: normal;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s;
}

.account-row .info-tooltip .tooltip-content.left::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%; /* Right side of the tooltip */
  margin-top: -8px;
  border-width: 8px;
  border-style: solid;
  border-color: transparent transparent transparent #333; /* Points to the right */
}

.account-row .info-tooltip .tooltip-content.active {
  visibility: visible;
  opacity: 1;
}

/* Make sure the info icon is gray */
.account-row .info-tooltip .fa-circle-info {
  color: #666;
  cursor: pointer;
}

/* Verification Modal Styles */
.verification-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.verification-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.verification-modal {
  background-color: white;
  width: 100%;
  max-width: 550px;
  border-radius: 0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow-y: auto;
}

.verification-modal-header {
  background-color: var(--primary-color);
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.verification-modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  color: #fff;
  font-weight: normal;
}

.close-modal {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.verification-modal-content {
  padding: 1.5rem;
  overflow-y: auto;
}

.verification-modal-content p {
  margin-bottom: 1.5rem;
  line-height: 1.5;
  color: #333;
}

.verification-input {
  position: relative;
  display: flex;
  align-items: center;
}

.verification-input.input-error {
  border: 1px solid #d32f2f;
  border-radius: 4px;
}

.verification-input .input-group-text {
  background-color: #f5f5f5;
  border: 1px solid #ccc;
  border-right: none;
  border-radius: 4px 0 0 4px;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  height: 100%;
}

.verification-input .form-control {
  border: 1px solid #ccc;
  padding: 0.75rem;
  width: 100%;
  border-radius: 0;
  border-left: none;
  border-right: none;
  outline: none;
}

.verification-input .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: none;
}

/* Fix Amount field width to match dropdown fields in ACH forms */
.ach-form-container .input-group {
  display: flex;
  width: 100%;
  max-width: none;
}

.ach-form-container .input-group .input-group-prepend {
  flex: 0 0 auto;
}

.ach-form-container .input-group .form-control {
  flex: 1;
  width: auto;
  min-width: 0;
}

.clear-input {
  background: none;
  border: 1px solid #ccc;
  border-left: none;
  border-radius: 0 4px 4px 0;
  color: #666;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.75rem;
  height: 100%;
}

.deposit-error {
  margin-top: 0.5rem;
  color: #d32f2f;
  display: flex;
  align-items: center;
  font-size: 0.875rem;
}

.deposit-error i {
  color: #d32f2f;
  margin-right: 0.5rem;
}

.account-details-summary {
  margin: 1.5rem 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  padding: 1rem 0;
}

.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
}

.cancel-button {
  background-color: #fff;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cancel-button:hover {
  background-color: #f5f5f5;
}

.verify-submit-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.verify-submit-button:hover {
  background-color: #135863; /* Slightly darker shade of the primary color */
}

/* Responsive styling */
@media (max-width: 768px) {
  .verification-modal {
    width: 90%;
    max-height: 80vh;
  }
  
  .verification-modal-content {
    padding: 1rem;
  }
  
  .modal-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .cancel-button, .verify-submit-button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .verification-modal {
    width: 95%;
    max-width: none;
    height: 90vh;
    max-height: none;
    margin: 0;
  }
  
  .verification-modal-header h2 {
    font-size: 1.125rem;
    color: #3f3f43;
    font-weight: normal;
  }
  
  .verification-modal-content p {
    font-size: 0.9rem;
  }
}

/* Mobile adjustments for content area */
@media (max-width: 991px) {
  .main-wrapper {
    margin-top: 4rem; /* Increased margin top for mobile */
  }
  
  .content {
    padding: 1rem;
  }
}

/* System Notification Banner */
.system-banner {
  width: calc(100% - 2rem); /* Match exact width accounting for padding */
  max-width: 1000px; /* Match the max-width of content */
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin: 1.5rem auto 1rem; /* Added 1.5rem top margin globally */
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
  max-height: 500px;
  opacity: 1;
  position: relative;
  z-index: 100;
}

/* External Link Modal Buttons */
.primary-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.primary-button:hover {
  background-color: #135863; /* Slightly darker shade of the primary color */
}

.secondary-button {
  background-color: #fff;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.secondary-button:hover {
  background-color: #f5f5f5;
}

/* Make the system banner and content widths consistent */
.main-wrapper .content,
.system-banner {
  max-width: 1000px; /* Ensure both elements use the same max-width */
  margin-left: auto;
  margin-right: auto;
}

.system-banner.hidden {
  max-height: 0;
  opacity: 0;
  margin: 0;
  border: none;
}

.system-banner-content {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
}

.banner-icon {
  color: #ff3b30;
  font-size: 1.25rem;
  margin-right: 1rem;
  flex-shrink: 0;
}

.banner-message {
  flex: 1;
  font-size: 0.95rem;
  color: #333;
  line-height: 1.5;
}

.banner-message p {
  margin: 0;
}

.banner-message strong {
  font-weight: 600;
}

.close-banner {
  background: none;
  border: none;
  color: #777;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: 1rem;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.close-banner:hover {
  color: #333;
}

/* Adjust main wrapper margin for banner */
.main-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 2rem auto; /* Consistent vertical spacing */
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex: 1 0 auto; /* Allows content to grow and push footer */
  padding: 0 1rem;
}

/* Content area inherits spacing from main-wrapper */
.content {
  flex: 1;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 2rem;
  margin: 0;
  max-width: 800px;
  overflow-x: hidden;
}

/* For pages without side banner, content should be centered */
.main-wrapper:not(.with-side-banner) .content {
  max-width: 1000px;
  margin: 0 auto;
}

/* --- Mobile Spacing --- */
@media (max-width: 991px) {
  body {
    padding-top: 60px; /* Account for fixed header */
    padding-bottom: 180px;
  }
  
  .main-wrapper {
    margin-top: 1.5rem; /* Adjusted mobile top margin */
    margin-bottom: 1.5rem; /* Adjusted mobile bottom margin */
  }
  
  .system-banner {
    width: calc(100% - 2rem); /* Keep consistent width */
    /* Global margin rule now applies the necessary 1.5rem top margin */
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
  }

  /* Content spacing adjustments for mobile */
  .content {
    padding: 1.5rem; /* Slightly less padding */
  }

  /* Ensure banner styles are correctly applied in mobile */
  .system-banner-content { padding: 1rem; }
  .banner-icon { font-size: 1.5rem; margin-right: 0.75rem; }
  .banner-message { font-size: 0.9rem; }
}

@media (max-width: 767px) {
  .banner-icon {
    font-size: 1.25rem;
    margin-right: 0.75rem;
  }
  
  .close-banner {
    padding: 0.25rem;
  }
}

/* Center the banner content on very small screens */
@media (max-width: 480px) {
  .system-banner-content {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }
  
  .banner-icon {
    margin-right: 0;
    margin-bottom: 0.5rem;
    width: 100%;
  }
  
  .banner-message {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .close-banner {
    margin-left: 0;
  }
}

@media (max-width: 991px) {
  body {
    padding-top: 60px; /* Add padding to clear fixed header */
    padding-bottom: 180px; /* Maintain existing bottom padding for footer */
  }

  .top-bar {
    /* Styles for fixed top bar */
    padding: 0.5rem 1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
  }

  .site-footer {
    /* Ensure footer is below the padded content */
    position: absolute;
  }
  
  /* Reset conflicting margin from previous attempts */
  .content {
    margin-top: 0;
    margin-bottom: 0; /* Let wrapper handle bottom margin */
    padding: 1rem;
  }

  /* Restore Mobile Table Styles */
  table {
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  table thead {
    display: none;
  }

  table tr {
    margin-bottom: 1rem;
    display: block;
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 4px;
  }

  table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
  }

  table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--primary-color);
    text-align: left;
    padding-right: 1rem;
  }

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

  /* Restore Section headers */
  .content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #3f3f43;
    font-weight: normal;
  }

  .content h3 {
    font-size: 1.25rem;
    margin: 2rem 0 1rem;
    color: var(--text-color);
  }
  
  /* Restore Hamburger/Mobile Nav/User */
  .hamburger {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  .mobile-nav {
    display: flex;
  }

  .user-name-container strong {
    display: none;
  }
}

/* Transfer Activity Styles */
.tab-container {
  margin-top: 1.5rem;
  border-radius: 8px;
  overflow: hidden;
}

.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background-color: #f7f7f7;
}

.tab-button {
  flex: 1;
  padding: 1rem;
  text-align: center;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  color: #757575;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
}

.tab-button.active {
  color: var(--primary-color);
  border-bottom: 3px solid var(--primary-color);
}

.tab-button:hover:not(.active) {
  background-color: #efefef;
}

.tab-content {
  display: none;
  padding: 1.5rem;
  background-color: white;
}

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

.no-data-message {
  text-align: center;
  padding: 2rem;
  color: #757575;
  font-size: 1.1rem;
}

.transfer-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.transfer-item {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: all 0.2s ease;
}

.transfer-item:hover {
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.transfer-header {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.transfer-account {
  margin-bottom: 0.5rem;
}

.transfer-amount {
  color: var(--primary-color);
  font-size: 1.1rem;
}

.transfer-date {
  color: #757575;
}

.transfer-description {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #eee;
  color: #555;
  font-style: italic;
}

.transfer-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #eee;
}

.action-button {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: #f5f5f5;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.action-button:hover {
  background-color: #e8e8e8;
}

.action-button.edit-button {
  color: var(--primary-color);
}

.action-button.cancel-button {
  color: var(--accent-color);
}

.action-button i {
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  .transfer-header {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .tab-button {
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
  }
  
  .transfer-item {
    padding: 1rem;
  }
  
  .transfer-actions {
    flex-wrap: wrap;
  }
  
  .action-button {
    flex: 1;
    min-width: 120px;
  }
}

@media (max-width: 480px) {
  .tabs {
    flex-direction: column;
  }
  
  .tab-button {
    border-bottom: none;
    border-left: 3px solid transparent;
  }
  
  .tab-button.active {
    border-bottom: none;
    border-left: 3px solid var(--primary-color);
  }
  
  .action-button {
    flex: 1;
    justify-content: center;
  }
}

/* Add External Account button tooltip styles */
.add-account-container {
  position: relative;
  display: inline-block;
}

.add-account-button + .tooltip-content {
  position: absolute;
  width: 300px;
  border-radius: 4px;
  padding: 12px;
  text-align: center;
  font-size: 0.9rem;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.add-account-button + .tooltip-content.dark {
  background-color: #333;
  color: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Top tooltip positioning */
.add-account-button + .tooltip-content.top {
  bottom: calc(100% + 15px);
  left: 50%;
  transform: translateX(-50%);
}

.add-account-button + .tooltip-content.top::after {
  content: '';
  position: absolute;
  border-width: 8px;
  border-style: solid;
}

.add-account-button + .tooltip-content.top.dark::after {
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-color: #333 transparent transparent transparent;
}

/* Bottom-right tooltip positioning */
.add-account-button + .tooltip-content.bottom.right {
  top: calc(100% + 10px);
  right: 0;
  left: auto;
  transform: none;
  background-color: #333;
  color: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.add-account-button + .tooltip-content.bottom.right::after {
  content: '';
  position: absolute;
  border-width: 8px;
  border-style: solid;
  bottom: 100%;
  right: 20px;
  border-color: transparent transparent #333 transparent;
}

.add-account-button + .tooltip-content.active {
  opacity: 1;
  visibility: visible;
}

/* Media queries for tooltip positioning */
@media (max-width: 768px) {
  .add-account-button + .tooltip-content.top {
    width: 250px;
    left: 0;
    transform: translateX(0);
  }
  
  .add-account-button + .tooltip-content.top.dark::after {
    left: 20px;
    transform: translateX(0);
  }
  
  .add-account-button + .tooltip-content.bottom.right {
    width: 250px;
    right: 0;
  }

  /* Pin tooltips to right edge on mobile */
  .tooltip-content {
    position: absolute;
    width: 200px;
    left: auto;
    right: 0;
    top: 100%;
    bottom: auto;
    transform: none;
    margin-top: 10px;
    margin-right: 0;
    z-index: 1500;
  }
  
  /* Position arrow to point to info icon */
  .tooltip-content::after {
    content: '';
    position: absolute;
    top: -8px;
    left: auto;
    right: 15px;
    bottom: auto;
    transform: none;
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent #333 transparent;
  }
}

@media (max-width: 480px) {
  .add-account-button + .tooltip-content.top {
    width: 200px;
  }
  
  .add-account-button + .tooltip-content.bottom.right {
    width: 200px;
  }
  
  /* Narrower tooltips on very small screens */
  .tooltip-content {
    width: 180px;
  }
}

/* Ensure Positive Pay is hidden in Base Features mode */
li a[href="positive-pay.html"] {
  display: none !important;
}

.hidden-for-retail {
  display: none !important;
}

/* Only show Positive Pay in Advanced Features mode */
body[data-client-type="business"] li a[href="positive-pay.html"],
body[data-client-type="business"] .hidden-for-retail {
  display: block !important;
}

/* Add this near the top of your CSS file to ensure it's not overridden */
.message-subject-link {
  color: var(--primary-color) !important;
  text-decoration: none;
  transition: color 0.2s;
}
.message-subject-link:hover, .message-subject-link:focus {
  color: #15505a;
  text-decoration: underline;
}

.compose-new-button {
  display: inline-block;
  background-color: var(--primary-color);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  margin-bottom: 1.5rem;
  cursor: pointer;
}
.compose-new-button:hover, .compose-new-button:focus {
  background-color: var(--hover-color);
  color: #fff;
  text-decoration: underline;
  outline: none;
}

/* Universal Button Styles */
.btn {
  font-size: 1rem;
  font-weight: bold;
  min-width: 136px;
  min-height: 2.5rem;
  max-width: 100%;
  border-radius: 4px;
  padding: 6px 20px;
  line-height: 1.5rem;
  text-align: center;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: normal;
  vertical-align: super;
  touch-action: manipulation;
  font-family: 'Lato', sans-serif;
  box-sizing: border-box;
  display: inline-block;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.btn-primary, .primary-button, .submit-button {
  background-color: #1b6875;
  color: #fff;
  border: none;
}

.btn-primary:hover, .primary-button:hover, .submit-button:hover:not(:disabled) {
  background-color: #15505a;
  color: #fff;
}

.btn-secondary, .secondary-button {
  background-color: #fff;
  color: #1b6875;
  border: 2px solid #1b6875;
}

.btn-secondary:hover, .secondary-button:hover {
  background-color: #eaf4f6;
  color: #15505a;
}

.btn:disabled, .primary-button:disabled, .submit-button:disabled {
  background-color: #8a8a8a;
  cursor: not-allowed;
}

.btn-link {
  background: none;
  border: none;
  color: #1b6875;
  padding: 0;
  min-width: 0;
  min-height: 0;
  font-weight: bold;
  font-size: 1rem;
  box-shadow: none;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
  margin-bottom: 1.5rem;
}
.btn-link:hover,
.btn-link:focus {
  color: #15505a;
  text-decoration: underline;
  outline: none;
}

/* --- MOBILE MENU HOVER & ACTIVE FIXES --- */

/* Top-level mobile menu items: hover, focus, active/open */
.mobile-menu > li > a:hover,
.mobile-menu > li > a:focus,
.mobile-menu > li.active > a,
.mobile-menu > li.has-submenu.active > a {
  background: #1b6875 !important;
  color: #fff !important;
}

/* Submenu headers: hover, focus, active/open */
.mobile-menu .has-submenu > a:hover,
.mobile-menu .has-submenu > a:focus,
.mobile-menu .has-submenu.active > a {
  background: #1b6875 !important;
  color: #fff !important;
}

/* Submenu items: hover, focus, active */
.mobile-menu .submenu a:hover,
.mobile-menu .submenu a:focus,
.mobile-menu .submenu li.active > a {
  background: #1b6875 !important;
  color: #fff !important;
}

/* Ensure icons in menu-trigger also turn white on hover/active */
.mobile-menu > li > a:hover i,
.mobile-menu > li.active > a i,
.mobile-menu .has-submenu > a:hover i,
.mobile-menu .has-submenu.active > a i,
.mobile-menu .submenu a:hover i,
.mobile-menu .submenu li.active > a i {
  color: #fff !important;
}

.mobile-menu .text-banking-menu > a::after {
  display: none !important;
}

/* Button style overrides to fix specificity issues on message detail and other pages */
.btn-primary {
  background-color: #1b6875 !important;
  color: #fff !important;
  border: 2px solid transparent !important;
}

.btn-secondary {
  background-color: #fff !important;
  color: #1b6875 !important;
  border: 2px solid #1b6875 !important;
}

.btn-gray {
  font-size: 1rem;
  font-weight: bold;
  min-width: 136px;
  min-height: 2.5rem;
  max-width: 100%;
  border-radius: 4px;
  padding: 6px 20px;
  line-height: 1.5rem;
  text-align: center;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: normal;
  vertical-align: super;
  touch-action: manipulation;
  font-family: 'Lato', sans-serif;
  box-sizing: border-box;
  display: inline-block;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  background: #6d747b;
  color: #fff !important;
  border: none;
}

.search-btn {
  font-size: 1rem;
  font-weight: bold;
  min-width: 136px;
  min-height: 2.5rem;
  max-width: 100%;
  border-radius: 4px;
  padding: 6px 20px;
  line-height: 1.5rem;
  text-align: center;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: normal;
  vertical-align: super;
  touch-action: manipulation;
  font-family: 'Lato', sans-serif;
  box-sizing: border-box;
  display: inline-block;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  background-color: #1b6875;
  color: #fff;
  border: 2px solid transparent;
}

.search-btn:hover:not(:disabled) {
  background-color: #15505a;
  color: #fff;
}

.search-btn:disabled {
  background-color: #8a8a8a;
  cursor: not-allowed;
}

@media (max-width: 600px) {
  .ach-templates-container .button-row {
    flex-direction: column !important;
    gap: 0.75rem !important;
  }
  .ach-templates-container .button-row button {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .table-container td[colspan="8"] {
    text-align: center !important;
    justify-content: center;
    align-items: center;
    display: table-cell;
  }
}

.custom-select-wrapper {
  position: relative;
}
.dropdown-options {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 0 0 4px 4px;
  z-index: 10;
  display: none;
  max-height: 200px;
  overflow-y: auto;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.dropdown-option {
  padding: 0.5rem 1rem;
  cursor: pointer;
  color: #3f3f43;
  font-size: 1rem;
}
.dropdown-option.selected,
.dropdown-option:hover {
  background: #f7f7f7;
}
.selected-value {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  color: #3f3f43;
  cursor: pointer;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-options-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.search-options-flex .form-group {
  flex: 0 0 32%;
  max-width: 32%;
  min-width: 200px;
  box-sizing: border-box;
}
@media (max-width: 900px) {
  .search-options-flex .form-group {
    flex: 0 0 48%;
    max-width: 48%;
  }
}
@media (max-width: 600px) {
  .search-options-flex {
    flex-direction: column;
    gap: 1rem;
  }
  .search-options-flex .form-group {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

@media (max-width: 991px) {
  .ach-templates-container .table-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .ach-templates-container .users-table {
    min-width: 650px;
    width: 100%;
    table-layout: fixed;
  }
  .ach-templates-container .users-table,
  .ach-templates-container .users-table thead,
  .ach-templates-container .users-table tbody,
  .ach-templates-container .users-table tr,
  .ach-templates-container .users-table th,
  .ach-templates-container .users-table td {
    display: table !important;
    width: auto !important;
    background: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  .ach-templates-container .users-table thead {
    display: table-header-group !important;
  }
  .ach-templates-container .users-table tbody {
    display: table-row-group !important;
  }
  .ach-templates-container .users-table tr {
    display: table-row !important;
  }
  .ach-templates-container .users-table th,
  .ach-templates-container .users-table td {
    display: table-cell !important;
  }
}

@media (max-width: 900px) {
  .ach-templates-container .button-row {
    flex-direction: column !important;
    gap: 0.75rem !important;
    align-items: stretch;
  }
  .ach-templates-container .button-row button {
    width: 100%;
    white-space: nowrap;
    text-align: center;
  }
}

.ach-templates-container .users-table th {
  white-space: nowrap !important;
  text-overflow: ellipsis;
  overflow: hidden;
}

@media (max-width: 600px) {
  .button-row {
    flex-direction: column !important;
    gap: 10px !important;
  }
  .button-row .btn {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }
}

.mobile-logout-btn {
  display: block;
  width: 90%;
  margin: 2rem auto 1.5rem auto;
  padding: 0.75rem 1.5rem;
  color: #1b6875;
  background: transparent;
  border: 1px solid #1b6875;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.mobile-logout-btn:hover, .mobile-logout-btn:focus {
  background: #e6f3f5;
  color: #14505c;
}

@media (min-width: 992px) {
  .mobile-logout-btn {
    display: none;
  }
}



@media (max-width: 600px) {
  .form-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  .form-actions .btn,
  .form-actions .btn-primary,
  .form-actions button {
    width: 100%;
    box-sizing: border-box;
    min-width: unset;
    max-width: 100%;
    display: block;
  }
}

/* Responsive: Tighten table columns and left-align empty state for import templates table on mobile */
@media (max-width: 650px) {
  .ach-templates-container .users-table th,
  .ach-templates-container .users-table td {
    padding: 0.4rem 0.5rem !important;
    font-size: 0.97rem !important;
    white-space: normal !important;
  }
  .ach-templates-container .users-table td[colspan] {
    text-align: left !important;
    font-size: 0.97rem !important;
    padding-left: 6.3rem !important;
    margin-left: 0px !important;
  }
}

@media (max-width: 600px) {
  .btn,
  .btn-primary,
  .btn-secondary,
  .btn-gray {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
    display: block;
  }
  .account-table td[colspan] {
    text-align: center !important;
    vertical-align: middle !important;
    height: 80px;
    font-size: 1.1rem;
    display: table-cell;
    padding-left: 5.5rem !important;
  }
}

/* Always stack detail-item vertically in details-section */
.details-section .detail-item {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}
.details-section .detail-label {
  width: 100%;
  margin-bottom: 0.25rem;
  color: #333;
  font-weight: normal;
}
.details-section .detail-value {
  width: 100%;
  font-weight: 600;
}

@media (max-width: 600px) {
  /* Hide account type and account number in card view */
  .account-info.account-type-column,
  .account-info.account-column {
    display: none !important;
  }
  /* Make Add External Account button full width and secondary style */
  .add-account-button {
    width: 100% !important;
    box-sizing: border-box;
    margin-bottom: 1.25rem;
    background: #fff !important;
    color: #1b6875 !important;
    border: 2px solid #1b6875 !important;
    font-weight: 500;
    text-align: center;
  }
  .add-account-button:hover, .add-account-button:focus {
    background: #eaf4f6 !important;
    color: #15505a !important;
  }
}

@media (max-width: 600px) {
  .add-account-container {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 0 1.25rem 0 !important;
    display: block !important;
  }
  .add-account-button {
    width: 100% !important;
    display: block !important;
    box-sizing: border-box;
    margin: 0 !important;
    background: #fff !important;
    color: #1b6875 !important;
    border: 2px solid #1b6875 !important;
    font-weight: 500;
    text-align: center;
  }
  .add-account-button:hover, .add-account-button:focus {
    background: #eaf4f6 !important;
    color: #15505a !important;
  }
}

/* Inherit all font and text styles from .secondary-button for .add-account-button */
.add-account-button {
  font-size: inherit !important;
  font-weight: inherit !important;
  font-family: inherit !important;
  letter-spacing: inherit !important;
  text-transform: inherit !important;
}

/* Smaller checkboxes and label text for Pending ACH Pass-Thru form */
.pending-ach-pass-thru-form .checkbox-option input[type="checkbox"].custom-checkbox + label {
  font-size: 0.97rem;
  padding-left: 28px;
}
.pending-ach-pass-thru-form .checkbox-option input[type="checkbox"].custom-checkbox + label:before {
  width: 16px;
  height: 16px;
}

/* Adjust checkmark for smaller custom checkbox in Pending ACH Pass-Thru form */
.pending-ach-pass-thru-form .checkbox-option input[type="checkbox"].custom-checkbox:checked + label:after {
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border-width: 0 2px 2px 0;
}

/* Reduce top spacing for Pending ACH Pass-Thru page to match One-Time ACH */
.pending-ach-pass-thru-page .main-wrapper {
  margin-top: 1rem !important;
}

.pending-ach-pass-thru-page .content {
  padding-top: 1.5rem !important;
}

/* Match ACH Import checkboxes to Pending ACH Pass-Thru style */
.ach-import-options-form .checkbox-option input[type="checkbox"].custom-checkbox + label {
  font-size: 0.97rem;
  padding-left: 28px;
}
.ach-import-options-form .checkbox-option input[type="checkbox"].custom-checkbox + label:before {
  width: 16px;
  height: 16px;
}
.ach-import-options-form .checkbox-option input[type="checkbox"].custom-checkbox:checked + label:after {
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border-width: 0 2px 2px 0;
}

@media (max-width: 600px) {
  .wire-button-row {
    flex-direction: column !important;
    gap: 0.75rem !important;
    width: 100%;
  }
  .wire-button-row button {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
    display: block;
  }
  /* Ensure Cancel is on the bottom by keeping button order: Cancel, then Submit */
}

/* Pending Wires Button Row - Mobile Fix */
@media (max-width: 600px) {
  .ach-section .pending-wires-buttons {
    display: flex !important;
    flex-direction: column-reverse !important;
    gap: 0.75rem !important;
  }
  .ach-section .pending-wires-buttons button {
    width: 100%;
  }
}

/* Logo visibility */
.logo-desktop { display: block; }
.logo-mobile { display: none; }

@media (max-width: 991px) {
  .top-bar {
    background: #1b6875 !important;
  }
  .logo-desktop { display: none !important; }
  .logo-mobile { display: block !important; height: 40px; }
  .hamburger { color: #fff !important; }
  .top-bar .top-circle { display: none !important; }
}

.hamburger-label {
  display: none;
  margin-left: 0.25rem;
  font-size: 0.95rem;
  color: #fff;
  vertical-align: middle;
}

@media (max-width: 991px) {
  .hamburger-label {
    display: inline-block;
  }
}

.hamburger-menu-group {
  display: flex;
  align-items: center;
}

@media (max-width: 991px) {
  .top-bar {
    background: #1b6875 !important;
  }
  .logo-desktop { display: none !important; }
  .logo-mobile { display: block !important; height: 28px; }
  .hamburger { color: #fff !important; margin-right: 0; padding-right: 0; }
  .top-bar .top-circle { display: none !important; }
  .hamburger-menu-group { gap: 5px; }
  .hamburger-label { margin-left: 0; }
}

/* Notification Dot for Hamburger Menu (Mobile) */
.notification-dot {
  position: absolute;
  top: 3.5px;
  right: -6px;
  width: 12.5px;
  height: 12.5px;
  background: var(--accent-color, #ff3b30);
  border-radius: 50%;
  border: 2px solid #fff;
  z-index: 2;
  display: none;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.05);
}

@media (max-width: 991px) {
  .hamburger-menu-group {
    position: relative;
  }
  .notification-dot {
    display: block;
  }
}

.info-tooltip .tooltip-content {
  top: auto;
  bottom: 100%;
  left: 50%;
  right: auto;
  transform: translateX(-50%) translateY(-10px);
  margin-left: 0;
  margin-bottom: 10px;
  width: 250px; /* Reduced width from 300px */
  max-height: none; /* Allow height to grow based on content */
  line-height: 1.6; /* Increased line height for better readability */
  /* Ensure it doesn't overflow the viewport */
  max-width: 95vw;
  z-index: 1000;
}

/* Adjust To Account tooltip specifically */
.form-label[for="toAccount"] .info-tooltip .tooltip-content {
  width: 220px; /* Even narrower for the To Account tooltip */
  padding: 15px;
  line-height: 1.7;
}

/* Remove right alignment for form tooltips */
.info-tooltip .tooltip-content.right {
  left: 50%;
  right: auto;
  top: auto;
  bottom: 100%;
  transform: translateX(-50%) translateY(-10px);
  margin-left: 0;
  margin-bottom: 10px;
  width: 250px; /* Match the width above */
  max-width: 95vw;
}

/* Adjust To Account tooltip with right class */
.form-label[for="toAccount"] .info-tooltip .tooltip-content.right {
  width: 220px;
}

/* Arrow for tooltip above icon */
.info-tooltip .tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

@media (max-width: 480px) {
  .info-tooltip .tooltip-content,
  .info-tooltip .tooltip-content.right {
    width: 180px;
    font-size: 13px;
  }
}

@media (min-width: 992px) {
  .ach-form-container .custom-select-wrapper,
  .ach-form-container .form-control,
  .ach-form-container .input-group {
    width: calc(50% + 30px);
    min-width: 220px;
    max-width: 100%;
    box-sizing: border-box;
  }
}

.external-accounts-table .status-column {
  width: 12%;
  min-width: 90px;
  max-width: 120px;
  justify-content: flex-start;
  padding-right: 0;
}

.external-accounts-table .action-column {
  width: 6%;
  min-width: 40px;
  max-width: 60px;
  justify-content: flex-end;
  padding-left: 0;
}

.external-accounts-table .header-column {
  font-weight: 600; /* Make header labels bold */
}

.external-accounts-table .header-column,
.external-accounts-table .account-info {
  align-items: center;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  box-sizing: border-box;
}

/* Remove extra gap between status and action columns */
.external-accounts-table .status-column,
.external-accounts-table .action-column {
  margin-right: 0;
  margin-left: 0;
}

/* Mobile view for external accounts */
@media (max-width: 768px) {
  /* Hide table header in mobile view */
  .external-accounts-table .table-header {
    display: none;
  }
  
  /* Restructure account rows for mobile */
  .external-accounts-table .account-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    padding: 0.75rem 1rem;
  }
  
  /* Position expand icon */
  .external-accounts-table .expand-icon {
    position: absolute;
    left: 0.5rem;
    top: 0.9rem;
    margin-right: 0;
  }
  
  /* Style nickname as primary identifier */
  .external-accounts-table .nickname-column {
    width: 100%;
    padding-left: 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.1rem;
  }
  
  /* Style financial institution below nickname */
  .external-accounts-table .financial-institution-column {
    width: 100%;
    padding-left: 1.5rem;
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
  }
  
  /* Show account type and account number in mobile view */
  .external-accounts-table .account-type-column,
  .external-accounts-table .account-column {
    display: none;
  }
  
  /* Position status at bottom left */
  .external-accounts-table .status-column {
    padding-left: 1.5rem;
    margin-top: 0.1rem;
    width: auto;
    font-size: 0.9rem;
  }
  
  /* Position verify button at bottom right */
  .external-accounts-table .action-column {
    position: absolute;
    bottom: 0.75rem;
    right: 1rem;
    width: auto;
    padding: 0;
  }
  
  /* Reduce spacing between rows */
  .external-accounts-table .account-row {
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 0;
  }
  
  /* Style account details section */
  .external-accounts-table .account-details {
    padding: 0;
    background-color: #f5f5f5;
  }
  
  .external-accounts-table .details-section {
    padding: 1.25rem;
    position: relative;
  }
  
  .external-accounts-table .details-section h3 {
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 1.25rem;
    font-weight: 700;
  }
  
  .external-accounts-table .close-details {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
  }
  
  /* Style detail items */
  .external-accounts-table .detail-item {
    margin-bottom: 0.75rem;
  }
  
  .external-accounts-table .detail-label {
    margin-bottom: 0.1rem;
  }
  
  /* Style action links */
  .external-accounts-table .detail-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.25rem;
  }
  
  .external-accounts-table .detail-action {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1rem;
    padding: 0.25rem 0;
  }
  
  /* Override the display:none for account type and status in mobile expanded view */
  .external-accounts-table .account-details .detail-item .detail-label,
  .external-accounts-table .account-details .detail-item .detail-value {
    display: block;
  }
}

/* Style action links with less spacing in mobile view */
@media (max-width: 768px) {
  .external-accounts-table .detail-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem !important;
    margin-top: 1rem !important;
  }
  
  .external-accounts-table .detail-action {
    padding: 0.15rem 0 !important;
    margin: 0 !important;
  }
}

/* Fix tooltip positioning for mobile view */
@media (max-width: 768px) {
  /* Position tooltips above the icon in mobile view */
  .account-row .info-tooltip .tooltip-content.left {
    left: auto !important;
    right: 100% !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) translateX(-10px) !important;
    width: 220px !important;
    min-height: 90px !important;
    max-width: 90vw !important;
    box-sizing: border-box !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
    padding: 18px 20px !important;
    line-height: 1.7 !important;
    z-index: 9999 !important;
    border: none !important;
    background: #333 !important;
  }
  .account-row .info-tooltip .tooltip-content.left::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -16px;
    left: auto;
    transform: translateY(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent transparent #333;
  }
  .account-row .info-tooltip {
    position: relative !important;
    z-index: 9999 !important;
  }
}

@media (min-width: 769px) {
  .account-row .info-tooltip .tooltip-content.left {
    right: 100%;
    left: auto;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%) translateX(-10px);
    width: 250px;
    max-width: 350px;
    min-height: 60px;
    box-sizing: border-box;
    z-index: 9999;
    border: none;
    background: #333;
  }
  .account-row .info-tooltip .tooltip-content.left::after {
    content: "";
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent transparent #333;
  }
}

@media (max-width: 768px) {
  .utility-links {
    display: none !important;
  }
}

.modal-overlay .primary-button {
  min-width: 200px;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  display: block;
}
@media (max-width: 600px) {
  .modal-overlay .primary-button {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}

/* Start Modal Adjustments */
.start-modal .modal-header {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  padding: 0.75rem 1.5rem 0.75rem 2rem;
}

.start-modal .modal-header h2 {
  color: #eaf6fa; /* lighter, less teal */
  font-size: 1.5rem;
  font-weight: normal;
  margin: 0;
}

.start-modal .modal-logo {
  height: 40px;
}

.welcome-heading {
  color: var(--primary-color);
  font-size: 1.75rem;
  margin: 0.5rem 0 1rem 0;
  text-align: center;
  font-weight: normal;
}

/* External Link Modal Styles */
#externalLinkModal .modal-content {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 500px;
}

#externalLinkModal .modal-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

#externalLinkModal .modal-header h2 {
  width: 100%;
  text-align: center;
  color: #fff;
}

#externalLinkModal #externalLinkMessage {
  color: #333;
  text-align: center;
}

#externalLinkModal .modal-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

#externalLinkModal #cancelExternalLink {
  background-color: transparent;
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

#externalLinkModal #cancelExternalLink:hover {
  background-color: #f5f5f5;
}

#externalLinkModal #continueExternalLink {
  background-color: var(--primary-color);
  color: white;
  border: none;
}

#externalLinkModal #continueExternalLink:hover {
  background-color: var(--hover-color);
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0 left: 0 right: 0 bottom: 0;
  background: rgba(44, 62, 80, 0.65);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Modal Dialog */
.modal-dialog {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  min-width: 340px;
  max-width: 95vw;
  width: 400px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Lato', sans-serif;
}

.modal-header {
  background: #1b6875;
  color: #fff;
  padding: 18px 24px 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.modal-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  padding: 0 0 0 12px;
  line-height: 1;
}

.modal-body {
  background: #fff;
  padding: 24px 24px 12px 24px;
  overflow-y: auto;
}

.modal-details-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.modal-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  font-size: 15px;
}

.modal-detail-label {
  color: #3f3f43;
  font-weight: 500;
  min-width: 160px;
  max-width: 60%;
  word-break: break-word;
}

.modal-detail-value {
  color: #1b6875;
  font-weight: 700;
  text-align: right;
  flex: 1;
  word-break: break-word;
}

#changeNicknameLink {
  color: #1b6875;
  font-size: 15px;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 500;
}

.modal-actions {
  display: flex;
  justify-content: center;
  padding: 12px 0 0 0;
}

.modal-close-btn {
  background: #1b6875;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 36px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.modal-close-btn:hover {
  background: #15525c;
}

@media (max-width: 500px) {
  .modal-dialog {
    min-width: 0;
    width: 98vw;
    padding: 0;
  }
  .modal-header, .modal-body {
    padding-left: 10px;
    padding-right: 10px;
  }
  .modal-title {
    font-size: 17px;
  }
  .modal-detail-label, .modal-detail-value {
    font-size: 14px;
  }
}

.search-input:focus {
  outline: none !important;
  border-color: #ddd !important;
  box-shadow: none !important;
}

/* Desktop: align form-actions buttons horizontally */
@media (min-width: 601px) {
  .form-actions {
    display: flex;
    flex-direction: row;
    align-items: left;
    gap: 1rem;
    justify-content: flex-start; /* Changed from flex-end to flex-start */
  }
  .form-actions .btn,
  .form-actions .btn-primary,
  .form-actions button {
    width: auto;
    min-width: 136px;
    max-width: 100%;
    display: inline-block;
    box-sizing: border-box;
  }
}