:root{
  --bg:#0b1020;
  --card:#0f1730;
  --text:#e9ecf5;
  --muted:#a6b0d2;
  --line:rgba(255,255,255,.10);
  --primary:#6d7cff;
  --primary2:#8a5cff;
  --shadow: 0 16px 40px rgba(0,0,0,.35);
  --radius: 18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue";
  color:var(--text);
  background:
    radial-gradient(1000px 700px at 15% 15%, rgba(109,124,255,.15), transparent 60%),
    radial-gradient(900px 600px at 85% 25%, rgba(138,92,255,.12), transparent 55%),
    var(--bg);
}

a{color:inherit; text-decoration:none}
.container{max-width:1100px; margin:0 auto; padding:0 18px}

/* TOPBAR */
.topbar{
  position:sticky; top:0; z-index:10;
  backdrop-filter: blur(12px);
  background: rgba(11,16,32,.75);
  border-bottom:1px solid var(--line);
}
.topbar__inner{display:flex; align-items:center; justify-content:space-between; padding:12px 0}
.brand{display:flex; align-items:center; gap:10px; font-weight:700; font-size:18px}
.brand__dot{
  width:10px; height:10px; border-radius:999px;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  box-shadow: 0 0 0 4px rgba(109,124,255,.15);
}
.nav{display:flex; gap:20px; align-items:center}
.nav a{opacity:.8; transition:opacity .2s}
.nav a:hover{opacity:1}

/* HERO */
.hero{padding:60px 0 40px}
.hero__grid{display:grid; grid-template-columns: 1.35fr .85fr; gap:32px; align-items:start}
@media (max-width: 960px){
  .hero__grid{grid-template-columns: 1fr; }
}

h1{font-size:38px; line-height:1.1; margin:0 0 16px; letter-spacing: -0.02em}
h2{font-size:28px; margin:0 0 10px}
h3{margin:24px 0 16px; font-size:22px}
h4{margin:0 0 6px; font-size:18px}
.muted{color:var(--muted); line-height: 1.5}
.small{font-size:13px}
.text-center{text-align: center}

.hero__actions{display:flex; gap:12px; flex-wrap:wrap; margin:24px 0 20px}

/* BUTTONS */
.btn{
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  color:var(--text);
  padding:10px 18px;
  border-radius: 999px;
  cursor:pointer;
  transition: all .2s ease;
  font-weight:600;
  font-size: 15px;
}
.btn:hover{transform: translateY(-2px); background: rgba(255,255,255,.07)}
.btn--primary{
  border:none;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  box-shadow: 0 10px 20px rgba(109,124,255,.25);
}
.btn--secondary{
  background: rgba(109,124,255,.10);
  border-color: rgba(109,124,255,.25);
}
.btn--ghost{background: transparent; padding: 6px 12px;}
.btn--sm{font-size:13px; padding: 6px 12px;}

/* STATS */
.stats{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:12px;
  margin: 24px 0;
}
.stat{
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  border-radius: 14px;
  padding: 16px;
}
.stat__label{color:var(--muted); font-size:13px}
.stat__value{font-size:32px; font-weight:700; margin-top:4px; color: #fff}

.note{
  border-left: 3px solid var(--primary);
  background: rgba(109,124,255,.08);
  padding:12px 16px;
  border-radius: 8px;
  font-size: 14px;
}

.hero__card .card{
  border:1px solid var(--line);
  background: rgba(23, 28, 48, 0.6);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.bullets{margin:10px 0 0; padding-left:20px}
.bullets li{margin:8px 0; color:var(--muted)}

.section{padding: 60px 0}
.section--dark{background: rgba(0,0,0,.15); border-top:1px solid var(--line); border-bottom:1px solid var(--line)}
.section__head{margin-bottom:30px; max-width: 700px}
.spacer{height: 40px}

/* --- VERTICAL MEDIA (9:16) --- */
.vertical-media-container{
  display: flex;
  justify-content: center;
}
.vertical-media{
  width: 100%;
  max-width: 320px; /* Телефон ені */
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: 24px;
  overflow: hidden;
  border: 4px solid rgba(255,255,255,0.05);
  box-shadow: var(--shadow);
  position: relative;
}
.media-content{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media-caption{
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 20px 10px;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  text-align: center;
  font-weight: 600;
  font-size: 14px;
}

/* --- VERTICAL STEPS GRID --- */
.steps-grid-vertical{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 20px;
  justify-items: center;
}
.step-card-vertical{
  width: 100%;
  max-width: 280px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.step-media{
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #1a1f35;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.step-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.step-content{
  padding: 16px;
  flex-grow: 1;
}
.step-num{
  display: inline-block;
  width: 24px; height: 24px;
  line-height: 24px;
  text-align: center;
  background: var(--primary);
  border-radius: 50%;
  font-weight: bold;
  font-size: 12px;
  margin-bottom: 8px;
  color: #fff;
}

/* TEMPLATE */
.template{
  margin-top:40px;
  border:1px dashed var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255,255,255,.02);
}
.template summary{cursor:pointer; font-weight:700; color: var(--primary)}
pre{
  white-space:pre-wrap;
  margin:16px 0 0;
  color: var(--muted);
  background: rgba(0,0,0,.3);
  border:1px solid var(--line);
  padding: 16px;
  border-radius: 12px;
  overflow:auto;
  font-family: monospace;
}

/* TABLE & LIST */
.table{
  border:1px solid var(--line);
  border-radius: var(--radius);
  overflow:hidden;
  background: rgba(255,255,255,.02);
}
.row{
  display:grid;
  grid-template-columns: 1.2fr .8fr .8fr;
  gap:10px;
  padding: 14px 18px;
  border-top:1px solid var(--line);
  align-items: center;
}
.row--head{
  border-top:none;
  background: rgba(255,255,255,.05);
  color: #fff;
  font-weight:700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 4px 10px;
  border-radius: 999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  font-size: 11px;
  width: fit-content;
  font-weight: 600;
}
.badge--pending{border-color: rgba(255,193,7,.3); color: #ffc107}
.badge--receipt{border-color: rgba(109,124,255,.35); background: rgba(109,124,255,.10); color: #bdc5ff}
.badge--verified{border-color: rgba(76, 175, 80, 0.35); background: rgba(76, 175, 80, 0.12); color: #66bb6a}

.empty{
  display:none;
  margin-top:12px;
  text-align: center;
  padding: 30px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.footer{
  border-top:1px solid var(--line);
  padding: 30px 0;
  margin-top: 40px;
  background: #080c19;
}
.footer__inner{display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap}

/* MODAL & FORM */
.modal{
  position: fixed; inset: 0; display:none; z-index: 100;
}
.modal.is-open{display:block}
.modal__backdrop{
  position:absolute; inset:0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
}
.modal__dialog{
  position: relative;
  margin: 5vh auto 0;
  width: min(500px, calc(100% - 30px));
  border-radius: 20px;
  border:1px solid var(--line);
  background: #131a33;
  box-shadow: 0 25px 50px rgba(0,0,0,.5);
  overflow:hidden;
  animation: slideIn .2s ease-out;
}
@keyframes slideIn{ from{transform:translateY(20px);opacity:0} to{transform:translateY(0);opacity:1}}

.modal__header{
  display:flex; justify-content:space-between; align-items:center;
  padding: 16px 20px;
  border-bottom:1px solid var(--line);
  background: rgba(255,255,255,.02);
}
.iconBtn{
  width:32px; height:32px;
  border-radius: 8px;
  border:none;
  background: rgba(255,255,255,.1);
  color: var(--text);
  cursor:pointer;
}
.iconBtn:hover{background: rgba(255,255,255,.2)}

.form{padding: 20px}
.field{display:block; margin: 16px 0}
.field span{display:block; font-weight:600; margin-bottom:8px; font-size: 14px}
.field input[type="text"]{
  width:100%;
  padding:12px;
  border-radius: 10px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.2);
  color: var(--text);
  outline:none;
}
.field input:focus{border-color: var(--primary)}

/* Custom File Input Styling to match dark theme */
.file-input-wrapper{
    border-radius: 10px;
    background: rgba(0,0,0,.2);
    border: 1px solid var(--line);
    padding: 8px;
}
.custom-file-input {
    width: 100%;
    color: var(--muted);
}
.custom-file-input::file-selector-button {
  margin-right: 12px;
  border: none;
  background: #e9ecf5;
  padding: 8px 12px;
  border-radius: 6px;
  color: #0b1020;
  cursor: pointer;
  font-weight: 600;
  transition: background .2s ease-in-out;
}
.custom-file-input::file-selector-button:hover {
  background: #fff;
}
.hint{display:block; margin-top:6px; color: var(--muted); font-size:12px}

.check{display:flex; gap:12px; align-items:start; margin:20px 0; font-size: 14px; line-height: 1.4}
.check input{width: 20px; height: 20px; accent-color: var(--primary); margin-top: 2px}

.form__actions{
  display:flex; justify-content:flex-end; gap:12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}