@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-page:       #0f1117;
  --bg-card:       #181c27;
  --bg-item:       #1e2333;
  --bg-item-hover: #252b3d;
  --bg-input:      #1a1f2e;
  --border:        rgba(255,255,255,0.07);
  --border-hover:  rgba(255,255,255,0.15);
  --accent:        #2e6be6;
  --accent-dim:    rgba(46,107,230,0.18);
  --text-primary:  #e8eaf0;
  --text-secondary:#8b93a8;
  --text-muted:    #4f5668;
  --font-ui:       'Inter', sans-serif;
  --font-mono:     'JetBrains Mono', monospace;
  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     14px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  background-color: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  padding: 2rem 1rem 4rem;
}

/* ─── HEADER ─────────────────────────────────────────────────── */
.header {
  max-width: 740px;
  margin: 0 auto 2.5rem;
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-logo {
  width: 46px;
  height: 46px;
  background: var(--accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-logo svg {
  width: 24px;
  height: 24px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-text h1 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--text-primary);
}

.header-text p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ─── SEARCH GLOBAL ──────────────────────────────────────────── */
.search-wrap {
  max-width: 740px;
  margin: 0 auto 1.5rem;
  position: relative;
}

.search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 14px;
  padding: 11px 14px 11px 42px;
  outline: none;
  transition: border-color 0.2s;
}

.search-wrap input::placeholder { color: var(--text-muted); }
.search-wrap input:focus { border-color: var(--accent); }

/* ─── COUNTER BADGE ──────────────────────────────────────────── */
.result-count {
  max-width: 740px;
  margin: 0 auto 1rem;
  font-size: 12px;
  color: var(--text-muted);
  min-height: 18px;
  display: none;
}
.result-count.visible { display: block; }

/* ─── SECTIONS ───────────────────────────────────────────────── */
.sections { max-width: 740px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }

.section {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s;
}

#sec-bva {
  max-width: 740px;
  margin: 8px auto 0;
}

.section:hover { border-color: var(--border-hover); }

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.section-header:hover { background: rgba(255,255,255,0.03); }

.sec-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 17px;
}

.sec-title {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.sec-badge {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 9px;
}

.chevron {
  width: 16px;
  height: 16px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.section.open .chevron { transform: rotate(180deg); }

/* ─── SECTION BODY ───────────────────────────────────────────── */
.section-body {
  display: none;
  padding: 0 12px 12px;
}

.section.open .section-body { display: block; }

/* ─── CLIENT BOX ─────────────────────────────────────────────── */
.client-box {
  background: var(--bg-item);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 10px;
}

.client-box label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.client-box input[type="text"],
.client-box select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 13px;
  padding: 8px 10px;
  outline: none;
  transition: border-color 0.2s;
}

.client-box input[type="text"]::placeholder { color: var(--text-muted); }
.client-box input[type="text"]:focus,
.client-box select:focus { border-color: var(--accent); }

.client-box select {
  margin-top: 6px;
  resize: vertical;
  min-height: 90px;
  option { background: var(--bg-card); }
}

.client-result {
  margin-top: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  min-height: 38px;
  line-height: 1.7;
}

.client-result .lbl { color: var(--text-muted); }
.client-result .val { color: #60c8ff; }

/* ─── FILE LIST ──────────────────────────────────────────────── */
.file-list { display: flex; flex-direction: column; gap: 3px; }

.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-primary);
  font-size: 13px;
  background: transparent;
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s;
}

.file-item:hover {
  background: var(--bg-item-hover);
  border-color: var(--border);
}

.file-item.hidden { display: none; }

.file-ext {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  min-width: 36px;
  text-align: center;
  letter-spacing: 0.3px;
}

.ext-msi  { background: rgba(46,107,230,0.2);  color: #7aabff; }
.ext-exe  { background: rgba(34,197,110,0.18); color: #5de89e; }
.ext-zip  { background: rgba(234,168,0,0.18);  color: #f5c842; }
.ext-ps1  { background: rgba(140,80,230,0.2);  color: #c09eff; }
.ext-rar  { background: rgba(230,80,80,0.18);  color: #ff9a9a; }
.ext-ppkg { background: rgba(0,200,200,0.15);  color: #5ee8e8; }
.ext-cab  { background: rgba(230,120,40,0.18); color: #ffb07a; }

.file-name { flex: 1; line-height: 1.3; }
.file-version { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); flex-shrink: 0; }

.dl-icon {
  width: 14px;
  height: 14px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transition: opacity 0.15s;
  flex-shrink: 0;
}

.file-item:hover .dl-icon { opacity: 1; }

/* ─── EMPTY STATE ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 14px;
  display: none;
}
.empty-state svg {
  width: 32px; height: 32px;
  stroke: var(--text-muted);
  fill: none; stroke-width: 1.5;
  margin-bottom: 12px;
}

/* ─── FOOTER ─────────────────────────────────────────────────── */
footer {
  max-width: 740px;
  margin: 2.5rem auto 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

footer strong { color: var(--text-secondary); }

/* ─── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 520px) {
  body { padding: 1rem 0.75rem 3rem; }
  .header { gap: 12px; }
  .header-text h1 { font-size: 16px; }
  .section-header { padding: 12px 14px; }
}
