/* ═══════════════════════════════════════════════════════════
   SOULARY — BUDGET TRACKER PAGE
   Aged paper on a wooden desk. Immersive diary aesthetic.
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&family=Inter:wght@400;600;700&family=Roboto:ital,wght@0,400;0,700;1,400&family=Open+Sans:wght@400;600;700&display=swap');

/* ─── DESIGN TOKENS ─── */
:root {
  --desk-dark:    #1a0f07;
  --desk-mid:     #2c1a0e;
  --desk-grain:   #3d2618;
  --leather:      #4e3221;
  --leather-dk:   #2a1a0d;
  --paper:        #faf6ea;
  --paper-warm:   #f5f0de;
  --paper-edge:   #d9d0b4;
  --ink:          #0d0905;
  --ink-mid:      #1e1409;
  --ink-fade:     #3d2e1e;
  --ink-ghost:    #5a4a36;
  --gold:         #c9a84c;
  --red-wax:      #8b1a1a;
  --red-wax-lt:   #a52020;
  --red-margin:   rgba(185,65,65,0.24);
  --rule:         rgba(0,0,0,0.06);
  --rule-h:       34px;
  --font-hand:    'Poppins', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-formal:  'Roboto', sans-serif;
  --font-scrawl:  'Open Sans', sans-serif;
}

/* ─── INK PEN CURSOR ─── */
html, body, * {
  cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2232%22%20height%3D%2232%22%20viewBox%3D%220%200%2032%2032%22%3E%3Crect%20x%3D%2210%22%20y%3D%222%22%20width%3D%2210%22%20height%3D%2220%22%20rx%3D%223%22%20ry%3D%223%22%20transform%3D%22rotate%2845%2015%2012%29%22%20fill%3D%22%232a1a0d%22%20stroke%3D%22%234e3221%22%20stroke-width%3D%220.6%22%2F%3E%3Crect%20x%3D%2211.5%22%20y%3D%223%22%20width%3D%223%22%20height%3D%2216%22%20rx%3D%221.5%22%20transform%3D%22rotate%2845%2015%2012%29%22%20fill%3D%22rgba%28255%2C255%2C255%2C0.12%29%22%2F%3E%3Crect%20x%3D%2210%22%20y%3D%2219.5%22%20width%3D%2210%22%20height%3D%222.5%22%20transform%3D%22rotate%2845%2015%2012%29%22%20fill%3D%22%23c9a84c%22%2F%3E%3Cpolygon%20points%3D%225%2C27%2012%2C20%208%2C16%202%2C30%22%20fill%3D%22%23c9a84c%22%20stroke%3D%22%239a7a28%22%20stroke-width%3D%220.5%22%2F%3E%3Cline%20x1%3D%223.5%22%20y1%3D%2228.5%22%20x2%3D%2210%22%20y2%3D%2218.5%22%20stroke%3D%22%239a7a28%22%20stroke-width%3D%220.7%22%20opacity%3D%220.8%22%2F%3E%3Ccircle%20cx%3D%222.5%22%20cy%3D%2229.5%22%20r%3D%221.2%22%20fill%3D%22%231c1209%22%20opacity%3D%220.85%22%2F%3E%3C%2Fsvg%3E") 2 30, crosshair !important;
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
  min-height: 100vh;
  background: var(--desk-dark);
  font-family: var(--font-body);
  font-size: 20px; /* Increased font size */
  color: var(--ink);
  overflow-x: hidden;
  position: relative;
}

/* Ensure all interactive elements inherit the larger font size */
input, 
textarea, 
button, 
select {
  font-family: inherit;
  font-size: 18px; /* Larger font for inputs and buttons */
}

/* Larger placeholder text for better clarity */
::placeholder {
  font-size: 18px;
  opacity: 0.7;
}

/* Wood grain background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%,   rgba(255,210,120,0.07) 0%, transparent 52%),
    radial-gradient(ellipse at 80% 85%,  rgba(0,0,0,0.45) 0%, transparent 55%),
    repeating-linear-gradient(180deg, var(--desk-mid) 0px, var(--desk-mid) 4px, var(--desk-grain) 4px, var(--desk-grain) 5px);
  z-index: 0;
  pointer-events: none;
}

/* Vignette */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 80% 70% at 50% 42%, transparent 28%, rgba(0,0,0,0.68) 100%);
  z-index: 0;
  pointer-events: none;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 80px;
  position: relative;
  z-index: 10;
  animation: bookOpen 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes bookOpen {
  from { opacity: 0; transform: perspective(1400px) rotateX(5deg) scale(0.97); }
  to { opacity: 1; transform: perspective(1400px) rotateX(0deg) scale(1); }
}

/* Leather covers */
.container::before {
  content: '';
  display: block;
  height: 18px;
  background: linear-gradient(to bottom, #1a0d05, var(--leather-dk));
  border-radius: 4px 4px 0 0;
  margin-top: 40px;
  box-shadow: 0 -3px 14px rgba(0,0,0,0.5);
}

.container::after {
  content: '';
  display: block;
  height: 18px;
  background: linear-gradient(to top, #1a0d05, var(--leather-dk));
  border-radius: 0 0 4px 4px;
  margin-bottom: 44px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}

header {
  background: var(--paper);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 52px;
  border-left: 10px solid var(--leather);
  box-shadow: inset 52px 0 0 -50px var(--red-margin), 0 6px 28px rgba(0,0,0,0.5);
}

.logo {
  font-family: var(--font-scrawl);
  font-size: 34px;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
}

/* Paper sections styling */
.hero-image,
.feature-cards,
.budget-container {
  background: var(--paper);
  border-left: 10px solid var(--leather);
  box-shadow: inset 52px 0 0 -50px var(--red-margin), 0 4px 20px rgba(0,0,0,0.38);
}

.hero-image {
  margin-bottom: 0;
  padding: 0;
}

.feature-cards {
  padding: 20px 52px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.feature-card {
  background: var(--paper-warm);
  border: 1.5px solid var(--paper-edge);
  padding: 14px;
  border-radius: 4px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.25s ease;
}

.feature-card:hover { transform: translateY(-3px) rotate(0.5deg); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

/* Financial Grid */
.budget-container {
  padding: 44px 52px;
}

.budget-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.summary-card {
  background: var(--paper-warm);
  padding: 30px 20px;
  border-left: 4px solid var(--gold);
  border-radius: 3px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
}

.summary-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    transparent 0px, transparent 24px,
    rgba(0,0,0,0.03) 24px, rgba(0,0,0,0.03) 25px
  );
  pointer-events: none;
}

.summary-card.balance { grid-column: span 3; border-left-color: var(--gold); }
.summary-card.income { border-left-color: #2ecc71; }
.summary-card.expense { border-left-color: #e74c3c; }

.summary-label {
  font-family: var(--font-formal);
  font-style: italic;
  font-size: 11px;
  color: var(--ink-ghost);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.summary-amount {
  font-family: var(--font-hand);
  font-weight: 800;
  font-size: 32px;
  color: var(--ink);
}

.summary-card.balance .summary-amount { font-size: 48px; }

/* Form styling */
.transaction-form-container {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px dashed var(--paper-edge);
}

.section-title {
  font-family: var(--font-scrawl);
  font-size: 24px;
  margin-bottom: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  align-items: flex-end;
}

.input-group label {
  display: block;
  font-family: var(--font-formal);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: var(--ink-fade);
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-bottom: 1.5px solid var(--paper-edge);
  background: var(--paper-warm);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
}

.btn-add-transaction {
  background: radial-gradient(ellipse at 40% 30%, var(--red-wax-lt), var(--red-wax));
  color: #faf3e0;
  border: none;
  padding: 12px 24px;
  border-radius: 50px;
  font-family: var(--font-hand);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(139,26,26,0.3);
  transition: all 0.2s;
}

.btn-add-transaction:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(139,26,26,0.4); }

/* Transaction list */
.transaction-item {
  display: flex;
  align-items: center;
  padding: 16px;
  background: var(--paper-warm);
  border-radius: 4px;
  margin-bottom: 12px;
  border-left: 3px solid var(--paper-edge);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.transaction-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    transparent 0px, transparent 32px,
    rgba(0,0,0,0.04) 32px, rgba(0,0,0,0.04) 33px
  );
  pointer-events: none;
}

.transaction-item:hover { transform: translateX(5px); box-shadow: 0 4px 12px rgba(0,0,0,0.06); }

.t-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  margin-right: 15px;
}

.t-info { flex: 1; }
.t-desc { font-weight: 700; font-size: 16px; margin-bottom: 2px; }
.t-cat { font-family: var(--font-formal); font-size: 12px; color: var(--ink-ghost); }

.t-amount {
  font-family: var(--font-hand);
  font-weight: 800;
  font-size: 20px;
}

.t-amount.plus { color: #2ecc71; }
.t-amount.minus { color: #e74c3c; }

/* Filter section */
.filter-section {
  margin-bottom: 30px;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.btn-clear-filters {
  background: transparent;
  border: 1.5px dashed var(--paper-edge);
  padding: 6px 16px;
  border-radius: 50px;
  font-family: var(--font-hand);
  font-weight: 600;
  cursor: pointer;
}

.type-toggles {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.type-toggle {
  background: var(--paper-warm);
  border: 1.5px solid var(--paper-edge);
  padding: 8px 20px;
  border-radius: 50px;
  font-family: var(--font-hand);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.type-toggle.active { background: var(--gold); color: white; border-color: var(--gold); }

@media (max-width: 768px) {
  .budget-summary { grid-template-columns: 1fr; }
  header { padding: 20px; flex-direction: column; text-align: center; gap: 15px; }
  .budget-container { padding: 30px 20px; }
}
