/* ============================================================
   Desktop Banking Application — Main Stylesheet
   A professional banking UI designed for test automation training.
   ============================================================ */

/* === RESET & BASE === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #dbeafe;
  --color-success: #10b981;
  --color-success-light: #d1fae5;
  --color-warning: #f59e0b;
  --color-warning-light: #fef3c7;
  --color-danger: #ef4444;
  --color-danger-light: #fee2e2;
  --color-info: #3b82f6;
  --color-info-light: #dbeafe;

  --sidebar-bg: #1a1f36;
  --sidebar-width: 280px;
  --sidebar-text: #a0aec0;
  --sidebar-active: #2563eb;
  --sidebar-hover-bg: #252b43;

  --header-height: 64px;

  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.6;
  min-width: 1024px;
  overflow-x: hidden;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

img {
  max-width: 100%;
  display: block;
}

/* === CUSTOM SCROLLBAR === */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: 4px;
  transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--gray-400) var(--gray-100);
}

/* === LAYOUT === */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content-area {
  flex: 1;
  padding: 24px 32px;
}

/* === DEMO BANNER === */
.demo-banner {
  background: var(--color-warning);
  color: #000;
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* === PAGE TITLE === */
.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-avatar .user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}

/* search-input styles handled by .header-search input */

/* === DASHBOARD === */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.dashboard-widget {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: box-shadow var(--transition-fast);
}

.dashboard-widget:hover {
  box-shadow: var(--shadow-md);
}

.dashboard-widget[data-widget-id="balance-overview"],
.dashboard-widget[data-widget-id="recent-transactions"] {
  grid-column: 1 / -1;
}

.widget-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.widget-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0;
}

.widget-content {
  padding: 20px;
}

.drag-handle {
  cursor: grab;
  color: var(--gray-400);
  font-size: 16px;
  padding: 4px;
  user-select: none;
}

.drag-handle:active {
  cursor: grabbing;
}

.stat-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

/* === STAT CARDS (standalone) === */
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 20px;
}

.stat-label {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
}

.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  margin-top: 8px;
}

.stat-trend.trend-up, .trend-up {
  color: var(--color-success);
}

.stat-trend.trend-down, .trend-down {
  color: var(--color-danger);
}

.currency-symbol {
  font-size: 18px;
  font-weight: 500;
  vertical-align: super;
  margin-right: 2px;
}

/* === ACCOUNT CARDS === */
.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.account-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  padding: 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

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

.account-card .account-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 4px;
}

.account-card .account-number {
  font-size: 13px;
  color: var(--gray-500);
  font-family: monospace;
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-card .account-balance {
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 12px 0 4px;
}

.account-card .account-available {
  font-size: 13px;
  color: var(--gray-500);
}

.account-card .account-interest {
  font-size: 12px;
  color: var(--color-success);
  margin-top: 4px;
}

.account-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* === SUMMARY STAT ROW === */
.summary-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

/* === QUICK ACTIONS === */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.quick-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  text-align: center;
  color: var(--gray-700);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
}

.quick-action-card:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-2px);
}

.quick-action-card .action-icon {
  font-size: 28px;
}

/* === TRANSACTION TABLE STYLES === */
.transaction-amount.credit,
.amount-credit {
  color: var(--color-success);
  font-weight: 600;
}

.transaction-amount.debit,
.amount-debit {
  color: var(--color-danger);
  font-weight: 600;
}

/* === FILTER BAR === */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 16px 0;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--gray-100);
}

.filter-bar input,
.filter-bar select {
  padding: 8px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-size: 14px;
}

.filter-bar input:focus,
.filter-bar select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
}

.filter-input {
  padding: 8px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-size: 14px;
  width: 200px;
  box-sizing: border-box;
}

.filter-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Custom Select (alias for custom-dropdown used in account-detail & transfers) */
.custom-select {
  position: relative;
  display: inline-block;
  min-width: 160px;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: border-color var(--transition-fast);
  gap: 8px;
}

.custom-select-trigger:hover {
  border-color: var(--gray-400);
}

.custom-select.open .custom-select-trigger {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.custom-select-value {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-select-arrow {
  font-size: 10px;
  color: var(--gray-400);
  transition: transform var(--transition-fast);
}

.custom-select.open .custom-select-arrow {
  transform: rotate(180deg);
}

.custom-select-options {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  max-height: 240px;
  overflow-y: auto;
}

.custom-select.open .custom-select-options {
  display: block;
}

.custom-select-option {
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

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

.custom-select-option.selected {
  background: var(--color-primary);
  color: #fff;
}

.custom-select-search {
  padding: 8px;
  border-bottom: 1px solid var(--gray-100);
}

.custom-select-search input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  font-size: 13px;
}

/* BEM-style custom-select (used in transfers) */
.custom-select__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: border-color var(--transition-fast);
}

.custom-select__trigger:hover {
  border-color: var(--gray-400);
}

.custom-select.open .custom-select__trigger {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.custom-select__value {
  flex: 1;
  color: var(--gray-800);
}

.custom-select__arrow {
  font-size: 10px;
  color: var(--gray-400);
  transition: transform var(--transition-fast);
}

.custom-select.open .custom-select__arrow {
  transform: rotate(180deg);
}

.custom-select__options {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  max-height: 260px;
  overflow-y: auto;
}

.custom-select.open .custom-select__options {
  display: block;
}

.custom-select__option {
  padding: 10px 14px;
  cursor: pointer;
  transition: background var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-bottom: 1px solid var(--gray-50);
}

.custom-select__option:last-child {
  border-bottom: none;
}

.custom-select__option:hover {
  background: var(--color-primary-light);
}

.custom-select__option.selected {
  background: var(--color-primary);
  color: #fff;
}

.custom-select__option .account-name,
.custom-select__option .payee-name {
  font-weight: 600;
  font-size: 14px;
}

.custom-select__option .account-number,
.custom-select__option .payee-bank,
.custom-select__option .payee-account {
  font-size: 12px;
  color: var(--gray-500);
}

.custom-select__option .account-balance {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
}

/* === PAGINATION === */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-100);
}

.pagination a,
.pagination span {
  padding: 8px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-size: 14px;
  color: var(--gray-600);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.pagination a:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.pagination .active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.pagination .disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* === ACCOUNT DETAIL HEADER === */
.account-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.account-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
}

.account-header .account-meta {
  font-size: 13px;
  color: var(--gray-500);
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.account-header .account-meta .copyable {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: monospace;
}

.balance-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

/* === TWO COLUMN LAYOUT === */
.two-column-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.column-left,
.column-right {
  min-width: 0;
}

.instructions-panel {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
}

.instructions-panel h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 16px;
}

/* === CARDS PAGE === */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.card-actions {
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.credit-info {
  font-size: 14px;
  color: var(--gray-600);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.limit-input {
  width: 100px;
  padding: 4px 8px;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  font-size: 14px;
}

.card-limit {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.flip-hint {
  text-align: center;
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 8px;
}

/* === TABS === */
.tabs {
  margin-bottom: 24px;
}

.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 20px;
}

.tab-btn,
.settings-tab-btn {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab-btn:hover,
.settings-tab-btn:hover {
  color: var(--color-primary);
}

.tab-btn.active,
.settings-tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.tab-content,
.settings-tab-content {
  display: none;
}

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

/* === TAB TOOLBAR === */
.tab-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

/* === PAYEE CARDS === */
.payee-drop-zone {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.payees-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.payee-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition-fast);
}

.payee-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
}

.payee-card.dragging {
  opacity: 0.4;
  border-style: dashed;
}

.payee-drag-handle {
  cursor: grab;
  color: var(--gray-400);
  font-size: 18px;
  padding: 4px;
  user-select: none;
  flex-shrink: 0;
}

.payee-drag-handle:hover {
  color: var(--gray-600);
}

.drag-icon {
  line-height: 1;
}

.payee-info {
  flex: 1;
  min-width: 0;
}

.payee-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.payee-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--gray-800);
}

.payee-details {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--gray-500);
}

.payee-account {
  font-family: var(--font-mono, 'SF Mono', 'Fira Code', monospace);
  letter-spacing: 0.02em;
}

.payee-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm, 4px);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background: var(--gray-100);
}

.payee-favorite-btn .star {
  font-size: 20px;
  color: var(--gray-300);
  line-height: 1;
  transition: color var(--transition-fast);
}

.payee-favorite-btn[data-favorited="true"] .star {
  color: var(--color-warning, #f59e0b);
}

.payee-favorite-btn:hover .star {
  color: var(--color-warning, #f59e0b);
}

.badge-category,
.badge-frequency {
  display: inline-block;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  background: var(--gray-100);
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.payee-favorite {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--gray-300);
  transition: color var(--transition-fast);
}

.payee-favorite.active {
  color: var(--color-warning);
}

/* === SETTINGS PAGE === */
.settings-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.profile-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.user-avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
}

.profile-display-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-800);
}

.inline-edit-field {
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}

.inline-edit-field .field-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 4px;
}

.inline-edit-field .field-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inline-edit-field .field-display span {
  font-size: 15px;
  color: var(--gray-800);
}

.inline-edit-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  font-size: 14px;
  padding: 4px;
}

.inline-edit-btn:hover {
  color: var(--color-primary);
}

.inline-edit-field .field-input {
  display: none;
}

.inline-edit-field .field-input input,
.inline-edit-field .field-input [contenteditable] {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--color-primary);
  border-radius: 6px;
  font-size: 15px;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Password strength */
.pw-requirements {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  font-size: 13px;
}

.pw-requirements .pw-req {
  color: var(--gray-400);
  padding: 2px 0;
}

.pw-requirements .pw-req::before {
  content: '○ ';
}

.pw-requirements .pw-req.met {
  color: var(--color-success);
}

.pw-requirements .pw-req.met::before {
  content: '● ';
}

/* QR Code fake */
.qr-placeholder {
  width: 160px;
  height: 160px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--gray-500);
  text-align: center;
  margin: 12px 0;
}

/* Theme selector */
.theme-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.theme-card {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-card:hover {
  border-color: var(--color-primary);
}

.theme-card.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.theme-card .theme-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.theme-card .theme-name {
  font-size: 14px;
  font-weight: 500;
}

/* === DEPOSIT PAGE === */
.deposit-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
}

/* === STATEMENTS PAGE === */
.statement-generator {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  padding: 24px;
  margin-bottom: 24px;
}

.statement-generator .form-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.statement-display {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  padding: 24px;
  min-height: 400px;
}

.statement-display iframe {
  width: 100%;
  min-height: 500px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}

.statement-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  color: var(--gray-400);
  text-align: center;
}

.statement-placeholder .placeholder-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

/* Login page styles moved to bottom of file */

.password-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}

.custom-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--gray-300);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.sr-only:checked + .custom-checkbox {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.sr-only:checked + .custom-checkbox::after {
  content: '✓';
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.forgot-link {
  font-size: 14px;
  color: var(--color-primary);
}

.captcha-group {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 12px;
  border: 1px solid var(--gray-200);
}

.login-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--gray-500);
}

.login-footer code {
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

/* === BILL AMOUNTS === */
.bill-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}

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

.bill-info .bill-payee {
  font-weight: 600;
  color: var(--gray-800);
}

.bill-info .bill-date {
  font-size: 13px;
  color: var(--gray-500);
}

.bill-amount {
  font-weight: 600;
  font-size: 16px;
}

/* === TRANSFER FORM === */
.transfer-form-section {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  padding: 24px;
}

.transfer-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.transfer-sidebar .info-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  padding: 20px;
}

.transfer-sidebar .info-card h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 12px;
}

/* === TRANSFERS PAGE LAYOUT === */
.transfers-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.transfers-form-column,
.transfers-sidebar-column {
  min-width: 0;
}

.transfer-type-toggle {
  display: flex;
  gap: 16px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
}

.radio-label input[type="radio"] {
  width: auto;
  accent-color: var(--color-primary);
}

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

.input-prefix {
  position: absolute;
  left: 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-500);
  pointer-events: none;
  z-index: 1;
}

.input-with-prefix input {
  padding-left: 28px;
}

.amount-warning {
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--color-warning-light);
  border-radius: 6px;
  font-size: 13px;
  color: #92400e;
}

/* Radio group for transfer type */
.radio-group {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.radio-card {
  flex: 1;
  padding: 12px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.radio-card.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* Pending transaction row highlight */
.transaction-pending {
  background: var(--color-warning-light) !important;
}

/* === EDITABLE NOTE CELL === */
.editable-note {
  min-width: 120px;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: text;
  transition: border-color var(--transition-fast);
  font-size: 13px;
  color: var(--gray-600);
}

.editable-note:hover {
  border-color: var(--gray-300);
}

.editable-note:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background: #fff;
}

/* === COPY BUTTON === */
.btn-copy {
  background: none;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  color: var(--gray-500);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-copy:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* === SECTION SPACING === */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-800);
}

/* === VIEW ALL LINK === */
.view-all-link,
.link-view-all {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-primary);
}

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

/* Widget footer */
.widget-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--gray-100);
  text-align: center;
}

/* Upcoming bills list */
.upcoming-bills-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.upcoming-bill-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}

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

.bill-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: right;
}

/* Cards summary in dashboard */
.cards-summary-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Data table */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead th {
  background: var(--gray-50);
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-600);
  border-bottom: 2px solid var(--gray-200);
}

.data-table tbody td {
  padding: 10px 14px;
  font-size: 14px;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
}

.data-table tbody tr:hover {
  background: var(--gray-50);
}

/* === CARD MINI (dashboard) === */
.card-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}

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

.card-mini-visual {
  width: 60px;
  height: 38px;
  border-radius: 4px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 8px;
  font-weight: 600;
}

.card-mini-info {
  flex: 1;
  font-size: 13px;
}

.card-mini-info .card-mini-name {
  font-weight: 600;
  color: var(--gray-800);
}

.card-mini-info .card-mini-number {
  color: var(--gray-500);
}

/* === ERROR PAGE === */
.error-container {
  text-align: center;
  padding: 80px 24px;
}

.error-container h1 {
  font-size: 36px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 12px;
}

.error-container p {
  font-size: 16px;
  color: var(--gray-500);
  margin-bottom: 24px;
}

/* === SIDEBAR === */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width var(--transition-base);
}

.sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo .logo-icon {
  width: 40px;
  height: 40px;
  background: var(--color-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  font-weight: 700;
}

.sidebar-logo .logo-text {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.025em;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
}

.sidebar-nav .nav-group-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  padding: 16px 12px 8px;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--sidebar-text);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
  cursor: pointer;
  position: relative;
}

.sidebar-nav .nav-link:hover {
  background: var(--sidebar-hover-bg);
  color: #fff;
}

.sidebar-nav .nav-link.active {
  background: rgba(37, 99, 235, 0.15);
  color: #fff;
}

.sidebar-nav .nav-link.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--color-primary);
  border-radius: 0 3px 3px 0;
}

/* Nav link inline icons */
.sidebar-nav .nav-link .nav-icon {
  width: 20px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
}

.sidebar-nav .nav-link .nav-label {
  font-size: 14px;
}

.sidebar-nav .nav-link .badge {
  margin-left: auto;
  background: var(--color-danger);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

/* Sidebar user profile at bottom */
.sidebar-user {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-user .user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.sidebar-user .user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user .user-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user .user-role {
  font-size: 12px;
  color: var(--gray-500);
}

.sidebar-user .logout-btn {
  color: var(--gray-500);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color var(--transition-fast);
  background: none;
  border: none;
  font-size: 18px;
}

.sidebar-user .logout-btn:hover {
  color: var(--color-danger);
}

/* === TOP HEADER === */
.top-header {
  height: var(--header-height);
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--gray-500);
}

.breadcrumb a {
  color: var(--gray-500);
}

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

.breadcrumb .separator {
  font-size: 12px;
}

.breadcrumb .current {
  color: var(--gray-800);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-search {
  position: relative;
}

.header-search input {
  width: 240px;
  padding: 8px 14px 8px 32px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-size: 14px;
  background: var(--gray-50);
  transition: all var(--transition-fast);
  box-sizing: border-box;
}

.header-search input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background: #fff;
  width: 300px;
}

.header-search::before {
  content: '⌕';
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--gray-400);
  z-index: 1;
  pointer-events: none;
}

.notification-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: background var(--transition-fast);
  font-size: 20px;
}

.notification-btn:hover {
  background: var(--gray-100);
}

.notification-btn .unread-count {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--color-danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 6px;
  transition: background var(--transition-fast);
}

.user-menu-btn:hover {
  background: var(--gray-100);
}

.user-menu-btn .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}

/* === CARDS === */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: box-shadow var(--transition-fast);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-800);
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
}

/* (stat-card styles defined in layout section above) */

/* Grid layouts */
.grid {
  display: grid;
  gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* === TABLES === */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead th {
  background: var(--gray-50);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-600);
  border-bottom: 2px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 10;
}

tbody tr {
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--transition-fast);
}

tbody tr:nth-child(even) {
  background: var(--gray-50);
}

tbody tr:hover {
  background: var(--color-primary-light);
}

tbody td {
  padding: 12px 16px;
  color: var(--gray-700);
  vertical-align: middle;
}

/* Sortable header */
thead th.sortable {
  cursor: pointer;
  user-select: none;
}

thead th.sortable::after {
  content: '\2195';
  margin-left: 6px;
  color: var(--gray-400);
  font-size: 10px;
}

thead th.sortable.asc::after {
  content: '\2191';
  color: var(--color-primary);
}

thead th.sortable.desc::after {
  content: '\2193';
  color: var(--color-primary);
}

/* === TRANSACTION AMOUNTS (color-coded) === */
.amount-credit {
  color: var(--color-success);
  font-weight: 600;
}

.amount-credit::before {
  content: '+';
}

.amount-debit {
  color: var(--color-danger);
  font-weight: 600;
}

.amount-debit::before {
  content: '-';
}

/* === FORMS === */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-group .hint {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 4px;
}

.form-group .error-text {
  font-size: 12px;
  color: var(--color-danger);
  margin-top: 4px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 14px;
  font-family: var(--font-family);
  color: var(--gray-800);
  background: #fff;
  transition: all var(--transition-fast);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

input.error,
textarea.error {
  border-color: var(--color-danger);
}

input.error:focus,
textarea.error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

input:disabled,
textarea:disabled {
  background: var(--gray-100);
  color: var(--gray-500);
  cursor: not-allowed;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

/* Custom styled select */
.select-wrapper {
  position: relative;
}

.select-wrapper select {
  width: 100%;
  padding: 10px 40px 10px 14px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 14px;
  color: var(--gray-800);
  background: #fff;
  appearance: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.select-wrapper::after {
  content: '\25BC';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: var(--gray-500);
  pointer-events: none;
}

.select-wrapper select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch .slider,
.toggle-switch .toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--gray-300);
  border-radius: 24px;
  transition: background var(--transition-fast);
}

.toggle-switch .slider::before,
.toggle-switch .toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked + .slider,
.toggle-switch input:checked + .toggle-slider {
  background: var(--color-primary);
}

.toggle-switch input:checked + .slider::before,
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.toggle-switch input:focus + .slider,
.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.toggle-switch .toggle-label {
  margin-left: 52px;
  font-size: 14px;
  color: var(--gray-700);
  white-space: nowrap;
  line-height: 24px;
}

/* Inline form row */
.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  box-shadow: var(--shadow-md);
}

.btn-success {
  background: var(--color-success);
  color: #fff;
}

.btn-success:hover {
  background: #059669;
  box-shadow: var(--shadow-md);
}

.btn-danger {
  background: var(--color-danger);
  color: #fff;
}

.btn-danger:hover {
  background: #dc2626;
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
  background: var(--gray-200);
  border-color: var(--gray-400);
}

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

.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

.btn-ghost:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

.btn-block {
  display: block;
  width: 100%;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 6px;
}

/* === STATUS BADGES === */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.badge-active,
.badge-completed {
  background: var(--color-success-light);
  color: #065f46;
}

.badge-pending,
.badge-processing {
  background: var(--color-warning-light);
  color: #92400e;
}

.badge-frozen,
.badge-info {
  background: var(--color-info-light);
  color: #1e40af;
}

.badge-lost,
.badge-failed,
.badge-declined {
  background: var(--color-danger-light);
  color: #991b1b;
}

.badge-inactive {
  background: var(--gray-100);
  color: var(--gray-600);
}

.badge-checking {
  background: var(--color-primary-light);
  color: #1e40af;
}

.badge-savings {
  background: var(--color-success-light);
  color: #065f46;
}

.badge-credit {
  background: var(--color-warning-light);
  color: #92400e;
}

.badge-investment {
  background: #ede9fe;
  color: #5b21b6;
}

.badge-debit {
  background: var(--color-info-light);
  color: #1e40af;
}

.badge-once { background: var(--gray-100); color: var(--gray-600); }
.badge-weekly { background: #dbeafe; color: #1e40af; }
.badge-monthly { background: #d1fae5; color: #065f46; }
.badge-paused { background: var(--color-warning-light); color: #92400e; }
.badge-cancelled { background: var(--color-danger-light); color: #991b1b; }

/* Status badges (used in tables) */
.status-badge,
.category-badge,
.frequency-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

.status-completed { background: var(--color-success-light); color: #065f46; }
.status-pending { background: var(--color-warning-light); color: #92400e; }
.status-failed { background: var(--color-danger-light); color: #991b1b; }
.status-active { background: var(--color-success-light); color: #065f46; }
.status-paused { background: var(--color-warning-light); color: #92400e; }
.status-cancelled { background: var(--color-danger-light); color: #991b1b; }

.category-badge { background: var(--gray-100); color: var(--gray-600); }
.category-income { background: #d1fae5; color: #065f46; }
.category-dining { background: #fef3c7; color: #92400e; }
.category-groceries { background: #d1fae5; color: #065f46; }
.category-transport { background: #dbeafe; color: #1e40af; }
.category-shopping { background: #ede9fe; color: #5b21b6; }
.category-utilities { background: #e0e7ff; color: #3730a3; }
.category-entertainment { background: #fce7f3; color: #9d174d; }
.category-health { background: #ccfbf1; color: #0f766e; }
.category-housing { background: #fed7aa; color: #9a3412; }
.category-insurance { background: #e5e7eb; color: #374151; }
.category-subscription { background: #e0e7ff; color: #3730a3; }
.category-transfer { background: #dbeafe; color: #1e40af; }
.category-refund { background: #d1fae5; color: #065f46; }
.category-deposit { background: #d1fae5; color: #065f46; }
.category-interest { background: #d1fae5; color: #065f46; }
.category-payment { background: #dbeafe; color: #1e40af; }
.category-travel { background: #fef3c7; color: #92400e; }

.frequency-badge { background: var(--gray-100); color: var(--gray-600); }
.frequency-once { background: var(--gray-100); color: var(--gray-600); }
.frequency-weekly { background: #dbeafe; color: #1e40af; }
.frequency-monthly { background: #d1fae5; color: #065f46; }

/* === MODAL === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

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

.modal {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition-base);
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--gray-400);
  padding: 4px;
  border-radius: 4px;
  transition: all var(--transition-fast);
  line-height: 1;
}

.modal-close:hover {
  color: var(--gray-700);
  background: var(--gray-100);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Modal size variants */
.modal.modal-lg {
  max-width: 720px;
}

.modal.modal-sm {
  max-width: 400px;
}

/* === TOAST NOTIFICATIONS === */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 320px;
  max-width: 420px;
  pointer-events: auto;
  animation: toastSlideIn 0.3s ease-out;
  border-left: 4px solid var(--gray-400);
}

.toast.toast-success { border-left-color: var(--color-success); }
.toast.toast-error   { border-left-color: var(--color-danger); }
.toast.toast-warning { border-left-color: var(--color-warning); }
.toast.toast-info    { border-left-color: var(--color-info); }

.toast .toast-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.toast .toast-message {
  flex: 1;
  font-size: 14px;
  color: var(--gray-700);
}

.toast .toast-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  font-size: 16px;
  padding: 2px;
}

.toast-exit {
  animation: toastSlideOut 0.25s ease-in forwards;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* === SKELETON LOADING === */
.skeleton {
  background: var(--gray-200);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.5),
    transparent
  );
  animation: shimmer 1.8s infinite;
}

.skeleton-text {
  height: 14px;
  margin-bottom: 10px;
  width: 100%;
}

.skeleton-text.short { width: 60%; }
.skeleton-text.medium { width: 80%; }

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.skeleton-card {
  height: 120px;
  border-radius: var(--radius);
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* === TOOLTIPS === */
.tooltip-trigger {
  position: relative;
  cursor: pointer;
}

.tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-900);
  color: #fff;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  z-index: 500;
}

.tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--gray-900);
}

.tooltip-trigger:hover .tooltip,
.tooltip.visible {
  opacity: 1;
  visibility: visible;
}

/* Interactive tooltip (doesn't vanish when hovered) */
.tooltip-interactive {
  pointer-events: auto;
  padding: 12px 16px;
  white-space: normal;
  min-width: 200px;
}

.tooltip-interactive a {
  color: var(--color-primary-light);
  display: block;
  padding: 4px 0;
}

.tooltip-interactive a:hover {
  color: #fff;
}

/* === DRAG AND DROP === */
.draggable {
  cursor: grab;
  transition: all var(--transition-fast);
}

.draggable:active {
  cursor: grabbing;
}

.dragging {
  opacity: 0.5;
  transform: scale(0.98);
  box-shadow: var(--shadow-lg);
}

.drag-over {
  border: 2px dashed var(--color-primary);
  border-radius: var(--radius);
  background: var(--color-primary-light);
}

.drag-placeholder {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  background: var(--gray-50);
  min-height: 80px;
}

/* duplicate tabs block removed — see primary tabs rules above */

/* === CREDIT CARD FLIP === */
.card-flip-container {
  perspective: 1000px;
}

.card-flip {
  position: relative;
  width: 340px;
  height: 210px;
  transition: transform 0.7s ease;
  transform-style: preserve-3d;
  cursor: pointer;
}

.card-flip.flipped {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 14px;
  overflow: hidden;
}

.card-back {
  transform: rotateY(180deg);
}

.card-visual {
  width: 100%;
  height: 100%;
  padding: 24px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-lg);
  border-radius: 14px;
}

.card-visual-back {
  justify-content: center;
}

.card-chip {
  font-size: 24px;
  letter-spacing: 2px;
  opacity: 0.7;
  margin-bottom: 16px;
}

.card-number {
  font-size: 18px;
  letter-spacing: 3px;
  font-weight: 500;
  font-family: monospace;
  margin-bottom: 16px;
}

.card-info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.card-info-row small {
  font-size: 10px;
  text-transform: uppercase;
  opacity: 0.7;
  display: block;
  margin-bottom: 2px;
}

.card-info-row div {
  font-size: 14px;
  font-weight: 500;
}

.card-type-badge {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  opacity: 0.8;
}

.card-stripe {
  height: 40px;
  background: rgba(0,0,0,0.4);
  margin: 0 -24px 16px;
}

.card-details-back {
  padding: 0 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

.card-details-back .btn-copy {
  margin-left: 8px;
  border-color: rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.8);
  font-size: 11px;
}

.card-details-back .btn-copy:hover {
  border-color: #fff;
  color: #fff;
}

/* === CONTEXT MENU === */
.context-menu {
  position: absolute;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-200);
  min-width: 180px;
  padding: 4px 0;
  z-index: 1500;
  display: none;
}

.context-menu.visible {
  display: block;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--gray-700);
  cursor: pointer;
  transition: background var(--transition-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.context-menu-item:hover {
  background: var(--gray-50);
  color: var(--gray-900);
}

.context-menu-item.danger {
  color: var(--color-danger);
}

.context-menu-item.danger:hover {
  background: var(--color-danger-light);
}

.context-menu-divider {
  height: 1px;
  background: var(--gray-100);
  margin: 4px 0;
}

/* === ANIMATED NUMBER COUNTER === */
.counter-value {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  display: inline-block;
  min-width: 1ch;
}

.counter-animating {
  transition: none;
}

/* === SIGNATURE PAD === */
.signature-pad-wrapper {
  position: relative;
}

.signature-pad {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  min-height: 150px;
  background: #fff;
  cursor: crosshair;
  touch-action: none;
}

.signature-pad:hover {
  border-color: var(--gray-400);
}

.signature-pad.signing {
  border-color: var(--color-primary);
  border-style: solid;
}

.signature-pad-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* === PROGRESS BAR === */
.progress-bar-container {
  width: 100%;
  background: var(--gray-200);
  border-radius: 8px;
  overflow: hidden;
  height: 8px;
}

.progress-bar {
  height: 100%;
  border-radius: 8px;
  background: var(--color-primary);
  transition: width 0.6s ease;
  min-width: 0;
}

.progress-bar.success { background: var(--color-success); }
.progress-bar.warning { background: var(--color-warning); }
.progress-bar.danger  { background: var(--color-danger); }

.progress-bar-label {
  font-size: 12px;
  color: var(--gray-600);
  margin-top: 4px;
  text-align: right;
}

/* Large progress bar variant */
.progress-bar-container.lg {
  height: 16px;
}

/* === ACCORDION === */
.accordion {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}

.accordion-item {
  border-bottom: 1px solid var(--gray-200);
}

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

.accordion-trigger,
.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 20px;
  background: #fff;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-800);
  text-align: left;
  transition: background var(--transition-fast);
}

.accordion-trigger:hover,
.accordion-header:hover {
  background: var(--gray-50);
}

.accordion-trigger::after,
.accordion-header::after {
  content: '\25BC';
  font-size: 10px;
  color: var(--gray-400);
  transition: transform var(--transition-base);
}

.accordion-item.open .accordion-trigger::after,
.accordion-header.active::after {
  transform: rotate(180deg);
}

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}

.accordion-item.open .accordion-panel {
  max-height: 500px;
}

.accordion-panel-inner {
  padding: 0 20px 16px;
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.7;
}

.accordion-content {
  padding: 0 20px 16px;
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.7;
}

.accordion-content ol,
.accordion-content ul {
  padding-left: 20px;
  margin: 0;
}

.accordion-content li {
  margin-bottom: 6px;
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.dropzone-content .text-muted {
  color: var(--gray-400);
  font-size: 13px;
}

.dropzone-content .text-sm {
  font-size: 12px;
}

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

.dropzone-preview img {
  max-width: 100%;
  max-height: 200px;
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.file-dropzone.dragover {
  border-color: var(--color-primary);
  background: var(--color-primary-light, #eff6ff);
}

/* === FILE UPLOAD DROPZONE === */
.file-dropzone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  background: var(--gray-50);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.file-dropzone:hover,
.file-dropzone.drag-hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.file-dropzone .dropzone-icon {
  font-size: 36px;
  margin-bottom: 8px;
  color: var(--gray-400);
}

.file-dropzone .dropzone-text {
  font-size: 14px;
  color: var(--gray-600);
}

.file-dropzone .dropzone-text strong {
  color: var(--color-primary);
}

.file-dropzone .dropzone-hint {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 4px;
}

.file-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  margin-top: 12px;
}

.file-preview img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

.file-preview .file-info {
  flex: 1;
}

.file-preview .file-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-800);
}

.file-preview .file-size {
  font-size: 12px;
  color: var(--gray-500);
}

/* === FLASH HIGHLIGHT === */
.flash-highlight {
  animation: flashHighlight 1.5s ease-out;
}

@keyframes flashHighlight {
  0% { background-color: #fef08a; }
  100% { background-color: transparent; }
}

/* === OTP INPUT === */
.otp-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.otp-inputs input {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  border: 2px solid var(--gray-300);
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.otp-inputs input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* === CUSTOM DROPDOWN (div-based select replacement) === */
.custom-dropdown {
  position: relative;
  width: 100%;
}

.custom-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 14px;
  color: var(--gray-800);
  background: #fff;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.custom-dropdown-trigger:hover {
  border-color: var(--gray-400);
}

.custom-dropdown.open .custom-dropdown-trigger {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.custom-dropdown-trigger .arrow {
  font-size: 10px;
  color: var(--gray-400);
  transition: transform var(--transition-fast);
}

.custom-dropdown.open .custom-dropdown-trigger .arrow {
  transform: rotate(180deg);
}

.custom-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  max-height: 240px;
  overflow-y: auto;
  z-index: 200;
  display: none;
}

.custom-dropdown.open .custom-dropdown-menu {
  display: block;
}

.custom-dropdown-search {
  padding: 8px 12px;
  border-bottom: 1px solid var(--gray-100);
}

.custom-dropdown-search input {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 13px;
}

.custom-dropdown-option {
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
  transition: background var(--transition-fast);
  color: var(--gray-700);
}

.custom-dropdown-option:hover {
  background: var(--gray-50);
}

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

.custom-dropdown-option.hidden {
  display: none;
}

/* === DATE RANGE PICKER === */
.date-range-picker {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  display: none;
  position: absolute;
  z-index: 300;
}

.date-range-picker.visible {
  display: block;
}

.date-range-picker .calendars {
  display: flex;
  gap: 24px;
}

.date-range-picker .calendar {
  width: 260px;
}

.date-range-picker .calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 600;
}

.date-range-picker .calendar-header button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 16px;
  color: var(--gray-600);
}

.date-range-picker .calendar-header button:hover {
  background: var(--gray-100);
}

.date-range-picker .calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  gap: 2px;
}

.date-range-picker .day-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  padding: 6px 0;
}

.date-range-picker .day {
  padding: 6px;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--gray-700);
}

.date-range-picker .day:hover {
  background: var(--gray-100);
}

.date-range-picker .day.today {
  font-weight: 700;
  color: var(--color-primary);
}

.date-range-picker .day.selected {
  background: var(--color-primary);
  color: #fff;
  border-radius: 4px;
}

.date-range-picker .day.in-range {
  background: var(--color-primary-light);
  border-radius: 0;
}

.date-range-picker .day.range-start {
  border-radius: 4px 0 0 4px;
}

.date-range-picker .day.range-end {
  border-radius: 0 4px 4px 0;
}

.date-range-picker .day.other-month {
  color: var(--gray-400);
}

.date-range-picker .day.disabled {
  color: var(--gray-300);
  cursor: not-allowed;
}

/* === KEYBOARD SHORTCUTS OVERLAY === */
.shortcuts-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.shortcuts-overlay.active {
  opacity: 1;
  visibility: visible;
}

.shortcuts-panel {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-xl);
}

.shortcuts-panel h2 {
  font-size: 18px;
  margin-bottom: 20px;
}

.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
}

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

.shortcut-keys {
  display: flex;
  gap: 4px;
}

.shortcut-keys kbd {
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  font-family: monospace;
  color: var(--gray-700);
  box-shadow: 0 1px 0 var(--gray-300);
}

.shortcut-label {
  font-size: 14px;
  color: var(--gray-600);
}

/* === IFRAME CONTAINER === */
.iframe-container {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}

.iframe-container iframe {
  width: 100%;
  min-height: 500px;
  border: none;
}

/* === EDITABLE CELL === */
td[contenteditable] {
  cursor: text;
  position: relative;
  transition: background var(--transition-fast);
}

td[contenteditable]:hover {
  background: var(--color-primary-light);
}

td[contenteditable]:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
  background: #fff;
}

/* === COPY BUTTON === */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  color: var(--gray-500);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.copy-btn:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  color: var(--gray-700);
}

.copy-btn.copied {
  background: var(--color-success-light);
  border-color: var(--color-success);
  color: var(--color-success);
}

/* === LOADING SPINNER === */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* === PAGINATION === */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 16px;
  justify-content: center;
}

.pagination button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--gray-200);
  background: #fff;
  border-radius: 6px;
  font-size: 14px;
  color: var(--gray-700);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination button:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.pagination button.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  color: var(--gray-300);
}

.empty-state h3 {
  font-size: 18px;
  color: var(--gray-700);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 20px;
}

/* === INFINITE SCROLL SENTINEL === */
.scroll-sentinel {
  height: 1px;
  width: 100%;
}

.loading-more {
  text-align: center;
  padding: 16px;
  color: var(--gray-500);
  font-size: 14px;
}

/* === PRINT STYLES === */
@media print {
  .sidebar,
  .top-header,
  .toast-container,
  .context-menu,
  .modal-overlay,
  .notification-btn,
  .btn,
  .shortcuts-overlay {
    display: none !important;
  }

  .main-wrapper {
    margin-left: 0;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
    min-width: auto;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }

  table {
    font-size: 10pt;
  }

  thead th {
    background: #eee !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .amount-credit { color: #000 !important; }
  .amount-debit { color: #000 !important; }

  a {
    color: #000;
    text-decoration: underline;
  }

  .badge {
    border: 1px solid #999;
    background: none !important;
    color: #000 !important;
  }
}

/* === WIDGET GRID (Dashboard) === */
.widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.widget {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: all var(--transition-fast);
}

.widget-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: grab;
}

.widget-header:active {
  cursor: grabbing;
}

.widget-header .drag-handle {
  color: var(--gray-400);
  font-size: 14px;
  cursor: grab;
}

.widget-body {
  padding: 20px;
}

/* === MISCELLANEOUS HELPERS === */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--gray-500); }
.text-sm { font-size: 13px; }
.text-danger { color: var(--color-danger); }
.text-success { color: var(--color-success); }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.text-xs { font-size: 12px; }
.text-lg { font-size: 18px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hidden { display: none !important; }
.visible { visibility: visible; }
.invisible { visibility: hidden; }

/* === LOGIN PAGE === */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1f36 0%, #2563eb 100%);
  display: flex;
  flex-direction: column;
}

.login-page .demo-banner {
  flex-shrink: 0;
}

.login-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-xl);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo .logo-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.login-logo h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-900);
  margin-top: 12px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--gray-500);
  margin-top: 4px;
}

/* === NOTIFICATION DROPDOWN (non-shadow-DOM fallback) === */
.notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-200);
  z-index: 500;
  display: none;
}

.notification-dropdown.visible {
  display: block;
}

.notification-dropdown .dropdown-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notification-dropdown .dropdown-header h4 {
  font-size: 14px;
  font-weight: 600;
}

.notification-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-50);
  display: flex;
  gap: 12px;
  transition: background var(--transition-fast);
  cursor: pointer;
}

.notification-item:hover {
  background: var(--gray-50);
}

.notification-item.unread {
  background: var(--color-primary-light);
}

.notification-item .notif-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.notification-item .notif-content {
  flex: 1;
  min-width: 0;
}

.notification-item .notif-text {
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.4;
}

.notification-item .notif-time {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 2px;
}

.notification-item .notif-dismiss {
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 2px;
  font-size: 14px;
  align-self: flex-start;
}

.notification-item .notif-dismiss:hover {
  color: var(--color-danger);
}

/* === CHART PLACEHOLDER === */
.chart-container {
  position: relative;
  min-height: 200px;
}

/* === ALERT BANNERS === */
.alert {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.alert-info {
  background: var(--color-info-light);
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.alert-success {
  background: var(--color-success-light);
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.alert-warning {
  background: var(--color-warning-light);
  color: #92400e;
  border: 1px solid #fcd34d;
}

.alert-danger,
.alert-error {
  background: var(--color-danger-light);
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* === DIVIDER === */
.divider {
  height: 1px;
  background: var(--gray-200);
  margin: 24px 0;
}

/* === AVATAR GROUP === */
.avatar-group {
  display: flex;
}

.avatar-group .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-left: -8px;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}

.avatar-group .avatar:first-child {
  margin-left: 0;
}

.avatar-group .avatar-more {
  background: var(--gray-200);
  color: var(--gray-600);
}
