/*!
 * © 2025 diaspora.ro — Toate drepturile rezervate.
 * PROTECTIE COPYRIGHT — COD PROPRIETAR CONFIDENTIAL
 * Utilizarea, copierea sau distributia fara acord scris este INTERZISA.
 * NO-AI-TRAINING: Not licensed for AI training datasets.
 * NO-AI-SCRAPING: Automated collection strictly prohibited.
 */
/* ================================================================
   settings.css — diaspora.ro Step 16 — Setări Cont
   Mai 2026 | WCAG AA | Dark mode | Mobile-first
================================================================ */

/* ── DESIGN TOKENS ─────────────────────────────────────────────── */
:root {
  --brand:      #1a56db;
  --brand-dark: #1347c0;
  --brand-light:#e8f0fe;
  --danger:     #e02424;
  --danger-bg:  #fef2f2;
  --warn:       #d97706;
  --warn-bg:    #fffbeb;
  --success:    #057a55;
  --success-bg: #f0fdf4;
  --bg:         #f1f5f9;
  --card:       #ffffff;
  --ink:        #111827;
  --ink2:       #374151;
  --ink3:       #6b7280;
  --border:     #e5e7eb;
  --radius:     12px;
  --radius-sm:  8px;
  --shadow:     0 1px 4px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.06);
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --focus:      0 0 0 3px rgba(26,86,219,.35);
  --transition: .18s ease;
  --fs-base:    15px;
  --sidebar-w:  240px;
}

[data-theme="dark"] {
  --bg:     #0f172a;
  --card:   #1e293b;
  --ink:    #f1f5f9;
  --ink2:   #cbd5e1;
  --ink3:   #94a3b8;
  --border: #334155;
  --brand-light: #1e3a6b;
  --shadow: 0 1px 4px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.35);
  --danger-bg: #2d1b1b;
  --warn-bg:   #2d2208;
  --success-bg:#0d2418;
}

/* Font size scale */
[data-fs="S"] { --fs-base: 13px; }
[data-fs="M"] { --fs-base: 15px; }
[data-fs="L"] { --fs-base: 17px; }
[data-fs="XL"]{ --fs-base: 19px; }

/* High contrast */
[data-contrast="high"] {
  --border: #374151;
  --ink3:   #4b5563;
}
[data-theme="dark"][data-contrast="high"] {
  --border: #64748b;
  --ink3:   #94a3b8;
}

/* ── RESET ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: var(--fs-base); scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100dvh;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; }

/* ── SKIP LINK ──────────────────────────────────────────────────── */
.st-skip {
  position: absolute; left: -9999px; top: 8px; z-index: 10000;
  background: var(--brand); color: #fff;
  padding: 8px 16px; border-radius: 6px;
}
.st-skip:focus { left: 8px; }

/* ── TOP BAR ────────────────────────────────────────────────────── */
.st-topbar {
  position: sticky; top: 0; z-index: 100;
  height: 56px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px;
  box-shadow: var(--shadow-sm);
}
.st-topbar-logo {
  font-weight: 800;
  font-size: .95rem;
  color: var(--brand);
  display: flex; align-items: center; gap: 8px;
}
.st-topbar-logo svg { width: 22px; height: 22px; }
.st-topbar-title {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}
.st-topbar-back {
  display: flex; align-items: center; gap: 6px;
  color: var(--ink3); font-size: .85rem;
  background: none; border: none; cursor: pointer;
  padding: 6px 10px; border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.st-topbar-back:hover { background: var(--bg); }

/* ── LAYOUT ─────────────────────────────────────────────────────── */
.st-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: 0;
  max-width: 1100px;
  margin: 32px auto;
  padding: 0 16px;
  align-items: start;
}

/* ── SIDEBAR ─────────────────────────────────────────────────────── */
.st-sidebar {
  position: sticky;
  top: 76px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border);
}
.st-sidebar-user {
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.st-sidebar-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--brand-light);
  object-fit: cover;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 700; color: var(--brand);
  flex-shrink: 0;
}
.st-sidebar-user-info { min-width: 0; }
.st-sidebar-user-name {
  font-weight: 600; font-size: .9rem;
  color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.st-sidebar-user-email {
  font-size: .75rem; color: var(--ink3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.st-nav { padding: 8px 0; }
.st-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  font-size: .88rem; font-weight: 500;
  color: var(--ink2);
  cursor: pointer;
  border: none; background: none; width: 100%; text-align: left;
  transition: background var(--transition), color var(--transition);
  border-radius: 0;
}
.st-nav-item:hover { background: var(--bg); color: var(--ink); }
.st-nav-item.active {
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 600;
}
.st-nav-item .icon { width: 18px; flex-shrink: 0; text-align: center; font-style: normal; }
.st-nav-sep { height: 1px; background: var(--border); margin: 6px 12px; }

/* ── MAIN CONTENT ───────────────────────────────────────────────── */
.st-main {
  min-width: 0;
  padding-left: 24px;
  display: flex; flex-direction: column; gap: 20px;
}

/* ── SECTION ────────────────────────────────────────────────────── */
.st-section {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}
.st-section-head {
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.st-section-icon { font-size: 1.3rem; }
.st-section-head h2 {
  font-size: 1.05rem; font-weight: 700;
  color: var(--ink); flex: 1;
}
.st-section-head p {
  font-size: .82rem; color: var(--ink3); margin-top: 2px;
}
.st-section-body { padding: 20px 24px; }
.st-section-body + .st-section-body {
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

/* ── FORM ELEMENTS ──────────────────────────────────────────────── */
.st-field { margin-bottom: 18px; }
.st-field:last-child { margin-bottom: 0; }
.st-label {
  display: block;
  font-size: .82rem; font-weight: 600;
  color: var(--ink2);
  margin-bottom: 6px;
}
.st-input, .st-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font-size: .9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}
.st-input:focus, .st-select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--focus);
}
.st-hint {
  font-size: .75rem; color: var(--ink3);
  margin-top: 4px;
}
.st-input-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ── TOGGLE SWITCH ──────────────────────────────────────────────── */
.st-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.st-toggle-row:last-child { border-bottom: none; padding-bottom: 0; }
.st-toggle-row:first-child { padding-top: 0; }
.st-toggle-label { flex: 1; }
.st-toggle-label strong { display: block; font-size: .9rem; color: var(--ink); }
.st-toggle-label span   { font-size: .78rem; color: var(--ink3); }
.st-toggle {
  position: relative; display: inline-block;
  width: 44px; height: 24px; flex-shrink: 0;
}
.st-toggle input { opacity: 0; width: 0; height: 0; }
.st-toggle-slider {
  position: absolute; inset: 0;
  background: var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: background var(--transition);
}
.st-toggle-slider::after {
  content: '';
  position: absolute;
  left: 2px; top: 2px;
  width: 20px; height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.st-toggle input:checked + .st-toggle-slider { background: var(--brand); }
.st-toggle input:checked + .st-toggle-slider::after { transform: translateX(20px); }
.st-toggle input:focus + .st-toggle-slider { box-shadow: var(--focus); }

/* ── RADIO SELECT ────────────────────────────────────────────────── */
.st-radio-group {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.st-radio-btn {
  padding: 6px 16px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--bg);
  color: var(--ink2);
  font-size: .82rem; font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.st-radio-btn:hover { border-color: var(--brand); color: var(--brand); }
.st-radio-btn.active {
  background: var(--brand); border-color: var(--brand);
  color: #fff; font-weight: 600;
}

/* ── SELECT STYLED ───────────────────────────────────────────────── */
.st-select-wrap { position: relative; }
.st-select-wrap::after {
  content: '▾';
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  pointer-events: none; color: var(--ink3); font-size: .8rem;
}

/* ── BUTTONS ─────────────────────────────────────────────────────── */
.st-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: .88rem; font-weight: 600;
  cursor: pointer; border: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.st-btn:focus { outline: none; box-shadow: var(--focus); }
.st-btn-primary {
  background: var(--brand); color: #fff;
}
.st-btn-primary:hover { background: var(--brand-dark); }
.st-btn-secondary {
  background: var(--bg); color: var(--ink2);
  border: 1.5px solid var(--border);
}
.st-btn-secondary:hover { border-color: var(--brand); color: var(--brand); }
.st-btn-danger {
  background: var(--danger-bg); color: var(--danger);
  border: 1.5px solid #fca5a5;
}
.st-btn-danger:hover { background: var(--danger); color: #fff; }
.st-btn-sm { padding: 6px 14px; font-size: .8rem; }
.st-btn[disabled] { opacity: .5; cursor: not-allowed; }
.st-btn-row {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ── ALERT / TOAST ───────────────────────────────────────────────── */
.st-alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  margin-bottom: 16px;
}
.st-alert-success { background: var(--success-bg); color: var(--success); border: 1px solid #6ee7b7; }
.st-alert-error   { background: var(--danger-bg);  color: var(--danger);  border: 1px solid #fca5a5; }
.st-alert-warn    { background: var(--warn-bg);    color: var(--warn);    border: 1px solid #fcd34d; }
.st-alert-info    { background: var(--brand-light); color: var(--brand);  border: 1px solid #93c5fd; }

#st-toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
  max-width: 340px;
  pointer-events: none;
}
.st-toast-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow);
  font-size: .85rem; font-weight: 500;
  animation: st-slide-in .2s ease;
  pointer-events: auto;
}
.st-toast-item.success { border-color: #6ee7b7; background: var(--success-bg); color: var(--success); }
.st-toast-item.error   { border-color: #fca5a5; background: var(--danger-bg);  color: var(--danger);  }
@keyframes st-slide-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0);    }
}

/* ── 2FA ─────────────────────────────────────────────────────────── */
.st-2fa-secret {
  font-family: 'Courier New', monospace;
  font-size: 1.1rem; font-weight: 700; letter-spacing: .25em;
  background: var(--bg); color: var(--brand);
  padding: 14px 20px; border-radius: var(--radius-sm);
  border: 2px dashed var(--brand);
  text-align: center; word-break: break-all;
  margin: 12px 0;
}
.st-2fa-steps {
  counter-reset: step;
  display: flex; flex-direction: column; gap: 10px;
  margin: 16px 0;
}
.st-2fa-step {
  display: flex; align-items: flex-start; gap: 14px;
  counter-increment: step;
}
.st-2fa-step::before {
  content: counter(step);
  width: 28px; height: 28px;
  background: var(--brand-light); color: var(--brand);
  border-radius: 50%; font-weight: 700; font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.st-2fa-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  border-radius: 20px; font-size: .78rem; font-weight: 600;
}
.st-2fa-badge.enabled  { background: var(--success-bg); color: var(--success); }
.st-2fa-badge.disabled { background: var(--bg);         color: var(--ink3);    }

/* ── SESSIONS ────────────────────────────────────────────────────── */
.st-session-list { display: flex; flex-direction: column; gap: 10px; }
.st-session-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
}
.st-session-card.current { border-color: var(--brand); background: var(--brand-light); }
.st-session-icon { font-size: 1.5rem; flex-shrink: 0; }
.st-session-info { flex: 1; min-width: 0; }
.st-session-ua {
  font-size: .85rem; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.st-session-meta { font-size: .75rem; color: var(--ink3); margin-top: 2px; }
.st-session-badge {
  font-size: .7rem; font-weight: 700; padding: 2px 8px;
  background: var(--brand); color: #fff; border-radius: 10px;
  margin-left: 6px;
}

/* ── BLOCKED LIST ────────────────────────────────────────────────── */
.st-blocked-list { display: flex; flex-direction: column; gap: 8px; }
.st-blocked-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.st-blocked-item span { flex: 1; font-size: .88rem; color: var(--ink); }
.st-blocked-empty { font-size: .88rem; color: var(--ink3); text-align: center; padding: 20px; }

/* ── FONT SIZE PICKER ────────────────────────────────────────────── */
.st-fs-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.st-fs-btn {
  padding: 8px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg); color: var(--ink2);
  cursor: pointer; font-weight: 600;
  transition: all var(--transition);
}
.st-fs-btn:hover { border-color: var(--brand); }
.st-fs-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.st-fs-btn[data-sz="S"]  { font-size: .82rem; }
.st-fs-btn[data-sz="M"]  { font-size: .9rem; }
.st-fs-btn[data-sz="L"]  { font-size: 1rem; }
.st-fs-btn[data-sz="XL"] { font-size: 1.1rem; }

/* ── GDPR DANGER ZONE ────────────────────────────────────────────── */
.st-danger-zone {
  border: 2px solid #fca5a5;
  border-radius: var(--radius);
  padding: 20px 24px;
  background: var(--danger-bg);
}
.st-danger-zone h3 { color: var(--danger); font-size: .95rem; margin-bottom: 8px; }
.st-danger-zone p  { font-size: .84rem; color: var(--ink2); margin-bottom: 16px; }

/* ── PASSWORD STRENGTH ───────────────────────────────────────────── */
.st-pw-strength { margin-top: 6px; height: 4px; border-radius: 2px; background: var(--border); overflow: hidden; }
.st-pw-bar { height: 100%; width: 0; border-radius: 2px; transition: width .3s, background .3s; }

/* ── VISIBILITY ROW ──────────────────────────────────────────────── */
.st-vis-row {
  display: flex; align-items: center;
  padding: 12px 0; gap: 16px;
  border-bottom: 1px solid var(--border);
}
.st-vis-row:last-child { border-bottom: none; padding-bottom: 0; }
.st-vis-row:first-child { padding-top: 0; }
.st-vis-label { flex: 1; font-size: .88rem; color: var(--ink2); font-weight: 500; }
.st-vis-select { width: auto; min-width: 130px; padding: 6px 32px 6px 10px; }

/* ── LOADING ─────────────────────────────────────────────────────── */
.st-spinner {
  width: 20px; height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: st-spin .7s linear infinite;
  display: inline-block;
}
@keyframes st-spin { to { transform: rotate(360deg); } }

/* ── PROGRESS INDICATOR ──────────────────────────────────────────── */
.st-profile-completeness {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.st-completeness-bar {
  flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden;
}
.st-completeness-fill {
  height: 100%; background: linear-gradient(90deg, var(--brand), #06b6d4);
  border-radius: 4px; transition: width .5s ease;
}
.st-completeness-pct { font-size: .82rem; font-weight: 700; color: var(--brand); }

/* ── SECTION HIDDEN (tabs) ───────────────────────────────────────── */
.st-panel { display: none; }
.st-panel.active { display: block; }

/* ── MOBILE NAV (bottom tabs on mobile) ──────────────────────────── */
@media (max-width: 720px) {
  .st-layout {
    grid-template-columns: 1fr;
    margin: 0;
    padding: 0;
    gap: 0;
  }
  .st-sidebar {
    display: none;
  }
  .st-main {
    padding: 0;
    border-radius: 0;
    gap: 0;
  }
  .st-section {
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin-bottom: 8px;
  }
  .st-mobile-nav {
    display: flex;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
    background: var(--card);
    border-top: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .st-mobile-nav::-webkit-scrollbar { display: none; }
  .st-mobile-nav-item {
    flex: none;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 8px 14px;
    font-size: .68rem; font-weight: 500;
    color: var(--ink3); background: none; border: none; cursor: pointer;
    transition: color var(--transition);
    white-space: nowrap;
  }
  .st-mobile-nav-item .icon { font-size: 1.1rem; }
  .st-mobile-nav-item.active { color: var(--brand); font-weight: 600; }
  .st-section-body { padding: 16px; }
  .st-input-group { grid-template-columns: 1fr; }
  body { padding-bottom: 72px; }
}
@media (min-width: 721px) {
  .st-mobile-nav { display: none; }
}

/* ── LINK DE ANULARE ─────────────────────────────────────────────── */
.st-cancel-delete {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  background: var(--warn-bg); color: var(--warn);
  border: 1.5px solid #fcd34d; font-weight: 600; font-size: .85rem;
  cursor: pointer; border-style: solid;
  transition: all var(--transition);
}
.st-cancel-delete:hover { background: var(--warn); color: #fff; }
