:root{
  --bg:#333333;
  --panel:#151515;
  --text:#fff;
  --muted:#bdbdbd;
  --accent:#ff5800;
  --accent2:#ff3f7f;
  --good:#7cffb2;
  --bad:#ff8a8a;
  --warn:#ffd37a;
  --line:rgba(255,255,255,.12);
  --shadow:0 24px 80px rgba(0,0,0,.42);
}

*{box-sizing:border-box}

html,body{
  margin:0;
  min-height:100%;
  background:
    radial-gradient(circle at top right,rgba(255,88,0,.18),transparent 34%),
    radial-gradient(circle at bottom left,rgba(255,63,127,.10),transparent 28%),
    var(--bg);
  color:var(--text);
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  overflow-x:hidden;
}

a{color:inherit;text-decoration:none}

button,input,textarea,select{
  font:inherit;
  font-size:16px;
}

.wrap{
  width:min(1120px,94%);
  margin:0 auto;
}

.top{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(20,20,20,.82);
  backdrop-filter:blur(18px);
  border-bottom:1px solid var(--line);
}

.nav{
  min-height:68px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

.logo{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:950;
  letter-spacing:-.04em;
  font-size:20px;
}

.logo-badge{
  width:38px;
  height:38px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,var(--accent),var(--accent2));
  box-shadow:0 12px 30px rgba(255,88,0,.28);
}

.nav-actions{
  display:flex;
  gap:8px;
  align-items:center;
}

.nav-actions a{
  min-height:40px;
  padding:10px 12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--line);
  border-radius:999px;
  font-size:13px;
  font-weight:850;
  color:#eee;
  background:rgba(255,255,255,.05);
}

.hero{
  padding:24px 0 12px;
}

.hero-card{
  border:1px solid rgba(255,88,0,.38);
  border-radius:34px;
  padding:26px;
  min-height:360px;
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:20px;
  align-items:center;
  background:
    radial-gradient(circle at top right,rgba(255,88,0,.28),transparent 34%),
    linear-gradient(135deg,rgba(255,255,255,.10),rgba(255,255,255,.035));
  box-shadow:var(--shadow);
}

.kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,88,0,.14);
  border:1px solid rgba(255,88,0,.36);
  color:#ffb184;
  font-size:12px;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
}

h1{
  font-size:clamp(42px,8vw,82px);
  line-height:.88;
  letter-spacing:-.08em;
  margin:16px 0 14px;
}

h2{
  font-size:clamp(28px,5vw,46px);
  line-height:.95;
  letter-spacing:-.06em;
  margin:0 0 12px;
}

h3{
  margin:0 0 8px;
  font-size:20px;
  letter-spacing:-.04em;
}

p{
  color:#e7e7e7;
  line-height:1.55;
}

.actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px;
}

.btn{
  border:0;
  min-height:50px;
  padding:14px 17px;
  border-radius:16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,var(--accent),var(--accent2));
  color:#fff;
  font-weight:950;
  cursor:pointer;
  box-shadow:0 14px 32px rgba(255,88,0,.24);
}

.btn.secondary{
  background:rgba(0,0,0,.25);
  border:1px solid rgba(255,88,0,.38);
  box-shadow:none;
}

.phone-card{
  border-radius:36px;
  padding:18px;
  background:#0d0d0d;
  border:1px solid rgba(255,255,255,.14);
  box-shadow:0 30px 90px rgba(0,0,0,.45);
}

.phone-screen{
  border-radius:28px;
  background:
    radial-gradient(circle at top right,rgba(255,88,0,.20),transparent 38%),
    #181818;
  padding:18px;
  min-height:280px;
}

.mini-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:12px 0;
  border-bottom:1px solid rgba(255,255,255,.08);
  color:#ddd;
}

.result-big{
  margin-top:18px;
  padding:18px;
  border-radius:22px;
  background:rgba(124,255,178,.10);
  border:1px solid rgba(124,255,178,.30);
}

.result-big span{
  color:#baffd3;
  font-size:13px;
  font-weight:850;
}

.result-big strong{
  display:block;
  font-size:34px;
  letter-spacing:-.06em;
  margin-top:4px;
}

.section{
  padding:22px 0;
}

.grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}

.card,.panel,.compare-card{
  border:1px solid var(--line);
  border-radius:26px;
  padding:18px;
  background:linear-gradient(180deg,rgba(255,255,255,.08),rgba(255,255,255,.035));
  box-shadow:0 18px 46px rgba(0,0,0,.22);
}

.app-shell{
  display:grid;
  grid-template-columns:.82fr 1.18fr;
  gap:16px;
  align-items:start;
}

.form-grid{
  display:grid;
  gap:12px;
}

.field{
  display:grid;
  gap:6px;
}

.field span{
  color:#ccc;
  font-size:12px;
  font-weight:850;
}

input,select,textarea{
  width:100%;
  min-height:48px;
  border:1px solid rgba(255,255,255,.13);
  border-radius:16px;
  padding:0 13px;
  background:rgba(0,0,0,.26);
  color:#fff;
  outline:none;
}

textarea{
  min-height:94px;
  padding:13px;
  resize:vertical;
}

.expense-list{
  display:grid;
  gap:10px;
  margin-top:14px;
}

.expense-item{
  display:grid;
  grid-template-columns:1.2fr .8fr auto;
  gap:8px;
  align-items:center;
  padding:10px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:18px;
  background:rgba(255,255,255,.05);
}

.expense-item input,.expense-item select{
  min-height:42px;
  border-radius:14px;
}

.icon-btn{
  width:42px;
  height:42px;
  border:0;
  border-radius:14px;
  color:#ffb0b0;
  background:rgba(255,0,0,.13);
  cursor:pointer;
  font-weight:950;
}

.summary-grid,.compare-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}

.compare-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
  margin-top:12px;
}

.metric{
  border:1px solid rgba(255,255,255,.11);
  border-radius:22px;
  padding:14px;
  background:rgba(255,255,255,.06);
}

.metric small,.compare-card small{
  display:block;
  color:#bbb;
  font-weight:850;
  margin-bottom:8px;
}

.metric strong,.compare-card strong{
  font-size:clamp(24px,4vw,34px);
  line-height:1;
  letter-spacing:-.06em;
}

.good strong{color:var(--good)}
.bad strong{color:var(--bad)}
.warn strong{color:var(--warn)}

.notice,.month-note{
  margin-top:14px;
  padding:14px;
  border-radius:18px;
  border:1px solid rgba(255,88,0,.30);
  background:rgba(255,88,0,.10);
  color:#fff;
  line-height:1.45;
}

.top-list,.history,.month-bar-wrap{
  display:grid;
  gap:10px;
  margin-top:12px;
}

.top-item,.history-item,.month-bar{
  padding:12px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.045);
}

.top-item,.month-bar-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.month-tools{
  display:grid;
  grid-template-columns:1fr auto auto;
  gap:10px;
  align-items:end;
  margin:16px 0;
}

.month-bar-track{
  height:12px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  overflow:hidden;
}

.month-bar-fill{
  height:100%;
  width:0%;
  border-radius:999px;
  background:linear-gradient(135deg,#ff5800,#ff3f7f);
}

.month-bar-fill.good{
  background:linear-gradient(135deg,#31d67b,#7cffb2);
}

.month-bar-fill.bad{
  background:linear-gradient(135deg,#ff4d4d,#ff8a8a);
}

.month-table-wrap{
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  border:1px solid rgba(255,255,255,.10);
  border-radius:20px;
  margin-top:12px;
}

.month-table{
  width:100%;
  border-collapse:collapse;
  min-width:680px;
}

.month-table th,.month-table td{
  padding:12px;
  border-bottom:1px solid rgba(255,255,255,.08);
  text-align:left;
  font-size:14px;
}

.month-table th{
  color:#ffb184;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.banner-local{
  margin-top:16px;
  border:1px solid rgba(255,88,0,.35);
  border-radius:24px;
  padding:18px;
  background:radial-gradient(circle at right,rgba(255,88,0,.20),transparent 35%),rgba(0,0,0,.20);
}

.footer{
  padding:34px 0 50px;
  color:#aaa;
  font-size:13px;
}

.footer-grid{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:18px;
  border-top:1px solid var(--line);
  padding-top:22px;
}

.footer a{font-weight:850}

@media(max-width:980px){
  .hero-card,.app-shell{grid-template-columns:1fr}
  .grid{grid-template-columns:1fr}
  .summary-grid{grid-template-columns:1fr 1fr}
}

@media(max-width:760px){
  .month-tools{grid-template-columns:1fr}
  .month-tools .btn{width:100%}
  .compare-grid{grid-template-columns:1fr}
  .compare-card{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
  }
  .compare-card small{
    max-width:48%;
    margin:0;
  }
  .compare-card strong{
    text-align:right;
    max-width:52%;
  }
}

@media(max-width:620px){
  .wrap{width:calc(100% - 18px)}
  .nav-actions a:nth-child(1){display:none}
  .hero-card{
    border-radius:26px;
    padding:18px;
    min-height:auto;
  }
  h1{font-size:44px}
  .panel{
    border-radius:24px;
    padding:14px;
  }
  .summary-grid{grid-template-columns:1fr}
  .metric{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
  }
  .expense-item{grid-template-columns:1fr}
  .icon-btn,.actions .btn{width:100%}
  .footer-grid{grid-template-columns:1fr}
}

@media(max-width:390px){
  h1{font-size:38px}
  .compare-card,.metric{display:block}
  .compare-card strong,.metric strong{
    margin-top:8px;
    text-align:left;
    max-width:100%;
  }
}
