*{box-sizing:border-box}
:root{
  --bg:#f7f5f1;--surface:#fff;--ink:#1f1a15;--muted:#6f665d;--line:#e9e2d9;
  --dark:#17120d;--gold:#b98735;--gold2:#936722;--goldsoft:#f5ead5;
  --green:#177245;--red:#b43a37;--shadow:0 18px 55px rgba(45,32,18,.08)
}
html{background:var(--bg)}
body{
  margin:0;color:var(--ink);
  background:radial-gradient(circle at top right,rgba(185,135,53,.08),transparent 28rem),var(--bg);
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  -webkit-font-smoothing:antialiased
}
button,input{font:inherit}
.topbar{
  position:sticky;top:0;z-index:20;
  background:rgba(23,18,13,.96);backdrop-filter:blur(16px);
  border-bottom:1px solid rgba(255,255,255,.07)
}
.topbar-inner,.page{width:min(1180px,calc(100% - 32px));margin:auto}
.topbar-inner{height:74px;display:flex;align-items:center;justify-content:space-between}
.brand{display:flex;align-items:center;gap:12px;color:white}
.brand-mark{
  width:42px;height:42px;display:grid;place-items:center;border-radius:13px;
  background:linear-gradient(145deg,#d8b16c,#9a6d27);font:700 24px Georgia,serif
}
.brand strong{display:block;font-size:18px;letter-spacing:.14em}
.brand span{display:block;margin-top:2px;color:#bcb3aa;font-size:11px}
.internal{display:flex;align-items:center;gap:8px;color:#d7cfc7;font-size:12px}
.internal i{width:8px;height:8px;border-radius:50%;background:#59be86;box-shadow:0 0 0 4px rgba(89,190,134,.12)}
.page{padding:38px 0 56px}
.hero{display:grid;grid-template-columns:1fr auto;gap:30px;align-items:end;margin-bottom:26px}
.eyebrow,.promo-card small{display:block;color:var(--gold2);font-size:11px;font-weight:800;letter-spacing:.14em}
.hero h1{max-width:700px;margin:8px 0 10px;font:500 clamp(34px,5vw,54px)/1.04 Georgia,serif;letter-spacing:-.025em}
.hero p{max-width:760px;margin:0;color:var(--muted);line-height:1.65;font-size:14px}
.promo-card{
  width:min(360px,100%);display:flex;align-items:center;gap:14px;background:rgba(255,255,255,.78);
  border:1px solid var(--line);border-radius:18px;padding:15px 17px
}
.promo-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;background:var(--goldsoft);color:var(--gold2);font-size:18px;font-weight:800}
.promo-card>div:last-child{min-width:0;display:grid;gap:3px}
.promo-card strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px}
.promo-card span{font-size:11px;color:var(--muted)}
.workspace{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(330px,.65fr);gap:22px;align-items:start}
.card{background:rgba(255,255,255,.95);border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow)}
.form-card{padding:26px}
.section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}
.section-head>div{display:flex;align-items:center;gap:10px}
.section-head>div>span{width:30px;height:30px;display:grid;place-items:center;border-radius:10px;background:var(--dark);color:white;font-size:11px;font-weight:800}
.section-head h2,.result-head h2{margin:0;font-size:18px}
.section-head>small{color:#9a9188}
.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.grid label{font-size:12px;font-weight:700;color:#4e463e}
.grid input{
  width:100%;height:52px;border:1px solid #ded6cc;border-radius:13px;background:white;
  padding:0 14px;margin-top:8px;font-size:15px;outline:none
}
.grid input:focus,.affix:focus-within{border-color:#c99c56;box-shadow:0 0 0 4px rgba(185,135,53,.1)}
.affix{height:52px;margin-top:8px;border:1px solid #ded6cc;border-radius:13px;display:flex;align-items:center;overflow:hidden}
.affix input{height:50px;border:0;border-radius:0;margin:0;box-shadow:none!important;min-width:0;padding:0 9px}
.affix b{font-size:12px;color:#8a8178;white-space:nowrap}
.affix b:first-child{padding-left:14px}.affix b:last-child{padding-right:14px}
hr{border:0;border-top:1px solid var(--line);margin:26px 0}
.message{min-height:20px;margin-top:14px;font-size:12px}
.message.error{color:var(--red)}.message.success{color:var(--green)}
.actions{display:grid;grid-template-columns:auto 1fr 1.2fr;gap:10px;margin-top:16px}
.btn{min-height:50px;border:0;border-radius:13px;padding:0 17px;cursor:pointer;font-size:13px;font-weight:800}
.btn:disabled{opacity:.55}.btn-light{background:#f0ece7;color:#51483f}.btn-dark{background:var(--dark);color:white}
.btn-gold{background:linear-gradient(135deg,#c79b52,#a9782c);color:white}
.result-card{position:sticky;top:96px;overflow:hidden}
.result-head{display:flex;justify-content:space-between;gap:12px;padding:24px 24px 18px}
.result-head h2{margin-top:6px}
.result-head>small{align-self:start;padding:6px 9px;border-radius:999px;background:#f2efe9;color:#746b62;font-size:10px;font-weight:800;text-transform:uppercase}
.result-lines{padding:0 24px 10px}
.result-lines>div{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:15px 0;border-top:1px solid #eee8e1}
.result-lines>div:first-child{border-top:0}
.result-lines span{display:grid;gap:3px;font-size:13px;font-weight:700}
.result-lines small{color:#9a9188;font-size:10px;font-weight:400}
.result-lines strong{font-size:14px;white-space:nowrap}.green{color:var(--green)}
.total-panel{
  margin:12px 18px 18px;padding:22px;border-radius:18px;
  background:linear-gradient(135deg,rgba(255,255,255,.05),transparent),var(--dark);color:white
}
.total-panel small{display:block;color:#d9b978;font-size:10px;font-weight:800;letter-spacing:.14em}
.total-panel strong{display:block;margin:8px 0 5px;font:500 clamp(34px,5vw,44px) Georgia,serif}
.total-panel span{font-size:10px;color:#bcb2a8}
.note{display:flex;gap:11px;margin:0 18px 16px;padding:14px;background:#fbfaf8;border:1px solid var(--line);border-radius:14px}
.note>b{width:24px;height:24px;display:grid;place-items:center;border-radius:8px;background:var(--goldsoft);color:var(--gold2)}
.note p{margin:0;color:var(--muted);font-size:10px;line-height:1.5}.note strong{color:var(--ink)}
.db-status{display:flex;align-items:center;gap:8px;padding:0 22px 20px;color:#8b8279;font-size:10px}
.db-status i{width:7px;height:7px;border-radius:50%;background:#c3bbb3}
.db-status i.ok{background:#45a873;box-shadow:0 0 0 4px rgba(69,168,115,.1)}
.db-status i.bad{background:#c85753}
.mobile-total{display:none}
.toast{
  position:fixed;right:24px;bottom:24px;z-index:50;width:min(360px,calc(100% - 32px));
  display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:14px;border-radius:16px;
  background:#172019;color:white;box-shadow:0 20px 60px rgba(0,0,0,.22);
  transform:translateY(130%);opacity:0;pointer-events:none;transition:.25s
}
.toast.show{transform:translateY(0);opacity:1;pointer-events:auto}
.toast>b{width:34px;height:34px;display:grid;place-items:center;border-radius:11px;background:#2c7a4e}
.toast strong,.toast span{display:block;font-size:11px}.toast button{border:0;background:transparent;color:#aeb9b1;font-size:20px}
footer{text-align:center;padding:22px;color:#9a9188;font-size:10px}
@media(max-width:900px){.hero{grid-template-columns:1fr}.promo-card{width:100%}.workspace{grid-template-columns:1fr}.result-card{position:static}}
@media(max-width:640px){
  .topbar-inner,.page{width:min(100% - 20px,1180px)}.topbar-inner{height:66px}.internal{display:none}
  .page{padding-top:24px}.hero{gap:18px;margin-bottom:18px}.hero h1{font-size:36px}
  .form-card{padding:17px}.grid{grid-template-columns:1fr}.actions{grid-template-columns:1fr 1fr}
  .btn-gold{grid-column:1/-1}
  .mobile-total{display:flex;justify-content:space-between;align-items:center;margin-top:4px;padding:14px 16px;border-radius:13px;background:var(--dark);color:white}
  .mobile-total span{font-size:11px;color:#d4c6b6}.mobile-total strong{font:500 23px Georgia,serif}
  .toast{right:16px;bottom:16px}
}
