/* TuLancho — small overrides on top of Pico. Green/palm accent, mobile-first. */

:root {
  --pico-primary: #2f7d4f;
  --pico-primary-hover: #276843;
  --pico-primary-focus: rgba(47, 125, 79, 0.25);
  --pico-primary-inverse: #fff;
}
:root:not([data-theme="dark"]),
[data-theme="light"] {
  --pico-primary: #2f7d4f;
  --pico-primary-hover: #276843;
}

/* Top navigation */
.tl-nav {
  border-bottom: 1px solid var(--pico-muted-border-color);
  margin-bottom: 1rem;
}
.tl-brand {
  font-weight: 700;
  text-decoration: none;
}
.tl-user {
  font-size: 0.85rem;
  color: var(--pico-muted-color);
}
.tl-logout {
  margin: 0;
}
.tl-logout button {
  margin: 0;
  padding: 0.3rem 0.75rem;
  font-size: 0.85rem;
}

/* Login */
.tl-login {
  max-width: 26rem;
  margin-top: 3rem;
}

/* Month picker */
.tl-monthpick {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  max-width: 22rem;
}
.tl-monthpick input {
  margin: 0;
}
.tl-monthpick button {
  margin: 0;
  width: auto;
  white-space: nowrap;
}

/* Totals cards */
.tl-totals article {
  margin: 0;
  padding: 0.75rem 1rem;
  text-align: center;
}
.tl-totals h3 {
  margin: 0;
  font-size: 1.25rem;
}
.tl-totals p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--pico-muted-color);
}

/* Right-align numeric columns */
.tl-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Status badges */
.tl-badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
}
.tl-pagado   { background: #d5efdd; color: #1b5e34; }
.tl-parcial  { background: #fdf0cf; color: #8a6300; }
.tl-pendiente{ background: #f6d9d6; color: #8a2b21; }
.tl-exento   { background: #e2e3e5; color: #494c50; }

@media (prefers-color-scheme: dark) {
  .tl-pagado   { background: #12341f; color: #8fe0a8; }
  .tl-parcial  { background: #3a2f0a; color: #e7c766; }
  .tl-pendiente{ background: #3a1512; color: #e79a90; }
  .tl-exento   { background: #2a2c2f; color: #b5b8bc; }
}

/* Inline pay form (native <details>, no JS) */
.tl-pay summary {
  padding: 0.3rem 0.75rem;
  font-size: 0.85rem;
  white-space: nowrap;
}
.tl-pay form {
  margin-top: 0.75rem;
  min-width: 16rem;
}
.tl-pay button[type="submit"] {
  margin-top: 0.25rem;
}

/* Caja chica highlight card */
.tl-totals article.tl-caja {
  border: 1px solid var(--pico-primary);
}
.tl-totals article.tl-caja h3 {
  color: var(--pico-primary);
}

/* Gasto filters */
.tl-filters {
  align-items: end;
  gap: 0.5rem;
}
.tl-filters label {
  margin: 0;
}
.tl-filters input,
.tl-filters select,
.tl-filters button {
  margin: 0;
}

/* Photo thumbnails on the expense detail */
.tl-photos {
  gap: 0.5rem;
}
.tl-photos img {
  width: 100%;
  height: auto;
  border-radius: var(--pico-border-radius);
  object-fit: cover;
}

/* Dashboard charts — give Chart.js a bounded box so it doesn't grow endlessly */
.tl-chart {
  position: relative;
  height: 260px;
}

/* Approval tally */
.tl-tally {
  margin-top: 1rem;
}
.tl-tally progress {
  margin: 0.25rem 0;
}

/* Flash messages */
.tl-error, .tl-ok {
  padding: 0.6rem 0.9rem;
  border-radius: var(--pico-border-radius);
}
.tl-error { background: #f6d9d6; color: #8a2b21; }
.tl-ok    { background: #d5efdd; color: #1b5e34; }
@media (prefers-color-scheme: dark) {
  .tl-error { background: #3a1512; color: #e79a90; }
  .tl-ok    { background: #12341f; color: #8fe0a8; }
}
