/* ==========================================================================
   BudgetBond - Modern Authentication Styles
   Theme derived from BudgetBond Flutter App & High-Fidelity Mockups
   ========================================================================== */

:root {
  /* Color Tokens */
  --bb-green-primary: #3fa536;
  --bb-green-hover: #35922e;
  --bb-green-active: #2b7825;
  --bb-green-tint: #f1faf0;
  --bb-green-border: #55ba47;
  --bb-green-glow: rgba(85, 186, 71, 0.18);

  --bb-navy-headline: #243a5e;
  --bb-navy-body: #3d5274;
  --bb-slate-muted: #55667e;
  --bb-slate-light: #8e9ea7;
  --bb-label: #4d6384;

  --bb-field-bg: #fdfdfd;
  --bb-field-border: #d4d8de;
  --bb-field-focus: #55ba47;

  --bb-card-bg: #ffffff;
  --bb-card-shadow: 0 13px 32px rgba(0, 0, 0, 0.12);
  --bb-card-border: rgba(220, 226, 235, 0.7);

  /* Typography */
  --font-heading: "Poppins", "Plus Jakarta Sans", sans-serif;
  --font-body: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Transitions */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--bb-navy-body);
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  overflow-x: hidden;
}

button, input {
  font-family: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Master Layout: 2 Columns tightly proportioned */
.auth-wrapper {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 46.2%) 1fr;
  position: relative;
}

/* ==========================================================================
   LEFT BRAND PANEL
   ========================================================================== */
.brand-panel {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 3.2vw 36px;
  overflow: hidden; /* Clips the scaled stacked cards on the right */
  background:
    radial-gradient(circle at 92% 10%, #76ee34 0%, #a4f85e 25%, #d8fcb1 48%, rgba(255, 255, 255, 0) 72%),
    linear-gradient(170deg, #9af74d 0%, #c4fc92 18%, #f6fff0 40%, #ffffff 64%, #ffffff 100%);
  border-right: 1px solid #c7c7c7;
}

.brand-header {
  position: relative;
  z-index: 10;
}

/* BudgetBond Logo: Lowered font weight (non-bold) */
.brand-logo {
  display: inline-block;
  font-family: "Poppins", sans-serif;
  font-size: clamp(23px, 2vw, 27px);
  font-weight: 500; /* Medium, non-bold */
  color: #0e1726;
  letter-spacing: -0.6px;
  transition: opacity 0.2s ease;
}

.brand-logo:hover {
  opacity: 0.9;
}

.brand-showcase {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 6px;
}

/* Artwork container aligned right to clip at panel edge */
.cards-artwork-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 64%;
  min-height: 350px;
  max-height: 540px;
  position: relative;
  overflow: visible;
}

.cards-artwork {
  width: min(100%, 640px);
  max-height: 100%;
  object-fit: contain;
  object-position: right center;
  transform: scale(1.24) translateX(14%);
  transform-origin: right center;
  filter: drop-shadow(0 20px 22px rgba(0, 0, 0, 0.18));
  user-select: none;
  pointer-events: none;
}

.brand-footer-text {
  position: relative;
  z-index: 5;
  padding: 0 1vw 4px;
}

.brand-headline {
  font-family: "Poppins", var(--font-heading);
  font-size: clamp(21px, 1.9vw, 26px);
  font-weight: 600;
  color: var(--bb-navy-headline);
  line-height: 1.25;
  margin-bottom: 7px;
  letter-spacing: -0.3px;
}

.brand-tagline {
  font-size: 12.5px;
  color: #3d5274;
  line-height: 1.42;
  max-width: 360px;
  font-weight: 400;
}

/* ==========================================================================
   RIGHT AUTH PANEL & CARD
   ========================================================================== */
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 4vw;
  background-color: #ffffff;
  position: relative;
}

.auth-card {
  width: min(100%, 485px);
  background: var(--bb-card-bg);
  border-radius: 10px;
  padding: 38px 38px 28px;
  box-shadow: var(--bb-card-shadow);
  border: 1px solid var(--bb-card-border);
  position: relative;
}

/* Form Views Transition */
.form-view {
  display: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s var(--ease-smooth), transform 0.2s var(--ease-smooth);
}

.form-view.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Card Header */
.card-header {
  margin-bottom: 22px;
}

.card-title {
  font-family: "Poppins", var(--font-heading);
  font-size: 28px;
  font-weight: 600;
  color: var(--bb-navy-headline);
  letter-spacing: -0.4px;
  line-height: 1.22;
}

.card-subtitle {
  font-size: 12px;
  color: var(--bb-slate-muted);
  margin-top: 5px;
  line-height: 1.38;
}

/* ==========================================================================
   ROLE SELECTOR (OFW vs Recipient)
   ========================================================================== */
.role-selector-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.role-card {
  height: 61px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: #ffffff;
  border: 1px solid var(--bb-field-border);
  border-radius: 7px;
  cursor: pointer;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.08);
  transition: all 0.2s var(--ease-smooth);
  color: #475b75;
  user-select: none;
}

.role-card:hover {
  border-color: #b8c4d2;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.18), inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.role-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6a7c93;
  transition: color 0.2s ease;
}

.role-svg {
  width: 19px;
  height: 19px;
}

.role-text {
  font-size: 11.5px;
  font-weight: 600;
}

/* Selected State */
.role-card.selected {
  background: var(--bb-green-tint);
  border-color: var(--bb-green-border);
  border-width: 1.5px;
  color: var(--bb-green-primary);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.12), inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.role-card.selected:hover {
  border-color: var(--bb-green-border);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.role-card.selected .role-icon-box {
  color: var(--bb-green-primary);
}

.role-card:focus-visible {
  outline: 2px solid var(--bb-green-border);
  outline-offset: 2px;
}

/* ==========================================================================
   FORM INPUTS & LABELS
   ========================================================================== */
.form-group {
  margin-bottom: 16px;
  position: relative;
}

/* Sign In Labels: Uppercase */
#view-sign-in .input-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--bb-label);
  margin-bottom: 5px;
}

/* Sign Up Labels: Title Case matching mockup */
#view-sign-up .input-label {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  text-transform: none;
  color: var(--bb-label);
  margin-bottom: 5px;
}

/* Inset Bevel Shadow for Fields */
.input-container {
  position: relative;
  display: flex;
  align-items: center;
  height: 44px;
  background: var(--bb-field-bg);
  border: 1px solid var(--bb-field-border);
  border-radius: 7px;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.14), inset 0 1px 2px rgba(0, 0, 0, 0.07);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-container:focus-within {
  border-color: var(--bb-field-focus);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04), 0 0 0 2px var(--bb-green-glow);
}

.field-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 11px;
  color: #8b99a8;
  pointer-events: none;
}

.field-input {
  flex: 1;
  height: 100%;
  width: 100%;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  padding: 0 12px 0 8px;
  font-size: 13px;
  color: #1a2738;
}

.field-input.no-left-icon {
  padding-left: 12px;
}

.field-input::placeholder {
  color: #9aa7b5;
  font-size: 12.5px;
}

/* Password Visibility Toggle */
.toggle-password-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  height: 100%;
  background: transparent;
  border: none;
  color: #7d8f9f;
  cursor: pointer;
  transition: color 0.2s ease;
}

.toggle-password-btn:hover {
  color: #3e4f62;
}

/* ==========================================================================
   FORM AUXILIARY ROW (Remember Me & Forgot Password)
   ========================================================================== */
.form-aux-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -6px;
  margin-bottom: 22px;
  font-size: 12px;
  color: var(--bb-navy-body);
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
  color: var(--bb-navy-body);
}

.checkbox-container input {
  width: 13px;
  height: 13px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--bb-green-primary);
}

.checkbox-label {
  font-size: 12px;
  font-weight: 500;
  color: #475b75;
}

.accent-link {
  color: var(--bb-green-primary);
  font-weight: 600;
  font-size: 12px;
  transition: color 0.15s ease, text-decoration 0.15s ease;
}

.accent-link:hover {
  color: var(--bb-green-hover);
  text-decoration: underline;
}

/* ==========================================================================
   SUBMIT BUTTONS
   ========================================================================== */
.submit-action-btn {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bb-green-primary);
  color: #ffffff;
  border: none;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.1px;
  cursor: pointer;
  box-shadow: 0 2px 7px rgba(63, 165, 54, 0.25);
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  position: relative;
}

.submit-action-btn:hover {
  background-color: var(--bb-green-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(63, 165, 54, 0.32);
}

.submit-action-btn:active {
  background-color: var(--bb-green-active);
  transform: translateY(0);
}

.submit-action-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* Spinner for Async API Submissions */
.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: 8px;
}

.submit-action-btn.is-loading .btn-spinner {
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   CARD FOOTER & SWITCH LINK
   ========================================================================== */
.card-footer {
  margin-top: 48px;
  text-align: center;
}

.switch-view-text {
  font-size: 12px;
  color: #4d6384;
}

.switch-link-btn {
  background: none;
  border: none;
  color: var(--bb-green-primary);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  margin-left: 2px;
  transition: color 0.15s ease, text-decoration 0.15s ease;
}

.switch-link-btn:hover {
  color: var(--bb-green-hover);
  text-decoration: underline;
}

/* ==========================================================================
   ALERT BANNERS & NOTIFICATIONS
   ========================================================================== */
.alert-banner {
  padding: 9px 12px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideDown 0.2s var(--ease-smooth);
}

.alert-banner.error {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.alert-banner.success {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   POPUP MODAL / DIALOG (Inspired by Flutter error_dialog.dart)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: #ffffff;
  border-radius: 14px;
  width: 100%;
  max-width: 390px;
  padding: 24px 22px 18px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
  transform: scale(0.96);
  transition: transform 0.2s var(--ease-spring);
}

.modal-backdrop.is-open .modal-box {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.modal-status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-status-icon.error {
  color: #d32f2f;
}

.modal-status-icon.success {
  color: var(--bb-green-primary);
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 16.5px;
  font-weight: 600;
  color: var(--bb-navy-headline);
}

.modal-body {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.48;
  margin-bottom: 18px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
}

.modal-action-btn {
  background: none;
  border: none;
  color: var(--bb-green-primary);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 6px;
  transition: background-color 0.15s ease;
}

.modal-action-btn:hover {
  background-color: var(--bb-green-tint);
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 900px) {
  .auth-wrapper {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    min-height: auto;
    padding: 26px 24px 32px;
    border-right: none;
    border-bottom: 1px solid #c7c7c7;
  }

  .cards-artwork-container {
    height: 250px;
    min-height: 220px;
    justify-content: center;
  }

  .cards-artwork {
    transform: none;
    object-position: center;
  }

  .auth-panel {
    padding: 32px 18px 44px;
  }

  .auth-card {
    padding: 30px 24px 24px;
  }
}

@media (max-width: 480px) {
  .brand-panel {
    padding: 20px 18px 24px;
  }

  .brand-logo {
    font-size: 22px;
  }

  .cards-artwork-container {
    height: 180px;
    min-height: 160px;
  }

  .brand-headline {
    font-size: 20px;
  }

  .brand-tagline {
    font-size: 12px;
  }

  .card-title {
    font-size: 24px;
  }

  .auth-card {
    padding: 24px 18px 20px;
  }

  .role-card {
    height: 56px;
  }
}

/* ==========================================================================
   GLOBAL APP TOP HEADER & EMBLEM (Images 1, 2, 5)
   ========================================================================== */
.clean-page-body {
  background-color: #ffffff;
  min-height: 100vh;
}

.app-top-header {
  height: 64px;
  border-bottom: 1px solid #e7ecf2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: #ffffff;
}

.top-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-emblem-icon {
  width: 32px;
  height: 32px;
  background: #b2b7bd;
  border-radius: 7px;
  flex-shrink: 0;
}

.top-header-logo-text {
  font-family: "Poppins", sans-serif;
  font-size: 20px;
  font-weight: 500;
  color: #0e1726;
  letter-spacing: -0.4px;
}

.header-logout-btn {
  background: none;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.header-logout-btn:hover {
  background: #f8fafc;
  color: #334155;
}

/* ==========================================================================
   HOUSEHOLD LINKING PAGE (Images 1, 2, 5)
   ========================================================================== */
.link-page-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 65px);
  padding: 40px 20px 60px;
}

.link-card {
  width: min(100%, 460px);
  background: #ffffff;
  border-radius: 12px;
  padding: 42px 38px 36px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12), 0 2px 10px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(220, 226, 235, 0.7);
  position: relative;
}

.link-welcome-title {
  font-family: "Poppins", sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--bb-navy-headline);
  letter-spacing: -0.4px;
}

.link-subheading {
  font-family: "Poppins", sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--bb-navy-headline);
  margin-top: 18px;
}

.link-explainer {
  font-size: 12px;
  color: var(--bb-slate-muted);
  line-height: 1.45;
  margin-top: 6px;
  margin-bottom: 24px;
}

/* State 1: Generate Action */
.generate-code-btn {
  width: 100%;
  height: 44px;
  border-radius: 22px;
  background-color: var(--bb-green-primary);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(63, 165, 54, 0.25);
}

.generate-code-btn:hover {
  background-color: var(--bb-green-hover);
  transform: translateY(-1px);
}

/* State 2: Dashed Code Box (Image 5) */
.dashed-code-box {
  border: 1.5px dashed var(--bb-green-border);
  border-radius: 8px;
  padding: 13px;
  text-align: center;
  background: #ffffff;
  margin-bottom: 12px;
}

.code-text {
  font-family: "Poppins", monospace;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--bb-navy-headline);
}

.copy-code-btn {
  width: 100%;
  height: 38px;
  border-radius: 19px;
  background: #92d98c;
  color: #24581f;
  font-size: 12.5px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-code-btn:hover {
  background: #83d37c;
}

.switch-to-link-wrap {
  text-align: center;
  margin-top: 10px;
}

.text-link-small {
  background: none;
  border: none;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--bb-green-primary);
  cursor: pointer;
  text-decoration: underline;
}

/* State 3: Dashed Share Link Box (Image 2) */
.dashed-link-box {
  border: 1.5px dashed #cbd5e1;
  border-radius: 10px;
  padding: 18px 16px 14px;
  background: #f8fafc;
  text-align: center;
  margin-bottom: 8px;
}

.share-link-label {
  display: block;
  color: var(--bb-green-primary);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}

.share-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #ffffff;
  border: 1px solid #d4d8de;
  border-radius: 8px;
  padding: 3px 4px 3px 12px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08);
}

.share-link-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 12px;
  color: #334155;
  background: transparent;
}

.copy-link-btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 6px;
  background: var(--bb-green-primary);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.copy-link-btn:hover {
  background: var(--bb-green-hover);
}

.share-expiry-text {
  display: block;
  font-size: 11px;
  color: #718399;
  margin-top: 10px;
}

/* Divider with OR */
.or-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #9aa7b5;
  font-size: 11px;
  font-weight: 500;
  margin: 20px 0;
}

.or-divider::before,
.or-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.or-divider span {
  padding: 0 10px;
}

/* Redeem Code Input Wrap (Inset shadow matching image 1 & 5) */
.redeem-input-wrap {
  height: 44px;
  border-radius: 8px;
  border: 1.2px solid #77cb69;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.12), inset 0 1px 2px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  padding: 4px 5px 4px 14px;
  background: #fdfdfd;
}

.redeem-field {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 12.5px;
  color: #1e293b;
}

.redeem-field::placeholder {
  color: #94a3b8;
  font-size: 12px;
}

.redeem-action-btn {
  height: 34px;
  padding: 0 18px;
  border-radius: 6px;
  background: var(--bb-green-primary);
  color: #ffffff;
  font-weight: 600;
  font-size: 12px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.redeem-action-btn:hover {
  background: var(--bb-green-hover);
}

.link-card-footer {
  text-align: center;
  font-size: 11px;
  color: #718399;
  line-height: 1.45;
  margin-top: 36px;
}

/* ==========================================================================
   DASHBOARD & RECURRING OBLIGATIONS (Images 3 & 4)
   ========================================================================== */
.dashboard-body {
  background: #ffffff;
  min-height: 100vh;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.dashboard-sidebar {
  background: #ffffff;
  border-right: 1px solid #eef2f6;
  padding: 28px 18px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: sticky;
  top: 0;
  height: 100vh;
  box-sizing: border-box;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding-left: 6px;
}

.mobile-menu-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  padding: 9px;
  border: 1px solid #dfe8e0;
  border-radius: 10px;
  background: #f5faf4;
  cursor: pointer;
}

.mobile-menu-toggle span {
  display: block;
  height: 2px;
  margin: 4px 0;
  border-radius: 2px;
  background: #35922e;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.sidebar-logo-text {
  font-family: "Poppins", sans-serif;
  font-size: 20px;
  font-weight: 500;
  color: #0e1726;
  letter-spacing: -0.4px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-pill-item {
  width: 100%;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  color: #3d5274;
  background: #ffffff;
  border: 1px solid #eef2f6;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.nav-pill-item:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.nav-pill-item.active {
  background: #eef9ec;
  color: #35922e;
  border-color: #d4f0cc;
  font-weight: 600;
}

.nav-pill-item.active .nav-icon {
  color: #35922e;
}

.logout-pill {
  color: #ef4444;
  border-color: #fee2e2;
}

.logout-pill:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

.logout-pill .nav-icon {
  color: inherit;
}

/* Dashboard Main Content */
.dashboard-main-content {
  padding: 36px 42px;
  background: #ffffff;
  min-height: 100vh;
  box-sizing: border-box;
}

.main-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.main-page-title {
  font-family: "Poppins", var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--bb-navy-headline);
  letter-spacing: -0.3px;
}

.main-page-subtitle {
  font-size: 12.5px;
  color: var(--bb-slate-muted);
  margin-top: 4px;
}

.user-avatar-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #c2f3b8;
  color: #27791e;
  font-weight: 700;
  display: grid;
  place-items: center;
  font-size: 15px;
}

/* Big Green Gradient Banner (Image 4) */
.cycle-banner-card {
  background: linear-gradient(105deg, #93d376 0%, #58c952 33%, #278b72 100%);
  border-radius: 14px;
  padding: 22px 28px;
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(52, 156, 45, 0.28), 0 3px 8px rgba(24, 74, 52, 0.1);
}

.cycle-banner-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cycle-pill-tag {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11.5px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.cycle-days-tag {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 500;
}

.cycle-budget-middle {
  margin-top: 14px;
}

.cycle-budget-label {
  font-size: 12.5px;
  font-weight: 500;
  opacity: 0.92;
}

.cycle-budget-amount {
  font-family: "Poppins", sans-serif;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-top: 2px;
  line-height: 1.15;
}

.cycle-banner-stats-row {
  display: flex;
  gap: 32px;
  justify-content: flex-end;
  margin-top: -10px;
}

.cycle-stat-item {
  text-align: right;
}

.stat-label {
  display: block;
  font-size: 11px;
  opacity: 0.88;
  margin-bottom: 2px;
}

.stat-value {
  font-size: 15px;
  font-weight: 700;
}

/* Two Cards Grid */
.overview-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 26px;
}

.overview-widget-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 24px;
  border: 1px solid #eef2f6;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12), 0 3px 8px rgba(15, 23, 42, 0.07);
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.widget-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.widget-card-title {
  font-family: "Poppins", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--bb-navy-headline);
}

.widget-header-link {
  background: none;
  border: none;
  font-size: 11.5px;
  font-weight: 600;
  color: #35922e;
  cursor: pointer;
}

.widget-header-link:hover {
  text-decoration: underline;
}

.widget-empty-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.empty-widget-icon {
  width: 44px;
  height: 44px;
  opacity: 0.45;
}

.coin-empty-icon {
  color: #8b99a8;
  opacity: 0.55;
}

.empty-widget-text {
  font-size: 12px;
  color: #718399;
  max-width: 250px;
  line-height: 1.45;
  margin-top: 14px;
}

.mini-obligation-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}

.mini-ob-summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mini-ob-status {
  color: #2b7825;
  background: #eef9ec;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 700;
}

.mini-ob-name {
  color: #1e293b;
  font-weight: 500;
}

.mini-ob-amount {
  font-weight: 700;
  color: var(--bb-navy-headline);
}

/* ======================================================================
   GOALS AND SAVINGS TAB
   ====================================================================== */
.goals-page-header {
  margin-bottom: 18px;
}

.goals-management-layout {
  display: block;
  max-width: 560px;
}

.goal-form-card,
.goals-list-panel {
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
}

.goal-form-card {
  padding: 24px 26px 26px;
}

.goal-form-group {
  margin-bottom: 18px;
}

.goal-input-label {
  display: block;
  color: var(--bb-label);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 4px;
}

.goal-input-container {
  height: 38px;
  border-radius: 6px;
}

.goal-input-container .field-input {
  font-size: 12px;
  padding-left: 9px;
}

.goal-input-container .field-input::placeholder {
  font-size: 11px;
}

.goal-field-icon {
  width: 30px;
  display: grid;
  place-items: center;
  color: #8e9aa9;
  font-size: 13px;
  pointer-events: none;
}

.goal-description-group {
  margin-top: 1px;
}

.goal-description-input {
  display: block;
  width: 100%;
  min-height: 90px;
  resize: vertical;
  border: 1px solid var(--bb-field-border);
  border-radius: 6px;
  outline: none;
  padding: 10px;
  color: #1a2738;
  font: 12px/1.4 var(--font-body);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.goal-description-input:focus {
  border-color: var(--bb-field-focus);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04), 0 0 0 2px var(--bb-green-glow);
}

.goal-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 28px;
}

.goal-cancel-btn,
.goal-confirm-btn {
  height: 38px;
  min-width: 100px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.goal-cancel-btn {
  background: #ffffff;
  border: 1px solid #cbd2da;
  color: #1e293b;
}

.goal-confirm-btn {
  background: var(--bb-green-primary);
  border: 1px solid var(--bb-green-primary);
  color: #ffffff;
  position: relative;
}

.goal-confirm-btn:hover {
  background: var(--bb-green-hover);
}

.goal-confirm-btn.is-loading .btn-spinner {
  display: inline-block;
}

.goals-list-panel {
  display: none;
  min-height: 160px;
  padding: 18px;
}

.goals-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef2f6;
}

.goals-list-title {
  color: var(--bb-navy-headline);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
}

.goals-count {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bb-green-tint);
  color: var(--bb-green-primary);
  font-size: 11px;
  font-weight: 700;
}

.goals-list-empty {
  padding: 30px 12px;
  color: #8b99a8;
  font-size: 11px;
  text-align: center;
}

.goal-summary-item {
  padding: 14px 0;
  border-bottom: 1px solid #f1f5f9;
}

.goal-summary-item:last-child {
  border-bottom: none;
}

.goal-summary-heading,
.goal-summary-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.goal-summary-heading h3 {
  color: var(--bb-navy-headline);
  font-size: 12px;
  font-weight: 600;
}

.goal-summary-heading strong {
  color: var(--bb-navy-headline);
  font-size: 11px;
}

.goal-progress-track {
  height: 6px;
  margin: 9px 0 5px;
  overflow: hidden;
  border-radius: 4px;
  background: #e8f2e5;
}

.goal-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d4f9bd 0%, #68d75a 48%, #318f75 100%);
}

.goal-summary-meta {
  color: #8b99a8;
  font-size: 10px;
}

/* ==========================================================================
   RECURRING OBLIGATIONS TAB (Image 3)
   ========================================================================== */
.obligations-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.filter-pills-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.filter-pill {
  height: 32px;
  padding: 0 16px;
  border-radius: 16px;
  border: none;
  background: #e2e8e0;
  color: #3d5274;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  background: #d4ded2;
}

.filter-pill.active {
  background: var(--bb-green-primary);
  color: #ffffff;
  font-weight: 600;
}

.create-new-btn {
  height: 34px;
  padding: 0 18px;
  border-radius: 17px;
  background: var(--bb-green-primary);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(63, 165, 54, 0.25);
  transition: all 0.15s ease;
}

.create-new-btn:hover {
  background: var(--bb-green-hover);
  transform: translateY(-1px);
}

/* Obligations List Cards (Image 3) */
.obligations-list-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.obligation-card-item {
  background: #ffffff;
  border-radius: 12px;
  padding: 18px 24px;
  border: 1px solid #eef2f6;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(180px, 220px) max-content;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.obligation-card-item:focus-visible {
  outline: 3px solid var(--bb-green-glow);
  outline-offset: 2px;
}

.obligation-card-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
}

.ob-card-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.ob-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #eef2f6;
  display: grid;
  place-items: center;
  color: #718399;
  flex-shrink: 0;
}

.ob-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ob-title {
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--bb-navy-headline);
  margin: 0;
}

.ob-category-pill {
  background: #d4f4cb;
  color: #27791e;
  border-radius: 12px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
}

.ob-due-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: #718399;
  margin-top: 4px;
}

.ob-card-middle {
  font-size: 11px;
  color: #475b75;
  line-height: 1.45;
  width: 220px;
}

.ob-card-middle strong {
  color: #1e293b;
}

.ob-card-right {
  text-align: right;
}

.ob-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: max-height 0.2s ease, margin-top 0.2s ease, opacity 0.18s ease, transform 0.2s ease;
}

.obligation-card-item.is-expanded .ob-card-actions {
  max-height: 40px;
  margin-top: 10px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.ob-action-btn {
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.ob-action-btn:hover {
  transform: translateY(-1px);
}

.ob-action-edit {
  color: #27791e;
  border-color: #cfe8c9;
  background: #f1faf0;
}

.ob-action-edit:hover {
  border-color: #9ed391;
  background: #e6f6e2;
}

.ob-action-delete {
  color: #b42318;
  border-color: #f2ceca;
  background: #fff6f5;
}

.ob-action-delete:hover {
  border-color: #e8a7a0;
  background: #ffebe9;
}

.ob-amount-display {
  font-family: "Poppins", sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--bb-navy-headline);
  letter-spacing: -0.2px;
}

.empty-obligations-box,
.loading-state-box {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
  font-size: 13px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
}

/* Modal Form Styles */
.modal-form-box {
  max-width: 532px;
  padding: 26px 26px 20px;
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.13), 0 3px 8px rgba(15, 23, 42, 0.06);
}

#modal-create-obligation {
  background-color: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(2px);
}

#modal-create-obligation .modal-close-icon {
  display: none;
}

.modal-form-box .modal-header {
  margin-bottom: 20px;
}

.modal-form-box .modal-title {
  font-size: 24px;
  color: var(--bb-navy-headline);
}

.modal-form-box .input-label {
  display: block;
  margin-bottom: 6px;
  color: #526987;
  font-size: 11px;
  font-weight: 600;
}

.modal-form-box .form-group {
  margin-bottom: 14px;
}

.modal-form-box .input-container {
  height: 34px;
  border-color: #b9bec2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: inset 0 2px 5px rgba(15, 23, 42, 0.12), 0 1px 2px rgba(15, 23, 42, 0.03);
}

.modal-form-box .input-container:focus-within {
  border-color: var(--bb-green-primary);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04), 0 0 0 2px var(--bb-green-glow);
}

.modal-form-box .field-input {
  font-size: 11px;
}

.modal-form-box .field-input::placeholder {
  color: #98a5b4;
  font-size: 11px;
}

.obligation-name-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.obligation-name-field .input-container {
  flex: 1;
}

.obligation-field-icon {
  width: 36px;
  height: 34px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #e7e8e8;
  color: #7d8588;
}

.obligation-field-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.modal-close-icon {
  background: none;
  border: none;
  font-size: 16px;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
}

.modal-close-icon:hover {
  color: #334155;
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.select-container {
  padding: 0 8px;
}

.select-field {
  cursor: pointer;
}

.modal-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 26px;
}

.btn-cancel {
  height: 40px;
  min-width: 118px;
  padding: 0 16px;
  border-radius: 7px;
  background: #ffffff;
  color: #26364b;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #b8bec1;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn-cancel:hover {
  background: #f4f6f6;
  border-color: #8e989b;
  transform: translateY(-1px);
}

.btn-modal-submit {
  height: 40px;
  min-width: 132px;
  padding: 0 20px;
  width: auto;
  border-radius: 7px;
  font-size: 12px;
}

@media (max-width: 560px) {
  .modal-form-box {
    padding: 22px 18px 18px;
  }

  .modal-form-actions {
    gap: 8px;
  }

  .btn-cancel,
  .btn-modal-submit {
    min-width: 0;
    flex: 1;
  }
}

/* Account Management View */
.account-page-header {
  margin-bottom: 14px;
}

.account-view-state[hidden] {
  display: none;
}

.account-profile-hero,
.account-edit-card,
.account-password-card,
.linked-account-card,
.pending-invite-card {
  background: #ffffff;
  border: 1px solid #eef2f6;
  box-shadow: 0 9px 22px rgba(15, 23, 42, 0.1), 0 2px 6px rgba(15, 23, 42, 0.05);
}

.account-profile-hero {
  max-width: 700px;
  min-height: 116px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 26px;
  border-radius: 9px;
}

.account-avatar-large {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e5f8df;
  color: #3a9833;
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 600;
}

.account-profile-copy h2 {
  color: var(--bb-navy-headline);
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 700;
}

.account-profile-copy p,
.account-state-subtitle {
  color: var(--bb-slate-muted);
  font-size: 12px;
}

.account-section-label {
  margin: 34px 0 13px;
  color: var(--bb-label);
  font-size: 12px;
  font-weight: 600;
}

.account-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(250px, 1fr));
  gap: 18px;
  max-width: 700px;
}

.account-menu-card {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 15px 20px;
  border: 1px solid #eef2f6;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 7px 16px rgba(15, 23, 42, 0.08), 0 2px 5px rgba(15, 23, 42, 0.04);
  color: var(--bb-navy-body);
  cursor: pointer;
  text-align: left;
}

.account-menu-card:hover,
.account-secondary-btn:hover,
.account-photo-btn:hover {
  border-color: #b9ddb2;
  background: #fbfffa;
}

.account-menu-icon,
.linked-small-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #f0faed;
  color: #3a9833;
  font-size: 18px;
  overflow: hidden;
}

.account-menu-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

.account-menu-copy strong,
.linked-account-card strong,
.pending-invite-card strong {
  color: var(--bb-navy-headline);
  font-size: 12px;
  font-weight: 600;
}

.account-menu-copy small,
.linked-account-card small,
.pending-invite-card small,
.account-password-card small {
  color: #718399;
  font-size: 10px;
}

.account-chevron {
  color: #718399;
  font-size: 20px;
}

.account-back-link {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  padding: 0;
  border: none;
  background: none;
  color: var(--bb-navy-body);
  font-size: 11px;
  cursor: pointer;
}

.account-back-link strong {
  color: var(--bb-navy-headline);
}

.account-state-title {
  color: var(--bb-navy-headline);
  font-family: var(--font-heading);
  font-size: 25px;
  font-weight: 700;
}

.account-state-subtitle {
  margin-top: 5px;
  margin-bottom: 18px;
}

.account-edit-card {
  max-width: 700px;
  padding: 22px 26px 20px;
  border-radius: 9px;
}

.account-edit-topline {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}

.account-photo-btn,
.account-secondary-btn {
  height: 32px;
  padding: 0 18px;
  border: 1px solid #d8e0e8;
  border-radius: 6px;
  background: #ffffff;
  color: var(--bb-navy-body);
  font-size: 11px;
  cursor: pointer;
}

.account-edit-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.account-input-label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--bb-navy-body);
  font-size: 11px;
  font-weight: 600;
}

.account-input-label input {
  height: 34px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid var(--bb-field-border);
  border-radius: 6px;
  outline: none;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.08);
  color: var(--bb-navy-body);
  font-size: 11px;
}

.account-input-label input:focus {
  border-color: var(--bb-field-focus);
}

.account-input-label small {
  color: #718399;
  font-size: 10px;
  font-weight: 400;
}

.account-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 42px;
}

.account-cancel-btn,
.account-save-btn {
  height: 38px;
  min-width: 105px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.account-cancel-btn {
  border: 1px solid #d8e0e8;
  background: #ffffff;
  color: #1e293b;
}

.account-save-btn {
  border: 1px solid var(--bb-green-primary);
  background: var(--bb-green-primary);
  color: #ffffff;
}

.account-password-card {
  max-width: 700px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding: 20px 24px;
  border-radius: 9px;
}

.account-password-card div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.linked-account-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(250px, 1fr));
  gap: 44px;
  max-width: 700px;
}

.linked-column-heading {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--bb-navy-headline);
  font-size: 12px;
}

.linked-column-heading span {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 50%;
  background: #e4f5df;
  color: #3a9833;
  font-size: 8px;
}

.linked-account-card,
.pending-invite-card {
  min-height: 92px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border-radius: 9px;
}

.linked-account-card > div,
.pending-invite-card > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

.linked-status,
.pending-tag {
  width: fit-content;
  padding: 2px 5px;
  border-radius: 4px;
  background: #e4f5df;
  color: #3a9833;
  font-size: 7px;
}

.pending-tag {
  background: #fff4cf;
  color: #9a7213;
}

.unlink-account-btn,
.invite-actions button {
  border: 1px solid #f3a5a5;
  border-radius: 4px;
  background: #ffffff;
  color: #e55b5b;
  font-size: 8px;
  cursor: pointer;
}

.invite-actions {
  display: flex;
  gap: 5px;
  margin-top: 6px;
}

.invite-actions button {
  padding: 3px 6px;
  border-color: #d8e0e8;
  color: var(--bb-navy-body);
}

.linked-empty-state {
  color: #718399;
  font-size: 9px;
}

.user-avatar-badge,
.account-avatar-large { 
  overflow: hidden; 
}

.avatar-img { 
  width: 100%; height: 100%;
   object-fit: cover;
    display: block; 
  }

  .widget-list-content {
  max-height: 260px;      
  overflow-y: auto;
  padding-right: 4px;
}

/* Responsive Dashboard Layout */
@media (max-width: 900px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid #eef2f6;
    padding: 20px;
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .nav-pill-item {
    width: auto;
  }

  .dashboard-main-content {
    padding: 24px 20px;
  }

  .overview-cards-grid {
    grid-template-columns: 1fr;
  }

  .goals-management-layout {
    grid-template-columns: 1fr;
  }

  .account-menu-grid,
  .linked-account-columns,
  .account-edit-fields {
    grid-template-columns: 1fr;
  }

  .account-profile-hero,
  .account-edit-card,
  .account-password-card,
  .linked-account-card,
  .pending-invite-card {
    max-width: 100%;
  }

  .obligation-card-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .ob-card-right {
    align-self: flex-end;
  }
}

@media (max-width: 640px) {
  .dashboard-sidebar {
    padding: 16px 14px 14px;
  }

  .sidebar-brand {
    margin-bottom: 16px;
    padding-left: 2px;
  }

  .mobile-menu-toggle {
    display: block;
    flex: 0 0 40px;
    appearance: none;
  }

  .sidebar-nav {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 8px;
    max-height: 0;
    overflow: hidden;
    padding: 0 2px;
    opacity: 0;
    transition: max-height 0.25s ease, opacity 0.2s ease, padding 0.25s ease;
  }

  .dashboard-sidebar.menu-open .sidebar-nav {
    max-height: 260px;
    padding: 2px;
    opacity: 1;
  }

  .nav-pill-item {
    width: 100%;
    min-width: 0;
    height: 40px;
    padding: 0 12px;
    font-size: 12px;
    flex: 0 0 auto;
  }

  .sidebar-bottom {
    display: none;
    margin-top: 12px;
  }

  .dashboard-sidebar.menu-open .sidebar-bottom {
    display: block;
  }

  .sidebar-bottom .nav-pill-item {
    width: 100%;
  }

  .dashboard-sidebar.menu-open .mobile-menu-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .dashboard-sidebar.menu-open .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .dashboard-sidebar.menu-open .mobile-menu-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .dashboard-main-content {
    padding: 24px 16px 112px;
  }

  .main-page-header {
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
  }

  .main-page-title {
    font-size: 23px;
    line-height: 1.2;
  }

  .main-page-subtitle {
    font-size: 11px;
    line-height: 1.45;
  }

  .user-avatar-badge {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
  }

  .cycle-banner-card {
    padding: 18px;
    border-radius: 12px;
  }

  .cycle-banner-top-row {
    gap: 10px;
  }

  .cycle-pill-tag,
  .cycle-days-tag {
    font-size: 10px;
    padding: 4px 9px;
  }

  .cycle-budget-amount {
    font-size: 32px;
  }

  .cycle-banner-stats-row {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 14px 24px;
    margin-top: 18px;
  }

  .cycle-stat-item {
    text-align: left;
  }

  .overview-cards-grid {
    gap: 16px;
    margin-top: 18px;
  }

  .overview-widget-card {
    min-height: 0;
    padding: 18px;
  }

  .obligations-controls-row {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 18px;
  }

  .filter-pills-group {
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
  }

  .filter-pills-group::-webkit-scrollbar {
    display: none;
  }

  .filter-pill {
    flex: 0 0 auto;
    padding: 0 14px;
  }

  .create-new-btn {
    width: 100%;
    justify-content: center;
    height: 42px;
    border-radius: 10px;
  }

  .obligation-card-item {
    align-items: stretch;
    gap: 14px;
    padding: 16px;
  }

  .ob-card-left {
    width: 100%;
    min-width: 0;
  }

  .ob-title-row {
    flex-wrap: wrap;
    gap: 6px 8px;
  }

  .ob-title {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .ob-card-middle,
  .ob-card-right {
    width: 100%;
    text-align: left;
  }

  .ob-card-actions {
    justify-content: flex-start;
    margin-top: 8px;
  }

  .ob-amount-display {
    font-size: 20px;
  }

  .modal-form-box {
    width: min(100%, 532px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
  }
}

