/* ============================================================
   DebtAura — Debt Payoff Tracker App by Formify
   Version: 1.0.0
============================================================ */

@font-face {
  font-family: 'Dacherry';
  src: url('assets/fonts/dacherry.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}
/* ===========================
   GOLD ROYALE
=========================== */
:root[data-theme="gold"] {
  --accent: #ffd54f;
  --card: #1c1a14;
  --bg-light: #262218;
  --bg-lighter: #2f2a1f;
  --border: #4a412f;
  --text: #fff8e1;
  --text-muted: #e8d9b8;
}

/* ===========================
   MIDNIGHT BLACK
=========================== */
:root[data-theme="midnight"] {
  --accent: #9e9e9e;
  --card: #0a0a0a;
  --bg-light: #111;
  --bg-lighter: #1a1a1a;
  --border: #2a2a2a;
  --text: #e0e0e0;
  --text-muted: #bdbdbd;
}

/* ===========================
   EMERALD LUXE
=========================== */
:root[data-theme="emerald"] {
  --accent: #00c853;
  --card: #0d1a12;
  --bg-light: #14241b;
  --bg-lighter: #1b2e23;
  --border: #2c4a3a;
  --text: #e6fff0;
  --text-muted: #c8e8d4;
}

/* ===========================
   OCEAN DEEP
=========================== */
:root[data-theme="ocean"] {
  --accent: #0091ea;
  --card: #0a141c;
  --bg-light: #11202b;
  --bg-lighter: #182a36;
  --border: #2a3f4a;
  --text: #e3f6ff;
  --text-muted: #c0d8e4;
}

/* ===========================
   LAVENDER DREAM
=========================== */
:root[data-theme="lavender"] {
  --accent: #c77dff;
  --card: #1c1620;
  --bg-light: #251d2b;
  --bg-lighter: #2f2636;
  --border: #443a4d;
  --text: #f3e8ff;
  --text-muted: #d8c6e8;
}

/* ===========================
   STEEL GREY
=========================== */
:root[data-theme="steel"] {
  --accent: #90a4ae;
  --card: #141618;
  --bg-light: #1d2023;
  --bg-lighter: #262a2e;
  --border: #3a4046;
  --text: #e0e4e7;
  --text-muted: #c2c7cb;
}

/* ===========================
   CHOCOLATE BRONZE
=========================== */
:root[data-theme="bronze"] {
  --accent: #c57b39;
  --card: #1a1410;
  --bg-light: #241c17;
  --bg-lighter: #2e251f;
  --border: #4a3a2f;
  --text: #f8efe6;
  --text-muted: #e2d2c4;
}

/* ===========================
   ROYAL BLUE
=========================== */
:root[data-theme="royal"] {
  --accent: #3d5afe;
  --card: #0e1220;
  --bg-light: #151a2b;
  --bg-lighter: #1d2336;
  --border: #2c3450;
  --text: #e6eaff;
  --text-muted: #c7cce8;
}

/* ===========================
   CRIMSON HEAT
=========================== */
:root[data-theme="crimson"] {
  --accent: #ff5252;
  --card: #1a0e0e;
  --bg-light: #241414;
  --bg-lighter: #2e1c1c;
  --border: #4a2a2a;
  --text: #ffe8e8;
  --text-muted: #e8c4c4;
}

/* ===========================
   GHOST WHITE
=========================== */
:root[data-theme="ghost"] {
  --accent: #ffffff;
  --card: #1a1a1a;
  --bg-light: #222;
  --bg-lighter: #2a2a2a;
  --border: #3a3a3a;
  --text: #ffffff;
  --text-muted: #d0d0d0;
}

/* ------------------------------
   ROOT VARIABLES
------------------------------ */
:root {
  --bg: #0f0f15;
  --bg-light: #1a1a22;
  --bg-lighter: #23232d;

  --text: #ffffff;
  --text-muted: #b5b5c9;

  --card: #1b1b25;
  --border: #2a2a38;

  --accent: #9b5cff;
  --accent-light: #b98aff;

  --danger: #ff4f4f;
  --success: #4fff9b;

  --radius: 12px;
  --transition: 0.25s ease;
}

/* Theme: Purple Classic (default) */
[data-theme="purple"] {
  --bg: #0f0f15;
  --bg-light: #1a1a22;
  --bg-lighter: #23232d;
  --text: #ffffff;
  --text-muted: #b5b5c9;
  --card: #1b1b25;
  --border: #2a2a38;
  --accent: #9b5cff;
  --accent-light: #b98aff;
}

/* Theme: Midnight Black */
[data-theme="midnight"] {
  --bg: #050509;
  --bg-light: #0b0b10;
  --bg-lighter: #14141c;
  --text: #f5f5f5;
  --text-muted: #8a8aa0;
  --card: #101018;
  --border: #202030;
  --accent: #ffffff;
  --accent-light: #d0d0ff;
}

/* Theme: Gold Edition */
[data-theme="gold"] {
  --bg: #12100b;
  --bg-light: #1b180f;
  --bg-lighter: #252016;
  --text: #fff7e3;
  --text-muted: #c9b892;
  --card: #2b2416;
  --border: #3a311f;
  --accent: #ffcf4f;
  --accent-light: #ffe58c;
}

/* Theme: Neon Blue */
[data-theme="neon"] {
  --bg: #050812;
  --bg-light: #071020;
  --bg-lighter: #0c182b;
  --text: #e8f4ff;
  --text-muted: #8fb3d9;
  --card: #0f1f33;
  --border: #1b3350;
  --accent: #00aaff;
  --accent-light: #4fd3ff;
}

/* Theme: Minimal White */
[data-theme="minimal"] {
  --bg: #f5f5f7;
  --bg-light: #ffffff;
  --bg-lighter: #e5e5ea;
  --text: #111111;
  --text-muted: #666670;
  --card: #ffffff;
  --border: #d0d0d6;
  --accent: #9b5cff;
  --accent-light: #b98aff;
}
/* Theme preview colors */
.da-theme-btn[data-theme="purple"] {
  background: #a56cff;
  color: #000;
}

.da-theme-btn[data-theme="midnight"] {
  background: #2a2a2a;
  color: #fff;
}

.da-theme-btn[data-theme="gold"] {
  background: #ffd54f;
  color: #000;
}

.da-theme-btn[data-theme="neon"] {
  background: #00f0ff;
  color: #000;
}

.da-theme-btn[data-theme="minimal"] {
  background: #ffffff;
  color: #000;
}

/* NEW THEMES */
.da-theme-btn[data-theme="emerald"] {
  background: #00c853;
  color: #000;
}

.da-theme-btn[data-theme="ocean"] {
  background: #0091ea;
  color: #fff;
}

.da-theme-btn[data-theme="lavender"] {
  background: #c77dff;
  color: #000;
}

.da-theme-btn[data-theme="steel"] {
  background: #90a4ae;
  color: #000;
}

.da-theme-btn[data-theme="bronze"] {
  background: #c57b39;
  color: #000;
}

.da-theme-btn[data-theme="royal"] {
  background: #3d5afe;
  color: #fff;
}

.da-theme-btn[data-theme="crimson"] {
  background: #ff5252;
  color: #000;
}

.da-theme-btn[data-theme="ghost"] {
  background: #e0e0e0;
  color: #000;
}
.da-version-label {
  position: fixed;
  bottom: 10px;
  right: 10px;
  font-size: 14px;
  color: var(--text-muted);
  opacity: 0.7;
  pointer-events: none;
  z-index: 9999;
}

.da-disclaimer {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-lighter);
  padding: 12px 15px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.da-priority-select {
  background: var(--bg-light);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px;
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
  min-width: 140px;
  transition: var(--transition);
}

.da-priority-select:hover {
  border-color: var(--accent);
}

.da-archive-btn {
  background: #ff9f43 !important;  
  color: #000 !important;
  border: none !important;
  padding: 10px 14px !important;
  border-radius: var(--radius) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: var(--transition) !important;
}

.da-archive-btn:hover {
  background: #ffb76b !important;
}

/* Triple column layout */
.da-strategy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-bottom: 25px;
}

/* Each option card */
.da-strategy-option {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: var(--radius);
  text-align: center;
}

/* Label text */
.da-strategy-label {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

/* Slider toggle switch */
.da-switch {
  position: relative;
  display: inline-block;
  width: 55px;
  height: 28px;
}

.da-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.da-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-lighter);
  border-radius: 34px;
  transition: var(--transition);
}

.da-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: var(--transition);
}

/* When checked */
.da-switch input:checked + .da-slider {
  background: var(--accent);
}

.da-switch input:checked + .da-slider:before {
  transform: translateX(27px);
  background: #000;
}

.da-strategy-explainer {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 18px 20px;
  border-radius: var(--radius);
  margin-top: 20px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}
.da-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 2;
}


/* ------------------------------
   GLOBAL
------------------------------ */
body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

button,
input,
select {
  font-family: inherit;
}

/* ------------------------------
   FIX: SCREEN SWITCHING
------------------------------ */
.da-screen {
  display: none;
}

.da-screen.active {
  display: block;
}

/* ------------------------------
   APP LAYOUT
------------------------------ */
.da-app {
  display: flex;
  height: 100vh;
}

/* ------------------------------
   SIDEBAR
------------------------------ */
.da-sidebar {
  width: 260px;
  background: var(--bg-light);
  border-right: 1px solid var(--border);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.da-logo h1 {
  font-size: 42px;
  margin: 0;
  color: var(--accent);
  font-family: 'Dacherry', sans-serif;
  text-shadow: 0 0 80px var(--accent);
}

.da-logo p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  
}

.da-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.da-nav-item {
  background: transparent;
  border: none;
  padding: 12px 14px;
  text-align: left;
  font-size: 15px;
  color: var(--text-muted);
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: pointer;
}

.da-nav-item:hover {
  background: var(--bg-lighter);
  color: var(--text);
}

.da-nav-item.active {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}

.da-sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ------------------------------
   BUTTONS
------------------------------ */
.da-primary-btn {
  background: var(--accent);
  color: #000;
  border: none;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  transition: var(--transition);
}

.da-primary-btn:hover {
  background: var(--accent-light);
}

.da-secondary-btn {
  background: var(--bg-lighter);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 15px;
  transition: var(--transition);
}

.da-secondary-btn:hover {
  background: var(--accent);
  color: #000;
}

.da-danger-btn {
  background: var(--danger);
  color: #fff;
  border: none;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  transition: var(--transition);
}

.da-danger-btn:hover {
  opacity: 0.8;
}

/* ------------------------------
   MAIN CONTENT
------------------------------ */
.da-main {
  flex: 1;
  overflow-y: auto;
  padding: 40px;
}

.da-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.da-header h2 {
  margin: 0;
  font-size: 26px;
  color: var(--accent);
  text-shadow: 0 0 80px var(--accent);
}

/* ------------------------------
   NEXT PAYMENT BANNER
------------------------------ */
.da-next-payment-banner {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: var(--radius);
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.da-next-label {
  font-size: 14px;
  color: var(--text-muted);
}

.da-next-name {
  font-size: 20px;
  font-weight: 600;
}

.da-next-payment-meta span {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
}

/* ------------------------------
   STATS GRID
------------------------------ */
.da-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.da-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: var(--radius);
}

.da-stat-card h3 {
  margin: 0 0 10px 0;
  color: var(--accent);
}

.da-progress-bar {
  width: 100%;
  height: 10px;
  background: var(--bg-lighter);
  border-radius: 10px;
  overflow: hidden;
}

.da-progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
}

.da-progress-text {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-muted);
}

/* ------------------------------
   BUDGET PLANNER
------------------------------ */
.da-budget-planner {
  color: var(--accent);
  background: var(--card);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: var(--radius);
  margin-bottom: 30px;
}

.da-budget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.da-budget-field label {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.da-budget-field input {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-light);
  color: var(--text);
}

.da-budget-result {
  font-size: 18px;
  font-weight: 600;
}

/* ------------------------------
   DEBTS LIST
------------------------------ */
.da-debts-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.da-debt-item {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: var(--radius);
  position: relative;
}

.da-debt-name {
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.da-debt-icon {
  font-size: 22px;
}

.da-debt-meta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 14px;
  color: var(--text-muted);
}

.da-debt-progress {
  margin-top: 15px;
}

.da-debt-remaining {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-muted);
}

.da-debt-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.da-payment-input {
  width: 140px;
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-light);
  color: var(--text);
}

/* ------------------------------
   BADGES
------------------------------ */
.da-paidoff-badge {
  background: var(--success);
  color: #000;
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
  position: absolute;
  top: 12px;
  right: 12px;
}

.da-target-label {
  background: var(--accent);
  color: #000;
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 10px;
}

/* ------------------------------
   STRATEGY SECTION
------------------------------ */
.da-strategy-options {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

.da-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}

.da-strategy-explanation {
  background: var(--bg-lighter);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: var(--radius);
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ------------------------------
   SETTINGS SCREEN
------------------------------ */
.da-theme-section {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: var(--radius);
}

.da-theme-section h3 {
  margin: 0 0 15px 0;
}

.da-theme-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.da-theme-btn {
  background: var(--bg-lighter);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}

.da-theme-btn.active {
  background: var(--accent);
  color: #000;
}

.da-settings-row {
  margin-bottom: 20px;
}

.da-settings-row label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--text-muted);
}

.da-settings-row select {
  width: 200px;
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-light);
  color: var(--text);
}

/* ------------------------------
   ADD DEBT MODAL — TWO COLUMNS
------------------------------ */
.da-modal-body {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.da-form-row {
  display: flex;
  flex-direction: column;
}

.da-input-with-prefix {
  display: flex;
  align-items: center;
  gap: 10px;
}

.da-modal-footer {
  grid-column: span 2;
  text-align: right;
}

/* ------------------------------
   MODALS
------------------------------ */
.da-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.da-modal.open {
  display: flex;
}

.da-modal-content {
  background: var(--card);
  padding: 30px;
  width: 420px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.da-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.da-modal-content h2 {
  margin: 0;
}

.da-modal-content label {
  display: block;
  margin-top: 15px;
  margin-bottom: 5px;
  font-size: 14px;
  color: var(--text-muted);
}

.da-modal-content input,
.da-modal-content select {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-light);
  color: var(--text);
}

/* ------------------------------
   SUMMARY
------------------------------ */
.da-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.da-summary-card {
  color: var(--accent);
  background: var(--card);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: var(--radius);
}

.da-summary-upcoming {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: var(--radius);
  margin-top: 30px;
}

.da-upcoming-item {
  padding: 15px;
  border-bottom: 1px solid var(--border);
}

.da-upcoming-item:last-child {
  border-bottom: none;
}

.da-upcoming-name {
  font-size: 16px;
  font-weight: 600;
}

.da-upcoming-meta {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-muted);
}
#debtNameInput,
#debtCategoryLabelInput {
  max-width: 250px;   /* adjust this number if you want smaller/larger */
}
/* ------------------------------
   ARCHIVES
------------------------------ */
.da-archives-list .da-debt-item {
  opacity: 0.85;
}

.da-modal-close {
  width: 28px;
  height: 28px;
  background: var(--bg-light);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.da-modal-close:hover {
  background: var(--accent);
  color: #000;
}

.da-archives-list .da-debt-item:hover {
  opacity: 1;
}

#addDebtModal input,
#addDebtModal select {
  max-width: 240px !important;
  width: 240px !important;
  display: block !important;
}
/* Fix Add Debt popup width */
#addDebtModal .da-modal-content {
  max-width: 650px !important;
  width: 600px !important;
  padding: 25px !important;
  overflow: hidden !important;
}



/* ------------------------------
   RESPONSIVE
------------------------------ */
@media (max-width: 900px) {
  .da-sidebar {
    display: none;
  }

  .da-main {
    padding: 20px;
  }

  .da-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
