*, *::before, *::after {
  box-sizing: border-box;
}

  html, body {
    margin: 0;
    height: 100%;
  }

  /* =========================================
    REPORT — Hanafuda / Cyber Glass Theme
  ========================================= */

  :root {
    --bg: #0a0810;
    --fg: #e9e6ff;
    --accent: #b19cff;
    --accent-glow: rgba(177,156,255,0.35);
    --grad-1: #120d1d;
    --grad-2: #07060c;
  }

  [data-theme="light"] {
    --bg: #ffffff;
    --fg: #161616;
    --accent: #4b2fff;
    --accent-glow: rgba(75,47,255,0.6);
    --grad-1: #ffffff;
    --grad-2: #dcdcff;
  }

  /* ===== PAGE ===== */

  html, body {
    margin: 0;
    min-height: 100%;
    font-family: "Barlow Condensed", sans-serif;
    color: var(--fg);
  }

  body {
    background:
      radial-gradient(
        1200px 800px at 80% 20%,
        var(--grad-1) 0%,
        var(--bg) 45%,
        var(--grad-2) 100%
      );
    transition: background .6s ease, color .4s ease;
  }

  /* glowing ambient blobs */
  body::before {
    content: "";
    position: fixed;
    inset: -12vmax;
    z-index: -1;
    background:
      radial-gradient(520px 280px at 30% 60%, var(--accent) 35%, transparent 60%),
      radial-gradient(420px 220px at 70% 35%, var(--accent) 25%, transparent 60%);
    filter: blur(30px);
    opacity: .18;
  }

  /* ===== MAIN LAYOUT ===== */

  .scene {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center; /* ✅ vertical center */
    padding: clamp(12px, 4vw, 2rem);
    box-sizing: border-box;
  }

  /* ===== GLASS PANEL ===== */

  .report-box {
    width: min(1100px, 95vw);
    padding: 2rem;

    background: rgba(255,255,255,0.02);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.06);

    box-shadow: 0 0 30px var(--accent-glow);

    animation: fadeUp 0.9s ease forwards;
  }

  /* animation */
  @keyframes fadeUp {
    from {
      opacity: 0;
      transform: translateY(24px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* ===== HEADINGS ===== */

  h2 {
    font-weight: 600;
    letter-spacing: 1px;
    margin-top: 1.4rem;
  }

  /* ===== SUMMARY CARDS ===== */

  .card {
    padding: 12px 16px;
    margin-bottom: 10px;

    border-radius: 12px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);

    box-shadow: 0 0 12px var(--accent-glow);
  }

  .positivo {
    color: #7dffa6;
  }

  [data-theme="light"] .positivo {
    color: #1f7a4d;
  }

  .negativo {
    color: #ff7d9c;
  }

  [data-theme="light"] .negativo {
    color: #b4232c;
  }

  /* ===== PICKER ROW (date + currency side by side) ===== */

  .picker-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: stretch;
    margin-bottom: 0;
  }

  .picker-row form {
    display: contents; /* lets children participate in the flex row directly */
  }

  /* ===== DATE INPUT ===== */

  input[type="date"] {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(177,156,255,0.35);
    color: var(--fg);
    padding: 10px 14px;
    border-radius: 12px;
    font-family: inherit;
    margin-bottom: 1rem;

    box-shadow: 0 0 10px rgba(177,156,255,0.15);
    transition: all .25s ease;
  }

  input[type="date"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 16px var(--accent-glow);
  }

  [data-theme="light"] input[type="date"] {
  background: #ffffff;
  border: 1px solid rgba(75,47,255,0.35);
  box-shadow: 0 0 0 1px rgba(75,47,255,0.15);
  }

  [data-theme="light"] input[type="date"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
  }

  /* ===== CURRENCY SELECT (matches date input style) ===== */

  select.currency-select {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(177,156,255,0.35);
    color: var(--fg);
    padding: 10px 14px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 1rem;
    cursor: pointer;

    box-shadow: 0 0 10px rgba(177,156,255,0.15);
    transition: all .25s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23b19cff' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
  }

  select.currency-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 16px var(--accent-glow);
  }

  [data-theme="light"] select.currency-select {
    background-color: #ffffff;
    border: 1px solid rgba(75,47,255,0.35);
    box-shadow: 0 0 0 1px rgba(75,47,255,0.15);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234b2fff' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
  }

  [data-theme="light"] select.currency-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
  }

  /* ===== CHART ===== */

  .chart-container {
    width: 100%;
    max-width: 520px;   /* prevents oversized donut */
    height: clamp(260px, 40vh, 420px);
    margin: 20px auto 0;
    position: relative;
  }

  .report-content > h2 {
    margin-top: 2rem;
    margin-bottom: 0.6rem;
  }

  td:nth-child(4),
  th:nth-child(4) {
    text-align: right;
    font-variant-numeric: tabular-nums;
  }

  @media (max-width: 700px) {

    .report-box {
      padding: 1.4rem;
    }

    .chart-container {
      height: 280px;
      max-width: 100%;
    }

    table {
      font-size: 0.9rem;
    }
  }

  /* ===== TABLE ===== */

  table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;

    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    overflow: hidden;
  }

  th {
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    background: rgba(255,255,255,0.04);
  }

  th, td {
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  tr:hover {
    background: rgba(177,156,255,0.08);
    transition: background .2s ease;
  }
  
  [data-theme="light"] th {
    background: rgba(75,47,255,0.08);
  }

  [data-theme="light"] th,
  [data-theme="light"] td {
    border-bottom: 1px solid rgba(75,47,255,0.15);
  }

  [data-theme="light"] tbody tr {
    background: rgba(0, 0, 0, 0.03);
  }
  [data-theme="light"] tr:hover {
    background: rgba(75,47,255,0.08);
  }

  /* ===== SCROLLBAR ===== */

  ::-webkit-scrollbar {
    width: 8px;
  }

  ::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
  }

  form {
    display: grid;
    gap: 10px;
  }

  .report-box input,
  .report-box select,
  .report-box button {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--fg);
    padding: 10px;
    border-radius: 10px;
    font-family: inherit;
  }

  /* Fix select option colors in dark mode */
  .report-box select option {
    background: #0a0810;
    color: #e9e6ff;
  }

  [data-theme="light"] .report-box select option {
    background: #f4f4ff;
    color: #161616;
  }

  [data-theme="light"] .report-box input,
  [data-theme="light"] .report-box select {
    background: #f4f4ff;
    border: 1px solid rgba(75,47,255,0.25);
    box-shadow: 0 0 0 1px rgba(75,47,255,0.08);
  }

  [data-theme="light"] .report-box input:focus,
  [data-theme="light"] .report-box select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
  }


  .report-box button {
    cursor: pointer;
    border: 1px solid var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
    transition: .2s;
  }

  .report-box button:hover {
    background: rgba(177,156,255,0.15);
  }

  /* ===== RADIO GROUP ===== */

  .radio-group {
    display: flex;
    gap: 20px;
    align-items: center;
    margin: 6px 0 12px;
  }

  .radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
  }

  /* custom radio look */
  input[type="radio"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: transparent;
    position: relative;
    cursor: pointer;
  }

  input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
  } 

  /* ===== DISABLED INPUT VISUAL ===== */

  input:disabled,
  select:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(40%);
    box-shadow: none;
    border-color: rgba(255,255,255,0.08);
  }

  /* =========================================
    ✅ MOBILE FIXES (FINAL OVERRIDES)
  ========================================= */
  @media (max-width: 700px) {

    /* ---- PAGE SAFE WIDTH ---- */
    html, body {
      width: 100%;
      overflow-x: hidden; /* prevents sideways scroll */
    }


    .scene {
      align-items: stretch; /* ✅ prevents vertical squeeze on phones */
    }


    /* ---- GLASS PANEL ---- */
    .report-box {
      width: 100%;
      max-width: 100%;
      padding: 1.2rem;
      border-radius: 14px;
    }

    /* ---- SUMMARY CARDS STACK CLEANLY ---- */
    .card {
      display: grid;
      grid-template-columns: 1fr;
      gap: 6px;
      font-size: 0.95rem;
    }

    .card div {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
    }

    /* ---- FORM CONTROLS ---- */
    form {
      width: 100%;
    }

    .report-box input,
    .report-box select,
    .report-box button {
      width: 100%;
    }


    /* radio buttons alignment */
    .radio-group {
      flex-wrap: wrap;
      gap: 12px;
    }

    .radio-group label {
      flex: 0 0 auto;
    }

    /* ---- CHART ---- */
    .chart-container {
      width: 100%;
      height: 260px;
      max-width: 100%;
      margin-top: 16px;
    }

    /* ---- TABLE (REAL FIX) ---- */
    .table-wrapper {
      width: 100%;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }

    .table-wrapper table {
      min-width: 620px;
    }

    table {
      font-size: 0.9rem;
    }

    th, td {
      padding: 10px 8px;
    }

    /* ---- BACKGROUND EFFECT LESS HEAVY ---- */
    body::before {
      opacity: .07;
      filter: blur(60px);
    }
  }

  .add-btn {
  display: inline-block;
  margin-bottom: 15px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  text-decoration: none;
  color: var(--fg);
  box-shadow: 0 0 10px var(--accent-glow);
  transition: .2s;
}

.add-btn:hover {
  background: rgba(177,156,255,0.15);
}

.custom-alert {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px; /* 🔥 prevents edge touching on small screens */
  z-index: 9999;
  backdrop-filter: blur(4px); /* nice modern effect */
}

.alert-box {
  background: var(--bg);
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--accent);
  box-shadow: 0 0 30px var(--accent-glow);
  width: 100%;
  max-width: 400px; /* 🔥 responsive width */
  text-align: center;
  animation: fadeInScale 0.2s ease;
}

.alert-box p {
  margin: 0 0 18px 0; /* 🔥 adds space below text */
  font-size: 1rem;
  line-height: 1.4;
}

/* Button container (if using two buttons) */
.alert-buttons {
  margin-top: 18px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap; /* 🔥 stacks nicely if needed */
}

.alert-box button {
  flex: 1; /* 🔥 buttons scale evenly */
  min-width: 120px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  box-shadow: 0 0 12px var(--accent-glow);
  transition: 0.2s ease;
  font-size: 0.95rem;
}

.alert-box button:hover {
  background: rgba(177,156,255,0.15);
}

/* Small phones */
@media (max-width: 480px) {
  .alert-box {
    padding: 20px;
    border-radius: 14px;
  }

  .alert-box button {
    font-size: 0.9rem;
    padding: 10px 14px;
  }

  .alert-box p {
    margin-bottom: 24px; /* more breathing space on phones */
  }
}

/* Simple animation */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
/* Center the Ações column */
th:last-child,
td:last-child {
    text-align: center;
    vertical-align: middle;
}

/* Proper alignment for the icons */
.actions {
    display: flex;
    justify-content: center;  /* centers horizontally */
    align-items: center;      /* centers vertically */
    gap: 10px;
}

.actions a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.icon {
    width: 20px;
    height: 20px;
    display: block;
    /* SVG icons inherit color from parent — no filter needed */
}

.icon-btn {
    color: var(--accent);
    transition: color .2s ease, transform .2s ease, opacity .2s ease;
}

.icon-btn:hover {
    color: var(--fg);
    transform: scale(1.15);
    opacity: 0.85;
    text-shadow: none;
}

.icon-btn--delete {
    color: #ff7d9c;
}

[data-theme="light"] .icon-btn--delete {
    color: #b4232c;
}

.icon-btn--delete:hover {
    color: #ff3366;
}

[data-theme="light"] .icon-btn--delete:hover {
    color: #8a0010;
}

th.sortable {
    cursor: pointer;
    color: inherit;       /* uses theme color instead of blue */
    user-select: none;
}

th.sortable:hover {
    text-decoration: underline;
}

th.sortable[data-order="asc"]::after {
    content: " 🔼";
    margin-left: 4px;
}

th.sortable[data-order="desc"]::after {
    content: " 🔽";
    margin-left: 4px;
}

/* =========================================
   LOGIN PAGE FIX (MOBILE OPTIMIZED)
========================================= */

.login-page .scene {
  min-height: 100svh; /* fixes mobile viewport issues */
  padding: 20px;
}

.login-page .report-box {
  max-width: 420px;
  width: 100%;
  padding: 1.6rem;
}

/* Stack everything clean */
.login-page form {
  gap: 14px;
}

.login-page label {
  font-size: 0.9rem;
  opacity: 0.85;
}

.login-page input {
  width: 100%;
  font-size: 1rem;
  padding: 12px 14px;
}

/* Bigger tap area for mobile */
.login-page button[type="submit"] {
  margin-top: 6px;
  padding: 14px;
  font-size: 1rem;
}

/* Links under form */
.login-page .report-box div {
  margin-top: 10px;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* Mobile specific tweaks */
@media (max-width: 480px) {

  .login-page .scene {
    align-items: center;
    padding: 16px;
  }

  .login-page .report-box {
    padding: 1.2rem;
    border-radius: 14px;
  }

  .login-page h2 {
    text-align: center;
    margin-bottom: 10px;
  }

  .login-page input,
  .login-page button {
    font-size: 1rem;
  }
}

/* ==========================
   Bottom Buttons Container
========================== */

.bottom-actions {
  display: flex;
  justify-content: center;  /* horizontal center */
  align-items: center;      /* vertical align (just in case) */
  gap: 16px;
  margin-top: 25px;
  flex-wrap: wrap;
}

/* ==========================
   Same Style As Other Buttons
========================== */

.action-btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 10px;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;

  background: var(--card-bg);
  color: var(--fg);
  border: 1px solid var(--border-color);

  transition: all 0.2s ease;
}

.action-btn:hover {
  background: var(--hover-bg);
  transform: translateY(-2px);
}

.action-btn:active {
  transform: scale(0.97);
}

/* =========================================
   ERROR PAGE
========================================= */

.error-page .scene {
  min-height: 100svh;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-page .report-box {
  width: min(420px, 92vw);
  max-width: 420px;
  padding: 1.8rem;
  margin: auto;
  text-align: center;
}

.error-code {
  font-size: clamp(3.5rem, 8vw, 5rem);
  letter-spacing: 6px;
  margin: 0;
  text-shadow: 0 0 24px var(--accent-glow);
}

.error-message {
  margin-top: 12px;
  margin-bottom: 20px;
  opacity: 0.85;
  font-size: 1rem;
}

.error-page .bottom-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.error-page .action-btn {
  padding: 12px 22px;
}


/* =========================================
   MOBILE IMPROVEMENTS
========================================= */

@media (max-width: 480px) {

  .error-page .scene {
    padding: 16px;
  }

  .error-page .report-box {
    padding: 1.4rem;
  }

  .error-code {
    font-size: clamp(3rem, 12vw, 4rem);
    letter-spacing: 4px;
  }

  .error-message {
    font-size: 0.95rem;
  }

  .error-page .bottom-actions {
    flex-direction: column;
    gap: 10px;
  }

  .error-page .action-btn {
    width: 100%;
    padding: 12px;
  }

  .login-links {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }


}

.login-links {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 10px;
}

.login-links a:first-child {
  text-align: left;
}

.login-links a:last-child {
  text-align: right;
}

/* =========================================
   TOP ACTION BAR (changelog + account)
========================================= */

/* Wrapper div handles fixed positioning — avoids conflict with
   `a { position: relative }` in theme.css */
.top-actions {
  position: fixed;
  top: max(0.55rem, env(safe-area-inset-top));
  right: calc(max(0.75rem, env(safe-area-inset-right)) + 42px);
  z-index: 998;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 20px;
  padding: 2px 4px;
  box-shadow: 0 0 12px var(--accent-glow);
  gap: 2px;
}

[data-theme="light"] .top-actions {
  background: rgba(75,47,255,0.05);
  border-color: rgba(75,47,255,0.18);
}

.top-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 16px;
  color: var(--fg);
  text-decoration: none;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background .2s;
}

.top-btn:hover {
  background: rgba(177,156,255,0.18);
  text-shadow: none;
}

/* Suppress the animated underline from theme.css */
.top-btn::after {
  display: none !important;
}

.top-btn-divider {
  width: 1px;
  height: 16px;
  background: rgba(255,255,255,0.12);
  flex-shrink: 0;
}

[data-theme="light"] .top-btn-divider {
  background: rgba(75,47,255,0.15);
}

/* On small screens: hide text labels, keep icons only */
@media (max-width: 480px) {
  .top-btn span {
    display: none;
  }
  .top-btn {
    padding: 5px 7px;
  }
}

/* =========================================
   ACCOUNT PAGE LAYOUT
========================================= */

.page-account .scene {
  align-items: flex-start;
  padding-top: clamp(1.5rem, 4vw, 3rem);
}

/* =========================================
   SAVINGS GOAL CARD
========================================= */

.goal-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.goal-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  flex-wrap: wrap;
  gap: 4px;
}

.goal-of {
  opacity: 0.6;
  font-size: 0.85rem;
}

.goal-bar-track {
  width: 100%;
  height: 10px;
  background: rgba(255,255,255,0.07);
  border-radius: 99px;
  overflow: hidden;
}

.goal-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  box-shadow: 0 0 10px var(--accent-glow);
  transition: width .6s ease;
}

.goal-bar-fill.goal-reached {
  background: #7dffa6;
  box-shadow: 0 0 10px rgba(125,255,166,0.4);
}

.goal-bar-fill.goal-negative {
  background: #ff7d9c;
  box-shadow: 0 0 10px rgba(255,125,156,0.4);
}

.goal-bar-fill.goal-allowance-warn {
  background: #ffb347;
  box-shadow: 0 0 10px rgba(255,179,71,0.4);
}

[data-theme="light"] .goal-bar-track {
  background: rgba(0,0,0,0.08);
}

.goal-pct {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: right;
}

.goal-empty {
  opacity: 0.7;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
}

/* =========================================
   ACCOUNT PAGE STYLES
========================================= */

.account-username {
  opacity: 0.6;
  margin: -10px 0 16px;
  font-size: 0.95rem;
}

.section-heading {
  margin-top: 1.8rem;
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  opacity: 0.9;
}

.section-hint {
  opacity: 0.65;
  font-size: 0.9rem;
  margin: 0 0 10px;
  line-height: 1.4;
}

.section-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.07);
  margin: 1.8rem 0 0;
}

[data-theme="light"] .section-divider {
  border-top-color: rgba(75,47,255,0.12);
}

.account-form {
  display: grid;
  gap: 10px;
}

/* =========================================
   GOAL CARDS — extended styles
========================================= */

.goal-type-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  opacity: 0.65;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.goal-due {
  font-size: 0.8rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  opacity: 1;
}

/* Two-bar layout for target goals */
.goal-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.goal-bar-row {
  display: grid;
  grid-template-columns: 84px 1fr 40px;
  align-items: center;
  gap: 8px;
}

.goal-bar-label {
  font-size: 0.78rem;
  opacity: 0.55;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: right;
}

.goal-pct-inline {
  font-size: 0.82rem;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Time bar — subtle purple/grey tint */
.goal-time-fill {
  background: rgba(177,156,255,0.45);
  box-shadow: none;
}

[data-theme="light"] .goal-time-fill {
  background: rgba(75,47,255,0.3);
}

/* =========================================
   GOAL ITEMS — account page list
========================================= */

.goal-item {
  margin-bottom: 8px;
  padding: 10px 14px;
}

.goal-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.goal-item-meta {
  display: block;
  font-size: 0.85rem;
  opacity: 0.6;
  margin-top: 2px;
}

/* Inline form (no grid, no gap override) */
.inline-form {
  display: contents;
}

/* Small danger text button */
.btn-link-danger {
  background: none;
  border: none;
  color: #ff7d9c;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background .2s, color .2s;
  box-shadow: none;
}

.btn-link-danger:hover {
  background: rgba(255,125,156,0.12);
  color: #ff3366;
}

[data-theme="light"] .btn-link-danger {
  color: #b4232c;
}

[data-theme="light"] .btn-link-danger:hover {
  background: rgba(180,35,44,0.08);
  color: #8a0010;
}

/* =========================================
   CHANGELOG PAGE
========================================= */

.changelog-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0.5rem;
}

.changelog-header h2 {
  margin: 0;
}

.cl-version {
  margin-top: 2rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.cl-version:last-of-type {
  border-bottom: none;
}

[data-theme="light"] .cl-version {
  border-bottom-color: rgba(75,47,255,0.1);
}

.cl-version-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.cl-version-num {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 1px;
}

.cl-version-date {
  font-size: 0.85rem;
  opacity: 0.5;
}

.cl-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 9px;
  border-radius: 99px;
}

.cl-tag--new {
  background: rgba(125,255,166,0.15);
  color: #7dffa6;
  border: 1px solid rgba(125,255,166,0.3);
}

.cl-tag--fix {
  background: rgba(177,156,255,0.15);
  color: var(--accent);
  border: 1px solid rgba(177,156,255,0.3);
}

.cl-tag--initial {
  background: rgba(255,211,111,0.12);
  color: #ffd36f;
  border: 1px solid rgba(255,211,111,0.25);
}

[data-theme="light"] .cl-tag--new   { color: #1f7a4d; background: rgba(31,122,77,0.1);  border-color: rgba(31,122,77,0.25); }
[data-theme="light"] .cl-tag--fix   { color: var(--accent); background: rgba(75,47,255,0.08); border-color: rgba(75,47,255,0.2); }
[data-theme="light"] .cl-tag--initial { color: #a07000; background: rgba(160,112,0,0.08); border-color: rgba(160,112,0,0.2); }

.cl-section-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.45;
  margin: 1rem 0 0.4rem;
}

.cl-list {
  margin: 0;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.97rem;
  line-height: 1.4;
}

.cl-list li {
  opacity: 0.85;
}

.cl-list code {
  font-family: monospace;
  font-size: 0.88rem;
  background: rgba(177,156,255,0.12);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--accent);
}

[data-theme="light"] .cl-list code {
  background: rgba(75,47,255,0.08);
}

/* LGPD data list */
.lgpd-data-list {
  margin-bottom: 12px;
}

.lgpd-data-list h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  opacity: 0.85;
}

.lgpd-data-list ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Export button */
.btn-outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--fg);
  padding: 10px 18px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent-glow);
  transition: background .2s;
}

.btn-outline:hover {
  background: rgba(177,156,255,0.12);
}

/* Danger zone (delete account) */
.danger-zone {
  margin-top: 1.6rem;
  border: 1px solid rgba(255,125,156,0.3);
  border-radius: 12px;
  overflow: hidden;
}

.danger-zone > summary {
  padding: 12px 16px;
  cursor: pointer;
  color: #ff7d9c;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.danger-zone > summary::before {
  content: "▶";
  font-size: 0.75rem;
  transition: transform .2s;
}

.danger-zone[open] > summary::before {
  transform: rotate(90deg);
}

[data-theme="light"] .danger-zone {
  border-color: rgba(180,35,44,0.3);
}

[data-theme="light"] .danger-zone > summary {
  color: #b4232c;
}

.danger-content {
  padding: 0 16px 16px;
}

.danger-warning {
  opacity: 0.75;
  font-size: 0.9rem;
  margin-bottom: 12px;
  line-height: 1.4;
}

.btn-danger {
  background: transparent;
  border: 1px solid #ff7d9c;
  color: #ff7d9c;
  padding: 10px 18px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.btn-danger:hover {
  background: rgba(255,125,156,0.15);
  color: #ff3366;
  border-color: #ff3366;
}

[data-theme="light"] .btn-danger {
  border-color: #b4232c;
  color: #b4232c;
}

[data-theme="light"] .btn-danger:hover {
  background: rgba(180,35,44,0.08);
}