* { box-sizing: border-box; }
body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: radial-gradient(circle at 50% 0%, #241f3a 0%, #12111a 55%);
  color: #f2eef7;
  margin: 0;
  padding: 0 14px 70px;
  min-height: 100vh;
}
.hero {
  max-width: 900px;
  margin: 0 auto 14px;
  padding: 34px 20px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 28px 28px;
  background: linear-gradient(160deg, #2a1f4d 0%, #1b1830 55%, #12111a 100%);
  border-bottom: 1px solid #3a3260;
}
.hero::before, .hero::after { content: "✦"; position: absolute; color: #b98cf233; font-size: 40px; }
.hero::before { top: 10px; left: 20px; }
.hero::after { bottom: 10px; right: 24px; font-size: 26px; }
.badge {
  display: inline-block; font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: #cbb8f5; background: #2c2648; border: 1px solid #4a4180; border-radius: 999px;
  padding: 5px 14px; margin-bottom: 12px;
}
h1 {
  font-size: 30px; font-weight: 800; text-align: center; margin: 0 0 6px; letter-spacing: .02em;
  background: linear-gradient(90deg, #d9c4ff, #b98cf2 40%, #7c5cff 75%, #ff9ecb);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.subtitle { text-align: center; color: #cbb8f5; font-size: 14px; letter-spacing: .04em; margin-bottom: 4px; }
.subtitle2 { text-align: center; color: #6f6685; font-size: 12px; }
.hero-countdown {
  text-align: center; margin-top: 10px; font-size: 13px; font-weight: 700;
  color: #f2eef7; background: rgba(124,92,255,.15); border: 1px solid #4a4180;
  display: inline-block; padding: 6px 14px; border-radius: 999px; letter-spacing: .02em;
}
.hero-countdown-wrap { text-align: center; }

.profile-bar {
  max-width: 900px; margin: 0 auto 14px; display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: #a89bc2; padding: 0 4px;
}
.profile-bar button {
  background: #2c2648; border: 1px solid #4a4180; color: #cbb8f5; border-radius: 8px;
  padding: 5px 10px; font-size: 12px; cursor: pointer;
}
.profile-bar button:hover { background: #382f5c; }

.profile-screen { max-width: 420px; margin: 60px auto; text-align: center; padding: 0 10px; }
.profile-screen h2 { color: #cbb8f5; font-size: 18px; margin-bottom: 6px; }
.profile-screen p { color: #6f6685; font-size: 12px; margin-bottom: 20px; }
.profile-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.profile-list button {
  background: #1b1826; border: 1px solid #2c273d; color: #f2eef7; padding: 12px;
  border-radius: 10px; font-size: 15px; cursor: pointer;
}
.profile-list button:hover { border-color: #7c5cff; }
.auth-tabs { display: flex; gap: 6px; background: #1b1826; border: 1px solid #2c273d; border-radius: 10px; padding: 4px; margin-bottom: 16px; }
.auth-tab-btn { flex: 1; background: transparent; border: none; color: #a89bc2; font-size: 13px; font-weight: 600; padding: 8px; border-radius: 7px; cursor: pointer; }
.auth-tab-btn.active { background: linear-gradient(90deg, #7c5cff, #b98cf2); color: #fff; }
.auth-tabs-small { max-width: 220px; margin: 10px auto 8px; padding: 3px; }
.auth-tabs-small .auth-tab-btn { font-size: 11px; padding: 5px; }
.profile-new { display: flex; gap: 8px; }
.profile-new input {
  flex: 1; background: #221f30; border: 1px solid #33304a; color: #f2eef7; border-radius: 8px; padding: 10px;
}
.profile-new button {
  background: linear-gradient(90deg, #7c5cff, #b98cf2); border: none; color: #fff;
  border-radius: 8px; padding: 0 16px; cursor: pointer; font-size: 15px;
}
.profile-new button:disabled { opacity: .6; cursor: not-allowed; }

.hero-stage { position: relative; height: 212px; }
.flight-svg { position: absolute; top: 0; left: 0; width: 100%; height: 220px; overflow: visible; z-index: 0; }
.flight-path {
  fill: none; stroke: url(#lineGrad); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 5 6; animation: dashFlow 2.2s linear infinite; opacity: .75;
}
@keyframes dashFlow { to { stroke-dashoffset: -110; } }
.star-dot circle { fill: #cbb8f5; animation: twinkle 2.4s ease-in-out infinite; }
@keyframes twinkle { 0%,100% { opacity: .35; } 50% { opacity: 1; } }
.flight-label { font-size: 9px; fill: #6f6685; letter-spacing: .14em; font-family: inherit; }
.plane-on-path {
  position: absolute; top: 0; left: 0; font-size: 18px; z-index: 1;
  offset-path: path("M72,15 L167,33 L202,71 L258,116 L246,165 L345,205 L392,155");
  offset-rotate: auto; animation: flyAlong 7s ease-in-out infinite; transform: rotate(20deg);
}
@keyframes flyAlong { 0% { offset-distance: 0%; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }

.logo-block { position: relative; z-index: 2; text-align: center; padding-top: 78px; }
.logo-eyebrow { font-size: 11px; letter-spacing: .35em; text-transform: uppercase; color: #8a7dc7; margin-bottom: 6px; }
.logo-main {
  font-size: 42px; font-weight: 900; line-height: .98; letter-spacing: .01em;
  background: linear-gradient(90deg, #d9c4ff, #b98cf2 40%, #7c5cff 75%, #ff9ecb);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 40px rgba(185,140,242,.25);
}
.logo-year {
  display: inline-block; margin-top: 10px; font-size: 13px; letter-spacing: .25em;
  color: #12111a; background: linear-gradient(90deg, #b98cf2, #7c5cff);
  padding: 4px 16px; border-radius: 999px; font-weight: 700;
}

.countdown-box { margin: 34px 0 18px; }
.countdown-label { font-size: 11px; color: #a89bc2; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 18px; }
.countdown-grid { display: flex; align-items: center; justify-content: center; gap: 6px; }
.cd-unit {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 56px; padding: 8px 4px 6px; border-radius: 12px;
  background: linear-gradient(160deg, #241f3a, #1b1826); border: 1px solid #3a3260;
  box-shadow: 0 0 16px rgba(124,92,255,.12);
}
.cd-num {
  font-size: 22px; font-weight: 800; line-height: 1;
  background: linear-gradient(90deg, #d9c4ff, #b98cf2, #7c5cff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cd-suf { font-size: 9px; color: #8a7dc7; text-transform: uppercase; letter-spacing: .08em; margin-top: 3px; }
.cd-sep { font-size: 18px; color: #4a4180; font-weight: 700; }

.countdown-box { margin-bottom: 18px; }
.countdown-label { font-size: 11px; color: #a89bc2; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.countdown-numbers {
  font-size: 22px; font-weight: 800; letter-spacing: .03em;
  background: linear-gradient(90deg, #d9c4ff, #b98cf2, #7c5cff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.tabs {
  max-width: 900px; margin: 0 auto 20px; display: flex; gap: 8px; background: #1b1826;
  padding: 6px; border-radius: 12px; border: 1px solid #2c273d;
}
.tab-btn {
  flex: 1; padding: 10px; text-align: center; border-radius: 8px; background: transparent;
  border: none; color: #a89bc2; font-size: 14px; font-weight: 600; cursor: pointer;
}
.tab-btn.active { background: linear-gradient(90deg, #7c5cff, #b98cf2); color: #fff; }

.panel { max-width: 900px; margin: 0 auto; display: none; }
.panel.active { display: block; }

.card {
  background: #1b1826; border: 1px solid #2c273d; border-radius: 14px; padding: 16px; margin-bottom: 16px;
}
.card h2 {
  font-size: 15px; text-transform: uppercase; letter-spacing: .05em; color: #cbb8f5;
  margin: 0 0 12px; border-bottom: 1px solid #2c273d; padding-bottom: 8px;
}
.card-show {
  background: linear-gradient(160deg, #4a1470 0%, #33125a 55%, #1b1826 100%);
  border: 1px solid #7c3fd6;
}
.card-show h2 { color: #d9aaff; border-bottom-color: #7c3fd6; }
.card-note { font-size: 12px; color: #c9a0f0; margin: -4px 0 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }

label.chk { display: flex; align-items: center; gap: 10px; padding: 5px 2px; font-size: 14px; cursor: pointer; border-radius: 8px; }
label.chk:hover { background: #221f30; }
input[type=checkbox] { width: 17px; height: 17px; accent-color: #7c5cff; cursor: pointer; flex-shrink: 0; }
.checked span { text-decoration: line-through; color: #6f6685; }

.progress-bar { height: 10px; border-radius: 6px; background: #221f30; overflow: hidden; margin-top: 6px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #7c5cff, #b98cf2); width: 0%; transition: width .3s ease; }
.progress-text { text-align: center; font-size: 12px; color: #a89bc2; margin-top: 6px; }

.chk .item-actions { margin-left: auto; display: flex; gap: 6px; opacity: 0; transition: opacity .15s; }
.chk:hover .item-actions { opacity: 1; }
.icon-btn { background: none; border: none; color: #6f6685; font-size: 13px; cursor: pointer; padding: 2px; }
.icon-btn.edit-btn:hover { color: #cbb8f5; }
.icon-btn.del-btn:hover { color: #ff7c9c; }

.item-details {
  margin: 4px 0 8px 30px; padding: 10px; background: #161320; border: 1px solid #2c273d;
  border-radius: 10px; display: flex; flex-direction: column; gap: 8px;
}
.detail-field { display: flex; flex-direction: column; gap: 3px; }
.detail-field label { font-size: 11px; color: #a89bc2; }
.detail-field input { background: #221f30; border: 1px solid #33304a; color: #f2eef7; border-radius: 7px; padding: 6px 8px; font-size: 13px; }
.chk-inline { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #cbb8f5; cursor: pointer; }
.buy-fields { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; border-top: 1px solid #2c273d; }

.mini-add-row { display: flex; gap: 6px; margin-top: 8px; }
.mini-add-row input { flex: 1; background: #221f30; border: 1px solid #33304a; color: #f2eef7; border-radius: 8px; padding: 7px 8px; font-size: 13px; }
.mini-add-row button { background: linear-gradient(90deg, #7c5cff, #b98cf2); border: none; color: #fff; border-radius: 8px; padding: 0 14px; font-size: 16px; cursor: pointer; }
.mini-add-row button:hover { opacity: .9; }

.shop-row { display: grid; grid-template-columns: 26px 1fr 90px 60px; align-items: center; gap: 8px; padding: 8px 4px; border-bottom: 1px solid #241f33; font-size: 13px; }
.shop-row.bought .shop-name { text-decoration: line-through; color: #6f6685; }
.shop-value { color: #cbb8f5; text-align: right; font-size: 12px; }
.shop-link { color: #b98cf2; font-size: 12px; text-decoration: underline; }
.shop-totais { display: flex; justify-content: space-between; margin-top: 12px; font-size: 13px; flex-wrap: wrap; gap: 8px; }
.shop-totais b { color: #cbb8f5; }

/* Gastos */
.gasto-row { display: grid; grid-template-columns: 1fr 110px 90px 30px; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid #241f33; }
.gasto-row input[type=text], .gasto-row input[type=number] { background: #221f30; border: 1px solid #33304a; color: #f2eef7; border-radius: 8px; padding: 7px 8px; font-size: 13px; width: 100%; }
.gasto-row .pago-lbl { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #a89bc2; }
.del-btn { background: none; border: none; color: #6f6685; font-size: 16px; cursor: pointer; }
.del-btn:hover { color: #ff7c9c; }
.add-btn { margin-top: 10px; background: #2c273d; border: 1px dashed #4a4361; color: #cbb8f5; padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; width: 100%; }
.add-btn:hover { background: #33304a; }
.totais { display: flex; justify-content: space-between; margin-top: 12px; font-size: 13px; flex-wrap: wrap; gap: 8px; }
.totais span b { color: #cbb8f5; }
.link-row { display: flex; gap: 8px; padding: 0 0 8px; flex-wrap: wrap; }
.link-row input { flex: 1; min-width: 180px; background: #221f30; border: 1px solid #33304a; color: #f2eef7; border-radius: 8px; padding: 6px 8px; font-size: 12px; }
.link-row input::placeholder { color: #6f6685; }

/* Roteiro */
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 10px; margin-bottom: 6px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 11px; color: #a89bc2; text-transform: uppercase; letter-spacing: .04em; }
.field input { background: #221f30; border: 1px solid #33304a; color: #f2eef7; border-radius: 8px; padding: 8px; font-size: 13px; }
.day-card { margin-bottom: 14px; }
.day-card h3 { font-size: 13px; color: #b98cf2; margin: 0 0 8px; }
.activity-row { display: grid; grid-template-columns: 90px 1fr 1fr 30px; gap: 8px; margin-bottom: 6px; align-items: center; }
.activity-row input { background: #221f30; border: 1px solid #33304a; color: #f2eef7; border-radius: 8px; padding: 7px 8px; font-size: 13px; width: 100%; }
.saving-note { text-align: center; font-size: 11px; color: #6f6685; margin-top: 6px; }

/* Estados de carregamento / erro (novos) */
.loading-screen {
  display: flex; align-items: center; justify-content: center; min-height: 60vh;
  color: #a89bc2; font-size: 14px; letter-spacing: .04em;
}
.field-error { color: #ff7c9c; font-size: 12px; min-height: 16px; margin-top: 4px; }
