/* ===================================================================
   REVOLU — Google Material / Google Pay style interface
   =================================================================== */

:root {
  /* Google-ish light palette */
  --bg:           #f6f8fc;
  --sidebar-bg:   #ffffff;
  --surface:      #ffffff;
  --surface-2:    #f1f3f4;
  --surface-3:    #e8eaed;
  --border:       #e8eaed;
  --border-2:     #dadce0;
  --border-3:     #c4c7c5;

  /* Brand & semantic — Google 4-color palette */
  --blue:         #1a73e8;
  --blue-bg:      #e8f0fe;
  --purple:       #a142f4;
  --purple-bg:    #f3e8fd;
  --green:        #1e8e3e;
  --green-bg:     #e6f4ea;
  --red:          #d93025;
  --red-bg:       #fce8e6;
  --yellow:       #f9ab00;
  --yellow-bg:    #fef7e0;
  --orange:       #fa7b17;

  /* Text */
  --text:         #202124;
  --text-2:       #5f6368;
  --text-3:       #80868b;

  /* Layout */
  --sidebar-w:    248px;
  --radius-xs:    6px;
  --radius-sm:    10px;
  --radius:       14px;
  --radius-lg:    20px;
  --radius-xl:    28px;
  --radius-full:  999px;

  --shadow:       0 1px 3px 0 rgba(60,64,67,.30), 0 4px 8px 3px rgba(60,64,67,.15);
  --shadow-sm:    0 1px 2px 0 rgba(60,64,67,.30), 0 1px 3px 1px rgba(60,64,67,.15);
  --transition:   .15s cubic-bezier(.4,0,.2,1);
  --font:         'Google Sans', 'Roboto', -apple-system, system-ui, sans-serif;
}

/* ===================================================================
   PRELOADER
   =================================================================== */
#rv-preloader {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .5s ease, visibility .5s;
}
#rv-preloader.rv-loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.rv-preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
.rv-preloader-img {
  max-width: 200px;
  max-height: 120px;
  object-fit: contain;
  animation: rvPreloaderPulse 2s ease-in-out infinite;
}
.rv-preloader-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.rv-preloader-logo-text {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -.8px;
  font-family: 'Google Sans', Arial, sans-serif;
}
.rv-preloader-spinner {
  width: 40px; height: 40px;
  margin-top: 2.5rem;
  border-radius: 50%;
  border: 4px solid var(--surface-3);
  border-top-color: var(--blue);
  border-right-color: var(--red);
  border-bottom-color: var(--yellow);
  animation: rvSpin .9s linear infinite;
}
/* legacy bar kept as fallback */
.rv-preloader-bar {
  width: 48px;
  height: 3px;
  background: var(--surface-3);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 2.5rem;
}
.rv-preloader-fill {
  height: 100%;
  width: 50%;
  background: var(--blue);
  border-radius: 2px;
  animation: preloaderSlide 1.2s ease-in-out infinite;
}
@keyframes preloaderSlide {
  0%   { transform: translateX(-150%); }
  100% { transform: translateX(250%);  }
}
@keyframes rvSpin { to { transform: rotate(360deg); } }
@keyframes rvPreloaderPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .7; }
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.5; font-size: 14px; height: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { opacity: .82; }
img { max-width: 100%; display: block; }
input, textarea, select, button { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }

/* ===================================================================
   AUTH LAYOUT — Google Sign-in style
   =================================================================== */
.auth-body {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem 3rem;
}
.auth-wrapper {
  width: 100%; max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 2.5rem 2.25rem;
}

.auth-brand { text-align: center; margin-bottom: 1.75rem; }
.brand-logo { display: inline-flex; align-items: center; gap: .6rem; }
.brand-icon {
  width: 38px; height: 38px;
  background: var(--blue);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.brand-name    { font-size: 1.6rem; font-weight: 700; color: var(--text); letter-spacing: -.2px; }
.brand-tagline { display: none; }

/* ---- Page title ---- */
.rv-auth-title {
  font-size: 1.65rem; font-weight: 400; color: var(--text);
  letter-spacing: 0; line-height: 1.3; margin-bottom: .5rem;
  font-family: 'Google Sans', var(--font);
}
.rv-auth-subtitle {
  font-size: .92rem; color: var(--text-2);
  line-height: 1.5; margin-bottom: 1.75rem;
}

/* ---- Material outlined input ---- */
.rv-input-pill {
  display: flex; align-items: center; gap: .65rem;
  background: var(--surface);
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-sm);
  height: 56px; padding: 0 1.1rem;
  transition: border-color .18s, box-shadow .18s;
  margin-bottom: .9rem;
}
.rv-input-pill:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue);
}
.rv-input-pill svg { flex-shrink: 0; color: var(--text-3); }
.rv-input-pill input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-family: var(--font);
  font-size: .95rem; font-weight: 400; min-width: 0;
}
.rv-input-pill input::placeholder { color: var(--text-3); }
.rv-input-pill .pw-toggle {
  background: none; border: none;
  color: var(--text-3); cursor: pointer;
  font-size: 1rem; padding: .15rem;
  transition: color .15s; line-height: 1; flex-shrink: 0;
}
.rv-input-pill .pw-toggle:hover { color: var(--text-2); }

/* ---- Subtle link (forgot etc) ---- */
.rv-auth-link {
  display: block; color: var(--blue); font-size: .88rem;
  font-weight: 500; margin-bottom: 1.5rem; text-decoration: none;
}
.rv-auth-link:hover { opacity: .8; }

/* ---- Continue / primary pill button ---- */
.rv-auth-continue {
  width: 100%; height: 52px; border-radius: var(--radius-full);
  border: none; font-family: var(--font); font-size: .95rem; font-weight: 600;
  cursor: pointer; transition: all .18s;
  background: var(--surface-3); color: var(--text-3);
  margin-bottom: 1.5rem; display: block; text-align: center; line-height: 52px;
  text-decoration: none;
}
.rv-auth-continue.active,
button.rv-auth-continue[type="submit"] {
  background: var(--blue); color: #ffffff;
  box-shadow: var(--shadow-sm);
}
button.rv-auth-continue[type="submit"]:hover { background: #1765cc; }

/* ---- Divider ---- */
.rv-auth-divider {
  display: flex; align-items: center; gap: .85rem; margin-bottom: 1.25rem;
}
.rv-auth-divider::before, .rv-auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border-2);
}
.rv-auth-divider span { font-size: .78rem; color: var(--text-3); white-space: nowrap; }

/* ---- Social buttons row ---- */
.rv-social-row { display: flex; justify-content: center; gap: .85rem; margin-bottom: 2rem; }
.rv-social-btn {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--border-2);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: .3rem;
  cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s;
  color: var(--text); text-decoration: none;
}
.rv-social-btn:hover {
  background: var(--surface-2); border-color: var(--border-3);
  box-shadow: var(--shadow-sm);
}
.rv-social-label { font-size: .6rem; color: var(--text-2); font-weight: 500; }

/* ---- Bottom create account area ---- */
.rv-auth-no-account {
  text-align: center; font-size: .82rem;
  color: var(--text-2); margin-bottom: .75rem;
}
.rv-auth-create-btn {
  display: block; width: 100%; height: 52px;
  border-radius: var(--radius-full); border: 1.5px solid var(--blue);
  background: transparent; color: var(--blue);
  font-family: var(--font); font-size: .95rem; font-weight: 600;
  cursor: pointer; transition: background .15s; text-align: center;
  line-height: 49px; text-decoration: none;
}
.rv-auth-create-btn:hover { background: var(--blue-bg); color: var(--blue); }

/* ---- Demo credentials box ---- */
.auth-demo {
  margin-top: 1.5rem; padding: .85rem 1rem;
  background: var(--blue-bg); border: 1px solid rgba(26,115,232,.18);
  border-radius: var(--radius); font-size: .73rem;
  color: var(--text-2); line-height: 1.8; text-align: center;
}
.auth-demo strong { color: var(--blue); font-size: .75rem; }
.auth-demo code { color: var(--text); font-family: 'Courier New', monospace; font-size: .7rem; }

/* ---- Flash inside auth ---- */
.auth-wrapper .flash-message { border-radius: var(--radius); margin-bottom: 1rem; }

/* compat stubs */
.auth-card { background: transparent; border: none; padding: 0; }
.auth-title { font-size: 1.25rem; font-weight: 700; margin-bottom: .3rem; letter-spacing: -.1px; }
.auth-subtitle { font-size: .82rem; color: var(--text-2); margin-bottom: 1.75rem; }

/* ===================================================================
   FORM COMPONENTS
   =================================================================== */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: .4rem;
  letter-spacing: .01em;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: .7rem .9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  font-size: .875rem;
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue);
  background: var(--surface);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-3); }
.input-disabled { opacity: .45; pointer-events: none; }
.form-hint { font-size: .73rem; color: var(--text-3); margin-top: .35rem; display: block; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.form-section-label {
  font-size: .73rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .75rem;
}
.form-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}

/* ===================================================================
   BUTTONS
   =================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .65rem 1.4rem;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0;
  white-space: nowrap;
}
.btn:hover { box-shadow: var(--shadow-sm); }
.btn:active { box-shadow: none; }
.btn-primary {
  background: var(--blue);
  color: #fff;
}
.btn-primary:hover { background: #1765cc; }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border-2);
}
.btn-secondary:hover { background: var(--surface-2); }
.btn-success { background: var(--green); color: #fff; }
.btn-danger  { background: var(--red); color: #fff; }
.btn-ghost   { background: transparent; color: var(--text-2); border: 1.5px solid var(--border-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-full  { width: 100%; }
.btn-sm    { padding: .4rem 1rem; font-size: .78rem; }
.btn-xs    { padding: .25rem .65rem; font-size: .72rem; border-radius: 6px; }

.auth-card-header { margin-bottom: 1.5rem; }
.auth-card-header h1 { font-size: 1.35rem; font-weight: 700; margin-bottom: .2rem; letter-spacing: -.1px; }
.auth-card-header p  { font-size: .82rem; color: var(--text-2); }

.auth-footer { text-align: center; margin-top: 1.25rem; font-size: .8rem; color: var(--text-2); }
.auth-footer a { color: var(--blue); font-weight: 500; }

.auth-demo {
  margin-top: 1.25rem; padding: .9rem 1rem;
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: var(--radius); font-size: .75rem; color: var(--text-2);
  line-height: 1.7;
}
.auth-demo code { color: var(--blue); font-size: .7rem; font-family: 'Courier New', monospace; }

.input-password { position: relative; }
.input-password input { width: 100%; padding-right: 2.75rem; }
.password-toggle {
  position: absolute; right: .65rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-2); cursor: pointer;
  font-size: 1rem; padding: .25rem; line-height: 1;
}
.password-toggle:hover { color: var(--text); }

/* ===================================================================
   WEB APP LAYOUT — sidebar + main
   =================================================================== */
.rv-app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ---- Sidebar ---- */
.rv-sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow: hidden;
  z-index: 100;
  transition: transform var(--transition);
}

.rv-sidebar-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: 1.5rem 1.25rem 1.25rem;
  flex-shrink: 0;
}
.rv-sidebar-brand .brand-icon { width: 32px; height: 32px; font-size: .85rem; border-radius: 8px; }
.rv-sidebar-brand .brand-name { font-size: 1.1rem; font-weight: 700; }

.rv-sidebar-nav {
  flex: 1;
  padding: .5rem .75rem;
  overflow-y: auto;
  overflow-x: hidden;
}
.rv-sidebar-nav::-webkit-scrollbar { width: 4px; }
.rv-sidebar-nav::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }

.rv-nav-group { margin-bottom: .25rem; }
.rv-nav-label {
  font-size: .68rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .75rem .65rem .3rem;
  display: block;
}

.rv-nav-item {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .65rem .9rem;
  border-radius: var(--radius-full);
  color: var(--text-2);
  font-size: .85rem;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
  margin-bottom: 2px;
}
.rv-nav-item:hover {
  background: var(--surface-2);
  color: var(--text);
}
.rv-nav-item.active {
  background: var(--blue-bg);
  color: #041e49;
  font-weight: 700;
}
.rv-nav-item.active .rv-nav-icon { color: var(--blue); }
.rv-nav-item.danger:hover { background: var(--red-bg); color: var(--red); }

.rv-nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  color: var(--text-3);
  transition: color var(--transition);
}
.rv-nav-item:hover .rv-nav-icon { color: var(--text-2); }

.rv-nav-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: .5rem .9rem;
}

.rv-nav-badge {
  margin-left: auto;
  background: var(--blue);
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  padding: .1rem .4rem;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
}

.rv-sidebar-footer {
  padding: .875rem .75rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.rv-sidebar-user {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .55rem .65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}
.rv-sidebar-user:hover { background: var(--surface-2); }
.rv-user-avatar {
  width: 34px; height: 34px;
  background: var(--purple);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.rv-user-info { flex: 1; min-width: 0; }
.rv-user-name {
  font-size: .8rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rv-user-role { font-size: .7rem; color: var(--text-3); margin-top: 1px; }
.rv-user-chevron { color: var(--text-3); font-size: .75rem; flex-shrink: 0; }

/* ---- Main area ---- */
.rv-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.rv-page-content {
  flex: 1;
  overflow-y: auto;
  padding: 2rem 2.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}
.rv-page-content::-webkit-scrollbar { width: 6px; }
.rv-page-content::-webkit-scrollbar-track { background: transparent; }
.rv-page-content::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }

/* ---- Mobile topbar ---- */
.rv-mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1.25rem;
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  flex-shrink: 0;
}
.rv-mobile-brand {
  display: flex; align-items: center; gap: .5rem;
  font-size: .95rem; font-weight: 700; color: var(--text);
}
.rv-hamburger {
  width: 36px; height: 36px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text); font-size: 1rem; cursor: pointer;
}
.rv-sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(32,33,36,.6);
  z-index: 99;
}
.rv-sidebar-overlay.show { display: block; }

/* ===================================================================
   PAGE HEADER (inside main content)
   =================================================================== */
.rv-page-header {
  margin-bottom: 2rem;
}
.rv-page-greeting {
  font-size: .8rem;
  color: var(--text-3);
  font-weight: 500;
  margin-bottom: .15rem;
  letter-spacing: .01em;
}
.rv-page-title {
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0;
  font-family: 'Google Sans', var(--font);
}
.rv-page-subtitle { font-size: .82rem; color: var(--text-2); margin-top: .2rem; }

/* ===================================================================
   BALANCE HERO — Dashboard
   =================================================================== */
.rv-balance-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 2rem 2rem 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}
.rv-balance-hero::before {
  content: '';
  position: absolute;
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(26,115,232,.06) 0%, transparent 70%);
  top: -120px; right: -80px;
  pointer-events: none;
}
.rv-balance-label {
  font-size: .75rem;
  font-weight: 500;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .6rem;
}
.rv-balance-amount {
  font-size: 3rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: .5rem;
  font-family: 'Google Sans', var(--font);
}
.rv-balance-currency {
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--text-2);
  vertical-align: top;
  margin-top: .35rem;
  display: inline-block;
  margin-right: .15rem;
}
.rv-balance-account-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-top: .6rem;
}
.rv-account-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-full);
  padding: .25rem .75rem;
  font-size: .72rem;
  font-weight: 500;
  color: var(--text-2);
}
.rv-account-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

/* Quick action buttons (below balance) */
.rv-quick-actions {
  display: flex;
  gap: .65rem;
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
  flex-wrap: wrap;
}
.rv-quick-btn {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--surface);
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-full);
  color: var(--text);
  font-size: .8rem;
  font-weight: 600;
  padding: .5rem 1.1rem;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.rv-quick-btn:hover {
  background: var(--surface-2);
  border-color: var(--border-3);
  box-shadow: var(--shadow-sm);
}
.rv-quick-btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.rv-quick-btn.primary:hover { background: #1765cc; }
.rv-qbtn-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem;
  background: var(--surface-3);
  flex-shrink: 0;
}
.rv-quick-btn.primary .rv-qbtn-icon { background: rgba(255,255,255,.25); }

/* ===================================================================
   DASHBOARD GRID — two columns on desktop
   =================================================================== */
.rv-dash-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}
.rv-dash-left  { min-width: 0; }
.rv-dash-right { min-width: 0; }

/* ===================================================================
   VIRTUAL CARD
   =================================================================== */
.rv-virtual-card {
  width: 100%;
  aspect-ratio: 1.586 / 1;
  background: linear-gradient(135deg, #1a73e8 0%, #4285f4 50%, #673ab7 100%);
  border-radius: 18px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  cursor: default;
  user-select: none;
}
.rv-virtual-card::before {
  content: '';
  position: absolute;
  width: 250px; height: 250px;
  background: radial-gradient(circle, rgba(255,255,255,.14) 0%, transparent 65%);
  top: -80px; right: -60px;
  pointer-events: none;
}
.rv-virtual-card::after {
  content: '';
  position: absolute;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(255,255,255,.10) 0%, transparent 65%);
  bottom: -60px; left: -30px;
  pointer-events: none;
}
.rv-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: auto;
  position: relative;
  z-index: 1;
}
.rv-card-brand {
  font-size: .85rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .05em;
}
.rv-card-logo {
  width: 28px; height: 28px;
  background: rgba(255,255,255,.2);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; color: #fff;
}
.rv-card-chip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  width: 32px;
  margin: 1.1rem 0;
  position: relative;
  z-index: 1;
}
.rv-card-chip span {
  width: 14px; height: 11px;
  background: linear-gradient(135deg, #f9ab00, #fbbc05);
  border-radius: 2px;
  display: block;
}
.rv-card-number {
  font-size: .85rem;
  font-weight: 600;
  color: rgba(255,255,255,.9);
  letter-spacing: .18em;
  position: relative;
  z-index: 1;
  font-family: 'Courier New', monospace;
  margin-bottom: .9rem;
}
.rv-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  position: relative;
  z-index: 1;
}
.rv-card-holder { font-size: .72rem; font-weight: 600; color: rgba(255,255,255,.85); text-transform: uppercase; letter-spacing: .08em; }
.rv-card-expiry-label { font-size: .55rem; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 1px; }
.rv-card-expiry { font-size: .75rem; font-weight: 600; color: rgba(255,255,255,.85); }
.rv-card-network {
  display: flex;
  gap: -4px;
}
.rv-card-network-circle {
  width: 22px; height: 22px;
  border-radius: 50%;
}
.rv-card-network-circle:first-child { background: rgba(255,255,255,.6); }
.rv-card-network-circle:last-child  { background: rgba(255,255,255,.3); margin-left: -8px; }

/* Card info panel */
.rv-card-info {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.rv-card-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .8rem 1.1rem;
  border-bottom: 1px solid var(--border);
  font-size: .8rem;
}
.rv-card-info-row:last-child { border-bottom: none; }
.rv-card-info-label { color: var(--text-2); }
.rv-card-info-value { font-weight: 600; color: var(--text); }
.rv-card-info-value.green { color: var(--green); }
.rv-card-info-value.blue  { color: var(--blue); font-family: monospace; font-size: .75rem; }

/* ===================================================================
   STATS PILLS
   =================================================================== */
.rv-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-bottom: 1.5rem;
}
.rv-stat-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  gap: .85rem;
}
.rv-stat-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rv-stat-dot.green { background: var(--green); }
.rv-stat-dot.red   { background: var(--red); }
.rv-stat-info { flex: 1; min-width: 0; }
.rv-stat-label { font-size: .72rem; color: var(--text-2); margin-bottom: .15rem; }
.rv-stat-value { font-size: .95rem; font-weight: 700; letter-spacing: 0; }
.rv-stat-value.green { color: var(--green); }
.rv-stat-value.red   { color: var(--red); }

/* Alert block */
.rv-alert-block {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  background: var(--yellow-bg);
  border: 1px solid rgba(249,171,0,.25);
  border-radius: var(--radius);
  padding: .9rem 1.1rem;
  margin-bottom: 1.25rem;
  font-size: .82rem;
  color: #7a5900;
}
.rv-alert-icon { font-size: 1rem; flex-shrink: 0; margin-top: .05rem; }
.rv-alert-text strong { display: block; font-weight: 600; margin-bottom: .15rem; }

/* ===================================================================
   SECTION HEADERS
   =================================================================== */
.rv-section { margin-bottom: 1.75rem; }
.rv-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .85rem;
  padding-bottom: .65rem;
  border-bottom: 1px solid var(--border);
}
.rv-section-title { font-size: .9rem; font-weight: 700; color: var(--text); letter-spacing: 0; }
.rv-section-link  { font-size: .75rem; color: var(--blue); font-weight: 500; }

/* ===================================================================
   TRANSACTION LIST
   =================================================================== */
.rv-tx-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.rv-tx-item {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .85rem 1.1rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  cursor: default;
}
.rv-tx-item:last-child { border-bottom: none; }
.rv-tx-item:hover { background: var(--surface-2); }
.rv-tx-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
}
.tx-icon-credit    { background: var(--green-bg);  border-color: rgba(30,142,62,.2); }
.tx-icon-debit     { background: var(--red-bg);    border-color: rgba(217,48,37,.2); }
.tx-icon-transfer  { background: var(--blue-bg);   border-color: rgba(26,115,232,.2); }
.tx-icon-withdrawal{ background: var(--yellow-bg); border-color: rgba(249,171,0,.25); }
.tx-icon-default   { background: var(--surface-3); }

.rv-tx-info { flex: 1; min-width: 0; }
.rv-tx-name {
  font-size: .85rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rv-tx-meta { font-size: .72rem; color: var(--text-2); margin-top: .15rem; }

.rv-tx-right { text-align: right; flex-shrink: 0; }
.rv-tx-amount { font-size: .88rem; font-weight: 700; color: var(--red); letter-spacing: 0; }
.rv-tx-amount.positive { color: var(--green); }
.rv-tx-status { font-size: .68rem; color: var(--text-3); margin-top: .15rem; }

/* ===================================================================
   CARDS (content panels)
   =================================================================== */
.rv-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.rv-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.rv-card-title { font-size: .88rem; font-weight: 700; color: var(--text); }
.rv-card-body { padding: 1.25rem; }
.rv-card-body.p-0 { padding: 0; }

/* Balance bar (in transaction pages) */
.rv-balance-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: .7rem 1.1rem;
  margin-bottom: 1rem;
  font-size: .82rem;
  color: var(--text-2);
}
.rv-balance-bar strong { color: var(--text); font-size: .9rem; font-weight: 700; }

/* ===================================================================
   FLASH MESSAGES
   =================================================================== */
.flash-message {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .8rem 1.1rem;
  border-radius: var(--radius);
  font-size: .82rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  animation: flashIn .2s ease;
}
@keyframes flashIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.flash-success { background: var(--green-bg); border: 1px solid rgba(30,142,62,.2); color: var(--green); }
.flash-error   { background: var(--red-bg);   border: 1px solid rgba(217,48,37,.2);  color: var(--red); }
.flash-info    { background: var(--blue-bg);  border: 1px solid rgba(26,115,232,.2); color: var(--blue); }
.flash-warning { background: var(--yellow-bg);border: 1px solid rgba(249,171,0,.25); color: #7a5900; }

/* ===================================================================
   BADGES & STATUS
   =================================================================== */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .15rem .55rem;
  border-radius: var(--radius-full);
  font-size: .68rem; font-weight: 600;
  white-space: nowrap; letter-spacing: .02em;
}
.badge-success   { background: var(--green-bg);  color: var(--green); }
.badge-danger    { background: var(--red-bg);    color: var(--red); }
.badge-warning   { background: var(--yellow-bg); color: #7a5900; }
.badge-info      { background: var(--blue-bg);   color: var(--blue); }
.badge-secondary { background: var(--surface-3); color: var(--text-2); }

/* ===================================================================
   EMPTY STATE
   =================================================================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  color: var(--text-2);
}
.empty-icon { font-size: 2.5rem; margin-bottom: .75rem; opacity: .6; }
.empty-state p { font-size: .85rem; color: var(--text-3); }

/* ===================================================================
   PAGINATION
   =================================================================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: 1rem;
  border-top: 1px solid var(--border);
}
.page-btn {
  display: inline-flex;
  align-items: center;
  padding: .4rem .9rem;
  background: var(--surface);
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-full);
  color: var(--text);
  font-size: .78rem;
  font-weight: 500;
  transition: all var(--transition);
}
.page-btn:hover { background: var(--surface-2); color: var(--text); opacity: 1; }
.page-info { font-size: .78rem; color: var(--text-2); }

/* ===================================================================
   BLOCK ANIMATION OVERLAY
   =================================================================== */
.block-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(32,33,36,.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.block-overlay.show,
.block-overlay.active { display: flex; }

.block-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  max-width: 400px;
  width: 90%;
  box-shadow: var(--shadow);
}
.block-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.block-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--surface-3);
  border-top-color: var(--blue);
  border-right-color: var(--red);
  border-bottom-color: var(--yellow);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.block-title { font-size: 1rem; font-weight: 700; }

.block-steps { margin-bottom: 1.25rem; }
.block-step {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .78rem;
  color: var(--text-3);
  padding: .3rem 0;
  transition: color var(--transition);
}
.block-step.done    { color: var(--green); }
.block-step.active,
.block-step.current { color: var(--text); }
.block-step-dot,
.step-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-3);
  flex-shrink: 0;
  transition: background var(--transition);
}
.block-step.done    .block-step-dot,
.block-step.done    .step-dot { background: var(--green); }
.block-step.active  .block-step-dot,
.block-step.active  .step-dot,
.block-step.current .block-step-dot,
.block-step.current .step-dot { background: var(--blue); }

.block-progress-wrapper {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}
.block-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--surface-3);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.block-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--blue), var(--purple));
  border-radius: var(--radius-full);
  transition: width .1s linear;
}
.block-progress-pct { font-size: .75rem; font-weight: 700; color: var(--text-2); width: 32px; text-align: right; flex-shrink: 0; }

.block-message {
  background: var(--red-bg);
  border: 1px solid rgba(217,48,37,.25);
  border-radius: var(--radius);
  padding: .9rem 1.1rem;
  font-size: .82rem;
  color: var(--red);
  line-height: 1.5;
  margin-top: .75rem;
}

/* ===================================================================
   RESULT MODAL
   =================================================================== */
.result-modal {
  position: fixed; inset: 0;
  background: rgba(32,33,36,.65);
  backdrop-filter: blur(4px);
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.result-modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow);
}
.result-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.result-modal-box h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .4rem; }
.result-modal-box p { font-size: .82rem; color: var(--text-2); margin-bottom: 1.25rem; }

/* ===================================================================
   UTILITY
   =================================================================== */
.text-success { color: var(--green) !important; }
.text-danger  { color: var(--red)   !important; }
.text-muted   { color: var(--text-2); }
.text-sm      { font-size: .78rem; }
.fw-500       { font-weight: 500; }
.fw-600       { font-weight: 600; }
.fw-700       { font-weight: 700; }
.fw-800       { font-weight: 700; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem;  }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem;  }

/* ===================================================================
   RESPONSIVE — Mobile (sidebar becomes drawer)
   =================================================================== */
@media (max-width: 768px) {
  .rv-app { display: block; height: auto; overflow: visible; }

  .rv-mobile-header { display: flex; }

  .rv-sidebar {
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    transform: translateX(-100%);
    z-index: 200;
    transition: transform .25s cubic-bezier(.4,0,.2,1);
  }
  .rv-sidebar.open { transform: translateX(0); }

  .rv-main { height: auto; overflow: visible; }
  .rv-page-content { overflow: visible; padding: 1.25rem 1rem; }

  .rv-dash-grid { grid-template-columns: 1fr; }
  .rv-dash-right { order: -1; }

  .rv-balance-amount { font-size: 2.25rem; }
  .rv-quick-actions { padding: 1rem; flex-wrap: wrap; }

  .rv-virtual-card { max-width: 320px; margin: 0 auto 1rem; }
}

@media (max-width: 480px) {
  .rv-page-content { padding: 1rem .75rem; }
  .form-row-2 { grid-template-columns: 1fr; }
  .rv-stats-row { grid-template-columns: 1fr; }
  .rv-quick-actions { gap: .5rem; }
  .rv-quick-btn span:not(.rv-qbtn-icon) { display: none; }
  .rv-quick-btn { padding: .5rem; border-radius: 50%; width: 44px; height: 44px; }
  .rv-qbtn-icon { background: none; width: auto; height: auto; font-size: 1.1rem; }
}
