:root {
  --bt-bg: #050816;
  --bt-surface: #111827;
  --bt-surface-soft: #1f2937;
  --bt-accent: #22c55e;
  --bt-accent-soft: rgba(34, 197, 94, 0.15);
  --bt-text: #f9fafb;
  --bt-text-muted: #9ca3af;
  --bt-danger: #f97373;
  --bt-radius-lg: 20px;
  --bt-radius-md: 12px;
  --bt-radius-sm: 999px;
  --bt-shadow-soft: 0 18px 40px rgba(0,0,0,0.45);
  --bt-shadow-subtle: 0 10px 25px rgba(0,0,0,0.35);
}

/* RESET */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  background: radial-gradient(circle at top, #1f2937 0, #020617 55%);
  color: var(--bt-text);
  transition: background 0.35s ease, color 0.35s ease;
}

/* LIGHT THEME OVERRIDES FOR APP SCREEN */
body.bt-theme-light {
  background: #f5f7fb;
  color: #0f172a;
}

/* APP SHELL */
.bt-app {
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0.75rem 4.5rem;
}

/* HEADER */
.bt-header {
  padding: 0.45rem 0.75rem 0.4rem;
  border-radius: 16px;
  margin-bottom: 0.4rem;
  background: #020617;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55);
}

/* Dark theme header (matches dark background) */
body:not(.bt-theme-light) .bt-header {
  background: #020617;
}

/* Light theme header (matches light card) */
body.bt-theme-light .bt-header {
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
}

/* main header row */
.bt-header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

/* logo + text */
.bt-header-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

/* big logo next to LendFluxy */
.bt-logo-large {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
  transform: translateY(2px); /* tiny tweak so it lines nicely with text */
}

/* header text stack */
.bt-header-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.bt-title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.1;
}

.bt-subtitle {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.2;
  color: var(--bt-text-muted);
}

.bt-subtitle-small {
  margin: 0.05rem 0 0;
  font-size: 0.75rem;
  color: var(--bt-text-muted);
}

/* header actions (theme + sign out) */
.bt-header-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.bt-icon-btn {
  border: none;
  background: rgba(15, 23, 42, 0.9);
  color: var(--bt-text);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  font-size: 0.8rem;
  box-shadow: var(--bt-shadow-subtle);
  cursor: pointer;
}

/* icon buttons in light theme */
body.bt-theme-light .bt-icon-btn {
  background: #e5e7eb;
  color: #0f172a;
}

/* theme toggle pill */
.bt-theme-toggle-btn {
  position: relative;
  width: 44px;
  height: 24px;
  padding: 0;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  overflow: hidden;
}

/* background track */
.bt-theme-toggle-btn::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  transition: background 0.25s ease;
}

/* sliding knob */
.bt-theme-toggle-btn::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #f9fafb;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.6);
  transform: translateX(-8px);
  transition: transform 0.25s ease;
}

/* knob position for light / dark */
body.bt-theme-light .bt-theme-toggle-btn::after {
  transform: translateX(-8px);
}

body:not(.bt-theme-light) .bt-theme-toggle-btn::after {
  transform: translateX(8px);
}

/* extra glow for dark mode */
.bt-theme-toggle-btn--dark::before {
  background: rgba(34, 197, 94, 0.2);
}

/* MAIN */
.bt-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* SECTIONS */
.bt-section {
  background: linear-gradient(135deg, rgba(15,23,42,0.95), rgba(8,47,73,0.9));
  border-radius: var(--bt-radius-lg);
  padding: 0.9rem 0.9rem 0.95rem;
  box-shadow: var(--bt-shadow-soft);
}

/* subtle fade/slide when a section becomes active */
.bt-section--active {
  animation: bt-section-in 0.22s ease-out;
}

@keyframes bt-section-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ROWS & LABELS */
.bt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.bt-label {
  font-size: 0.8rem;
  color: var(--bt-text-muted);
}

.bt-label-hint {
  font-size: 0.7rem;
  color: var(--bt-text-muted);
}

/* INPUTS */
.bt-input,
.bt-select,
.bt-textarea {
  width: 100%;
  border-radius: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.85);
  color: var(--bt-text);
  padding: 0.6rem 0.75rem;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.bt-input:focus,
.bt-select:focus,
.bt-textarea:focus {
  border-color: var(--bt-accent);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.25);
  background: rgba(15, 23, 42, 0.95);
}

.bt-textarea {
  resize: vertical;
  min-height: 60px;
}

/* BUTTONS */
.bt-primary-btn {
  width: 100%;
  border-radius: 999px;
  border: none;
  padding: 0.7rem 1rem;
  margin-top: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: linear-gradient(135deg, #22c55e, #4ade80);
  color: #022c22;
  box-shadow: var(--bt-shadow-soft);
  cursor: pointer;
}

.bt-primary-btn:active {
  transform: translateY(1px) scale(0.995);
}

.bt-primary-btn--danger {
  background: linear-gradient(135deg, #f97373, #ef4444);
  color: #fff7f7;
}

.bt-link-btn {
  background: transparent;
  border: none;
  font-size: 0.8rem;
  color: var(--bt-accent);
  text-decoration: underline;
  cursor: pointer;
}

/* CARDS */
.bt-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* DASHBOARD & GENERAL CARD STYLE */
.bt-card {
  border-radius: 1rem;
  background: radial-gradient(circle at top left, #1f2937, #020617);
  padding: 0.5rem 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.35);

  /* subtle default state */
  transform: translateY(2px);
  opacity: 0.98;

  /* smooth transitions */
  transition:
    transform 0.16s ease-out,
    box-shadow 0.16s ease-out,
    opacity 0.16s ease-out;
}

/* HOVER EFFECT (DESKTOP ONLY) */
@media (hover: hover) and (pointer: fine) {
  .bt-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.55);
    opacity: 1;
  }
}

/* Borrower detail card */
#borrowerDetail {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* Top row of the borrower detail card */
.borrower-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.borrower-name {
  font-size: 0.95rem;
  font-weight: 600;
}

/* Credit score chip */
.borrower-score-pill {
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
}

/* Small info tags (loans count, last payment, status) */
.borrower-meta {
  font-size: 0.75rem;
  color: var(--bt-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.borrower-meta span {
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
}

/* Light theme fix */
body.bt-theme-light .borrower-meta span {
  background: #f3f4f6;
}

.bt-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
}

.bt-card-icon {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* dashboard card accent borders */
.bt-card--income {
  border-color: rgba(34, 197, 94, 0.7);
}

.bt-card--expense {
  border-color: rgba(248, 113, 113, 0.7);
}

.bt-card--net {
  border-color: rgba(56, 189, 248, 0.7);
}

.bt-card--outstanding {
  border-color: rgba(234, 179, 8, 0.8);
}

.bt-card-label {
  margin: 0;
  font-size: 0.7rem;
  color: var(--bt-text-muted);
}

.bt-card-value {
  margin: 0.1rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
}

/* FORM */
.bt-form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.5rem;
}

.bt-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

/* DETAILS */
.bt-details {
  border-radius: var(--bt-radius-md);
  background: rgba(15, 23, 42, 0.8);
  padding: 0.35rem 0.5rem 0.55rem;
  transition: background 0.15s ease;
}

.bt-details[open] {
  background: rgba(15, 23, 42, 0.95);
}

.bt-summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
}

.bt-summary::-webkit-details-marker {
  display: none;
}

/* SECTION TITLES & LISTS */
.bt-section-title {
  margin: 0;
  font-size: 0.95rem;
}

.bt-section-subtitle {
  margin: 0.08rem 0 0;
  font-size: 0.8rem;
  color: var(--bt-text-muted);
}

.bt-list {
  margin-top: 0.5rem;
  max-height: 320px;
  overflow-y: auto;
  padding-bottom: 2rem;
}

.bt-list::-webkit-scrollbar {
  width: 4px;
}

.bt-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.5);
  border-radius: 999px;
}

/* TRANSACTION TABLE */
.txn-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.txn-table th,
.txn-table td {
  padding: 0.45rem 0.4rem;
  border-bottom: 1px solid rgba(30, 64, 175, 0.6);
}

.txn-table th {
  position: sticky;
  top: 0;
  background: rgba(15, 23, 42, 0.95);
  z-index: 1;
}

.txn-table tr:nth-child(even) td {
  background: rgba(15, 23, 42, 0.5);
}

.txn-table tr:hover td {
  background: rgba(15, 23, 42, 0.9);
}

.txn-row {
  transition: background 0.15s ease, transform 0.1s ease;
}

/* TYPE BADGE */
.txn-type-badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
}

.txn-type-badge--income {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
}

.txn-type-badge--expense {
  background: rgba(248, 113, 113, 0.18);
  color: #fca5a5;
}

.txn-type-badge--lending {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}

.txn-type-badge--repayment {
  background: rgba(234, 179, 8, 0.18);
  color: #facc15;
}

/* INLINE SELECT */
.bt-select--inline {
  max-width: 140px;
  font-size: 0.75rem;
  padding: 0.35rem 0.5rem;
}

/* BOTTOM NAV */
.bt-bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0.7rem;
  transform: translateX(-50%);
  width: min(480px, 100% - 1.2rem);
  background: rgba(15, 23, 42, 0.96);
  border-radius: 999px;
  padding: 0.35rem;
  box-shadow: 0 18px 40px rgba(0,0,0,0.55);
  display: flex;
  justify-content: space-around;
  backdrop-filter: blur(18px);
}

.bt-bottom-nav-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--bt-text-muted);
  padding: 0.35rem 0.5rem;
  border-radius: 999px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.7rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.bt-bottom-nav-btn span {
  font-size: 0.65rem;
}

.bt-bottom-nav-btn--active {
  background: var(--bt-accent-soft);
  color: var(--bt-accent);
}

/* ==============================
   LOGIN SCREEN – LendFluxy MINT
============================== */

.auth-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.8rem 1.2rem;
  background: radial-gradient(circle at top left, #e6fff4 0, #b8f5de 30%, #7ee0c3 60%, #4cc0ae 100%);
}

.auth-hero {
  text-align: center;
  margin-bottom: 1.4rem;
  padding: 0 0.5rem;
}

.auth-hero-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  color: #064e3b;
}

.auth-hero-title span {
  color: #047857;
}

.auth-hero-subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  color: #047857;
}

/* white card */
.auth-card {
  width: 100%;
  max-width: 380px;
  border-radius: 22px;
  padding: 1.2rem 1.1rem 1.1rem;
  box-shadow: 0 24px 60px rgba(4, 120, 87, 0.25);
}

.auth-card--glass {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(0px);
}

.auth-card-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  color: #064e3b;
}

.auth-email-form {
  margin-top: 0.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.auth-row-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.1rem;
}

.auth-link-inline {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.75rem;
  color: #047857;
  text-decoration: underline;
  cursor: pointer;
}

.auth-mode-hint {
  font-size: 0.75rem;
  color: #6b7280;
}

.auth-card .bt-input,
.auth-card .bt-select,
.auth-card .bt-textarea {
  background: #f9fafb;
  border: 1px solid #e2e8f0;
  color: #0f172a;
}

.auth-card .bt-input::placeholder,
.auth-card .bt-textarea::placeholder {
  color: #9ca3af;
}

/* email button primary green */
.auth-btn-email {
  margin-top: 0.25rem;
  background: linear-gradient(135deg, #059669, #047857);
  color: #ecfdf5;
  box-shadow: 0 16px 35px rgba(4, 120, 87, 0.35);
}

/* divider */
.auth-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.7rem 0 0.5rem;
  font-size: 0.75rem;
  color: #94a3b8;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(148, 163, 184, 0.6);
  margin: 0 0.6rem;
}

/* google button */
.auth-google-btn {
  width: 100%;
  border-radius: 999px;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.1s ease, background 0.15s ease;
}

.auth-google-btn:hover {
  background: #f9fafb;
  box-shadow: 0 12px 30px rgba(148, 163, 184, 0.35);
  transform: translateY(-1px);
}

.auth-google-icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: conic-gradient(
    from 45deg,
    #ea4335 0deg,
    #ea4335 90deg,
    #fbbc05 90deg,
    #fbbc05 180deg,
    #34a853 180deg,
    #34a853 270deg,
    #4285f4 270deg,
    #4285f4 360deg
  );
  display: inline-block;
}

.auth-guest-btn {
  margin-top: 0.8rem;
  width: 100%;
  background: transparent;
  border: none;
  font-size: 0.78rem;
  color: #047857;
  text-decoration: underline;
  cursor: pointer;
}

.auth-error {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--bt-danger);
  min-height: 1em;
}

/* loading spinner */
.auth-submit-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.btn-label {
  transition: opacity 0.2s ease;
}

.btn-spinner {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(15, 23, 42, 0.3);
  border-top-color: rgba(15, 23, 42, 0.9);
  animation: bt-spin 0.7s linear infinite;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.auth-submit-btn.is-loading .btn-label {
  opacity: 0.6;
}

.auth-submit-btn.is-loading .btn-spinner {
  opacity: 1;
  transform: scale(1);
}

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

/* SCREENS: fade between login / app */
.bt-screen {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.bt-screen--active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* hide inactive screens */
#authScreen.bt-screen:not(.bt-screen--active),
#appScreen.bt-screen:not(.bt-screen--active) {
  display: none !important;
}

/* LIGHT THEME – APP OVERRIDES */
body.bt-theme-light .bt-section {
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  border: 1px solid #e5e7eb;
}

body.bt-theme-light .bt-card {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

body.bt-theme-light .bt-details {
  background: #ffffff;
}

body.bt-theme-light .bt-details[open] {
  background: #f9fafb;
}

body.bt-theme-light .bt-input,
body.bt-theme-light .bt-select,
body.bt-theme-light .bt-textarea {
  background: #ffffff;
  border-color: #d1d5db;
  color: #0f172a;
}

body.bt-theme-light .bt-input:focus,
body.bt-theme-light .bt-select:focus,
body.bt-theme-light .bt-textarea:focus {
  background: #ffffff;
  border-color: #16a34a;
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.25);
}

body.bt-theme-light .bt-subtitle,
body.bt-theme-light .bt-subtitle-small,
body.bt-theme-light .bt-label,
body.bt-theme-light .bt-label-hint {
  color: #6b7280;
}

body.bt-theme-light .bt-bottom-nav {
  background: #ffffff;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.16);
}

body.bt-theme-light .bt-bottom-nav-btn {
  color: #6b7280;
}

body.bt-theme-light .bt-bottom-nav-btn--active {
  background: rgba(34, 197, 94, 0.16);
  color: #16a34a;
}

body.bt-theme-light .txn-table th {
  background: #f9fafb;
  border-bottom-color: #e5e7eb;
}

body.bt-theme-light .txn-table tr:nth-child(even) td {
  background: #f9fafb;
}

body.bt-theme-light .txn-table tr:hover td {
  background: #e5f9f0;
}

/* MOBILE TWEAKS */
@media (max-width: 480px) {
  .bt-app {
    padding: 0.5rem 0.4rem 4.5rem;
  }

  .bt-section {
    padding: 0.75rem;
  }

  .bt-title {
    font-size: 1.3rem;
  }

  .bt-subtitle {
    font-size: 0.75rem;
  }

  .bt-input,
  .bt-select,
  .bt-textarea {
    font-size: 0.8rem;
    padding: 0.55rem 0.7rem;
  }

  .bt-bottom-nav-btn {
    font-size: 0.7rem;
    padding: 0.3rem 0.2rem;
  }

  .bt-bottom-nav-btn span {
    font-size: 0.6rem;
  }

  .txn-table th.col-borrower,
  .txn-table td.col-borrower,
  .txn-table th.col-due,
  .txn-table td.col-due,
  .txn-table th.col-notes,
  .txn-table td.col-notes {
    display: none;
  }

  .txn-table th,
  .txn-table td {
    font-size: 0.75rem;
    padding: 0.35rem 0.25rem;
  }

  .auth-screen {
    justify-content: flex-start;
    padding-top: 3.2rem;
  }

  .auth-card {
    margin-top: 1.3rem;
    padding: 1rem 0.9rem 1.1rem;
  }

  .auth-hero-title {
    font-size: 1.65rem;
  }

  .auth-hero-subtitle {
    font-size: 0.85rem;
  }
}

/* BIGGER SCREENS */
@media (min-width: 768px) {
  .bt-app {
    max-width: 720px;
    padding-bottom: 1.5rem;
  }

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

  .bt-list {
    max-height: 400px;
  }

  .bt-bottom-nav {
    position: static;
    margin-top: 0.5rem;
    transform: none;
  }

  .auth-screen {
    justify-content: center;
    padding-top: 0;
  }

  .auth-card {
    max-width: 340px;
    padding: 1rem 0.95rem;
  }

  .auth-hero-title {
    font-size: 1.9rem;
  }
}

/* PRINT STYLES */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .bt-app {
    max-width: 100%;
    padding: 0;
    box-shadow: none;
  }

  .auth-screen,
  .bt-bottom-nav,
  .bt-icon-btn,
  .bt-link-btn,
  #sectionTools,
  #btnGoogleAuth,
  #btnStartApp {
    display: none !important;
  }

  #txnForm,
  .bt-details {
    display: none !important;
  }

  .bt-section {
    background: #ffffff !important;
    box-shadow: none !important;
    border-radius: 0;
    border: 1px solid #e5e7eb;
    margin-bottom: 0.75rem;
  }

  .bt-section-title,
  .bt-label {
    color: #000000 !important;
  }

  .bt-list {
    max-height: none !important;
    overflow: visible !important;
  }

  .txn-table th,
  .txn-table td {
    display: table-cell !important;
    font-size: 10pt !important;
    border-bottom: 1px solid #9ca3af !important;
  }

  .bt-primary-btn {
    display: none !important;
  }

  * {
    font-size: 11pt !important;
  }
}

/* ==============================
   NEW UI: charts, chips, alerts
============================== */

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.chart-card {
  border-radius: var(--bt-radius-lg);
  background: radial-gradient(circle at top left, #1f2937, #020617);
  padding: 0.5rem 0.6rem 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.chart-card canvas {
  width: 100%;
  max-height: 140px;
}

/* quick actions */
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
  align-items: center;
}

.quick-chip {
  border: none;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.75rem;
  background: rgba(15, 23, 42, 0.85);
  color: var(--bt-text-muted);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease, color 0.15s ease;
}

.quick-chip:hover {
  background: rgba(34, 197, 94, 0.18);
  color: #bbf7d0;
}

.quick-chip:active {
  transform: scale(0.97);
}

.bt-input--inline {
  font-size: 0.8rem;
}

/* lending credit score + alerts */
.credit-score-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  font-size: 0.7rem;
  margin-left: 0.25rem;
}

.credit-score--good {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
}

.credit-score--ok {
  background: rgba(234, 179, 8, 0.18);
  color: #facc15;
}

.credit-score--bad {
  background: rgba(248, 113, 113, 0.18);
  color: #fca5a5;
}

.alert-pill {
  border-radius: 1rem;
  padding: 0.35rem 0.55rem;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.85);
}

.alert-pill--high {
  border-color: rgba(248, 113, 113, 0.7);
}

.alert-pill--medium {
  border-color: rgba(234, 179, 8, 0.7);
}

/* onboarding overlay */
.onboarding {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.onboarding-card {
  max-width: 360px;
  width: 90%;
  background: #ffffff;
  border-radius: 22px;
  padding: 1.2rem 1.1rem 1.1rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.4);
}

.onboarding-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
}

.onboarding-card ol {
  margin: 0 0 0.85rem 1.1rem;
  padding: 0;
  font-size: 0.85rem;
  color: #4b5563;
}

.hidden {
  display: none !important;
}

body.bt-theme-light .chart-card,
body.bt-theme-light .alert-pill {
  background: #ffffff;
}

/* --- Dashboard summary strip --- */
.bt-cards--summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.6rem;
  margin: 0.9rem 0;
}

@media (min-width: 640px) {
  .bt-cards--summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.bt-card--soft {
  background: rgba(148, 163, 184, 0.08);
}

/* --- Alerts --- */
.alert-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-height: 1.6rem;
}

.alert-pill {
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.7);
  color: #e5e7eb;
  white-space: nowrap;
}

.alert-pill--medium {
  border-color: #f97316;
  background: rgba(248, 113, 22, 0.1);
}

.alert-pill--high {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}

/* --- Today highlight in table --- */
.txn-row--today {
  background: rgba(34, 197, 94, 0.1);
}

/* --- Floating action button (aligned & non-blocking) --- */
.bt-app {
  position: relative;
}

.bt-fab {
  position: fixed;
  right: 1.2rem;
  bottom: 4.2rem;              /* sits just above the bottom nav on mobile */
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #22c55e, #4ade80);
  color: #0b1120;
  font-size: 1.5rem;
  font-weight: 600;
  box-shadow: var(--bt-shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 40;
  opacity: 0;
  transform: scale(0.9) translateY(10px);
  animation: fabIn 0.35s ease-out forwards;
}

/* New animation */
@keyframes fabIn {
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.bt-fab:active {
  transform: translateY(1px) scale(0.98);
}

/* Give extra space at the bottom of the transaction list
   so the last row never hides under the + button */
#sectionTransactions .bt-list {
  padding-bottom: 5rem;
}

/* Desktop: keep it tidy in the bottom-right corner */
@media (min-width: 768px) {
  .bt-fab {
    bottom: 1.5rem;
    right: 1.5rem;
  }
}

