:root{
  --ink:#101828;
  --muted:#667085;
  --soft:#f4f7fb;
  --card:#ffffff;
  --line:#e6eaf0;
  --blue:#2563eb;
  --purple:#7c3aed;
  --green:#16a34a;
  --orange:#f97316;
  --red:#ef4444;
  --shadow:0 22px 60px rgba(15,23,42,.10);
}

*{box-sizing:border-box}
body{
  margin:0;
  min-height:100vh;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--ink);
  background:
    radial-gradient(circle at top left,rgba(37,99,235,.18),transparent 34rem),
    radial-gradient(circle at top right,rgba(124,58,237,.18),transparent 30rem),
    linear-gradient(180deg,#f8fbff 0%,#eef3f9 100%);
}
button,input,select{font:inherit}
button{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.7}
.hidden{display:none!important}

.auth-shell{
  display:grid;
  place-items:center;
  width:min(1180px,100%);
  min-height:100vh;
  margin:auto;
  padding:32px 24px;
}
.auth-card{
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:34px;
  align-items:center;
  width:100%;
  padding:34px;
  border:1px solid rgba(255,255,255,.82);
  border-radius:34px;
  background:rgba(255,255,255,.78);
  box-shadow:var(--shadow);
  backdrop-filter:blur(18px);
}
.auth-form{
  padding:24px;
  border:1px solid var(--line);
  border-radius:26px;
  background:#fff;
}
.auth-tabs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-bottom:16px;
  padding:6px;
  border-radius:16px;
  background:#f1f5f9;
}
.auth-tabs button{
  border:0;
  border-radius:12px;
  padding:11px;
  background:transparent;
  color:var(--muted);
  font-weight:800;
}
.auth-tabs button.active{
  background:#fff;
  color:var(--blue);
  box-shadow:0 6px 18px rgba(15,23,42,.08);
}
.form-message{
  min-height:20px;
  margin:0;
  color:var(--red);
  font-size:13px;
  font-weight:700;
}
.form-message.success{color:var(--green)}
.bot-field{
  position:absolute;
  left:-9999px;
  width:1px;
  height:1px;
  overflow:hidden;
}
.link-button{
  width:100%;
  margin-top:12px;
  border:0;
  background:transparent;
  color:var(--blue);
  font-weight:800;
}
.auth-footer{
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid var(--line);
  text-align:center;
}
.auth-footer p{
  margin:0 0 7px;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}
.auth-footer a{
  color:var(--green);
  font-size:13px;
  font-weight:900;
  text-decoration:none;
}

.app-shell{
  width:min(1180px,100%);
  min-height:100vh;
  margin:auto;
  padding:38px 24px 120px;
}

.hero,.panel-heading,.section-heading,.dialog-heading,.card-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
}

.hero{align-items:center;margin-bottom:26px}
.brand-mark{
  display:inline-flex;
  align-items:center;
  gap:10px;
  margin-bottom:20px;
  padding:8px 12px 8px 8px;
  border:1px solid rgba(255,255,255,.82);
  border-radius:999px;
  background:rgba(255,255,255,.7);
  box-shadow:0 10px 24px rgba(15,23,42,.08);
  backdrop-filter:blur(14px);
}
.brand-mark span{
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--blue),var(--purple));
  color:#fff;
  font-size:12px;
  font-weight:900;
}
.brand-mark strong{
  color:var(--ink);
  font-size:14px;
  font-weight:900;
  letter-spacing:-.03em;
}
.header-actions{display:flex;align-items:center;gap:10px}
.header-actions span{
  max-width:190px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  padding:11px 14px;
  border:1px solid rgba(255,255,255,.8);
  border-radius:16px;
  background:rgba(255,255,255,.72);
  box-shadow:0 8px 22px rgba(15,23,42,.08);
  color:var(--muted);
  font-size:13px;
  font-weight:800;
}
.eyebrow{
  margin:0 0 8px;
  color:var(--muted);
  font-size:11px;
  font-weight:800;
  letter-spacing:1.6px;
}
h1,h2{margin:0;letter-spacing:-.04em}
h1{font-size:clamp(40px,6vw,72px);line-height:.96}
h1 span{
  background:linear-gradient(90deg,var(--blue),var(--purple),#db2777);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
h2{font-size:24px}
.hero-copy{max-width:470px;margin:14px 0 0;color:var(--muted);font-size:16px;line-height:1.6}
.icon-button{
  border:1px solid rgba(255,255,255,.8);
  background:rgba(255,255,255,.72);
  backdrop-filter:blur(14px);
  border-radius:18px;
  width:52px;
  height:52px;
  box-shadow:var(--shadow);
  font-size:20px;
}

.overview-grid{
  display:grid;
  grid-template-columns:1.25fr .85fr .85fr;
  gap:16px;
  margin-bottom:16px;
}
.money-card,.panel,.alert-card,.category,.transaction{
  border:1px solid rgba(255,255,255,.82);
  background:rgba(255,255,255,.78);
  box-shadow:var(--shadow);
  backdrop-filter:blur(18px);
}
.money-card{
  overflow:hidden;
  position:relative;
  padding:22px;
  border-radius:28px;
}
.money-card::after{
  content:"";
  position:absolute;
  right:-38px;
  top:-38px;
  width:118px;
  height:118px;
  border-radius:50%;
  background:rgba(37,99,235,.10);
}
.money-card.primary{
  color:#fff;
  background:
    radial-gradient(circle at top right,rgba(255,255,255,.28),transparent 13rem),
    linear-gradient(135deg,#172554,#2563eb 55%,#7c3aed);
}
.money-card.primary .card-label,.money-card.primary p,.money-card.primary .card-row{color:rgba(255,255,255,.82)}
.card-label{position:relative;z-index:1;color:var(--muted);font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:1.2px}
.money-card strong{position:relative;z-index:1;display:block;margin-top:12px;font-size:clamp(28px,4vw,42px);letter-spacing:-.05em}
.money-card p{position:relative;z-index:1;margin:8px 0 0;color:var(--muted);line-height:1.45}

.progress-track{
  position:relative;
  z-index:1;
  height:10px;
  margin:22px 0 12px;
  overflow:hidden;
  border-radius:99px;
  background:rgba(255,255,255,.25);
}
.progress-fill{
  height:100%;
  width:0;
  border-radius:inherit;
  background:linear-gradient(90deg,#22c55e,#facc15,#fb7185);
  transition:width .35s ease;
}
.card-row{position:relative;z-index:1;color:var(--muted);font-size:13px;font-weight:700}

.alert-card{
  display:flex;
  gap:14px;
  align-items:flex-start;
  margin-bottom:16px;
  padding:18px 20px;
  border-radius:24px;
}
.alert-card>span{
  display:grid;
  place-items:center;
  flex:none;
  width:42px;
  height:42px;
  border-radius:15px;
  background:#fff7ed;
  font-size:20px;
}
.alert-card strong{font-size:15px;line-height:1.45}
.alert-card.good{border-color:rgba(22,163,74,.18)}
.alert-card.warning{border-color:rgba(249,115,22,.25)}
.alert-card.danger{border-color:rgba(239,68,68,.25)}

.dashboard-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  margin-bottom:30px;
}
.panel{
  padding:22px;
  border-radius:28px;
}
.panel-heading{align-items:flex-start;margin-bottom:22px}
.panel-heading>span,.section-heading>span{color:var(--muted);font-size:13px;font-weight:700}
.month-filter{
  width:auto;
  min-width:158px;
  margin-top:0;
  padding:10px 12px;
  border-radius:13px;
  font-size:13px;
  font-weight:800;
}
.donut-wrap{display:grid;grid-template-columns:210px 1fr;gap:24px;align-items:center}
.donut{
  display:grid;
  place-items:center;
  width:210px;
  height:210px;
  border-radius:50%;
  background:conic-gradient(#e5e7eb 0 100%);
  box-shadow:inset 0 0 0 34px #fff;
}
.donut span{font-size:30px;font-weight:800;letter-spacing:-.05em}
.legend{display:grid;gap:10px}
.legend-item{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:10px;
  align-items:center;
  color:var(--muted);
  font-size:13px;
  font-weight:700;
}
.dot{width:11px;height:11px;border-radius:50%}

.trend-chart{
  height:214px;
  display:flex;
  gap:10px;
  align-items:end;
}
.bar-day{
  display:flex;
  flex:1;
  height:100%;
  flex-direction:column;
  justify-content:end;
  align-items:center;
  gap:9px;
}
.bar{
  position:relative;
  width:100%;
  min-height:8px;
  border-radius:14px 14px 6px 6px;
  background:linear-gradient(180deg,#60a5fa,#2563eb);
  box-shadow:0 10px 20px rgba(37,99,235,.18);
  transition:.25s ease;
}
.bar:hover{transform:translateY(-4px)}
.bar.is-today{background:linear-gradient(180deg,#fb7185,#e11d48)}
.bar-day small{color:var(--muted);font-size:11px;font-weight:800}

.section-heading{align-items:end;margin:6px 0 16px}
.category-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
}
.category{
  position:relative;
  overflow:hidden;
  padding:18px;
  min-height:150px;
  border-radius:24px;
}
.category::after{
  content:"";
  position:absolute;
  right:-24px;
  bottom:-34px;
  width:112px;
  height:112px;
  border-radius:50%;
  background:var(--tone);
  opacity:.13;
}
.category-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.category-icon{
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  border-radius:15px;
  background:var(--tone);
  color:#fff;
  font-size:19px;
}
.category-percent{color:var(--muted);font-size:12px;font-weight:800}
.category-name{display:block;margin-top:18px;color:var(--muted);font-size:13px;font-weight:700}
.category-amount{display:block;margin-top:5px;font-size:24px;font-weight:800;letter-spacing:-.04em}
.mini-track{height:7px;margin-top:16px;border-radius:99px;background:#edf1f7;overflow:hidden}
.mini-fill{height:100%;width:0;border-radius:inherit;background:var(--tone)}

.transactions-heading{margin-top:36px}
.section-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.text-button{
  border:0;
  background:#fff;
  color:var(--blue);
  padding:10px 14px;
  border-radius:12px;
  font-weight:800;
  box-shadow:0 8px 20px rgba(15,23,42,.08);
}
.danger-button{color:var(--red)}
.transaction-list{display:grid;gap:10px}
.transaction{
  display:grid;
  grid-template-columns:auto 1fr auto auto;
  align-items:center;
  gap:13px;
  padding:13px 15px;
  border-radius:19px;
}
.transaction-icon{
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  border-radius:15px;
  background:var(--tone);
  color:#fff;
  font-size:18px;
}
.transaction-main{min-width:0}
.transaction-main strong{display:block;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.transaction-main span{color:var(--muted);font-size:12px;font-weight:600}
.transaction-amount{font-weight:800;white-space:nowrap}
.transaction-actions{display:flex;gap:3px}
.transaction-actions button{
  border:0;
  background:#f4f7fb;
  color:var(--muted);
  padding:7px 9px;
  border-radius:10px;
  font-weight:800;
}
.transaction-actions button:hover{color:var(--blue)}
.empty{grid-column:1/-1;padding:30px 10px;color:var(--muted);text-align:center;font-size:14px}

.app-footer{
  margin-top:34px;
  color:var(--muted);
  text-align:center;
  font-size:13px;
  font-weight:700;
}

.fab{
  position:fixed;
  right:max(25px,calc((100vw - 1130px)/2));
  bottom:28px;
  display:grid;
  place-items:center;
  width:64px;
  height:64px;
  border:0;
  border-radius:22px;
  background:linear-gradient(135deg,var(--blue),var(--purple));
  color:#fff;
  box-shadow:0 18px 36px rgba(37,99,235,.35);
  font-size:36px;
  line-height:1;
}

dialog{
  width:min(92vw,460px);
  padding:0;
  border:0;
  border-radius:28px;
  box-shadow:0 28px 80px rgba(15,23,42,.35);
}
dialog::backdrop{background:rgba(15,23,42,.45);backdrop-filter:blur(6px)}
dialog form{padding:26px}
.dialog-heading{align-items:flex-start;margin-bottom:22px}
.close{border:0;background:transparent;color:var(--muted);font-size:32px;line-height:22px}
label{display:block;margin:15px 0;color:var(--muted);font-size:13px;font-weight:800}
input,select{
  width:100%;
  margin-top:8px;
  padding:14px;
  border:1px solid #d9e0ea;
  outline:none;
  border-radius:14px;
  background:#fff;
  color:var(--ink);
}
input:focus,select:focus{border-color:var(--blue);box-shadow:0 0 0 4px rgba(37,99,235,.10)}
.amount-input{position:relative}
.amount-input span{position:absolute;top:22px;left:14px;color:var(--muted);font-size:14px;font-weight:800}
.amount-input input{padding-left:58px}
.primary-button{
  width:100%;
  margin-top:12px;
  padding:15px;
  border:0;
  border-radius:15px;
  background:linear-gradient(135deg,var(--blue),var(--purple));
  color:#fff;
  font-weight:800;
}

@media(max-width:900px){
  .auth-card{grid-template-columns:1fr}
  .overview-grid,.dashboard-grid{grid-template-columns:1fr}
  .donut-wrap{grid-template-columns:1fr}
  .donut{margin:auto}
  .category-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:560px){
  .auth-shell{padding:18px}
  .auth-card{padding:22px;border-radius:26px}
  .auth-form{padding:18px}
  .app-shell{padding:28px 16px 110px}
  h1{font-size:38px}
  h2{font-size:22px}
  .hero-copy{font-size:15px}
  .hero{align-items:flex-start;flex-direction:column}
  .header-actions{width:100%;justify-content:space-between}
  .header-actions span{max-width:calc(100% - 124px)}
  .money-card,.panel,.alert-card{border-radius:22px}
  .money-card strong{font-size:34px}
  .donut{width:188px;height:188px}
  .trend-chart{height:170px}
  .section-heading{align-items:flex-start;flex-direction:column}
  .section-actions{width:100%;justify-content:flex-start}
  .month-filter{width:100%}
  .category-grid{grid-template-columns:1fr}
  .transaction{grid-template-columns:auto 1fr auto}
  .transaction-actions{grid-column:2/-1;justify-content:flex-end}
  .fab{right:18px;bottom:18px;width:58px;height:58px;border-radius:20px}
}
@media(max-width:390px){
  h1{font-size:34px}
  .header-actions{gap:8px}
  .icon-button{width:48px;height:48px}
  .header-actions span{max-width:calc(100% - 112px);padding-inline:11px}
  .transaction{grid-template-columns:auto 1fr}
  .transaction-amount{grid-column:2}
}
