/* ── Variables (dark theme — default) ───────────────────────────────────────── */
:root {
  --bg:           #0f1117;
  --surface:      #1a1d27;
  --surface-1:    #1a1d27;
  --surface-2:    #242736;
  --surface-3:    #2e3147;
  --border:       #333651;
  --accent:       #5b6af0;
  --accent-hover: #7280f5;
  --accent-dim:   rgba(91,106,240,.15);
  --text:         #e2e4f0;
  --text-muted:   #7a7f9a;
  --text-faint:   #4a4f6a;
  --success:      #4caf7d;
  --warning:      #f0a855;
  --error:        #f05b5b;
  --radius:       10px;
  --radius-sm:    6px;
  --shadow:       0 4px 24px rgba(0,0,0,.45);
  --transition:   .18s ease;
}

/* ── Light theme ─────────────────────────────────────────────────────────────── */
[data-theme="light"] {
  --bg:           #f0f2fa;
  --surface:      #ffffff;
  --surface-1:    #ffffff;
  --surface-2:    #eaecf8;
  --surface-3:    #dde0f5;
  --border:       #cdd1eb;
  --accent:       #4a59e8;
  --accent-hover: #3748d8;
  --accent-dim:   rgba(74,89,232,.12);
  --text:         #1a1d30;
  --text-muted:   #55597a;
  --text-faint:   #9598b8;
  --success:      #2e8f5e;
  --warning:      #c47f10;
  --error:        #cc3333;
  --shadow:       0 4px 24px rgba(0,0,0,.10);
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}
a { color: inherit; }
input, textarea, select, button { font: inherit; }
img { max-width: 100%; display: block; }
code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: .85em;
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ── Nav ────────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  letter-spacing: -.01em;
}
.nav-logo svg { color: var(--accent); flex-shrink: 0; }
.nav-logo__img { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }
.nav-logo__short { display: none; }
.nav-logo--btn { background: none; border: none; cursor: pointer; padding: 0;
  display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 1rem;
  color: var(--text); letter-spacing: -.01em; white-space: nowrap; flex-shrink: 0; }
.nav-logo--btn:hover { opacity: .85; }
.nav-btn--desktop { /* visible desktop, hidden mobile — set below */ }
.nav-btn--burger  { display: none; padding: 6px 10px; }
.burger-menu {
  position: absolute; top: 100%; right: 14px;
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(0,0,0,.35);
  z-index: 200; min-width: 160px; padding: 6px;
}
.burger-item {
  display: block; width: 100%; text-align: left;
  background: none; border: none; color: var(--text-muted);
  padding: 9px 12px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: .9rem;
}
.burger-item:hover { background: var(--surface-2); color: var(--text); }
.nav-links { display: flex; gap: 4px; }
.nav-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: .9rem;
  transition: color var(--transition), background var(--transition);
}
.nav-btn:hover  { color: var(--text); background: var(--surface-2); }
.nav-btn.active { color: var(--text); background: var(--surface-3); }
.nav-btn--theme {
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 5px 9px;
  margin-left: 4px;
  display: flex;
  align-items: center;
}
.nav-btn--theme:hover { color: var(--accent); background: var(--accent-dim); border-color: var(--accent); }

/* ── Main layout ────────────────────────────────────────────────────────────── */
main { max-width: 1100px; margin: 0 auto; padding: 32px 24px 80px; }

.section { animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn:disabled { opacity: .4; pointer-events: none; }
.btn--primary  { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--primary:hover  { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--secondary { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn--secondary:hover { background: var(--surface-3); border-color: var(--accent); color: var(--accent); }
.btn--ghost { background: none; color: var(--text-muted); border-color: transparent; }
.btn--ghost:hover { color: var(--text); background: var(--surface-2); }
.btn--small { padding: 5px 12px; font-size: .82rem; }
.btn--danger { background: none; color: var(--error); border-color: transparent; }
.btn--danger:hover { background: rgba(240,91,91,.1); }

/* ── Drop zone ──────────────────────────────────────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 52px 32px;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
  background: var(--surface);
}
.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.drop-zone__icon {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--text-muted);
  transition: color var(--transition);
}
.drop-zone:hover .drop-zone__icon,
.drop-zone.drag-over .drop-zone__icon { color: var(--accent); }
.drop-zone__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.drop-zone__subtitle {
  color: var(--text-muted);
  font-size: .85rem;
  margin-bottom: 20px;
}

/* ── Actions bar ────────────────────────────────────────────────────────────── */
.actions-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 20px 0 0;
  flex-wrap: wrap;
}

/* ── File list ──────────────────────────────────────────────────────────────── */
.file-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── File card ──────────────────────────────────────────────────────────────── */
.file-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}
.file-card--done    { border-color: var(--success); }
.file-card--error   { border-color: var(--error); }
.file-card--processing { border-color: var(--accent); }

.file-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}
.file-card__thumb {
  width: 52px;
  height: 40px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  flex-shrink: 0;
}
.file-card__name {
  flex: 1;
  font-size: .9rem;
  font-weight: 500;
  word-break: break-all;
  min-width: 0;
}
.file-card__size-hint {
  font-size: .8rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.file-card__remove {
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  line-height: 1;
  transition: color var(--transition);
  flex-shrink: 0;
}
.file-card__remove:hover { color: var(--error); }

/* ── Badge ──────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge--pending    { background: var(--surface-3); color: var(--text-muted); }
.badge--uploading  { background: var(--accent-dim); color: var(--accent); }
.badge--processing { background: var(--accent-dim); color: var(--accent); animation: pulse 1s infinite; }
.badge--done       { background: rgba(76,175,125,.15); color: var(--success); }
.badge--error      { background: rgba(240,91,91,.15); color: var(--error); }

@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.5; } }

/* ── Progress bar ───────────────────────────────────────────────────────────── */
.progress-bar {
  height: 2px;
  background: var(--surface-3);
  overflow: hidden;
}
.progress-bar__fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width .3s ease;
}
.progress-bar__fill--indeterminate {
  width: 40%;
  animation: indeterminate 1.2s ease-in-out infinite;
}
@keyframes indeterminate {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ── Error message ──────────────────────────────────────────────────────────── */
.file-card__error {
  padding: 10px 16px;
  font-size: .85rem;
  color: var(--error);
  background: rgba(240,91,91,.07);
  border-top: 1px solid rgba(240,91,91,.2);
}

/* ── Comparison view ────────────────────────────────────────────────────────── */
.file-card__body { padding: 0 16px 16px; }

.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.preview-panel {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.preview-panel__label {
  padding: 6px 10px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--border);
}
.preview-panel__img {
  width: 100%;
  aspect-ratio: 1470/1080;
  object-fit: contain;
  background: repeating-conic-gradient(#2a2d3e 0% 25%, transparent 0% 50%) 0 0 / 16px 16px;
  display: block;
}
.preview-panel__info {
  padding: 8px 10px;
  font-size: .78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ── File info panel ────────────────────────────────────────────────────────── */
.file-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}
.file-info__item {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.file-info__label {
  font-size: .7rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.file-info__value {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
}
.file-info__value--warn { color: var(--warning); }
.file-info__value--ok   { color: var(--success); }

/* ── Warning banner ─────────────────────────────────────────────────────────── */
.warning-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(240,168,85,.1);
  border: 1px solid rgba(240,168,85,.3);
  border-radius: var(--radius-sm);
  font-size: .83rem;
  color: var(--warning);
  margin-bottom: 12px;
}
.success-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(72,199,142,.1);
  border: 1px solid rgba(72,199,142,.35);
  border-radius: var(--radius-sm);
  font-size: .83rem;
  color: #2ecc71;
  margin-bottom: 12px;
}

/* ── Card actions ───────────────────────────────────────────────────────────── */
.file-card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── EXIF panel ─────────────────────────────────────────────────────────────── */
.exif-panel {
  border-top: 1px solid var(--border);
  margin-top: 2px;
}
.exif-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 8px;
}
.exif-panel__title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
}
.exif-panel__body {
  padding: 0 16px 14px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.exif-section {
  flex: 1 1 220px;
  min-width: 200px;
}
.exif-section__title {
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border);
}
.exif-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255,255,255,.03);
}
.exif-row__key {
  font-size: .78rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.exif-row__val {
  font-size: .8rem;
  color: var(--text);
  font-weight: 500;
  text-align: right;
  word-break: break-all;
}
.exif-loading {
  font-size: .82rem;
  color: var(--text-faint);
  padding: 4px 0;
}
.exif-error {
  font-size: .82rem;
  color: var(--error);
  padding: 4px 0;
}

/* Source panel variant */
.exif-panel--source {
  background: rgba(255,255,255,.02);
}
.exif-panel--source .exif-panel__title {
  color: var(--text-muted);
}

/* Time action buttons */
.exif-time-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: var(--surface-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.exif-time-actions__row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.exif-sync-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 6px 10px;
  font-size: .85rem;
}

/* Edit mode */
.exif-edit-row {
  margin-bottom: 10px;
}
.exif-edit-row label {
  display: block;
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.exif-hint {
  font-size: .72rem;
  color: var(--text-faint);
}
.exif-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 6px 10px;
  font-size: .85rem;
  transition: border-color var(--transition);
}
.exif-input:focus {
  outline: none;
  border-color: var(--accent);
}
.exif-edit-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.exif-save-status {
  font-size: .8rem;
  margin-left: 4px;
}
.exif-save-status--ok    { color: var(--success); }
.exif-save-status--error { color: var(--error); }

/* ── Notes form ─────────────────────────────────────────────────────────────── */
.notes-details {
  border-top: 1px solid var(--border);
}
.notes-details summary {
  padding: 10px 16px;
  font-size: .85rem;
  color: var(--text-muted);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  transition: color var(--transition);
}
.notes-details summary:hover { color: var(--text); }
.notes-details summary::before {
  content: '›';
  font-size: 1.1rem;
  transition: transform var(--transition);
  display: inline-block;
}
.notes-details[open] summary::before { transform: rotate(90deg); }
.notes-details[open] summary { color: var(--text); }

.notes-form {
  padding: 12px 16px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.notes-form .form-field { margin: 0; }
.notes-form .form-field:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ── Settings ───────────────────────────────────────────────────────────────── */
.settings-header { margin-bottom: 28px; }
.settings-header h1 { font-size: 1.4rem; font-weight: 700; margin-bottom: 4px; }

/* ── ЕАИСТО notice ──────────────────────────────────────────────────────────── */
.eaisto-notice {
  display: flex;
  gap: 14px;
  background: rgba(91,106,240,.1);
  border: 1px solid rgba(91,106,240,.35);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 28px;
}
.eaisto-notice__icon {
  flex-shrink: 0;
  color: var(--accent);
  margin-top: 1px;
}
.eaisto-notice__body { display: flex; flex-direction: column; gap: 10px; }
.eaisto-notice__lead { font-size: .93rem; line-height: 1.55; color: var(--text); }
.eaisto-notice__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.eaisto-notice__term {
  font-weight: 600;
  color: var(--text);
  margin-right: 4px;
}

.settings-form { display: flex; flex-direction: column; gap: 8px; }

.settings-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.settings-group + .settings-group { margin-top: 6px; }
.settings-group__title {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
  letter-spacing: -.01em;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.form-field:last-child { margin-bottom: 0; }
.form-field label { font-size: .85rem; font-weight: 500; color: var(--text); }
.label-block { display: block; font-size: .85rem; font-weight: 500; }
.form-field input[type="text"],
.form-field input[type="number"],
.form-field input[type="date"],
.form-field textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 8px 11px;
  font-size: .9rem;
  transition: border-color var(--transition);
  width: 100%;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-field input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}
.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: .75rem;
  color: var(--text-faint);
}
.field-hint {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: 3px;
}
.info-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  line-height: 1.55;
}

.radio-group { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.radio-group--inline { flex-direction: row; gap: 16px; }
.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.radio-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.radio-option input[type="radio"] { margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.radio-label { display: flex; flex-direction: column; gap: 1px; }
.radio-label strong { font-size: .88rem; }
.radio-label span { font-size: .78rem; color: var(--text-muted); }
.radio-group--inline .radio-option { padding: 7px 14px; }

.settings-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 0 0;
  flex-wrap: wrap;
}
.settings-status {
  font-size: .85rem;
  transition: color var(--transition);
}
.settings-status--ok    { color: var(--success); }
.settings-status--error { color: var(--error); }

/* ── Misc helpers ───────────────────────────────────────────────────────────── */
.muted { color: var(--text-muted); }
.hidden { display: none !important; }

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

/* ── Mobile ─────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  main { padding: 20px 14px 60px; }
  .nav-inner { padding: 0 14px; }
  .nav-btn { padding: 6px 10px; font-size: .85rem; }
  .nav-logo__full  { display: none; }
  .nav-logo__short { display: inline; }
  .nav-btn--desktop { display: none; }
  .nav-btn--burger  { display: flex; align-items: center; }
  .nav-inner { position: relative; padding: 0 10px; gap: 4px; }
  .nav-links { gap: 2px; }
  .nav-btn { padding: 6px 8px; font-size: .82rem; }
  .nav-btn--lang { padding: 4px 7px; margin-left: 2px; }

  .drop-zone { padding: 36px 18px; }
  .drop-zone__icon svg { width: 36px; height: 36px; }

  .form-row { grid-template-columns: 1fr; }
  .comparison { grid-template-columns: 1fr; }

  .notes-form { grid-template-columns: 1fr; }
  .notes-form .form-field:last-child:nth-child(odd) { grid-column: 1; }

  .file-info { gap: 6px 12px; }
  .actions-bar { gap: 8px; }
  .btn { padding: 10px 16px; }

  .radio-group--inline { flex-direction: column; gap: 6px; }
}

@media (max-width: 480px) {
  .file-card__header { flex-wrap: wrap; }
  .comparison { gap: 8px; }
  .settings-group { padding: 14px 14px; }
}

/* ── Info pages (About / Requirements) ──────────────────────────────────────── */
.info-section { max-width: 820px; margin: 0 auto; }
.info-article { color: var(--text); }
.info-article h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 12px; line-height: 1.3; }
.info-article h2 { font-size: 1.15rem; font-weight: 600; margin: 28px 0 10px; color: var(--text); }
.info-article h3 { font-size: 1rem; font-weight: 600; margin: 18px 0 8px; color: var(--text-muted); }
.info-article p  { margin-bottom: 12px; line-height: 1.7; color: var(--text-muted); }
.info-article ul { margin: 0 0 14px 20px; }
.info-article ul li { margin-bottom: 6px; line-height: 1.6; color: var(--text-muted); }
.info-lead { font-size: 1.05rem; color: var(--text) !important; font-weight: 500; }

.info-table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: .9rem; }
.info-table th { text-align: left; padding: 8px 12px; background: var(--surface-2); color: var(--text); border-bottom: 2px solid var(--border); }
.info-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); color: var(--text-muted); }
.info-table tr:last-child td { border-bottom: none; }

.info-alert { padding: 14px 16px; border-radius: var(--radius-sm); margin: 20px 0; line-height: 1.6; font-size: .9rem; }
.info-alert h3 { margin: 0 0 8px; font-size: 1rem; }
.info-alert p  { margin-bottom: 8px; }
.info-alert p:last-child { margin-bottom: 0; }
.info-alert--danger  { background: rgba(231,76,60,.08); border: 1px solid rgba(231,76,60,.3); color: #e74c3c; }
.info-alert--warning { background: rgba(240,168,85,.08); border: 1px solid rgba(240,168,85,.3); color: var(--warning); }
.info-alert--warning p { color: var(--text-muted); }
.info-alert--warning h3 { color: var(--warning); }

.info-doc-link { display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin: 24px 0; }
.info-doc-link svg { color: var(--accent); flex-shrink: 0; }
.info-doc-link a { color: var(--accent); text-decoration: none; font-weight: 500; font-size: .9rem; }
.info-doc-link a:hover { text-decoration: underline; }

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); margin-top: 60px; padding: 20px 0; }
.site-footer__inner { max-width: 1100px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: .82rem; color: var(--text-muted); }
.footer-nav { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.footer-link { background: none; border: none; color: var(--text-muted); cursor: pointer;
  font-size: .82rem; padding: 0; text-decoration: underline; }
.footer-link:hover { color: var(--accent); }
.footer-nav a { color: var(--text-muted); text-decoration: underline; font-size: .82rem; }
.footer-nav a:hover { color: var(--accent); }

@media (max-width: 768px) {
  .info-article h1 { font-size: 1.25rem; }
  .info-article h2 { font-size: 1rem; }
  .site-footer__inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  .footer-nav { gap: 10px; }
}

/* ── Auth nav ────────────────────────────────────────────────────────────────── */
.auth-area { display: flex; align-items: center; gap: 8px; margin-left: 4px; }
.nav-btn--auth { background: var(--accent); color: #fff; }
.nav-btn--auth:hover { background: var(--accent-hover); }
.nav-btn--ghost-sm {
  font-size: .8rem; padding: 4px 10px;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); border-radius: var(--radius-sm);
  cursor: pointer; transition: var(--transition);
}
.nav-btn--ghost-sm:hover { border-color: var(--accent); color: var(--accent); }
.auth-user-info { display: flex; align-items: center; gap: 8px; }
.auth-user-email { font-size: .8rem; color: var(--text-muted); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Auth modal ──────────────────────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
}
.modal__box {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px 28px;
  width: 100%; max-width: 400px;
  box-shadow: var(--shadow);
}
.modal__close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; cursor: pointer;
  font-size: 1.4rem; color: var(--text-muted); line-height: 1;
}
.modal__close:hover { color: var(--text); }

.auth-tabs { display: flex; gap: 0; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.auth-tab {
  flex: 1; background: none; border: none; cursor: pointer;
  padding: 10px 0; font-size: .9rem; color: var(--text-muted);
  border-bottom: 2px solid transparent; transition: var(--transition);
}
.auth-tab--active { color: var(--accent); border-bottom-color: var(--accent); }
.auth-tab:hover:not(.auth-tab--active) { color: var(--text); }

.auth-form .form-field { margin-bottom: 14px; }
.auth-input {
  width: 100%; padding: 9px 12px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-size: .9rem;
  transition: var(--transition);
}
.auth-input:focus { outline: none; border-color: var(--accent); }
.auth-submit { width: 100%; margin-top: 4px; }
.auth-status { font-size: .85rem; display: block; min-height: 1.2em; }

.auth-verified-msg {
  background: rgba(76,175,125,.15); border: 1px solid rgba(76,175,125,.4);
  border-radius: var(--radius-sm); padding: 10px 14px;
  color: var(--success); font-size: .88rem; margin-bottom: 16px;
}
