:root {
  --bs-body-bg: #f5f7fb;
  --bs-body-color: #1f2430;
  --brand: #2f5fda;
  --brand-dark: #234bb5;
  --border: #e3e7ef;
}
body {
  background: var(--bs-body-bg);
}
.navbar {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border);
}
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: #1f2430 !important;
  font-size: 1.15rem;
}
.brand-logo .brand-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #fff;
  border-radius: 8px;
}
.brand-logo .brand-icon svg { width: 18px; height: 18px; }

.card {
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
}
.shadow-soft {
  box-shadow: 0 6px 20px rgba(31, 36, 48, .06);
}
.form-control, .form-select {
  background-color: #fff;
  border-color: var(--border);
  color: #1f2430;
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 .2rem rgba(47, 95, 218, .12);
}
.btn-primary {
  background-color: var(--brand);
  border-color: var(--brand);
}
.btn-primary:hover {
  background-color: var(--brand-dark);
  border-color: var(--brand-dark);
}
.btn-outline-primary {
  color: var(--brand);
  border-color: var(--brand);
}
.btn-outline-primary:hover {
  background-color: var(--brand);
  color: #fff;
}
code { color: var(--brand-dark); }

/* --- Мастер выбора на главной --- */
.choice-card {
  display: block;
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: #fff;
  padding: 1.75rem 1.25rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
  cursor: pointer;
}
.choice-card:hover {
  border-color: var(--brand);
  box-shadow: 0 10px 24px rgba(47, 95, 218, .10);
  transform: translateY(-2px);
  color: inherit;
}
.choice-card .choice-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto .9rem;
  border-radius: 14px;
  background: #eef2ff;
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
}
.choice-icon svg { width: 68px; height: 68px; }
.choice-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: .25rem; }
.choice-card p { color: #6b7280; font-size: .875rem; margin-bottom: 0; }

/* --- Шаги мастера --- */
.wizard-steps {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.5rem;
  font-size: .85rem;
  color: #8a94a6;
}
.wizard-steps .step.active { color: var(--brand); font-weight: 600; }
.wizard-steps .sep { color: #cbd3e1; }

/* --- Срок хранения: сегмент из двух вариантов (компактный) --- */
.duration-toggle {
  display: flex;
  max-width: 260px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.btn-check + .duration-option {
  flex: 1;
  text-align: center;
  padding: .4rem .75rem;
  font-size: .82rem;
  font-weight: 600;
  color: #4b5565;
  background: #fff;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.btn-check:checked + .duration-option {
  background: var(--brand);
  color: #fff;
}
.duration-toggle label:first-of-type { border-right: 1.5px solid var(--border); }
.btn-check:checked + .duration-option.duration-option { border-color: transparent; }

/* --- Переключатель (iOS-style) --- */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
}
.switch { position: relative; display: inline-block; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track {
  display: block;
  width: 50px;
  height: 30px;
  background: #dfe3ea;
  border-radius: 999px;
  position: relative;
  transition: background-color .2s ease;
}
.switch-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 26px; height: 26px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,.2), 0 0 0 .5px rgba(0,0,0,.04);
  transition: transform .2s cubic-bezier(.4,0,.2,1);
}
.switch input:checked + .switch-track { background: #34c759; }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(20px); }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 .2rem rgba(47,95,218,.25); }

/* --- Dropzone для файла (компактная) --- */
.dropzone {
  border: 1.5px dashed var(--border);
  border-radius: 14px;
  padding: 1.1rem 1rem;
  text-align: center;
  cursor: pointer;
  background: #fafbfd;
  transition: border-color .15s ease, background-color .15s ease;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--brand); background: #f3f6ff; outline: none; }
.dropzone.is-dragover { border-color: var(--brand); background: #eef2ff; }
.dropzone-file [data-file-remove] { position: relative; z-index: 1; }
.dropzone .choice-icon { width: 40px; height: 40px; margin-bottom: .5rem; }
.dropzone .choice-icon svg { width: 20px; height: 20px; }

/* --- Слайдер-подтверждение (замена капчи + кнопка "Создать ссылку") --- */
.slide-confirm {
  position: relative;
  height: 52px;
  border-radius: 999px;
  background: #eef1f6;
  border: 1.5px solid var(--border);
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
}
.slide-confirm.is-disabled { opacity: .55; pointer-events: none; }
.slide-confirm-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 0;
  background: linear-gradient(90deg, #dbe6ff, #eef2ff);
  transition: width .05s linear;
}
.slide-confirm-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  font-weight: 600;
  color: #4b5565;
  pointer-events: none;
}
.slide-confirm-handle {
  position: absolute;
  top: 3px; left: 3px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  box-shadow: 0 2px 6px rgba(47,95,218,.35);
  touch-action: none;
}
.slide-confirm-handle:active { cursor: grabbing; }
.slide-confirm.is-complete .slide-confirm-fill { background: #d7f3e0; }
.slide-confirm.is-complete .slide-confirm-handle { background: #1f9d55; box-shadow: 0 2px 6px rgba(31,157,85,.35); }
.slide-confirm.is-complete .slide-confirm-label { color: #1f9d55; }

.result-link-box {
  background: #f6f8ff;
  border: 1.5px dashed var(--brand);
  border-radius: 12px;
}

footer { color: #97a1b2; }
