:root{
  --bg:#0f1115;
  --card:#161a22;
  --stroke:#262c3a;
  --input:#0f1320;
  --text:#e9edf5;
  --muted: rgba(233,237,245,.75);
  --blue:#2b6cff;
  --radius: 16px;
}

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

body{
  margin:0;
  padding:24px;
  background:var(--bg);
  color:var(--text);
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

.card{
  position: relative;
  z-index: 2;
  max-width:900px;
  margin:0 auto;
  background:var(--card);
  border:1px solid var(--stroke);
  border-radius:var(--radius);
  padding:18px;
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
}

.header{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:14px;
}

h1{
  margin:0;
  font-size:22px;
  font-weight:700;
}

.sub{
  color:var(--muted);
  font-size:13px;
}

.controls{
  display:flex;
  gap:10px;
  align-items:center;
}

input{
  width:100%;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--stroke);
  background:var(--input);
  color:var(--text);
  outline:none;
  font-size:14px;
}

.mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

button{
  padding:12px 16px;
  border-radius:14px;
  border:1px solid transparent;
  cursor:pointer;
  font-weight:600;
  background:var(--blue);
  color:#fff;
  font-size:14px;
}

button:disabled{
  opacity:.5;
  cursor:not-allowed;
}

/* Corporate green Download button */
button.download{
  background:#2f855a;
  border:1px solid #2f855a;
  color:#fff;
}
button.download:hover:not(:disabled){
  background:#276749;
  border-color:#276749;
}

/* barcode area */
.barcodeBox{
  display:none;
  margin-top:20px;
  padding:14px;
  background:#fff;
  border:2px solid #000;
  border-radius:14px;
  width:100%;
}

#svgBarcode{
  width:100%;
  height:auto;
  display:block;
}

.meta{
  margin-top:16px;
  color:var(--muted);
  font-size:13px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}

@media (max-width: 520px){
  body{ padding:16px; }
  button{ padding:10px 12px; font-size:13px; }
  input{ padding:10px 12px; }
}

.below-card-hint{
  margin-top: 10px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  opacity: 0.9;
}

.page-footer{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 24px;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;

  text-align: center;
  pointer-events: none; /* не мешает кликам */
}

.footer-line{
  color: var(--muted);
}

.footer-line.main{
  font-size: 18px;
  font-weight: 600;
}

.footer-line.sub{
  font-size: 14px;
  letter-spacing: 0.02em;
}


/* Fixed footer (separate from main.card) */
.page-footer{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 20px;
  z-index: 50;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;

  text-align: center;
  pointer-events: none; /* doesn't block clicks */
}

.footer-line{
  color: var(--muted); /* same family as placeholder */
}

.footer-line.main{
  font-size: 18px;
  font-weight: 600;
}

.footer-line.sub{
  font-size: 14px;
  letter-spacing: 0.02em;
}
body{
  padding-bottom: 90px;
}

/* Title row + info button */
.titleRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0;
}
.infoBtn{
  border: none;
  background: transparent;
  color: var(--muted);   /* тот же цвет, что и вторичный текст */
  font-size: 18px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.infoBtn:hover{
  color: var(--text);
}

/* Modal (Info) */
/* модалка всегда выше всего */
.modal{
  z-index: 9999;
}
.modal.isOpen{
  display:block;
}
.modalBackdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.55);
}
.modalCard{
  position:absolute;
  left:50%;
  top:50%;
  transform: translate(-50%, -50%);
  width:min(560px, calc(100vw - 32px));
  background: var(--card);
  border:1px solid var(--stroke);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  padding:16px;
}
.modalHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.modalTitle{
  font-weight:700;
}
.modalClose{
  width:34px;
  height:34px;
  border-radius:10px;
  border:1px solid var(--stroke);
  background: transparent;
  color: var(--text);
  cursor:pointer;
}
.modalClose:hover{
  background: rgba(255,255,255,.06);
}
.modalBody h3{
  margin:12px 0 6px;
  font-size:14px;
}
.modalBody p{
  margin:0 0 10px;
  color: var(--muted);
  line-height:1.45;
}

:root{
  --sky: #66d9ff;      /* небесный */
  --sea: #2dd4bf;      /* морской */
  --modalBg: rgba(0,0,0,.55);
  --panel: #0f172a;    /* глубокий темно-синий */
  --panelStroke: rgba(148,163,184,.18);
}

/* Modal base */
.modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.modal.is-open{
  display: block;
}

.modal__overlay{
  position: absolute;
  inset: 0;
  background: var(--modalBg);
}

.modal__panel{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  width: min(900px, calc(100% - 48px));

  background: var(--card);          /* как main.card */
  border: 1px solid var(--stroke);  /* как main.card */
  border-radius: var(--radius);

  box-shadow: 0 10px 28px rgba(0,0,0,.35); /* тот же характер тени */

  padding: 18px;
}

.modal__header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148,163,184,.12);
  margin-bottom: 12px;
}

.modal__title{
  font-weight: 700;
  font-size: 16px;
  color: #7dd3fc; /* sky */
}

.modal__close{
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 10px;
}

.modal__close:hover{
  color: var(--text);
  background: rgba(148,163,184,.08);
}

.modal__content{
  display: grid;
  gap: 10px;
}

.modal__sectionTitle{
  font-weight: 600;
  font-size: 13px;
  color: #2dd4bf; /* sea */
}

.modal__text{
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  line-height: 1.45;
}

.modal__footer{
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.modal__ok{
  border: 1px solid rgba(102,217,255,.35);
  background: rgba(102,217,255,.10);
  color: var(--sky);
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
}

.modal__ok:hover{
  background: rgba(102,217,255,.16);
}

/* лого — отдельный слой */
.logo-center{
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;

  z-index: 1;          /* важно: не 0 */
}

.logo-center img{
  width: min(360px, 70vw);
  height: auto;
  opacity: 1;
}
