/* =========================================================
   Ethereum Bliss – Shared Styles (style.css)
   - Fullscreen layout
   - Smooth mobile nav drawer
   - Compact top text on mobile
   - Shared forms, cards & FAQ accordion
   ========================================================= */

/* -------------------------
   Reset & base
   ------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.18), transparent 60%),
    radial-gradient(circle at bottom right, rgba(8, 47, 73, 0.35), transparent 65%),
    #020617;
  background-repeat: no-repeat;
  color: #e5e7eb;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

/* -------------------------
   Tokens
   ------------------------- */

:root {
  --eb-bg: #020617;
  --eb-surface: rgba(15, 23, 42, 0.98);
  --eb-surface-soft: rgba(15, 23, 42, 0.94);
  --eb-border-subtle: rgba(148, 163, 184, 0.28);
  --eb-border-strong: rgba(148, 163, 184, 0.45);
  --eb-muted: #9ca3af;
  --eb-strong: #e5e7eb;
  --eb-accent: #7c3aed;
  --eb-accent-soft: rgba(124, 58, 237, 0.18);
  --eb-radius-lg: 1rem;
  --eb-radius-pill: 999px;
  --eb-shadow-shell: 0 22px 60px rgba(15, 23, 42, 0.9);
  --eb-shadow-card: 0 12px 34px rgba(15, 23, 42, 0.9);
  --eb-shadow-soft: 0 14px 40px rgba(15, 23, 42, 0.88);
}

/* -------------------------
   Layout shell
   ------------------------- */

.app-shell {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 1rem 1.3rem 1.2rem;
  border-radius: 0;
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.98));
  box-shadow: none;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 1.25rem;
}

/* -------------------------
   Sidebar – desktop
   ------------------------- */

.sidebar {
  position: sticky;
  top: 0.8rem;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: 1rem 1rem 1.3rem;
  border-radius: 1.3rem;
  background: linear-gradient(
    145deg,
    rgba(15, 23, 42, 0.98),
    rgba(15, 23, 42, 0.98)
  );
  border: 1px solid var(--eb-border-subtle);
  box-shadow: var(--eb-shadow-card);
  max-height: calc(100vh - 1.6rem);
  overflow-y: auto;
}

/* Brand */

.sidebar-logo {
  display: flex;
  align-items: center;
  margin-bottom: 0.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 0.9rem;
  background: radial-gradient(circle at top left, rgba(124, 58, 237, 0.8), rgba(30, 64, 175, 0.7));
  padding: 4px;
}

.brand-title {
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f9fafb;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--eb-muted);
}

/* Sidebar nav */

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  margin: 0.4rem 0 0.8rem;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0.42rem 0.75rem;
  border-radius: 0.8rem;
  text-decoration: none;
  color: #cbd5f5;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  transition:
    background-color 0.18s ease-out,
    color 0.18s ease-out,
    transform 0.16s ease-out,
    box-shadow 0.18s ease-out;
}

.nav-item::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at left, rgba(124, 58, 237, 0.36), transparent 55%);
  opacity: 0;
  transition: opacity 0.18s ease-out;
  pointer-events: none;
}

.nav-item:hover {
  background: rgba(15, 23, 42, 0.96);
  color: #f9fafb;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.9);
}

.nav-item:hover::before {
  opacity: 1;
}

.nav-item.active {
  background: radial-gradient(circle at left, rgba(124, 58, 237, 0.7), rgba(30, 64, 175, 0.5));
  color: #f9fafb;
  box-shadow: 0 14px 32px rgba(124, 58, 237, 0.6);
}

/* Sidebar meta & stats */

.sidebar-meta {
  padding: 0.65rem 0.55rem 0.2rem;
  border-radius: 0.9rem;
  background: radial-gradient(circle at top left, rgba(124, 58, 237, 0.22), transparent 60%);
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.6rem;
  border-radius: 999px;
  font-size: 0.63rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--eb-muted);
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.98);
  margin-bottom: 0.55rem;
}

.sidebar-copy {
  margin: 0 0 0.6rem;
  font-size: 0.76rem;
  color: #e5e7eb;
}

.sidebar-stats {
  padding: 0.6rem 0.55rem 0.7rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.98);
}

.sidebar-stats h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--eb-muted);
  margin: 0 0 0.55rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.stat-card {
  padding: 0.45rem 0.5rem;
  border-radius: 0.75rem;
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(30, 64, 175, 0.45);
}

.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--eb-muted);
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f9fafb;
  margin-bottom: 0.12rem;
}

.stat-sub {
  font-size: 0.74rem;
  color: #cbd5f5;
}

/* Sidebar footer */

.sidebar-footer {
  margin-top: 0.4rem;
}

.primary-cta {
  width: 100%;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: radial-gradient(circle at top left, #a855f7, #7c3aed);
  color: #f9fafb;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 16px 40px rgba(124, 58, 237, 0.7);
  transition:
    transform 0.18s ease-out,
    box-shadow 0.18s ease-out,
    opacity 0.12s ease-out;
}

.primary-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 55px rgba(124, 58, 237, 0.85);
}

.sidebar-note {
  margin: 0.5rem 0 0;
  font-size: 0.74rem;
  color: var(--eb-muted);
}

/* -------------------------
   Main area
   ------------------------- */

.main {
  position: relative;
  padding: 1rem 1.1rem 1.3rem;
  border-radius: 1.3rem;
  background: linear-gradient(
    135deg,
    var(--eb-surface),
    var(--eb-surface-soft)
  );
  border: 1px solid var(--eb-border-subtle);
  box-shadow: var(--eb-shadow-soft);
  min-height: calc(100vh - 2rem);
}

/* Top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding-bottom: 0.8rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.2rem;
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.98),
    rgba(15, 23, 42, 0.94),
    transparent
  );
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.6);
  background: rgba(15, 23, 42, 0.98);
  margin-bottom: 0.3rem;
}

.topbar-left h1 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.3;
  color: #f9fafb;
}

.topbar-subline,
.auth-header-text {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: #cbd5f5;
  max-width: 46rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

/* Buttons */

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.8rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background-color 0.18s ease-out,
    color 0.18s ease-out,
    border-color 0.18s ease-out,
    transform 0.16s ease-out,
    box-shadow 0.18s ease-out;
}

.primary-btn {
  background: radial-gradient(circle at top left, #a855f7, #7c3aed);
  color: #f9fafb;
  box-shadow: 0 14px 36px rgba(124, 58, 237, 0.75);
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 48px rgba(124, 58, 237, 0.9);
}

.ghost-btn {
  background: rgba(15, 23, 42, 0.98);
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.4);
}

.ghost-btn:hover {
  background: rgba(15, 23, 42, 1);
  border-color: rgba(148, 163, 184, 0.7);
}

/* Topbar user text */

.topbar-user-line {
  font-size: 0.78rem;
  color: var(--eb-muted);
}

.topbar-user-email {
  margin-left: 0.2rem;
  font-weight: 500;
  color: #f9fafb;
}

/* Mobile menu button */

.topbar-menu {
  display: none;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.98);
  color: #e5e7eb;
  padding: 0.32rem 0.7rem;
  font-size: 1.05rem;
  cursor: pointer;
  transition:
    background-color 0.16s ease-out,
    transform 0.14s ease-out;
}

.topbar-menu:hover {
  background: rgba(15, 23, 42, 1);
  transform: translateY(-0.5px);
}

/* -------------------------
   Panels & common blocks
   ------------------------- */

.panel {
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(30, 64, 175, 0.4);
  padding: 1rem 1rem 1.1rem;
  margin-bottom: 1.1rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.9);
}

.panel-title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f9fafb;
}

.panel-intro,
.how-intro {
  font-size: 0.82rem;
  color: #cbd5f5;
  margin: 0 0 0.8rem;
}

/* Columns */

.columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.column h3 {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  color: #f9fafb;
}

.column p {
  margin: 0 0 0.4rem;
  font-size: 0.8rem;
  color: #e5e7eb;
}

/* Lists */

.overview-list {
  padding-left: 1.1rem;
  margin: 0.1rem 0 0.6rem;
  font-size: 0.8rem;
  color: #e5e7eb;
}

.overview-list li {
  margin-bottom: 0.25rem;
}

/* -------------------------
   Forms
   ------------------------- */

.form,
.auth-form {
  display: grid;
  gap: 0.7rem;
}

.form-row,
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.form-row-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

label,
.auth-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--eb-muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
textarea,
select,
.auth-input {
  border-radius: 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.96);
  color: #f9fafb;
  padding: 0.5rem 0.6rem;
  font-size: 0.85rem;
  outline: none;
  transition:
    border-color 0.16s ease-out,
    box-shadow 0.16s ease-out,
    background-color 0.16s ease-out;
  width: 100%;
}

input::placeholder,
textarea::placeholder {
  color: rgba(148, 163, 184, 0.8);
}

input:focus,
textarea:focus,
select:focus {
  border-color: #a855f7;
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.55);
  background-color: #020617;
}

textarea {
  resize: vertical;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #9ca3af 50%),
    linear-gradient(135deg, #9ca3af 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 50%,
    calc(100% - 9px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

/* Checkboxes */

.checkbox-group {
  font-size: 0.78rem;
  color: #e5e7eb;
}

.checkbox-group input[type="checkbox"] {
  margin-right: 0.35rem;
}

/* Helper text & messages */

.field-hint {
  font-size: 0.72rem;
  color: var(--eb-muted);
  margin-top: 0.18rem;
}

.auth-message {
  margin-top: 0.45rem;
  font-size: 0.78rem;
}

.auth-message span {
  display: inline-flex;
  padding: 0.24rem 0.55rem;
  border-radius: 999px;
}

.auth-message-success span {
  background: rgba(22, 163, 74, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.5);
}

.auth-message-error span {
  background: rgba(220, 38, 38, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.55);
}

/* Form actions */

.form-actions,
.auth-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* -------------------------
   Auth pages
   ------------------------- */

.auth-section {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-tabs {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--eb-border-strong);
  background: rgba(15, 23, 42, 0.98);
  gap: 4px;
  margin-bottom: 0.75rem;
}

.auth-tab-btn {
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.75rem;
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--eb-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
  transition:
    background 0.18s ease-out,
    color 0.18s ease-out,
    box-shadow 0.18s ease-out,
    transform 0.16s ease-out;
}

.auth-tab-btn.active {
  background: radial-gradient(circle at top left, #a855f7, #7c3aed);
  color: #f9fafb;
  box-shadow: 0 10px 26px rgba(124, 58, 237, 0.7);
  transform: translateY(-0.5px);
}

.auth-card {
  background: var(--eb-surface);
  border-radius: 1rem;
  border: 1px solid var(--eb-border-subtle);
  padding: 1rem 1rem 0.9rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--eb-shadow-card);
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at top left, var(--eb-accent-soft), transparent 60%);
  opacity: 0.65;
  pointer-events: none;
}

.auth-card-inner {
  position: relative;
  z-index: 1;
}

.auth-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

.auth-card-header h2 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--eb-strong);
}

.auth-card-sub {
  font-size: 0.8rem;
  color: var(--eb-muted);
  margin: 0 0 0.9rem;
}

.auth-pill {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.98);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--eb-muted);
}

.auth-password-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.auth-password-wrap .auth-input {
  flex: 1;
}

.auth-toggle-password-btn {
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.98);
  color: var(--eb-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  cursor: pointer;
  transition:
    background 0.15s ease-out,
    color 0.15s ease-out,
    border-color 0.15s ease-out;
  white-space: nowrap;
}

.auth-toggle-password-btn:hover {
  background: rgba(15, 23, 42, 1);
  color: var(--eb-strong);
  border-color: #a855f7;
}

.auth-hint {
  font-size: 0.75rem;
  color: var(--eb-muted);
}

.auth-hint strong {
  color: var(--eb-strong);
}

.auth-footer-note {
  font-size: 0.78rem;
  color: var(--eb-muted);
}

/* -------------------------
   My Account page
   ------------------------- */

.account-section {
  margin-bottom: 1.1rem;
}

.auth-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.auth-intro,
.auth-note,
.auth-small-print p {
  font-size: 0.8rem;
  color: #cbd5f5;
}

.auth-note {
  margin-top: 0.35rem;
}

.auth-small-print {
  margin-top: 0.7rem;
  font-size: 0.75rem;
  color: var(--eb-muted);
}

#account-dashboard h2 {
  margin-top: 0;
}

/* -------------------------
   Request Loan page
   ------------------------- */

.request-layout {
  position: relative;
}

.request-overlay {
  position: relative;
  z-index: 2;
  padding: 0.9rem 0.9rem 0.9rem;
  border-radius: 0.9rem;
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(250, 204, 21, 0.5);
  margin-bottom: 0.9rem;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.9);
}

.request-overlay h2 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  color: #f9fafb;
}

.request-overlay .overview-list {
  margin-top: 0.3rem;
}

.request-overlay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

/* Blurred content behind overlay */

.request-content {
  position: relative;
}

.request-blurred {
  filter: blur(2.5px);
  opacity: 0.75;
  pointer-events: none;
}

.loan-summary-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  margin-top: 0.7rem;
}

.summary-card {
  padding: 0.6rem 0.7rem;
  border-radius: 0.8rem;
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.94));
  border: 1px solid rgba(30, 64, 175, 0.55);
}

/* -------------------------
   Contact & Visit Us – support chat tiles
   ------------------------- */

/* Wrapper around all support links */
.support-chat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
  margin: 0.5rem 0 0.9rem;
}

/* Each individual channel (WhatsApp / Telegram / Discord / Email) */
.support-chat-link {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.94));
  text-decoration: none;
  color: #e5e7eb;
  font-size: 0.8rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.9);
  transition:
    background 0.18s ease-out,
    border-color 0.18s ease-out,
    transform 0.18s ease-out,
    box-shadow 0.2s ease-out;
}

.support-chat-link:hover {
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.7), rgba(15, 23, 42, 1));
  border-color: rgba(59, 130, 246, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.95);
}

/* Icon (image or emoji) on the left */
.support-chat-logo,
.support-chat-emoji {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.98);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 1.4rem; /* for emoji block */
}

.support-chat-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* Text stack on the right */
.support-chat-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.support-chat-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: #f9fafb;
}

.support-chat-description {
  font-size: 0.78rem;
  color: #cbd5f5;
}

/* Mobile tweak */
@media (max-width: 640px) {
  .support-chat-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* -------------------------
   How it works specific
   ------------------------- */

.how-flow {
  margin-top: 0.8rem;
}

.how-flow h3 {
  font-size: 0.9rem;
  margin: 0 0 0.4rem;
  color: #f9fafb;
}

.how-flow ol {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  color: #e5e7eb;
}

.how-flow li {
  margin-bottom: 0.35rem;
}

.how-summary {
  margin-top: 0.8rem;
  font-size: 0.8rem;
  color: #e5e7eb;
}

.how-summary h3 {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
}

.how-faq {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  color: #e5e7eb;
}

.how-faq h3 {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
}

.how-faq h4 {
  margin: 0.5rem 0 0.2rem;
  font-size: 0.82rem;
}

/* -------------------------
   FAQ / Q&A accordion (generic)
   ------------------------- */

.faq-panel {
  position: relative;
}

.qa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 0.7rem;
}

.qa-item {
  border-radius: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.85);
  overflow: hidden;
}

.qa-header {
  width: 100%;
  padding: 0.6rem 0.85rem;
  background: transparent;
  border: none;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  cursor: pointer;
  font: inherit;
  color: #f9fafb;
}

.qa-header:hover {
  background: radial-gradient(circle at top left, rgba(30, 64, 175, 0.5), rgba(15, 23, 42, 1));
}

.qa-question {
  font-size: 0.82rem;
  text-align: left;
}

.qa-toggle {
  font-size: 0.9rem;
  flex-shrink: 0;
  width: 1.5rem;
  text-align: center;
  color: #cbd5f5;
  transition: transform 0.18s ease-out, color 0.18s ease-out;
}

/* Answer: hidden by default */
.qa-body {
  max-height: 0;
  opacity: 0;
  padding: 0 0.85rem;
  overflow: hidden;
  visibility: hidden;
  transition:
    max-height 0.22s ease-out,
    opacity 0.16s ease-out,
    visibility 0.16s ease-out,
    padding-top 0.18s ease-out,
    padding-bottom 0.18s ease-out;
}

.qa-body p {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  color: #e5e7eb;
}

/* Open state */
.qa-item.is-open .qa-body {
  max-height: 400px;
  opacity: 1;
  visibility: visible;
  padding-top: 0.2rem;
  padding-bottom: 0.6rem;
}

.qa-item.is-open .qa-toggle {
  transform: rotate(45deg);
  color: #facc15;
}

/* -------------------------
   Footer
   ------------------------- */

.footer {
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.5fr;
  gap: 0.8rem;
  font-size: 0.78rem;
  color: var(--eb-muted);
}

.footer-column h3 {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  color: #f9fafb;
}

.footer-column p {
  margin: 0 0 0.4rem;
}

.footer-column a {
  display: block;
  color: #cbd5f5;
  text-decoration: none;
  margin-bottom: 0.2rem;
  font-size: 0.78rem;
}

.footer-column a:hover {
  text-decoration: underline;
}

.footer-column form {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.footer-column input[type="email"] {
  flex: 1;
  font-size: 0.8rem;
  padding: 0.35rem 0.5rem;
  border-radius: 999px;
}

.footer-column button {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.98);
  color: #e5e7eb;
  font-size: 0.78rem;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  transition:
    background-color 0.16s ease-out,
    border-color 0.16s ease-out;
}

.footer-column button:hover {
  background: rgba(15, 23, 42, 1);
  border-color: rgba(148, 163, 184, 0.85);
}

/* -------------------------
   Mobile nav backdrop
   ------------------------- */

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease-out;
  z-index: 25;
}

/* -------------------------
   Responsive
   ------------------------- */

@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    padding: 0.7rem 0.7rem 1rem;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    max-height: none;
    width: 270px;
    border-radius: 0 1.3rem 1.3rem 0;
    transform: translateX(-100%);
    transition: transform 0.22s ease-out;
    z-index: 30;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .main {
    padding: 0.85rem 0.8rem 1.1rem;
  }

  .topbar {
    padding: 0.6rem 0 0.7rem;
    margin-bottom: 0.75rem;
    align-items: center;
    gap: 0.75rem;
  }

  .topbar-left {
    max-width: calc(100% - 70px);
  }

  .topbar-actions {
    margin-left: auto;
    gap: 0.35rem;
  }

  .topbar-menu {
    display: inline-flex;
  }

  .columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 0.6rem 0.6rem 0.9rem;
  }

  .main {
    border-radius: 1rem;
    padding: 0.8rem 0.8rem 1rem;
  }

  .sidebar {
    width: 250px;
  }

  .topbar-left h1 {
    font-size: 0.96rem;
  }

  .topbar-subline,
  .auth-header-text {
    font-size: 0.76rem;
    max-height: 3.9em; /* limit to ±2–3 lines */
    overflow: hidden;
  }

  .panel {
    padding: 0.9rem;
  }

  .panel-title {
    font-size: 0.9rem;
  }

  .badge {
    margin-bottom: 0.18rem;
  }

  .topbar {
    gap: 0.6rem;
  }

  .topbar-actions .ghost-btn,
  .topbar-actions .primary-btn {
    display: none; /* keep only the nav toggle on very small screens */
  }
}

/* =========================================
   My Account – visual dashboard & graphs
   ========================================= */

#account-notifications {
  margin-bottom: 1.5rem;
}

.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.notification-card {
  border-radius: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.9);
  padding: 0.65rem 0.75rem;
}

.notification-main {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.notification-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  margin-top: 0.3rem;
  flex-shrink: 0;
}

.notification-text {
  font-size: 0.85rem;
  color: #e5e7eb;
  margin: 0 0 0.15rem;
}

.notification-meta {
  font-size: 0.72rem;
  color: #9ca3af;
  margin: 0;
}

.notifications-empty {
  font-size: 0.8rem;
  color: #9ca3af;
}

/* Loan dashboard */

#loan-dashboard {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.loan-dashboard-header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.loan-dashboard-note {
  margin: 0;
  font-size: 0.8rem;
  color: #9ca3af;
}

/* Toggle */

.loan-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.95);
}

.loan-toggle-btn {
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 0.18s ease-out,
    color 0.18s ease-out,
    box-shadow 0.18s ease-out,
    transform 0.16s ease-out;
}

.loan-toggle-btn.active {
  background: radial-gradient(circle at top left, #a855f7, #7c3aed);
  color: #f9fafb;
  box-shadow: 0 10px 26px rgba(124, 58, 237, 0.6);
  transform: translateY(-0.5px);
}

/* Layout */

.loan-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1.6fr);
  gap: 0.9rem;
  align-items: stretch;
}

.loan-balance-card,
.loan-breakdown-card,
.loan-graphs-card,
.loan-action-card {
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.95));
  padding: 0.85rem 0.9rem;
}

.loan-balance-card {
  position: relative;
  overflow: hidden;
}

.loan-balance-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at top left, rgba(124, 58, 237, 0.32), transparent 60%);
  opacity: 0.8;
  pointer-events: none;
}

.loan-balance-card > * {
  position: relative;
  z-index: 1;
}

.loan-balance-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #cbd5f5;
}

.loan-balance-pill {
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid rgba(209, 213, 219, 0.4);
  background: rgba(15, 23, 42, 0.96);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #e5e7eb;
}

.loan-balance-value {
  margin-top: 0.35rem;
  font-size: 2rem;
  font-weight: 700;
  color: #f9fafb;
}

.loan-balance-text {
  margin-top: 0.25rem;
  font-size: 0.82rem;
  color: #cbd5f5;
}

/* Breakdown */

.loan-subtitle {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #e5e7eb;
}

.loan-breakdown-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  font-size: 0.8rem;
}

.loan-breakdown-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.loan-breakdown-list span:first-child {
  color: #9ca3af;
}

.loan-breakdown-list span:last-child {
  color: #e5e7eb;
  font-weight: 500;
}

/* Graphs */

.loan-graphs-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.graph-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.graph-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #e5e7eb;
}

.graph-row-header span:first-child {
  color: #9ca3af;
}

.graph-bar {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.4);
  overflow: hidden;
}

.graph-bar-fill {
  position: absolute;
  inset: 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #a855f7, #7c3aed);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.7);
  transition: width 0.2s ease-out;
}

/* Actions */

.loan-actions-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr);
  gap: 0.9rem;
  margin-top: 0.6rem;
}

.loan-form .field-hint {
  margin-top: 0.15rem;
}

/* Responsive tweaks for loan layout */

@media (max-width: 1024px) {
  .loan-layout {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.5fr);
    grid-template-rows: auto auto;
  }

  .loan-balance-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .loan-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .loan-actions-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .loan-balance-value {
    font-size: 1.6rem;
  }

  #account-notifications {
    margin-top: 0.6rem;
  }
}
