/* ─── Nav Avatar / User Menu ──────────────────────── */
.nav-avatar { display: flex; align-items: center; gap: 6px; position: relative; cursor: pointer; }
.user-menu { position: absolute; top: calc(100% + 10px); right: 0; background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 6px; min-width: 200px; box-shadow: var(--shadow-md); display: none; z-index: 200; }
.user-menu.open { display: block; }
.umenu-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-md); font-size: 13px; color: var(--text); text-decoration: none; transition: background .15s; }
.umenu-item:hover, .umenu-item.active { background: var(--bg); }
.umenu-item.active { font-weight: 500; color: var(--green); }
.umenu-danger { color: #A32D2D !important; }
.umenu-danger:hover { background: #FFF0F0 !important; }
.umenu-divider { height: 1px; background: var(--border-soft); margin: 4px 0; }

/* ─── Dashboard Layout ────────────────────────────── */
.dash-layout { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 57px); }
@media (max-width: 640px) { .dash-layout { grid-template-columns: 1fr; } .dash-sidebar { display: none; } }

/* ─── Sidebar ─────────────────────────────────────── */
.dash-sidebar { background: var(--surface); border-right: 1px solid var(--border-soft); padding: 1.5rem 1rem; position: sticky; top: 57px; height: calc(100vh - 57px); overflow-y: auto; }
.sidebar-profile { text-align: center; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border-soft); margin-bottom: 1rem; }
.sb-name { font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.sb-role { font-size: 12px; color: var(--text-soft); margin-bottom: 5px; }
.sb-badge { font-size: 12px; color: var(--green); font-weight: 500; }
.dash-nav { display: flex; flex-direction: column; gap: 2px; }
.dnav-item { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: var(--radius-md); font-size: 13px; color: var(--text-soft); text-decoration: none; transition: all .15s; }
.dnav-item:hover { background: var(--bg); color: var(--text); }
.dnav-item.active { background: var(--green-light); color: var(--green-dark); font-weight: 500; }
.dnav-danger { color: #A32D2D !important; }
.dnav-danger:hover { background: #FFF0F0 !important; }
.dnav-divider { height: 1px; background: var(--border-soft); margin: 8px 0; }

/* ─── Main area ───────────────────────────────────── */
.dash-main { padding: 1.75rem; background: var(--bg); }
.dash-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1.5rem; gap: 12px; flex-wrap: wrap; }
.dash-header h1 { font-size: 1.4rem; font-weight: 800; letter-spacing: -.5px; margin-bottom: 3px; }
.dash-sub { font-size: 13px; color: var(--text-soft); }

/* ─── Dash card ───────────────────────────────────── */
.dash-card { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 1.25rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.card-head h2 { font-size: 14px; font-weight: 700; }
.link-btn { font-size: 13px; color: var(--green); font-weight: 500; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.card-section-title { font-size: 14px; font-weight: 700; margin-bottom: 1rem; }
.notif-dot { background: var(--coral-light); color: var(--coral); font-size: 11px; font-weight: 500; padding: 3px 8px; border-radius: 20px; }

/* ─── Two col ─────────────────────────────────────── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; } }

/* ─── Stats row ───────────────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
@media (max-width: 720px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }
.stat-card { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 1.1rem; text-align: center; }
.stat-icon { width: 38px; height: 38px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 18px; margin: 0 auto 8px; }
.stat-val { font-family: 'Syne', sans-serif; font-size: 1.5rem; font-weight: 800; color: var(--green); }
.stat-lbl { font-size: 12px; color: var(--text-soft); margin-top: 2px; }

/* ─── Listing items ───────────────────────────────── */
.listing-list { display: flex; flex-direction: column; gap: 10px; }
.listing-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--radius-md); background: var(--bg); }
.li-icon { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.li-body { flex: 1; }
.li-title { font-size: 13px; font-weight: 500; margin-bottom: 2px; }
.li-meta { font-size: 11px; color: var(--text-muted); }
.li-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.li-actions { display: flex; gap: 4px; }
.icon-btn { background: none; border: none; cursor: pointer; font-size: 14px; padding: 3px; border-radius: 6px; transition: background .15s; }
.icon-btn:hover { background: var(--border-soft); }
.status-badge { font-size: 11px; padding: 3px 8px; border-radius: 20px; font-weight: 500; }
.status-badge.active { background: var(--green-light); color: var(--green-dark); }
.status-badge.paused { background: var(--amber-light); color: #633806; }

/* ─── Swap requests ───────────────────────────────── */
.request-list { display: flex; flex-direction: column; gap: 10px; }
.request-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--radius-md); background: var(--bg); }
.request-item.dimmed { opacity: .6; }
.req-body { flex: 1; }
.req-name { font-size: 13px; font-weight: 500; }
.req-time { font-size: 11px; color: var(--text-muted); font-weight: 400; margin-left: 4px; }
.req-msg { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.req-actions { display: flex; gap: 6px; }
.req-btn { width: 28px; height: 28px; border-radius: 50%; border: none; cursor: pointer; font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; transition: all .15s; }
.req-btn.accept { background: var(--green-light); color: var(--green-dark); }
.req-btn.accept:hover { background: var(--green); color: #fff; }
.req-btn.decline { background: #FAECE7; color: var(--coral); }
.req-btn.decline:hover { background: var(--coral); color: #fff; }

/* ─── Active swaps ────────────────────────────────── */
.swap-list { display: flex; flex-direction: column; gap: 12px; }
.swap-item { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--radius-md); background: var(--bg); flex-wrap: wrap; }
.swap-avatars { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.swap-arrow { font-size: 14px; color: var(--text-muted); }
.swap-body { flex: 1; min-width: 160px; }
.swap-title { font-size: 13px; font-weight: 500; margin-bottom: 3px; }
.swap-meta { font-size: 12px; color: var(--text-soft); }
.swap-progress { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.prog-bar { width: 80px; height: 6px; background: var(--border-soft); border-radius: 3px; overflow: hidden; }
.prog-fill { height: 100%; background: var(--green); border-radius: 3px; transition: width .4s; }
.prog-label { font-size: 12px; font-weight: 500; color: var(--green); }

/* ─── Profile page ────────────────────────────────── */
.avatar-edit-row { display: flex; align-items: center; gap: 16px; }
.avatar-preview { width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; flex-shrink: 0; overflow: hidden; }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.field-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.input-prefix-wrap { display: flex; }
.input-prefix { background: var(--bg); border: 1.5px solid var(--border); border-right: none; border-radius: var(--radius-md) 0 0 var(--radius-md); padding: .6rem .75rem; font-size: 13px; color: var(--text-soft); white-space: nowrap; display: flex; align-items: center; }
.profile-preview-card { min-height: 200px; }

/* ─── Settings page ───────────────────────────────── */
.settings-tabs { display: flex; gap: 4px; margin-bottom: 1.25rem; background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 4px; width: fit-content; }
.stab { background: none; border: none; padding: 7px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--text-soft); font-family: 'DM Sans', sans-serif; transition: all .15s; }
.stab.active { background: var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,.08); color: var(--text); background: var(--green); color: #fff; }
.toggle-list { display: flex; flex-direction: column; }
.toggle-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border-soft); }
.toggle-item:last-child { border-bottom: none; padding-bottom: 0; }
.toggle-label { font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.toggle-sub { font-size: 12px; color: var(--text-soft); line-height: 1.5; }
.toggle-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; inset: 0; background: var(--border); border-radius: 22px; transition: .3s; }
.toggle-slider::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .3s; }
.toggle-switch input:checked + .toggle-slider { background: var(--green); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }
.pw-bar { display: flex; gap: 4px; }
.pw-seg { height: 3px; flex: 1; border-radius: 2px; background: var(--border-soft); transition: background .3s; }
.connected-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border-soft); gap: 12px; }
.connected-row:last-child { border-bottom: none; padding-bottom: 0; }
.danger-card { border-color: #FADADD; }
.danger-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 14px 0; flex-wrap: wrap; }
.danger-divider { height: 1px; background: #FADADD; }

/* ─── Modal ───────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: none; align-items: center; justify-content: center; z-index: 500; }
.modal-overlay.open { display: flex; }
.modal-box { background: var(--surface); border-radius: var(--radius-lg); padding: 1.5rem; max-width: 380px; width: 90%; box-shadow: var(--shadow-md); }
.modal-box h3 { font-family: 'Syne', sans-serif; font-size: 1rem; font-weight: 800; }

/* ─── Contact page ────────────────────────────────── */
.file-upload-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--bg); border: 1.5px dashed var(--border); border-radius: var(--radius-md); padding: .6rem 1rem; font-size: 13px; color: var(--text-soft); cursor: pointer; transition: border-color .15s; }
.file-upload-btn:hover { border-color: var(--green); color: var(--green); }
.faq-list { display: flex; flex-direction: column; }
.faq-item { border-bottom: 1px solid var(--border-soft); cursor: pointer; }
.faq-item:last-child { border-bottom: none; }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; font-size: 13px; font-weight: 500; }
.faq-arrow { font-size: 11px; color: var(--text-muted); transition: transform .2s; flex-shrink: 0; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-a { display: none; font-size: 13px; color: var(--text-soft); line-height: 1.6; padding-bottom: 12px; }
.faq-item.open .faq-a { display: block; }
.contact-method { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border-soft); }
.contact-method:last-child { border-bottom: none; }

/* ─── Toast ───────────────────────────────────────── */
.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(80px); background: var(--text); color: #fff; font-size: 13px; font-weight: 500; padding: .65rem 1.25rem; border-radius: 30px; opacity: 0; transition: all .35s; z-index: 999; pointer-events: none; white-space: nowrap; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
