/* =============================================
   AUTHONOS — Sovereign Commerce Dashboard
   ============================================= */

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

:root {
    --sidebar-width: 300px;
    --dashboard-sidebar-width: 400px;
    --layout-gap: 35px;

    --bg-body: #09090b;
    --bg-sidebar: #0c0d10;
    --bg-surface: rgba(255,255,255,0.02);
    --bg-surface-hover: rgba(255,255,255,0.04);
    --bg-elevated: rgba(255,255,255,0.03);

    --border-subtle: rgba(255,255,255,0.06);
    --border-light: rgba(255,255,255,0.08);

    --text-primary: #ffffff;
    --text-secondary: rgba(255,255,255,0.7);
    --text-muted: rgba(255,255,255,0.45);
    --text-faint: rgba(255,255,255,0.25);

    /* Light purple accent */
    --accent: #a78bfa;
    --accent-hover: #8b5cf6;
    --accent-light: rgba(167,139,250,0.15);
    --accent-glow: rgba(167,139,250,0.25);

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono','Monaco','Inconsolata','Fira Code', monospace;
}

html { font-size: 14px; }

body {
    font-family: var(--font-sans);
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

/* ── APP LAYOUT ─────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }

/* ── LEFT SIDEBAR ───────────────────────────── */
.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    display: flex; flex-direction: column;
    z-index: 100; padding: 0 25px;
}

.sidebar-logo {
    display: flex; align-items: center; gap: 14px;
    padding: 32px 0; font-size: 1.4rem; font-weight: 700;
    color: var(--text-primary); letter-spacing: -0.5px;
}
.sidebar-logo i { font-size: 1.6rem; color: var(--accent); }

.sidebar-nav {
    flex: 1; overflow-y: auto;
    margin: 0 -25px; padding: 0 25px;
}
.nav-section { margin-bottom: 32px; }
.nav-section-label {
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.8px; color: var(--text-faint);
    padding: 0 14px 14px;
}
.nav-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px; border-radius: 12px;
    color: var(--text-muted); font-size: 14px; font-weight: 500;
    cursor: pointer; transition: all .15s ease; margin-bottom: 6px;
}
.nav-item i { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.nav-item span:first-of-type { flex: 1; }
.nav-item:hover { background: var(--bg-surface-hover); color: var(--text-secondary); }
.nav-item.active { background: var(--accent-light); color: var(--accent); }

.nav-badge {
    background: var(--bg-elevated); color: var(--text-muted);
    font-size: 12px; font-weight: 600; padding: 4px 10px;
    border-radius: 8px; min-width: 32px; text-align: center;
}
.nav-item.active .nav-badge { background: var(--accent-glow); color: var(--accent); }

/* Sidebar Footer */
.sidebar-footer {
    padding: 24px 0; border-top: 1px solid var(--border-subtle);
    margin: 0 -25px; padding-left: 25px; padding-right: 25px;
}
.status-group { margin-bottom: 20px; }
.status-item {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 0; font-size: 12px; color: var(--text-muted);
}
.status-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--text-faint); flex-shrink: 0;
}
.status-dot.connected  { background: var(--success); box-shadow: 0 0 0 3px rgba(16,185,129,.2); }
.status-dot.verified   { background: var(--accent);  box-shadow: 0 0 0 3px var(--accent-light); }
.status-dot.warning    { background: var(--warning);  box-shadow: 0 0 0 3px rgba(245,158,11,.2); }
.status-dot.error      { background: var(--danger);   box-shadow: 0 0 0 3px rgba(239,68,68,.2); }

.sidebar-user {
    display: flex; align-items: center; gap: 14px;
    padding: 14px; background: var(--bg-surface); border-radius: 12px;
}
.user-avatar {
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--accent-light);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent); font-size: 18px; flex-shrink: 0; overflow: hidden;
}
.user-avatar img { width: 100%; height: 100%; border-radius: 12px; object-fit: cover; }
.user-info { flex: 1; min-width: 0; }
.user-name {
    font-size: 14px; font-weight: 600; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-domain {
    font-size: 12px; color: var(--text-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── MAIN CONTENT ───────────────────────────── */
.main-content {
    flex: 1; margin-left: var(--sidebar-width); min-height: 100vh;
}

/* ── DASHBOARD LAYOUT ───────────────────────── */
.dashboard-layout {
    display: flex; gap: var(--layout-gap); padding: var(--layout-gap);
    min-height: 100vh;
}
.dashboard-main { flex: 1; min-width: 0; }
.dashboard-sidebar {
    width: var(--dashboard-sidebar-width); flex-shrink: 0;
    position: sticky; top: var(--layout-gap);
    height: calc(100vh - var(--layout-gap)*2); overflow-y: auto;
}

/* ── PROFILE HEADER ─────────────────────────── */
.profile-header {
    background: var(--bg-surface); border-radius: 16px;
    overflow: hidden; margin-bottom: 28px;
}
.profile-banner {
    height: 130px;
    background: linear-gradient(135deg, rgba(167,139,250,.15), rgba(139,92,246,.1));
    overflow: hidden;
}
.profile-banner img { width: 100%; height: 100%; object-fit: cover; }
.banner-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-faint); font-size: 2rem;
}
.profile-info {
    padding: 0 28px 28px;
    display: flex; gap: 24px; align-items: flex-start;
}
.profile-avatar {
    width: 90px; height: 90px; border-radius: 16px;
    background: var(--accent-light); border: 4px solid var(--bg-body);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent); font-size: 2.25rem;
    margin-top: -45px; flex-shrink: 0; overflow: hidden;
}
.profile-avatar img { width: 100%; height: 100%; border-radius: 12px; object-fit: cover; }
.profile-details { flex: 1; padding-top: 10px; min-width: 0; }
.profile-details h1 { font-size: 1.5rem; font-weight: 700; margin: 0 0 6px; }
.profile-meta {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 12px; flex-wrap: wrap;
}
.nip05 {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--accent); font-size: 13px; font-weight: 500;
}
.nip05::before { content: '✓'; font-weight: 700; }
.nip05:empty { display: none; }
.nip05:empty::before { display: none; }

.website {
    color: var(--text-muted); font-size: 13px; text-decoration: none;
}
.website:hover { color: var(--accent); }

.profile-about {
    color: var(--text-secondary); font-size: 14px;
    line-height: 1.6; margin-bottom: 20px;
}
.profile-stats { display: flex; gap: 36px; }
.profile-stats .stat { text-align: center; }
.profile-stats .stat-value {
    display: block; font-size: 1.5rem; font-weight: 700;
    color: var(--text-primary);
}
.profile-stats .stat-label {
    font-size: 11px; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .5px;
}
.profile-actions { display: flex; gap: 10px; margin-top: 10px; flex-shrink: 0; }

/* ── TABS ───────────────────────────────────── */
.dashboard-tabs {
    display: flex; gap: 6px; padding: 6px;
    background: var(--bg-surface); border-radius: 14px;
    margin-bottom: 28px;
}
.tab-btn {
    flex: 1; display: flex; align-items: center; justify-content: center;
    gap: 10px; padding: 14px 20px;
    background: transparent; border: none; border-radius: 10px;
    color: var(--text-muted); font-size: 14px; font-weight: 500;
    cursor: pointer; transition: all .15s ease; font-family: var(--font-sans);
}
.tab-btn i { font-size: 16px; }
.tab-btn:hover { color: var(--text-secondary); background: var(--bg-surface-hover); }
.tab-btn.active { background: var(--accent); color: #fff; }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── ACTIVITY FEED ──────────────────────────── */
.activity-feed { display: flex; flex-direction: column; gap: 14px; }
.activity-item {
    display: flex; gap: 18px; padding: 20px;
    background: var(--bg-surface); border-radius: 14px;
    transition: background .15s ease;
}
.activity-item:hover { background: var(--bg-surface-hover); }
.activity-icon {
    width: 46px; height: 46px; border-radius: 12px;
    background: var(--accent-light);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent); font-size: 18px; flex-shrink: 0;
}
.activity-icon.success { background: rgba(16,185,129,.12); color: var(--success); }
.activity-icon.warning { background: rgba(245,158,11,.12); color: var(--warning); }
.activity-content { flex: 1; min-width: 0; }
.activity-title { font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.activity-description { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.activity-time { font-size: 12px; color: var(--text-faint); }

/* ── REVIEWS ────────────────────────────────── */
.reviews-filters {
    display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px;
}
.filter-btn {
    padding: 10px 16px; background: var(--bg-surface); border: none;
    border-radius: 10px; color: var(--text-muted);
    font-size: 13px; font-weight: 500; cursor: pointer;
    transition: all .15s ease; font-family: var(--font-sans);
}
.filter-btn:hover { background: var(--bg-surface-hover); color: var(--text-secondary); }
.filter-btn.active { background: var(--accent-light); color: var(--accent); }
.filter-divider { width: 1px; background: var(--border-subtle); margin: 0 8px; }

.reviews-list { display: flex; flex-direction: column; gap: 14px; }
.review-item { padding: 22px; background: var(--bg-surface); border-radius: 14px; }
.review-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px;
}
.review-stars { color: var(--warning); font-size: 15px; letter-spacing: 2px; }
.review-meta {
    display: flex; align-items: center; gap: 10px;
    font-size: 12px; color: var(--text-muted);
}
.review-badge {
    padding: 4px 10px; background: rgba(16,185,129,.12);
    color: var(--success); border-radius: 6px;
    font-size: 11px; font-weight: 600;
}
.review-content {
    color: var(--text-secondary); font-size: 14px;
    line-height: 1.6; margin-bottom: 10px;
}
.review-product { font-size: 12px; color: var(--text-faint); }

/* ── STATS GRID ─────────────────────────────── */
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr));
    gap: 18px;
}
.stats-card { padding: 24px; background: var(--bg-surface); border-radius: 14px; }
.stats-card h3 {
    display: flex; align-items: center; gap: 12px;
    font-size: 14px; font-weight: 600; color: var(--text-secondary);
    margin: 0 0 20px;
}
.stats-card h3 i { color: var(--accent); font-size: 16px; }

.rating-bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rating-bar-label { font-size: 13px; color: var(--text-muted); width: 24px; text-align: right; }
.rating-bar-track {
    flex: 1; height: 8px; background: var(--bg-elevated);
    border-radius: 4px; overflow: hidden;
}
.rating-bar-fill {
    height: 100%; background: var(--accent); border-radius: 4px;
    transition: width .4s ease;
}
.rating-bar-count { font-size: 12px; color: var(--text-faint); width: 28px; }

.chart-placeholder {
    height: 160px; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: var(--text-faint); gap: 10px;
}
.chart-placeholder i { font-size: 2.5rem; }

/* ── SIDEBAR CARDS ──────────────────────────── */
.sidebar-card {
    background: var(--bg-surface); border-radius: 14px; margin-bottom: 18px;
}
.sidebar-card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 22px; border-bottom: 1px solid var(--border-subtle);
}
.sidebar-card-header h3 {
    display: flex; align-items: center; gap: 10px;
    font-size: 14px; font-weight: 600; color: var(--text-secondary); margin: 0;
}
.sidebar-card-header h3 i { color: var(--accent); font-size: 16px; }

.view-all-link { font-size: 12px; color: var(--accent); text-decoration: none; font-weight: 500; }
.view-all-link:hover { text-decoration: underline; }

.sidebar-card-content { padding: 20px 22px; }

.empty-state-small {
    display: flex; flex-direction: column; align-items: center;
    gap: 12px; padding: 32px; color: var(--text-faint); font-size: 13px;
}
.empty-state-small i { font-size: 32px; }

.quick-actions { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.quick-action-btn {
    display: flex; flex-direction: column; align-items: center;
    gap: 10px; padding: 20px 14px;
    background: var(--bg-elevated); border: none; border-radius: 12px;
    color: var(--text-muted); font-size: 12px; font-weight: 500;
    cursor: pointer; transition: all .15s ease; font-family: var(--font-sans);
}
.quick-action-btn i { font-size: 22px; color: var(--accent); }
.quick-action-btn:hover { background: var(--accent-light); color: var(--text-primary); }

/* ── TOGGLE SWITCH ──────────────────────────── */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; cursor: pointer; inset: 0;
    background: var(--bg-elevated); border-radius: 24px; transition: .25s;
}
.toggle-slider::before {
    content: ''; position: absolute;
    height: 18px; width: 18px; left: 3px; bottom: 3px;
    background: white; border-radius: 50%; transition: .25s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── FORMS ──────────────────────────────────── */
.form-row { margin-bottom: 18px; }
.form-row label {
    display: block; font-size: 13px; font-weight: 500;
    color: var(--text-muted); margin-bottom: 8px;
}
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.form-input, .form-select {
    width: 100%; padding: 12px 14px;
    background: var(--bg-elevated); border: 1px solid var(--border-light);
    border-radius: 10px; color: var(--text-primary);
    font-size: 14px; font-family: var(--font-sans);
    transition: border-color .15s ease;
}
.form-input:focus, .form-select:focus { outline: none; border-color: var(--accent); }
.form-input::placeholder { color: var(--text-faint); }
textarea.form-input { resize: vertical; min-height: 90px; }

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

/* ── BUTTONS ────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; padding: 12px 20px; border-radius: 10px;
    font-size: 14px; font-weight: 500; cursor: pointer;
    transition: all .15s ease; border: none; font-family: var(--font-sans);
}
.btn i { font-size: 14px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border-light); }
.btn-ghost:hover { background: var(--bg-surface-hover); color: var(--text-primary); }
.btn-secondary { background: var(--bg-surface); color: var(--text-secondary); border: 1px solid var(--border-light); }
.btn-secondary:hover { background: var(--bg-surface-hover); color: var(--text-primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ── MODAL ──────────────────────────────────── */
.modal {
    display: none; position: fixed; inset: 0; z-index: 1000;
    align-items: center; justify-content: center;
}
.modal.active { display: flex; }
.modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.75); backdrop-filter: blur(4px);
}
.modal-content {
    position: relative; width: 100%; max-width: 560px;
    max-height: 90vh; overflow-y: auto;
    background: #111214; border-radius: 18px;
    border: 1px solid var(--border-subtle); margin: 24px;
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 24px 28px; border-bottom: 1px solid var(--border-subtle);
}
.modal-header h2 { font-size: 18px; font-weight: 600; margin: 0; }
.modal-close {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: none; color: var(--text-muted);
    font-size: 18px; cursor: pointer; border-radius: 10px;
    transition: all .15s ease;
}
.modal-close:hover { background: var(--bg-surface-hover); color: var(--text-primary); }
.modal-body { padding: 28px; }
.modal-footer {
    display: flex; justify-content: flex-end; gap: 12px;
    padding: 20px 28px; border-top: 1px solid var(--border-subtle);
}

/* ── TOAST ──────────────────────────────────── */
.toast {
    position: fixed; bottom: 24px; right: 24px;
    padding: 14px 22px; border-radius: 12px; color: white;
    font-size: 14px; font-weight: 500;
    box-shadow: 0 8px 32px rgba(0,0,0,.3);
    z-index: 10000; display: flex; align-items: center; gap: 10px;
    animation: toastIn .3s ease;
}
.toast-success { background: var(--success); }
.toast-error   { background: var(--danger); }
.toast-info    { background: var(--accent); }
.toast.leaving { animation: toastOut .3s ease forwards; }

@keyframes toastIn  { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes toastOut { from { transform: translateY(0); opacity: 1; } to { transform: translateY(20px); opacity: 0; } }

/* ── UTILITIES ──────────────────────────────── */
.loading-placeholder {
    display: flex; align-items: center; justify-content: center;
    gap: 12px; padding: 48px; color: var(--text-muted); font-size: 14px;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* ── RESPONSIVE ─────────────────────────────── */
@media (max-width: 1400px) { :root { --dashboard-sidebar-width: 360px; } }
@media (max-width: 1200px) { :root { --dashboard-sidebar-width: 320px; --layout-gap: 28px; } }
@media (max-width: 1024px) {
    .dashboard-layout { flex-direction: column; }
    .dashboard-sidebar { width: 100%; position: static; height: auto; }
}
@media (max-width: 768px) {
    :root { --sidebar-width: 0px; --layout-gap: 20px; }
    .sidebar { transform: translateX(-100%); transition: transform .3s ease; width: 280px; }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .profile-info { flex-direction: column; align-items: center; text-align: center; }
    .profile-avatar { margin-top: -45px; }
    .profile-actions { margin-top: 16px; }
    .profile-stats { justify-content: center; }
}

/* ── REVIEWS SECTION - FULL PAGE ───────────── */
.content-header { padding: 0 var(--layout-gap) var(--layout-gap); }
.content-header h1 { font-size: 1.75rem; font-weight: 700; margin: 0 0 8px; display: flex; align-items: center; gap: 12px; }
.content-header h1 i { color: var(--accent); }
.content-header p { color: var(--text-muted); margin: 0; }

.reviews-toolbar {
    display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
    margin: 0 var(--layout-gap) 24px; padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
}
.reviews-toolbar .search-bar { flex: 1; min-width: 200px; max-width: 300px; }
.reviews-toolbar .filter-buttons { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.reviews-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px; margin: 0 var(--layout-gap) 24px;
}
.mini-stat {
    background: var(--bg-surface); border-radius: 12px; padding: 20px; text-align: center;
}
.mini-stat .value { display: block; font-size: 1.75rem; font-weight: 700; color: var(--text-primary); }
.mini-stat .label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }

.reviews-list-full { display: flex; flex-direction: column; gap: 16px; margin: 0 var(--layout-gap); }

/* Review Card */
.review-card {
    background: var(--bg-surface); border: 1px solid var(--border-subtle);
    border-radius: 14px; padding: 22px; transition: all .15s ease;
}
.review-card:hover { border-color: var(--accent-light); }
.review-card.is-filtered { opacity: 0.6; border-color: rgba(239,68,68,.2); }

.review-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.review-rating { display: flex; align-items: center; gap: 12px; }
.review-stars { color: var(--warning); font-size: 15px; }
.review-stars .star-full { color: var(--warning); }
.review-stars .star-empty { color: var(--text-faint); }
.review-date { font-size: 12px; color: var(--text-muted); }

.review-card-body { margin-bottom: 16px; }
.review-text { color: var(--text-secondary); line-height: 1.6; margin-bottom: 8px; }
.review-product { font-size: 12px; color: var(--text-faint); }
.review-product i { margin-right: 6px; color: var(--accent); }

.review-card-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 14px; border-top: 1px solid var(--border-subtle);
}
.reviewer-info { display: flex; flex-direction: column; gap: 8px; }
.reviewer-pubkey { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); }
.reviewer-pubkey i { margin-right: 4px; }
.review-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.review-actions { display: flex; gap: 8px; }

/* Trust Indicator */
.trust-indicator {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600;
}
.trust-indicator.high { background: rgba(16,185,129,.12); color: var(--success); }
.trust-indicator.medium { background: rgba(245,158,11,.12); color: var(--warning); }
.trust-indicator.low { background: rgba(239,68,68,.12); color: var(--danger); }

/* Badges */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600;
}
.badge i { font-size: 10px; }
.badge.verified { background: rgba(16,185,129,.12); color: var(--success); }
.badge.filtered { background: rgba(239,68,68,.12); color: var(--danger); }
.badge.nip05 { background: var(--accent-light); color: var(--accent); }
.badge.responded { background: rgba(168,85,247,.12); color: #a855f7; }

/* Response Modal */
.response-review-context {
    background: var(--bg-elevated); border-radius: 10px;
    padding: 18px; margin-bottom: 20px; border-left: 3px solid var(--accent);
}
.context-review { display: flex; flex-direction: column; gap: 10px; }
.context-content { color: var(--text-secondary); font-style: italic; line-height: 1.6; }
.context-meta { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); }
.form-hint { font-size: 12px; color: var(--text-faint); margin-top: 8px; }

/* Review Detail Modal */
.modal-large { max-width: 680px; }
.detail-section { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border-subtle); }
.detail-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.detail-section h4 {
    font-size: 11px; color: var(--text-faint); margin-bottom: 12px;
    text-transform: uppercase; letter-spacing: .8px;
}
.detail-section h4 i { margin-right: 8px; color: var(--accent); }
.detail-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.detail-date { font-size: 12px; color: var(--text-muted); }
.detail-content { color: var(--text-primary); line-height: 1.7; font-size: 15px; }
.detail-reviewer { display: flex; flex-direction: column; gap: 12px; }
.pubkey-full, .event-id {
    display: block; padding: 12px 14px; background: var(--bg-elevated);
    border-radius: 8px; font-size: 12px; color: var(--text-secondary);
    word-break: break-all; font-family: var(--font-mono);
}
.reviewer-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.reviewer-stats span { font-size: 13px; color: var(--text-secondary); }
.reviewer-stats i { margin-right: 4px; color: var(--accent); }
.response-preview {
    color: var(--text-secondary); padding: 14px;
    background: rgba(168,85,247,.08); border-radius: 10px; border-left: 3px solid #a855f7;
}

/* Empty State */
.empty-state {
    text-align: center; padding: 60px 20px; color: var(--text-faint);
}
.empty-state i { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 1.2rem; margin-bottom: 8px; color: var(--text-secondary); }
.empty-state p { font-size: 14px; }

/* Button Variants */
.btn-warning { background: rgba(245,158,11,.15); color: var(--warning); border: 1px solid rgba(245,158,11,.25); }
.btn-warning:hover { background: rgba(245,158,11,.25); }

/* Reviews Responsive */
@media (max-width: 768px) {
    .reviews-toolbar { flex-direction: column; align-items: stretch; margin: 0 20px 20px; }
    .reviews-toolbar .search-bar { max-width: none; }
    .reviews-stats { margin: 0 20px 20px; }
    .reviews-list-full { margin: 0 20px; }
    .review-card-footer { flex-direction: column; gap: 12px; align-items: flex-start; }
    .review-actions { width: 100%; justify-content: flex-end; }
    .content-header { padding: 0 20px 20px; }
}

/* ── CATALOG SECTION ─────────────────────────── */
.catalog-container { padding: var(--layout-gap); }

.catalog-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px;
}
.catalog-header h1 {
    font-size: 1.75rem; font-weight: 700; margin: 0;
    display: flex; align-items: center; gap: 12px;
}
.catalog-header h1 i { color: var(--accent); }
.catalog-actions { display: flex; gap: 12px; }

.catalog-tabs {
    display: flex; gap: 6px; padding: 6px;
    background: var(--bg-surface); border-radius: 14px;
    margin-bottom: 24px; width: fit-content;
}
.catalog-tabs .tab-btn {
    padding: 12px 24px; background: transparent; border: none;
    border-radius: 10px; color: var(--text-muted);
    font-size: 14px; font-weight: 500; cursor: pointer;
    transition: all .15s ease; font-family: var(--font-sans);
}
.catalog-tabs .tab-btn:hover { color: var(--text-secondary); background: var(--bg-surface-hover); }
.catalog-tabs .tab-btn.active { background: var(--accent); color: #fff; }

.catalog-stats {
    display: flex; gap: 24px; margin-bottom: 24px;
    padding: 20px; background: var(--bg-surface); border-radius: 14px;
}
.catalog-stats .stat-item { text-align: center; min-width: 80px; }
.catalog-stats .stat-value {
    display: block; font-size: 1.5rem; font-weight: 700; color: var(--text-primary);
}
.catalog-stats .stat-label {
    font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px;
}

/* Detail Panel (slide-out) */
.detail-panel {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: 420px; max-width: 90vw;
    background: #111214; border-left: 1px solid var(--border-subtle);
    transform: translateX(100%); transition: transform .3s ease;
    z-index: 500; display: flex; flex-direction: column;
    box-shadow: -10px 0 40px rgba(0,0,0,.5);
}
.detail-panel.active { transform: translateX(0); }

.panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px; border-bottom: 1px solid var(--border-subtle);
}
.panel-header h2 { font-size: 18px; font-weight: 600; margin: 0; }
.panel-close {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: none; color: var(--text-muted);
    font-size: 24px; cursor: pointer; border-radius: 10px;
    transition: all .15s ease;
}
.panel-close:hover { background: var(--bg-surface-hover); color: var(--text-primary); }

.panel-body { flex: 1; overflow-y: auto; padding: 24px; }

.product-gallery {
    width: 100%; height: 200px; background: var(--bg-elevated);
    border-radius: 12px; margin-bottom: 20px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.product-gallery img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery .image-placeholder {
    display: flex; align-items: center; justify-content: center;
    color: var(--text-faint); font-size: 3rem;
}

.panel-body .product-info { margin-bottom: 24px; }
.panel-body .product-price {
    font-size: 1.5rem; font-weight: 700; color: var(--accent); margin-bottom: 20px;
}
.panel-body .product-price span { font-size: 14px; color: var(--text-muted); margin-left: 4px; }

.panel-body .product-meta { display: flex; flex-direction: column; gap: 12px; }
.panel-body .meta-item {
    display: flex; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid var(--border-subtle);
}
.panel-body .meta-label { color: var(--text-muted); font-size: 13px; }
.panel-body .meta-value { color: var(--text-primary); font-weight: 500; font-size: 13px; }

.panel-body .product-description { margin-top: 20px; }
.panel-body .product-description h4 {
    font-size: 12px; color: var(--text-faint); margin-bottom: 10px;
    text-transform: uppercase; letter-spacing: .5px;
}
.panel-body .product-description p { color: var(--text-secondary); line-height: 1.6; }

.panel-actions {
    display: flex; gap: 12px; margin-top: 24px;
    padding-top: 20px; border-top: 1px solid var(--border-subtle);
}

.panel-reviews { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border-subtle); }
.panel-reviews h4 {
    font-size: 14px; font-weight: 600; margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px;
}
.panel-reviews h4 span { color: var(--text-muted); font-weight: 400; }

.panel-review {
    padding: 14px; background: var(--bg-surface); border-radius: 10px; margin-bottom: 12px;
}
.panel-review-stars { color: var(--warning); font-size: 13px; margin-bottom: 8px; }
.panel-review p { color: var(--text-secondary); font-size: 13px; line-height: 1.5; margin: 0 0 8px; }
.panel-review-meta { font-size: 11px; color: var(--text-faint); font-family: var(--font-mono); }

.no-reviews { color: var(--text-faint); font-style: italic; font-size: 13px; }

/* Integrations Section */
.integrations-section { margin-bottom: 32px; }
.integrations-section h3 {
    font-size: 14px; font-weight: 600; color: var(--text-secondary);
    margin-bottom: 16px; text-transform: uppercase; letter-spacing: .5px;
}

.integrations-list { display: flex; flex-direction: column; gap: 12px; }

.integration-card {
    display: flex; align-items: center; gap: 16px;
    padding: 18px; background: var(--bg-surface);
    border: 1px solid var(--border-subtle); border-radius: 14px;
    transition: all .15s ease;
}
.integration-card:hover { border-color: var(--accent-light); }

.integration-icon {
    width: 48px; height: 48px; border-radius: 12px;
    background: var(--accent-light);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent); font-size: 20px; flex-shrink: 0;
}

.integration-info { flex: 1; min-width: 0; }
.integration-name { font-size: 15px; font-weight: 600; color: var(--text-primary); margin: 0 0 4px; }
.integration-domain { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.integration-stats { display: flex; gap: 16px; font-size: 12px; color: var(--text-faint); }

.integration-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* Platforms Grid */
.platforms-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.platform-card {
    display: flex; flex-direction: column; align-items: center;
    padding: 24px 16px; background: var(--bg-surface);
    border: 1px solid var(--border-subtle); border-radius: 14px;
    cursor: pointer; transition: all .15s ease; text-align: center;
}
.platform-card:hover { border-color: var(--accent-light); }
.platform-card.disabled { opacity: 0.5; cursor: not-allowed; }

.platform-icon {
    width: 56px; height: 56px; border-radius: 14px;
    background: var(--bg-elevated);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 24px; margin-bottom: 14px;
}

.platform-name { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.platform-status { font-size: 12px; }
.platform-status.available { color: var(--success); }
.platform-status.coming-soon { color: var(--text-faint); }

/* Status badges for products */
.status-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 600;
}
.status-badge i { font-size: 10px; }

/* NIP-05 Warning */
.nip05-warning { margin-bottom: 16px; }

/* ── PRODUCTS SECTION ────────────────────────── */
.products-toolbar {
    display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
    margin: 0 var(--layout-gap) 24px; padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
}
.products-toolbar .search-bar { flex: 1; min-width: 200px; max-width: 300px; }
.products-toolbar .filter-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.products-toolbar .toolbar-actions { display: flex; gap: 8px; margin-left: auto; }

.products-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px; margin: 0 var(--layout-gap) 24px;
}

.products-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px; margin: 0 var(--layout-gap);
}

.product-card {
    background: var(--bg-surface); border: 1px solid var(--border-subtle);
    border-radius: 14px; overflow: hidden; cursor: pointer;
    transition: all .15s ease;
}
.product-card:hover { border-color: var(--accent-light); transform: translateY(-2px); }

.product-card .product-image {
    height: 160px; background: var(--bg-elevated);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.product-card .product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-card .product-image .image-placeholder {
    color: var(--text-faint); font-size: 2.5rem;
}

.product-card .product-info { padding: 16px; }
.product-card .product-title {
    font-size: 15px; font-weight: 600; color: var(--text-primary);
    margin: 0 0 8px; line-height: 1.4;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.product-card .product-price {
    font-size: 16px; font-weight: 700; color: var(--accent); margin-bottom: 10px;
}
.product-card .product-price .currency {
    font-size: 12px; font-weight: 500; color: var(--text-muted);
}
.product-card .product-meta {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.product-card .product-rating { font-size: 13px; color: var(--warning); }
.product-card .product-rating i { margin-right: 4px; }

.sync-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600;
}
.sync-badge.synced { background: rgba(16,185,129,.12); color: var(--success); }
.sync-badge.pending { background: rgba(245,158,11,.12); color: var(--warning); }

.product-detail-layout { display: flex; gap: 24px; margin-bottom: 24px; }
.product-detail-image {
    width: 200px; height: 200px; flex-shrink: 0;
    background: var(--bg-elevated); border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.product-detail-image img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-image .image-placeholder { color: var(--text-faint); font-size: 3rem; }
.product-detail-info { flex: 1; }
.product-detail-info .detail-row {
    display: flex; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid var(--border-subtle);
}
.product-detail-info .detail-label { color: var(--text-muted); font-size: 13px; }
.product-detail-info .detail-value { color: var(--text-primary); font-weight: 500; }
.product-detail-info .detail-value.mono { font-family: var(--font-mono); font-size: 12px; }

/* ── MESSAGES SECTION ────────────────────────── */
.messages-layout {
    display: flex; height: calc(100vh - var(--layout-gap) * 2);
    margin: var(--layout-gap); gap: 0;
    background: var(--bg-surface); border-radius: 16px;
    overflow: hidden; border: 1px solid var(--border-subtle);
}

.conversations-sidebar {
    width: 320px; flex-shrink: 0;
    border-right: 1px solid var(--border-subtle);
    display: flex; flex-direction: column;
}
.conversations-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px; border-bottom: 1px solid var(--border-subtle);
}
.conversations-header h2 {
    font-size: 16px; font-weight: 600; margin: 0;
    display: flex; align-items: center; gap: 10px;
}
.conversations-header h2 i { color: var(--accent); }
.conversations-search { padding: 12px 16px; }
.conversations-list { flex: 1; overflow-y: auto; }

.conversation-item {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 20px; cursor: pointer;
    border-bottom: 1px solid var(--border-subtle);
    transition: background .15s ease;
}
.conversation-item:hover { background: var(--bg-surface-hover); }
.conversation-item.active { background: var(--accent-light); }
.conversation-item.unread { background: rgba(167,139,250,.06); }

.conversation-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--bg-elevated);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 18px; flex-shrink: 0;
    overflow: hidden;
}
.conversation-avatar img { width: 100%; height: 100%; object-fit: cover; }

.conversation-info { flex: 1; min-width: 0; }
.conversation-name {
    font-size: 14px; font-weight: 600; color: var(--text-primary);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.conversation-preview {
    font-size: 13px; color: var(--text-muted);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.conversation-meta { text-align: right; flex-shrink: 0; }
.conversation-time { font-size: 11px; color: var(--text-faint); }
.unread-badge {
    width: 10px; height: 10px; background: var(--accent);
    border-radius: 50%; margin-top: 6px; margin-left: auto;
}

.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.chat-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 24px; border-bottom: 1px solid var(--border-subtle);
}
.chat-header-info { display: flex; align-items: center; gap: 14px; }
.chat-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--bg-elevated);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 18px; overflow: hidden;
}
.chat-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-header-details h3 { font-size: 15px; font-weight: 600; margin: 0 0 2px; }
.chat-status { font-size: 12px; color: var(--text-muted); }

.chat-messages {
    flex: 1; overflow-y: auto; padding: 24px;
    display: flex; flex-direction: column; gap: 12px;
}

.chat-empty-state, .chat-start-message {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: var(--text-faint); gap: 12px;
}
.chat-empty-state i, .chat-start-message i { font-size: 3rem; opacity: 0.5; }
.chat-empty-state h3 { font-size: 1.1rem; color: var(--text-secondary); margin: 0; }
.chat-empty-state p { font-size: 14px; margin: 0; }

.message {
    max-width: 70%; padding: 12px 16px;
    border-radius: 16px; font-size: 14px; line-height: 1.5;
}
.message.incoming {
    background: var(--bg-elevated); color: var(--text-primary);
    align-self: flex-start; border-bottom-left-radius: 4px;
}
.message.outgoing {
    background: var(--accent); color: #fff;
    align-self: flex-end; border-bottom-right-radius: 4px;
}
.message-content { word-break: break-word; }
.message-time { font-size: 11px; opacity: 0.7; margin-top: 6px; }

.chat-input-area {
    padding: 16px 24px; border-top: 1px solid var(--border-subtle);
    display: flex; flex-direction: column; gap: 8px;
}
.chat-input-wrapper { display: flex; gap: 12px; align-items: flex-end; }
.chat-input-wrapper .form-input { flex: 1; resize: none; min-height: 44px; max-height: 120px; }
.chat-encryption-badge {
    display: flex; align-items: center; gap: 6px;
    font-size: 11px; color: var(--text-faint);
}
.chat-encryption-badge i { color: var(--success); }

.context-sidebar {
    width: 320px; flex-shrink: 0;
    border-left: 1px solid var(--border-subtle);
    display: flex; flex-direction: column;
    transition: width .2s ease, opacity .2s ease;
}
.context-sidebar.hidden { width: 0; opacity: 0; overflow: hidden; }

.context-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px; border-bottom: 1px solid var(--border-subtle);
}
.context-header h3 {
    font-size: 14px; font-weight: 600; margin: 0;
    display: flex; align-items: center; gap: 10px;
}
.context-header h3 i { color: var(--accent); }

.context-body { flex: 1; overflow-y: auto; padding: 20px; }

.context-profile { text-align: center; margin-bottom: 24px; }
.context-avatar {
    width: 80px; height: 80px; border-radius: 50%;
    background: var(--bg-elevated); margin: 0 auto 16px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 2rem; overflow: hidden;
}
.context-avatar img { width: 100%; height: 100%; object-fit: cover; }
.context-profile h4 { font-size: 16px; font-weight: 600; margin: 0 0 4px; }
.context-nip05 { font-size: 13px; color: var(--accent); }

.context-section { margin-bottom: 24px; }
.context-section h5 {
    font-size: 11px; color: var(--text-faint); margin: 0 0 12px;
    text-transform: uppercase; letter-spacing: .8px;
    display: flex; align-items: center; gap: 8px;
}
.context-section h5 i { color: var(--accent); }

.context-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.context-stat { text-align: center; }
.context-stat .stat-value { display: block; font-size: 1.25rem; font-weight: 700; }
.context-stat .stat-label { font-size: 11px; color: var(--text-muted); }

.context-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600;
}
.tag.verified { background: rgba(16,185,129,.12); color: var(--success); }
.tag.vip { background: rgba(245,158,11,.12); color: var(--warning); }
.tag.nip05 { background: var(--accent-light); color: var(--accent); }
.tag.default { background: var(--bg-elevated); color: var(--text-muted); }

.pubkey-display {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-elevated); padding: 10px 12px;
    border-radius: 8px; font-family: var(--font-mono); font-size: 12px;
}
.pubkey-display code { flex: 1; overflow: hidden; text-overflow: ellipsis; }

.context-actions { padding-top: 16px; border-top: 1px solid var(--border-subtle); }

.empty-note { font-size: 13px; color: var(--text-faint); font-style: italic; }

/* ── CONTACTS SECTION ────────────────────────── */
.contacts-toolbar {
    display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
    margin: 0 var(--layout-gap) 24px; padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
}
.contacts-toolbar .search-bar { flex: 1; min-width: 200px; max-width: 350px; }
.contacts-toolbar .filter-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.contacts-toolbar .toolbar-actions { margin-left: auto; }

.contacts-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px; margin: 0 var(--layout-gap) 24px;
}

.contacts-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px; margin: 0 var(--layout-gap);
}

.contact-card {
    display: flex; align-items: center; gap: 16px;
    background: var(--bg-surface); border: 1px solid var(--border-subtle);
    border-radius: 14px; padding: 18px; cursor: pointer;
    transition: all .15s ease;
}
.contact-card:hover { border-color: var(--accent-light); }

.contact-avatar {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--bg-elevated);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 1.5rem; flex-shrink: 0;
    overflow: hidden;
}
.contact-avatar img { width: 100%; height: 100%; object-fit: cover; }

.contact-info { flex: 1; min-width: 0; }
.contact-name {
    font-size: 15px; font-weight: 600; color: var(--text-primary);
    margin: 0 0 4px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.contact-card .contact-nip05 {
    font-size: 12px; color: var(--accent); display: block; margin-bottom: 8px;
}
.contact-meta {
    display: flex; gap: 16px; font-size: 12px; color: var(--text-muted);
}
.contact-meta i { margin-right: 4px; color: var(--accent); }

.contact-tags { display: flex; gap: 6px; flex-shrink: 0; }
.contact-tags .tag { padding: 6px; }
.contact-tags .tag i { font-size: 12px; }

.contact-profile-header {
    display: flex; align-items: center; gap: 20px;
    margin-bottom: 24px; padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
}
.contact-avatar-large {
    width: 80px; height: 80px; border-radius: 50%;
    background: var(--bg-elevated);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 2rem; flex-shrink: 0;
    overflow: hidden;
}
.contact-avatar-large img { width: 100%; height: 100%; object-fit: cover; }
.contact-profile-info h3 { font-size: 1.25rem; font-weight: 700; margin: 0 0 4px; }
.contact-profile-info .contact-nip05 { font-size: 14px; color: var(--accent); display: block; margin-bottom: 10px; }
.contact-profile-info .contact-tags { margin-top: 8px; }

.contact-stats-row {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
    margin-bottom: 24px; padding: 20px;
    background: var(--bg-elevated); border-radius: 12px;
}
.contact-stat { text-align: center; }
.contact-stat .value { display: block; font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }
.contact-stat .label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; }

.pubkey-meta {
    display: flex; gap: 20px; margin-top: 10px;
    font-size: 12px; color: var(--text-muted);
}

.orders-list, .reviews-list-mini {
    display: flex; flex-direction: column; gap: 10px;
}

/* ── MODAL OVERLAY (shared) ───────────────────── */
.modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,.75); backdrop-filter: blur(4px);
    align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }

.modal-overlay .modal {
    display: block; position: relative; inset: auto;
    background: #111214; border-radius: 18px;
    border: 1px solid var(--border-subtle);
    max-width: 560px; width: 100%; max-height: 90vh;
    overflow-y: auto; margin: 24px;
}
.modal-overlay .modal.modal-large { max-width: 680px; }

.modal-overlay .modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 24px 28px; border-bottom: 1px solid var(--border-subtle);
}
.modal-overlay .modal-header h2 { font-size: 18px; font-weight: 600; margin: 0; }
.modal-overlay .close-btn {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: none; color: var(--text-muted);
    font-size: 24px; cursor: pointer; border-radius: 10px;
    transition: all .15s ease;
}
.modal-overlay .close-btn:hover { background: var(--bg-surface-hover); color: var(--text-primary); }
.modal-overlay .modal-body { padding: 28px; }
.modal-overlay .modal-footer {
    display: flex; justify-content: flex-end; gap: 12px;
    padding: 20px 28px; border-top: 1px solid var(--border-subtle);
}

/* ── SECTION RESPONSIVE ───────────────────────── */
@media (max-width: 1024px) {
    .messages-layout { flex-direction: column; height: auto; min-height: calc(100vh - var(--layout-gap) * 2); }
    .conversations-sidebar { width: 100%; height: 300px; border-right: none; border-bottom: 1px solid var(--border-subtle); }
    .context-sidebar { display: none; }
}

@media (max-width: 768px) {
    .products-toolbar, .contacts-toolbar {
        flex-direction: column; align-items: stretch;
        margin: 0 20px 20px;
    }
    .products-toolbar .search-bar, .contacts-toolbar .search-bar { max-width: none; }
    .products-toolbar .toolbar-actions, .contacts-toolbar .toolbar-actions { margin-left: 0; }
    .products-stats, .contacts-stats { margin: 0 20px 20px; }
    .products-grid, .contacts-grid { margin: 0 20px; }
    .messages-layout { margin: 20px; }
    .contact-stats-row { grid-template-columns: repeat(2, 1fr); }
}

/* =============================================
   SETTINGS SECTION
   ============================================= */

.settings-nav {
    display: flex; gap: 8px; padding: 0 35px; margin-bottom: 24px;
    border-bottom: 1px solid var(--border-subtle); padding-bottom: 16px;
}
.settings-tab {
    padding: 10px 18px; font-size: 14px; font-weight: 500;
    background: transparent; border: none; color: var(--text-muted);
    cursor: pointer; border-radius: 8px; transition: all .15s ease;
}
.settings-tab:hover { background: var(--bg-surface-hover); color: var(--text-secondary); }
.settings-tab.active { background: var(--accent-light); color: var(--accent); }

.settings-panel { display: none; padding: 0 35px 35px; }
.settings-panel.active { display: block; }

.settings-grid {
    display: grid; grid-template-columns: 1fr 340px; gap: 24px;
}
.settings-main { display: flex; flex-direction: column; gap: 24px; }
.settings-aside { display: flex; flex-direction: column; gap: 24px; }

.settings-card {
    background: var(--bg-surface); border: 1px solid var(--border-subtle);
    border-radius: 16px; padding: 24px;
}
.settings-card h3 {
    font-size: 16px; font-weight: 600; margin: 0; display: flex;
    align-items: center; gap: 10px;
}
.settings-card h3 i { color: var(--accent); font-size: 18px; }
.settings-card h4 {
    font-size: 14px; font-weight: 600; margin: 0 0 16px; color: var(--text-secondary);
}

.card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px;
}

.settings-card.danger-zone {
    border-color: rgba(239,68,68,.25);
    background: rgba(239,68,68,.05);
}
.settings-card.danger-zone h3 { color: var(--danger); }
.settings-card.danger-zone h3 i { color: var(--danger); }

/* Profile Media Section */
.profile-media { margin-bottom: 24px; position: relative; }
.profile-banner {
    height: 140px; border-radius: 12px; background: var(--bg-elevated);
    background-size: cover; background-position: center;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-subtle); position: relative;
}
.banner-placeholder {
    display: flex; flex-direction: column; align-items: center;
    gap: 8px; color: var(--text-faint); font-size: 13px;
}
.banner-placeholder i { font-size: 28px; }

.profile-avatar-wrapper {
    position: absolute; bottom: -32px; left: 24px;
}
.profile-avatar {
    width: 80px; height: 80px; border-radius: 16px;
    background: var(--bg-surface); border: 4px solid var(--bg-body);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent); font-size: 28px; overflow: hidden;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Form Elements */
.form-group { margin-bottom: 18px; }
.form-group:last-child { margin-bottom: 0; }
.form-group label {
    display: block; font-size: 13px; font-weight: 500;
    color: var(--text-secondary); margin-bottom: 8px;
}
.form-group small {
    display: block; font-size: 12px; color: var(--text-muted); margin-top: 6px;
}

.form-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}

.input-with-copy {
    display: flex; gap: 8px;
}
.input-with-copy .form-input { flex: 1; }

.input-with-action {
    display: flex; gap: 12px;
}
.input-with-action .form-input { flex: 1; }

.input-with-addon {
    display: flex;
}
.input-with-addon .form-input {
    flex: 1; border-top-right-radius: 0; border-bottom-right-radius: 0;
}
.input-addon {
    padding: 0 14px; background: var(--bg-elevated);
    border: 1px solid var(--border-light); border-left: none;
    border-radius: 0 10px 10px 0; display: flex; align-items: center;
    color: var(--text-muted); font-size: 13px;
}

.btn-icon {
    width: 44px; height: 44px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-surface); border: 1px solid var(--border-light);
    border-radius: 10px; color: var(--text-muted); cursor: pointer;
    transition: all .15s ease;
}
.btn-icon:hover { background: var(--bg-surface-hover); color: var(--text-primary); }

/* Toggle Switch */
.toggle-label {
    display: flex; align-items: center; gap: 12px; cursor: pointer;
}
.toggle-label input[type="checkbox"] { display: none; }
.toggle-switch {
    width: 44px; height: 24px; background: var(--bg-elevated);
    border-radius: 12px; position: relative; transition: all .2s ease;
    flex-shrink: 0;
}
.toggle-switch::after {
    content: ''; position: absolute; top: 3px; left: 3px;
    width: 18px; height: 18px; background: var(--text-muted);
    border-radius: 50%; transition: all .2s ease;
}
.toggle-label input:checked + .toggle-switch { background: var(--accent); }
.toggle-label input:checked + .toggle-switch::after {
    transform: translateX(20px); background: #fff;
}

/* Badges */
.badge {
    display: inline-flex; align-items: center; padding: 4px 10px;
    font-size: 11px; font-weight: 600; border-radius: 6px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-muted { background: var(--bg-elevated); color: var(--text-muted); }
.badge-success { background: rgba(16,185,129,.15); color: var(--success); }
.badge-warning { background: rgba(245,158,11,.15); color: var(--warning); }
.badge-info { background: var(--accent-light); color: var(--accent); }

/* NIP-05 Status Box */
.nip05-status {
    display: flex; align-items: center; gap: 14px;
    padding: 14px; border-radius: 10px; margin-top: 16px;
}
.nip05-status.success {
    background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.25);
}
.nip05-status .status-icon {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(16,185,129,.15); color: var(--success); font-size: 18px;
}
.nip05-status .status-content { display: flex; flex-direction: column; gap: 2px; }
.nip05-status .status-content strong { font-size: 13px; color: var(--success); }
.nip05-status .status-content span { font-size: 12px; color: var(--text-muted); }

/* Settings Actions */
.settings-actions {
    display: flex; gap: 12px; justify-content: flex-end; padding-top: 8px;
}

/* Quick Links */
.quick-link {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 0; color: var(--text-secondary);
    text-decoration: none; font-size: 14px;
    border-bottom: 1px solid var(--border-subtle);
    transition: color .15s ease;
}
.quick-link:last-child { border-bottom: none; }
.quick-link:hover { color: var(--accent); }
.quick-link i { color: var(--text-muted); }

/* Relay Info */
.relay-info { margin-bottom: 8px; }
.relay-status-row {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 10px; font-size: 13px;
}
.relay-url {
    display: block; font-size: 12px; padding: 8px 12px;
    background: var(--bg-elevated); border-radius: 8px;
    color: var(--text-muted);
}

/* Range Input */
.form-range {
    width: 100%; height: 6px; appearance: none;
    background: var(--bg-elevated); border-radius: 3px;
    outline: none; margin: 12px 0;
}
.form-range::-webkit-slider-thumb {
    appearance: none; width: 18px; height: 18px;
    background: var(--accent); border-radius: 50%;
    cursor: pointer;
}
.range-labels {
    display: flex; justify-content: space-between;
    font-size: 12px; color: var(--text-muted);
}

/* Variable List */
.variable-list {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.variable-list code {
    padding: 4px 8px; background: var(--bg-elevated);
    border-radius: 6px; font-size: 12px; color: var(--accent);
}

/* Checkbox Group */
.checkbox-group {
    display: flex; flex-wrap: wrap; gap: 16px;
}
.checkbox-label {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; color: var(--text-secondary); cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
    width: 16px; height: 16px; accent-color: var(--accent);
}

/* Button Row */
.button-row {
    display: flex; gap: 12px; flex-wrap: wrap;
}

/* Zap Splits */
.zap-splits { display: flex; flex-direction: column; gap: 12px; }
.zap-split-row {
    display: flex; align-items: center; gap: 10px;
}
.zap-split-row .form-input:first-child { flex: 1; }
.zap-split-row .split-pct { width: 80px; text-align: center; }
.zap-split-row span { color: var(--text-muted); font-size: 14px; }

/* Info List */
.info-list { display: flex; flex-direction: column; gap: 12px; }
.info-item {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 13px;
}
.info-item span { color: var(--text-muted); }
.info-item code {
    padding: 4px 8px; background: var(--bg-elevated);
    border-radius: 6px; font-size: 12px; color: var(--text-secondary);
}

/* Responsive Settings */
@media (max-width: 1024px) {
    .settings-grid { grid-template-columns: 1fr; }
    .settings-aside { order: -1; }
}

@media (max-width: 768px) {
    .settings-nav { padding: 0 20px; flex-wrap: wrap; }
    .settings-panel { padding: 0 20px 20px; }
    .form-row { grid-template-columns: 1fr; }
}