/* ============================================================
   HSBC Online Banking – Main Stylesheet
   HSBC Brand: Red #DB0011, Dark #1A1A1A, White #FFFFFF
   ============================================================ */

/* ---- CSS Variables ---- */
:root {
  --red: #DB0011;
  --red-dark: #a80009;
  --red-light: #f9e0e2;
  --dark: #1a1a1a;
  --gray-900: #1f2937;
  --gray-800: #2d3748;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --green: #059669;
  --green-light: #d1fae5;
  --blue: #1d4ed8;
  --blue-light: #dbeafe;
  --orange: #d97706;
  --orange-light: #fef3c7;
  --white: #ffffff;

  --sidebar-w: 260px;
  --topbar-h: 64px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.12), 0 8px 32px rgba(0,0,0,.08);
  --transition: .2s ease;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--gray-900); background: var(--gray-50); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; cursor: pointer; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }
input, select, textarea { font-family: var(--font); }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* ============================================================
   HSBC LOGO
   ============================================================ */
.hsbc-hex-grid {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  width: 32px;
  height: 32px;
}
.hsbc-hex-grid.small { width: 26px; height: 26px; gap: 1.5px; }
.hx {
  background: var(--red);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.hx.tr, .hx.bl { background: var(--red); opacity: .55; }
.hsbc-wordmark { font-size: 1.5rem; font-weight: 800; color: var(--red); letter-spacing: -.5px; }
.hsbc-wordmark.sm { font-size: 1.1rem; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
body.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f0f0f 0%, #1f0507 40%, #2a0009 70%, #1a1a1a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Login screen container – fills the body */
.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  position: relative;
}
.login-screen[hidden] { display: none !important; }

.login-bg {
  position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0;
}
.login-bg-shape {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(219,0,17,.2) 0%, transparent 70%);
  animation: bgPulse 8s ease-in-out infinite alternate;
}
.login-bg-shape.s1 { width: 500px; height: 500px; top: -100px; left: -100px; }
.login-bg-shape.s2 { width: 400px; height: 400px; bottom: -80px; right: -80px; animation-delay: -3s; }
.login-bg-shape.s3 { width: 300px; height: 300px; top: 50%; left: 50%; transform: translate(-50%,-50%); animation-delay: -5s; }

@keyframes bgPulse {
  from { opacity: .3; transform: scale(1); }
  to   { opacity: .7; transform: scale(1.1); }
}

.login-wrap {
  position: relative; z-index: 1;
  width: 100%; max-width: 460px;
  padding: 24px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 24px;
}

.login-logo-area {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.hsbc-logo {
  display: flex; align-items: center; gap: 10px;
}
.login-tagline { color: rgba(255,255,255,.7); font-size: .9rem; letter-spacing: .3px; }

.login-card {
  width: 100%;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 32px 28px;
  box-shadow: var(--shadow-md);
}
.login-card-title { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); margin-bottom: 4px; }
.login-card-sub { font-size: .85rem; color: var(--gray-500); margin-bottom: 24px; }

/* Alerts */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  font-size: .875rem; margin-bottom: 16px;
}
.alert-error { background: var(--red-light); color: var(--red-dark); border: 1px solid #f5c6cb; }
.alert-success { background: var(--green-light); color: var(--green); border: 1px solid #a7f3d0; }
.alert-info { background: var(--blue-light); color: var(--blue); border: 1px solid #bfdbfe; }
.alert-warning { background: var(--orange-light); color: var(--orange); border: 1px solid #fde68a; }

/* Form Fields */
.field-group { margin-bottom: 16px; }
.field-group label { display: block; font-size: .8rem; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .4px; }
.field-wrap { position: relative; display: flex; align-items: center; }
.field-icon { position: absolute; left: 12px; color: var(--gray-400); font-size: .9rem; pointer-events: none; }
.field-wrap input, .field-wrap select {
  width: 100%; height: 46px;
  padding: 0 42px 0 38px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: .9rem; color: var(--gray-900);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}
.field-wrap input:focus, .field-wrap select:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(219,0,17,.12);
}
.field-wrap input.error, .field-wrap select.error { border-color: var(--red); }

.pw-toggle {
  position: absolute; right: 10px; color: var(--gray-400); font-size: .9rem;
  transition: color var(--transition);
}
.pw-toggle:hover { color: var(--red); }

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

/* Checkbox */
.cb-label { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--gray-600); cursor: pointer; user-select: none; }
.cb-label input[type="checkbox"] { display: none; }
.cb-custom {
  width: 16px; height: 16px; border-radius: 4px;
  border: 1.5px solid var(--gray-300);
  background: var(--white); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), border-color var(--transition);
}
.cb-label input:checked + .cb-custom {
  background: var(--red); border-color: var(--red);
}
.cb-label input:checked + .cb-custom::after {
  content: ''; display: block;
  width: 4px; height: 8px;
  border: 2px solid white; border-top: none; border-left: none;
  transform: rotate(45deg) translateY(-1px);
}

.link-subtle { font-size: .8rem; color: var(--red); font-weight: 500; }
.link-subtle:hover { text-decoration: underline; }

/* Buttons */
.btn-hsbc {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px;
  background: var(--red); color: var(--white);
  border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 600;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn-hsbc:hover { background: var(--red-dark); box-shadow: 0 4px 12px rgba(219,0,17,.3); }
.btn-hsbc:active { transform: translateY(1px); }
.btn-hsbc:disabled { opacity: .55; cursor: not-allowed; }
.btn-full { width: 100%; }

.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px;
  border: 1.5px solid var(--gray-300); border-radius: var(--radius-sm);
  color: var(--gray-700); font-size: .875rem; font-weight: 500;
  transition: all var(--transition);
}
.btn-outline:hover { border-color: var(--red); color: var(--red); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--red); font-size: .8rem; font-weight: 600;
  transition: background var(--transition);
}
.btn-ghost:hover { background: var(--red-light); }

.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  color: var(--gray-600); font-size: .85rem;
  transition: background var(--transition), color var(--transition);
}
.btn-icon:hover { background: var(--gray-100); color: var(--red); }
.btn-icon.danger:hover { background: var(--red-light); color: var(--red); }

/* Demo hint */
.demo-hint {
  margin-top: 20px; padding: 14px 16px;
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm); cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.demo-hint:hover { border-color: var(--red); background: var(--red-light); }
.demo-hint-header { font-size: .78rem; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.demo-row { display: flex; justify-content: space-between; font-size: .85rem; color: var(--gray-600); margin-bottom: 3px; }
.demo-row strong { color: var(--gray-900); font-family: monospace; }
.demo-click-hint { font-size: .73rem; color: var(--gray-400); text-align: center; margin-top: 8px; }

.login-footer-links {
  display: flex; gap: 20px; flex-wrap: wrap; justify-content: center;
  font-size: .78rem; color: rgba(255,255,255,.5);
}
.login-footer-links a { color: rgba(255,255,255,.5); transition: color var(--transition); }
.login-footer-links a:hover { color: white; }
.admin-link { color: rgba(255,255,255,.35) !important; }

/* ============================================================
   APP SHELL
   ============================================================ */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
/* app-shell is hidden until login – [hidden] takes priority */
.app-shell[hidden] { display: none !important; }

/* TOPBAR */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--topbar-h);
  background: var(--dark);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-logo { display: flex; align-items: center; gap: 8px; }
.topbar-label { font-size: .8rem; color: rgba(255,255,255,.5); font-weight: 400; display: none; }
@media (min-width: 640px) { .topbar-label { display: block; } }

.menu-btn {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  color: white; font-size: 1rem;
  transition: background var(--transition);
}
.menu-btn:hover { background: rgba(255,255,255,.1); }

.topbar-right { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  color: rgba(255,255,255,.8); font-size: 1rem;
  transition: background var(--transition);
}
.icon-btn:hover { background: rgba(255,255,255,.1); color: white; }
.notif-badge {
  position: absolute; top: 6px; right: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--red); color: white;
  font-size: .6rem; font-weight: 700; line-height: 14px; text-align: center;
}

.user-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition);
  position: relative;
}
.user-pill:hover { background: rgba(255,255,255,.1); }

.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--red); color: white;
  font-size: .8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-avatar.lg { width: 42px; height: 42px; font-size: 1rem; }

.user-pill-name { font-size: .85rem; font-weight: 500; color: rgba(255,255,255,.9); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-pill-arrow { color: rgba(255,255,255,.6); font-size: .65rem; transition: transform var(--transition); }

/* User Dropdown */
.user-dropdown {
  position: absolute; top: calc(var(--topbar-h) + 4px); right: 12px;
  width: 230px;
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
  z-index: 300;
  animation: fadeDown .15s ease;
}
@keyframes fadeDown { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }

.udrop-header { padding: 16px; display: flex; align-items: center; gap: 12px; }
.udrop-name { font-weight: 600; font-size: .9rem; color: var(--gray-900); }
.udrop-email { font-size: .78rem; color: var(--gray-500); }
.user-dropdown hr { border: none; border-top: 1px solid var(--gray-200); margin: 4px 0; }
.udrop-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; font-size: .875rem; color: var(--gray-700);
  transition: background var(--transition), color var(--transition);
}
.udrop-item:hover { background: var(--gray-50); color: var(--red); }
.udrop-item i { width: 16px; text-align: center; color: var(--gray-400); }
.udrop-item:hover i { color: var(--red); }
.udrop-item.logout:hover { background: var(--red-light); color: var(--red); }

/* APP BODY */
.app-body {
  margin-top: var(--topbar-h);
  display: flex; min-height: calc(100vh - var(--topbar-h));
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  position: fixed;
  top: var(--topbar-h); bottom: 0; left: 0;
  z-index: 150;
  transition: transform var(--transition);
  display: flex; flex-direction: column;
}
.sidebar.collapsed { transform: translateX(calc(-1 * var(--sidebar-w))); }
.sidebar-inner { display: flex; flex-direction: column; height: 100%; overflow-y: auto; }
.sidebar-nav { flex: 1; padding: 16px 12px; }

.snav-group { margin-bottom: 8px; }
.snav-label {
  display: block; padding: 6px 8px;
  font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .8px;
  color: var(--gray-400);
}
.snav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 500; color: var(--gray-600);
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.snav-item i { width: 18px; text-align: center; color: var(--gray-400); flex-shrink: 0; transition: color var(--transition); }
.snav-item span:first-of-type { flex: 1; }
.snav-item:hover { background: var(--gray-50); color: var(--gray-900); }
.snav-item:hover i { color: var(--gray-700); }
.snav-item.active { background: var(--red-light); color: var(--red); font-weight: 600; }
.snav-item.active i { color: var(--red); }

.snav-balance {
  font-size: .72rem; font-weight: 600; color: var(--gray-500);
  background: var(--gray-100); padding: 2px 6px; border-radius: 999px;
  white-space: nowrap;
}
.snav-item.active .snav-balance { background: rgba(219,0,17,.12); color: var(--red); }

.sidebar-footer {
  padding: 12px; border-top: 1px solid var(--gray-200);
}
.sidebar-logout-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 10px;
  border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 500; color: var(--gray-500);
  transition: background var(--transition), color var(--transition);
}
.sidebar-logout-btn:hover { background: var(--red-light); color: var(--red); }
.sidebar-logout-btn i { width: 18px; text-align: center; }

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 140;
}
.sidebar-overlay.visible { display: block; }

/* MAIN CONTENT */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 28px 28px 80px;
  transition: margin-left var(--transition);
  min-width: 0;
}
.main-content.full-width { margin-left: 0; }

/* ============================================================
   CARDS & LAYOUT
   ============================================================ */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
}
.card-header h3 { font-size: .95rem; font-weight: 600; color: var(--gray-900); display: flex; align-items: center; gap: 8px; }
.card-header h3 i { color: var(--red); }
.card-body { padding: 20px; }

.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); }
.page-header p { font-size: .875rem; color: var(--gray-500); margin-top: 4px; }

.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--gray-500); margin-bottom: 16px; }
.breadcrumb a { color: var(--red); cursor: pointer; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--gray-300); }

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.flex-row { display: flex; gap: 16px; align-items: flex-start; }
.flex-1 { flex: 1; }
.gap-16 { gap: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-16 { margin-top: 16px; }

/* Stat cards */
.stat-card {
  background: var(--white); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  display: flex; flex-direction: column; gap: 6px;
}
.stat-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--gray-500); }
.stat-value { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); }
.stat-sub { font-size: .78rem; color: var(--gray-500); }
.stat-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 600; }
.stat-badge.up { background: var(--green-light); color: var(--green); }
.stat-badge.down { background: var(--red-light); color: var(--red); }

/* Account cards (dashboard) */
.account-cards-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 24px; }

.acct-card {
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  color: white;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  min-height: 160px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.acct-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.acct-card::before {
  content: ''; position: absolute; top: -30%; right: -10%;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255,255,255,.07);
}
.acct-card::after {
  content: ''; position: absolute; top: 10%; right: 20%;
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255,255,255,.05);
}
.acct-card.giro { background: linear-gradient(135deg, #1e1e1e 0%, #3a0009 100%); }
.acct-card.tagesgeld { background: linear-gradient(135deg, #064e3b 0%, #065f46 100%); }
.acct-card.festgeld { background: linear-gradient(135deg, #1e3a5f 0%, #1a4078 100%); }

.acct-card-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.acct-card-type { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; opacity: .75; margin-bottom: 4px; }
.acct-card-name { font-size: 1rem; font-weight: 600; }
.acct-card-icon { font-size: 1.6rem; opacity: .35; }
.acct-card-bottom { position: relative; z-index: 1; }
.acct-card-iban { font-size: .72rem; opacity: .6; font-family: monospace; margin-bottom: 2px; }
.acct-card-balance { font-size: 1.5rem; font-weight: 700; }
.acct-card-meta { display: flex; gap: 12px; align-items: center; margin-top: 4px; font-size: .75rem; opacity: .65; }

/* Quick actions */
.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.qa-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: var(--white); border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-200);
  font-size: .85rem; font-weight: 500; color: var(--gray-700);
  box-shadow: var(--shadow);
  transition: all var(--transition);
}
.qa-btn:hover { border-color: var(--red); color: var(--red); background: var(--red-light); box-shadow: none; }
.qa-btn i { color: var(--red); font-size: .85rem; }

/* ============================================================
   ACCOUNT DETAIL PAGE
   ============================================================ */
.acct-banner {
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  color: white;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.acct-banner::before {
  content: ''; position: absolute;
  width: 300px; height: 300px; border-radius: 50%;
  top: -80px; right: -60px;
  background: rgba(255,255,255,.06);
}
.acct-banner::after {
  content: ''; position: absolute;
  width: 200px; height: 200px; border-radius: 50%;
  bottom: -40px; right: 120px;
  background: rgba(255,255,255,.04);
}
.acct-banner.giro { background: linear-gradient(135deg, #1e1e1e, #3a0009); }
.acct-banner.tagesgeld { background: linear-gradient(135deg, #064e3b, #065f46); }
.acct-banner.festgeld { background: linear-gradient(135deg, #1e3a5f, #1a4078); }

.acct-banner-inner { position: relative; z-index: 1; }
.acct-banner-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .5px; opacity: .7; margin-bottom: 4px; }
.acct-banner-balance { font-size: 2.2rem; font-weight: 700; margin-bottom: 6px; }
.acct-banner-iban { font-family: monospace; font-size: .8rem; opacity: .65; margin-bottom: 16px; }
.acct-banner-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.acct-banner-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.3);
  border-radius: var(--radius-sm);
  color: white; font-size: .85rem; font-weight: 500;
  transition: background var(--transition);
}
.acct-banner-btn:hover { background: rgba(255,255,255,.25); }

.acct-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.acct-stat {
  background: var(--white); border-radius: var(--radius-sm);
  padding: 14px 16px;
  border: 1px solid var(--gray-200);
}
.acct-stat-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .4px; color: var(--gray-500); margin-bottom: 4px; }
.acct-stat-value { font-size: 1rem; font-weight: 600; color: var(--gray-900); }

/* ============================================================
   TRANSACTIONS TABLE
   ============================================================ */
.tx-filters {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-bottom: 16px;
}
.tx-search-wrap {
  position: relative; flex: 1; min-width: 200px;
}
.tx-search-wrap i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--gray-400); font-size: .85rem; }
.tx-search-wrap input {
  width: 100%; height: 38px; padding: 0 12px 0 32px;
  border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: .875rem; color: var(--gray-900); background: var(--white);
  transition: border-color var(--transition);
}
.tx-search-wrap input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 2px rgba(219,0,17,.1); }

.filter-select {
  height: 38px; padding: 0 28px 0 10px;
  border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: .85rem; color: var(--gray-700); background: var(--white);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
  cursor: pointer; transition: border-color var(--transition);
}
.filter-select:focus { outline: none; border-color: var(--red); }

.tx-table-wrap { overflow-x: auto; }
.tx-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.tx-table th {
  padding: 10px 12px;
  text-align: left; white-space: nowrap;
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  color: var(--gray-500); background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}
.tx-table td { padding: 12px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.tx-table tr:last-child td { border-bottom: none; }
.tx-table tr:hover td { background: var(--gray-50); }

.tx-icon {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: .75rem;
}
.tx-icon.credit { background: var(--green-light); color: var(--green); }
.tx-icon.debit  { background: var(--red-light);   color: var(--red);   }

.tx-party { font-weight: 500; color: var(--gray-900); }
.tx-ref   { font-size: .78rem; color: var(--gray-500); margin-top: 1px; }
.tx-iban  { font-size: .75rem; color: var(--gray-400); font-family: monospace; }

.cat-badge {
  display: inline-block; padding: 2px 8px;
  border-radius: 999px; font-size: .7rem; font-weight: 600;
  background: var(--gray-100); color: var(--gray-600);
  white-space: nowrap;
}
.cat-badge.Gehalt { background: var(--green-light); color: var(--green); }
.cat-badge.Miete { background: #fce7f3; color: #be185d; }
.cat-badge.Lebensmittel { background: #fef3c7; color: #92400e; }
.cat-badge.Versicherung { background: var(--blue-light); color: var(--blue); }
.cat-badge.Restaurant { background: #fee2e2; color: #b91c1c; }
.cat-badge.Zinsen { background: var(--green-light); color: var(--green); }

.tx-amount { font-weight: 600; text-align: right; white-space: nowrap; }
.tx-amount.credit { color: var(--green); }
.tx-amount.debit  { color: var(--red); }
.tx-date { color: var(--gray-500); white-space: nowrap; font-size: .82rem; }

/* ============================================================
   TRANSFER PAGE
   ============================================================ */
.transfer-layout { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: flex-start; }
.transfer-form-card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--gray-200); box-shadow: var(--shadow); }
.transfer-section-title { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--gray-500); margin-bottom: 12px; }

.iban-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: flex-end; }
.iban-check-btn {
  height: 46px; padding: 0 14px;
  border-radius: var(--radius-sm);
  background: var(--gray-100); color: var(--gray-700);
  font-size: .85rem; font-weight: 500; border: 1.5px solid var(--gray-200);
  transition: all var(--transition);
}
.iban-check-btn:hover { background: var(--red-light); color: var(--red); border-color: var(--red); }

.iban-result {
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: .82rem; background: var(--green-light); color: var(--green);
  border: 1px solid #a7f3d0; margin-top: 8px;
}
.iban-result.error { background: var(--red-light); color: var(--red); border-color: #f5c6cb; }

.amount-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: flex-end; }
.currency-badge {
  display: flex; align-items: center; justify-content: center;
  height: 46px; padding: 0 14px;
  background: var(--gray-100); border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 600; color: var(--gray-600);
}

.amount-quick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.amount-quick-btn {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--gray-200); font-size: .78rem; font-weight: 500; color: var(--gray-600);
  transition: all var(--transition);
}
.amount-quick-btn:hover { border-color: var(--red); color: var(--red); background: var(--red-light); }

.field-note { font-size: .75rem; color: var(--gray-500); margin-top: 4px; }

/* ============================================================
   STANDING ORDERS
   ============================================================ */
.so-card {
  background: var(--white); border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200); padding: 16px;
  display: flex; align-items: center; gap: 14px;
  transition: box-shadow var(--transition);
}
.so-card:hover { box-shadow: var(--shadow); }
.so-icon {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--blue-light); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.so-info { flex: 1; min-width: 0; }
.so-name { font-weight: 600; font-size: .9rem; color: var(--gray-900); }
.so-iban { font-size: .75rem; color: var(--gray-500); font-family: monospace; }
.so-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.so-tag { font-size: .7rem; padding: 1px 7px; border-radius: 999px; font-weight: 600; }
.so-tag.active { background: var(--green-light); color: var(--green); }
.so-tag.paused { background: var(--orange-light); color: var(--orange); }
.so-amount { font-size: 1rem; font-weight: 700; color: var(--gray-900); text-align: right; flex-shrink: 0; }
.so-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* ============================================================
   CARDS PAGE
   ============================================================ */
.bank-card {
  border-radius: 16px;
  padding: 24px;
  color: white;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1.58;
  display: flex; flex-direction: column; justify-content: space-between;
}
.bank-card.debit { background: linear-gradient(135deg, #1e1e1e 0%, #3a0009 50%, #2d0008 100%); }
.bank-card.credit { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); }
.bank-card::before {
  content: ''; position: absolute;
  width: 250px; height: 250px; border-radius: 50%;
  top: -80px; right: -40px;
  background: rgba(255,255,255,.05);
}
.bank-card::after {
  content: ''; position: absolute;
  width: 180px; height: 180px; border-radius: 50%;
  bottom: -60px; left: 20px;
  background: rgba(255,255,255,.03);
}
.bank-card-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.bank-card-bank { font-size: .85rem; font-weight: 700; opacity: .8; }
.bank-card-chip {
  width: 36px; height: 28px; background: linear-gradient(135deg, #d4a017, #c8a00d);
  border-radius: 4px;
}
.bank-card-number { font-family: monospace; font-size: 1rem; letter-spacing: 2px; position: relative; z-index: 1; }
.bank-card-bottom { display: flex; align-items: flex-end; justify-content: space-between; position: relative; z-index: 1; }
.bank-card-holder { font-size: .75rem; opacity: .6; margin-bottom: 2px; }
.bank-card-name { font-size: .9rem; font-weight: 600; }
.bank-card-exp-label { font-size: .65rem; opacity: .5; }
.bank-card-exp { font-size: .85rem; font-weight: 600; }
.bank-card-network { font-size: 1.6rem; opacity: .5; }

.card-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--gray-100); }
.card-toggle-row:last-child { border-bottom: none; }
.card-toggle-label { font-size: .875rem; color: var(--gray-700); }
.card-toggle-sub { font-size: .75rem; color: var(--gray-500); }

.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { display: none; }
.toggle-track {
  position: absolute; inset: 0; border-radius: 999px;
  background: var(--gray-300); cursor: pointer;
  transition: background var(--transition);
}
.toggle-switch input:checked + .toggle-track { background: var(--green); }
.toggle-track::after {
  content: ''; position: absolute;
  width: 18px; height: 18px; border-radius: 50%;
  top: 3px; left: 3px; background: white;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle-switch input:checked + .toggle-track::after { transform: translateX(20px); }

/* ============================================================
   FESTGELD PAGE
   ============================================================ */
.festgeld-progress-bar {
  height: 8px; background: var(--gray-200); border-radius: 4px; overflow: hidden;
}
.festgeld-progress-fill { height: 100%; background: linear-gradient(90deg, var(--red), var(--orange)); border-radius: 4px; }

/* ============================================================
   DOCUMENTS PAGE
   ============================================================ */
.doc-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--transition);
}
.doc-item:last-child { border-bottom: none; }
.doc-item:hover { background: var(--gray-50); }
.doc-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--red-light); color: var(--red); display: flex; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0; }
.doc-info { flex: 1; }
.doc-name { font-size: .875rem; font-weight: 500; color: var(--gray-900); }
.doc-meta { font-size: .75rem; color: var(--gray-500); }
.doc-size { font-size: .75rem; color: var(--gray-400); white-space: nowrap; }

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.profile-avatar-section {
  display: flex; align-items: center; gap: 20px;
  padding: 24px; background: var(--white);
  border-radius: var(--radius); border: 1px solid var(--gray-200);
  margin-bottom: 20px; box-shadow: var(--shadow);
}
.profile-avatar-big {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--red); color: white;
  font-size: 1.6rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.profile-name { font-size: 1.1rem; font-weight: 700; color: var(--gray-900); }
.profile-email { font-size: .85rem; color: var(--gray-500); }
.profile-since { font-size: .78rem; color: var(--gray-400); }

.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.info-item { }
.info-item-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .4px; color: var(--gray-500); margin-bottom: 4px; font-weight: 600; }
.info-item-value { font-size: .9rem; color: var(--gray-900); font-weight: 500; }

/* ============================================================
   SECURITY PAGE
   ============================================================ */
.security-status-card {
  display: flex; align-items: center; gap: 16px;
  padding: 20px; border-radius: var(--radius);
  background: var(--green-light); border: 1px solid #a7f3d0;
  margin-bottom: 20px;
}
.security-status-icon { font-size: 2rem; color: var(--green); }
.security-status-title { font-size: 1rem; font-weight: 700; color: var(--green); }
.security-status-sub { font-size: .82rem; color: #065f46; }

.security-item {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 0; border-bottom: 1px solid var(--gray-100);
}
.security-item:last-child { border-bottom: none; }
.sec-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0; }
.sec-icon.ok { background: var(--green-light); color: var(--green); }
.sec-icon.warn { background: var(--orange-light); color: var(--orange); }
.sec-title { font-size: .875rem; font-weight: 600; color: var(--gray-900); }
.sec-sub { font-size: .78rem; color: var(--gray-500); }
.sec-actions { margin-left: auto; flex-shrink: 0; }

/* ============================================================
   NOTIFICATIONS
   ============================================================ */
.notif-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px; border-bottom: 1px solid var(--gray-100);
  transition: background var(--transition);
}
.notif-item.unread { background: #fff9f9; }
.notif-item:hover { background: var(--gray-50); }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-top: 6px; flex-shrink: 0; }
.notif-dot.read { background: var(--gray-300); }
.notif-text { font-size: .875rem; color: var(--gray-700); line-height: 1.4; }
.notif-time { font-size: .75rem; color: var(--gray-400); margin-top: 3px; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.5);
  display: flex !important;
  align-items: center; justify-content: center;
  padding: 16px;
  animation: fadeIn .15s ease;
}
.modal-backdrop[hidden] { display: none !important; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

.modal {
  background: var(--white); border-radius: var(--radius-lg);
  width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-md);
  animation: slideUp .2s ease;
}
.modal.modal-lg { max-width: 600px; }
@keyframes slideUp { from { transform:translateY(20px); opacity:0; } to { transform:translateY(0); opacity:1; } }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--gray-200);
}
.modal-header h3 { font-size: 1rem; font-weight: 700; color: var(--gray-900); display: flex; align-items: center; gap: 8px; }
.modal-header h3 i { color: var(--red); }
.modal-close-btn { font-size: 1.3rem; color: var(--gray-400); transition: color var(--transition); }
.modal-close-btn:hover { color: var(--gray-900); }

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

/* Confirm modal details */
.confirm-detail {
  background: var(--gray-50); border-radius: var(--radius-sm);
  padding: 16px; margin-bottom: 16px;
}
.confirm-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: .875rem; }
.confirm-row:not(:last-child) { border-bottom: 1px solid var(--gray-200); }
.confirm-row-label { color: var(--gray-500); }
.confirm-row-value { font-weight: 600; color: var(--gray-900); }
.confirm-row-value.amount { color: var(--red); font-size: 1.1rem; }
.confirm-warning { padding: 10px 12px; background: var(--orange-light); border-radius: var(--radius-sm); color: var(--orange); font-size: .82rem; display: flex; gap: 8px; align-items: flex-start; }

/* ============================================================
   TOAST
   ============================================================ */
#toast-container {
  position: fixed; bottom: 80px; right: 16px;
  z-index: 1000;
  display: flex; flex-direction: column; gap: 8px;
  max-width: 340px;
}
@media (min-width: 768px) { #toast-container { bottom: 16px; } }

.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: var(--white); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--red);
  animation: toastIn .25s ease;
  max-width: 340px;
  font-size: .875rem;
}
@keyframes toastIn { from { transform: translateX(100%); opacity:0; } to { transform:translateX(0); opacity:1; } }
.toast.success { border-color: var(--green); }
.toast.error   { border-color: var(--red); }
.toast.warning { border-color: var(--orange); }
.toast.info    { border-color: var(--blue); }
.toast-icon { font-size: 1rem; flex-shrink: 0; }
.toast.success .toast-icon { color: var(--green); }
.toast.error   .toast-icon { color: var(--red); }
.toast.warning .toast-icon { color: var(--orange); }
.toast.info    .toast-icon { color: var(--blue); }
.toast-text { flex: 1; color: var(--gray-700); }
.toast-close { color: var(--gray-400); cursor: pointer; flex-shrink: 0; }
.toast-close:hover { color: var(--gray-700); }

/* ============================================================
   MOBILE BOTTOM NAV
   ============================================================ */
.mobile-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 120;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  display: none; /* Hidden by default – shown via JS on mobile */
  align-items: stretch;
  box-shadow: 0 -2px 8px rgba(0,0,0,.08);
  height: 60px;
}
.mbn-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: .65rem; font-weight: 500; color: var(--gray-500);
  transition: color var(--transition);
}
.mbn-btn i { font-size: 1.1rem; }
.mbn-btn.active { color: var(--red); }
.mbn-btn.mbn-center {
  background: var(--red); color: white; border-radius: 16px 16px 0 0;
  margin: 0 8px; padding: 0 12px;
}
.mbn-btn.mbn-center i { font-size: 1.2rem; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center; padding: 40px 20px;
  color: var(--gray-500);
}
.empty-state i { font-size: 2.5rem; color: var(--gray-300); margin-bottom: 12px; display: block; }
.empty-state p { font-size: .9rem; }

/* ============================================================
   CHART
   ============================================================ */
.chart-wrap { position: relative; }

/* ============================================================
   UTILITY
   ============================================================ */
.text-red { color: var(--red); }
.text-green { color: var(--green); }
.text-muted { color: var(--gray-500); }
.text-sm { font-size: .82rem; }
.font-mono { font-family: monospace; }
.divider { border: none; border-top: 1px solid var(--gray-200); margin: 16px 0; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 600; }
.tag.green { background: var(--green-light); color: var(--green); }
.tag.red { background: var(--red-light); color: var(--red); }
.tag.blue { background: var(--blue-light); color: var(--blue); }
.tag.orange { background: var(--orange-light); color: var(--orange); }

/* ============================================================
   DASHBOARD BOTTOM GRID (responsive)
   ============================================================ */
.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: flex-start;
}
.dashboard-tx-col { min-width: 0; }
.dashboard-side-col { display: flex; flex-direction: column; gap: 16px; }

/* ============================================================
   RESPONSIVE – TABLET (max 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .transfer-layout { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-side-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

/* ============================================================
   RESPONSIVE – MOBILE (max 768px)
   ============================================================ */
@media (max-width: 768px) {
  :root { --sidebar-w: 280px; }

  /* Sidebar: off-screen by default on mobile */
  .sidebar {
    transform: translateX(calc(-1 * var(--sidebar-w)));
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,.15);
  }

  /* Main content: no left margin on mobile */
  .main-content {
    margin-left: 0 !important;
    padding: 16px 14px 80px;
  }

  /* Mobile bottom nav: visible on mobile */
  .mobile-bottom-nav { display: flex !important; }

  .topbar-label { display: none; }
  .user-pill-name { max-width: 80px; }
  .user-dropdown { right: 8px; width: 220px; }

  /* Grids: single column on mobile */
  .account-cards-row { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  /* Dashboard bottom: single column */
  .dashboard-bottom-grid { grid-template-columns: 1fr; }
  .dashboard-side-col { display: flex; flex-direction: column; gap: 16px; }

  /* Account banner */
  .acct-banner-balance { font-size: 1.6rem; }
  .acct-banner { padding: 20px 16px; }
  .acct-banner-actions { flex-wrap: wrap; gap: 8px; }
  .acct-banner-btn { font-size: .8rem; padding: 7px 12px; }

  /* Cards */
  .card-body { padding: 14px; }
  .card-header { padding: 12px 14px; }

  /* Transaction table: hide IBAN column on mobile */
  .tx-table th:nth-child(3),
  .tx-table td:nth-child(3) { display: none; }

  /* Page header */
  .page-header h1 { font-size: 1.25rem; }
  .page-header { margin-bottom: 16px; }

  /* Quick actions */
  .quick-actions { gap: 8px; }
  .qa-btn { font-size: .78rem; padding: 8px 10px; }

  /* Modals */
  .modal { border-radius: var(--radius); max-width: 100%; margin: 0; }
  .modal-body { padding: 16px; }
  .modal-header { padding: 14px 16px; }
  .modal-footer {
    padding: 12px 16px;
    flex-direction: column;
  }
  .modal-footer .btn-outline,
  .modal-footer .btn-hsbc { width: 100%; justify-content: center; }
  .modal-backdrop { padding: 12px; align-items: flex-end; }

  /* Login */
  .login-card { padding: 24px 18px 20px; }
  .login-wrap { padding: 20px 14px; }

  /* Misc */
  .flex-row { flex-direction: column; }
  .transfer-layout { grid-template-columns: 1fr; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 1.2rem; }
  .bank-card { max-width: 100%; }
  .profile-avatar-section { flex-direction: column; text-align: center; align-items: center; }
  .info-grid { grid-template-columns: 1fr 1fr; }

  /* Stats row in account detail */
  .acct-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .acct-stat { padding: 10px 12px; }

  /* SO cards */
  .so-card { flex-wrap: wrap; }
  .so-info { min-width: 60%; }

  /* Security items */
  .sec-actions { flex-shrink: 0; }

  /* Breadcrumb */
  .breadcrumb { font-size: .75rem; }
}

@media (max-width: 480px) {
  .tx-table th:nth-child(2),
  .tx-table td:nth-child(2) { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .info-grid { grid-template-columns: 1fr; }
  .acct-stats { grid-template-columns: 1fr 1fr; }
  .amount-quick { display: none; }
  .page-header h1 { font-size: 1.1rem; }
  .stat-value { font-size: 1.1rem; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .mbn-btn span { font-size: .6rem; }
  .user-pill-name { display: none; }
}
