/* ============================================================
   SomaliTalk — Design System
   Mobile-first. Clean. Fast.
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Noto+Nastaliq+Urdu:wght@400;600&display=swap');

/* ── Variables ────────────────────────────────────────────── */
:root {
    --bg:           #000000;
    --bg-1:         #0f0f0f;
    --bg-2:         #161616;
    --bg-3:         #1e1e1e;
    --border:       #2a2a2a;
    --text:         #e7e7e7;
    --text-muted:   #6b7280;
    --text-dim:     #9ca3af;
    --accent:       #1d9bf0;
    --accent-hover: #1a8cd8;
    --accent-light: rgba(29,155,240,0.12);
    --green:        #00ba7c;
    --green-light:  rgba(0,186,124,0.12);
    --red:          #f4212e;
    --red-light:    rgba(244,33,46,0.12);
    --gold:         #ffd700;
    --gold-light:   rgba(255,215,0,0.15);
    --gov-blue:     #1565c0;
    --radius:       12px;
    --radius-sm:    8px;
    --radius-pill:  999px;
    --shadow:       0 1px 3px rgba(0,0,0,0.6);
    --shadow-lg:    0 8px 32px rgba(0,0,0,0.8);
    --font:         'Plus Jakarta Sans', sans-serif;
    --transition:   0.2s ease;
    --nav-height:   56px;
    --sidebar-w:    260px;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

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

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select {
    font-family: inherit;
    color: inherit;
    background: transparent;
}

input:focus, textarea:focus, select:focus {
    outline: 2px solid var(--accent);
    outline-offset: 0;
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }

.text-muted  { color: var(--text-muted); }
.text-dim    { color: var(--text-dim); }
.text-accent { color: var(--accent); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-gold   { color: var(--gold); }
.text-sm     { font-size: 0.85rem; }
.text-xs     { font-size: 0.75rem; }
.font-bold   { font-weight: 700; }
.font-semi   { font-weight: 600; }

/* ── Layout ───────────────────────────────────────────────── */
.app-wrap {
    display: flex;
    min-height: 100vh;
    max-width: 1280px;
    margin: 0 auto;
}

.main-content {
    flex: 1;
    min-width: 0;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    padding-bottom: calc(var(--nav-height) + 16px);
}

.sidebar-left  { width: var(--sidebar-w); flex-shrink: 0; }
.sidebar-right { width: 340px; flex-shrink: 0; }

/* ── Bottom Navigation (mobile) ───────────────────────────── */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--nav-height);
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    z-index: 100;
    padding: 0 4px;
}

.bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 2px;
    position: relative;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 500;
    transition: color var(--transition);
    border-radius: var(--radius-sm);
}

.bottom-nav a:hover,
.bottom-nav a.active {
    color: var(--text);
}

.bottom-nav a.active i { color: var(--accent); }

.bottom-nav a i { font-size: 1.3rem; }

.nav-label {
    font-size: 0.62rem;
    font-weight: 500;
    line-height: 1;
    margin-top: 2px;
    color: inherit;
}

label { cursor: pointer; }

.nav-badge {
    position: absolute;
    top: 8px; right: calc(50% - 14px);
    background: var(--red);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ── Page Header ──────────────────────────────────────────── */
.page-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
}

.page-header h1 {
    font-size: 1.1rem;
    font-weight: 700;
}

.back-btn {
    width: 36px; height: 36px;
    border-radius: var(--radius-pill);
    border: none;
    background: transparent;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: background var(--transition);
}
.back-btn:hover { background: var(--bg-3); }

/* ── Tabs ─────────────────────────────────────────────────── */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
    flex: 1;
    min-width: 60px;
    padding: 14px 8px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    position: relative;
    white-space: nowrap;
    transition: color var(--transition);
    text-align: center;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%; right: 50%;
    height: 3px;
    background: var(--accent);
    border-radius: 3px 3px 0 0;
    transition: left var(--transition), right var(--transition);
}

.tab-btn.active {
    color: var(--text);
}
.tab-btn.active::after { left: 15%; right: 15%; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

/* ── Post Card ────────────────────────────────────────────── */
.post-card {
    border-bottom: 1px solid var(--border);
    padding: 14px 16px;
    display: flex;
    gap: 12px;
    cursor: pointer;
    transition: background var(--transition);
    position: relative;
}
.post-card:hover { background: rgba(255,255,255,0.02); }

.post-card .avatar-wrap {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.post-card .thread-line {
    width: 2px;
    flex: 1;
    margin-top: 6px;
    background: var(--border);
    border-radius: 1px;
}

.post-body { flex: 1; min-width: 0; }

.post-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.post-meta .username {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.post-meta .dot { color: var(--text-muted); }
.post-meta .time {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: auto;
}

.post-display-name {
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-content {
    font-size: 0.95rem;
    line-height: 1.55;
    word-break: break-word;
    margin-bottom: 10px;
}

.post-content a { color: var(--accent); }

.post-image {
    width: 100%;
    border-radius: var(--radius-sm);
    object-fit: cover;
    max-height: 400px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
}

/* Post Actions */
.post-actions {
    display: flex;
    gap: 0;
    margin-top: 8px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 6px 10px 6px 0;
    border-radius: var(--radius-pill);
    transition: color var(--transition);
    min-width: 60px;
}

.action-btn i { font-size: 1rem; }

.action-btn:hover.like-btn    { color: var(--red); }
.action-btn:hover.repost-btn  { color: var(--green); }
.action-btn:hover.reply-btn   { color: var(--accent); }
.action-btn:hover.bookmark-btn{ color: var(--accent); }
.action-btn:hover.share-btn   { color: var(--text); }

.action-btn.liked     { color: var(--red); }
.action-btn.reposted  { color: var(--green); }
.action-btn.bookmarked{ color: var(--accent); }

/* Repost banner */
.repost-banner {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 16px 0;
}

/* ── Avatar ───────────────────────────────────────────────── */
.avatar {
    width: 42px; height: 42px;
    border-radius: var(--radius-pill);
    object-fit: cover;
    border: 2px solid var(--bg-3);
    flex-shrink: 0;
}
.avatar-lg  { width: 80px; height: 80px; }
.avatar-sm  { width: 32px; height: 32px; border-width: 1px; }
.avatar-xl  { width: 120px; height: 120px; border-width: 3px; }

/* ── Verification Badges ──────────────────────────────────── */
.badge { display: inline-flex; align-items: center; font-size: 0.75rem; }

.badge-personal i   { color: var(--accent); }
.badge-gov i        { color: var(--gov-blue); }
.badge-siyaasi i    { color: var(--gold); }

/* ── Compose Box ──────────────────────────────────────────── */
.compose-box {
    border-bottom: 1px solid var(--border);
    padding: 14px 16px;
    display: flex;
    gap: 12px;
}

.compose-inner { flex: 1; }

.compose-textarea {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text);
    font-size: 1rem;
    resize: none;
    min-height: 60px;
    line-height: 1.5;
    placeholder-color: var(--text-muted);
}

.compose-textarea::placeholder { color: var(--text-muted); }

.compose-tools {
    display: flex;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 10px;
    margin-top: 10px;
    gap: 8px;
}

.compose-tool-btn {
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 1.1rem;
    padding: 6px;
    border-radius: var(--radius-pill);
    transition: background var(--transition);
}
.compose-tool-btn:hover { background: var(--accent-light); }

.char-counter {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.char-counter.warn  { color: #f59e0b; }
.char-counter.limit { color: var(--red); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 20px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    font-family: var(--font);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--text-dim); }

.btn-danger {
    background: var(--red);
    color: #fff;
}

.btn-gold {
    background: linear-gradient(135deg, #f59e0b, var(--gold));
    color: #000;
}

.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-lg { padding: 12px 28px; font-size: 1rem; }

/* Follow button */
.btn-follow { background: var(--text); color: #000; }
.btn-follow:hover { background: #d1d5db; }
.btn-following {
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border);
}
.btn-following:hover {
    border-color: var(--red);
    color: var(--red);
}

/* ── Forms ────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95rem;
    transition: border-color var(--transition);
    outline: none;
}

.form-control:focus { border-color: var(--accent); }
.form-control.error { border-color: var(--red); }

.form-error {
    color: var(--red);
    font-size: 0.8rem;
    margin-top: 4px;
}

.form-hint {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 4px;
}

/* ── Search Bar ───────────────────────────────────────────── */
.search-wrap {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(0,0,0,0.9);
    z-index: 40;
    backdrop-filter: blur(12px);
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 9px 14px;
    transition: border-color var(--transition);
}
.search-bar:focus-within { border-color: var(--accent); }

.search-bar i { color: var(--text-muted); }

.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.95rem;
    color: var(--text);
}
.search-bar input::placeholder { color: var(--text-muted); }

/* ── Trending Widget ──────────────────────────────────────── */
.trending-widget {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 16px;
}

.widget-title {
    padding: 14px 16px;
    font-size: 1rem;
    font-weight: 800;
    border-bottom: 1px solid var(--border);
}

.trending-item {
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background var(--transition);
}
.trending-item:last-child { border-bottom: none; }
.trending-item:hover { background: var(--bg-2); }

.trending-item .tag {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text);
}
.trending-item .count {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── User Suggestion ──────────────────────────────────────── */
.user-suggestion {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    transition: background var(--transition);
}
.user-suggestion:hover { background: var(--bg-2); }

.user-suggestion .info { flex: 1; min-width: 0; }
.user-suggestion .dname {
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-suggestion .uname {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ── Profile Header ───────────────────────────────────────── */
.profile-cover {
    width: 100%;
    height: 130px;
    object-fit: cover;
    background: var(--bg-3);
}

.profile-info-bar {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.avatar-offset {
    margin-top: -46px;
    margin-bottom: 8px;
}

.profile-stats {
    display: flex;
    gap: 20px;
    margin-top: 12px;
}

.profile-stat a {
    display: flex;
    gap: 5px;
    font-size: 0.875rem;
}
.profile-stat .num { font-weight: 700; }
.profile-stat .lbl { color: var(--text-muted); }

/* ── Notifications ────────────────────────────────────────── */
.notif-item {
    display: flex;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background var(--transition);
}
.notif-item.unread { background: rgba(29,155,240,0.04); }
.notif-item:hover  { background: rgba(255,255,255,0.02); }

.notif-icon {
    width: 38px; height: 38px;
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.notif-icon.like     { background: var(--red-light);   color: var(--red); }
.notif-icon.follow   { background: var(--accent-light); color: var(--accent); }
.notif-icon.reply    { background: var(--accent-light); color: var(--accent); }
.notif-icon.repost   { background: var(--green-light);  color: var(--green); }
.notif-icon.mention  { background: var(--accent-light); color: var(--accent); }
.notif-icon.verified { background: var(--gold-light);   color: var(--gold); }

/* ── Messages ─────────────────────────────────────────────── */
.thread-item {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background var(--transition);
}
.thread-item:hover { background: rgba(255,255,255,0.02); }
.thread-item.unread .thread-preview { color: var(--text); font-weight: 600; }
.thread-item .thread-preview { color: var(--text-muted); font-size: 0.875rem; }

.messages-pane {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--nav-height));
}

.messages-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 0.92rem;
    line-height: 1.4;
    word-break: break-word;
}

.message-bubble.sent {
    background: var(--accent);
    color: #fff;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.message-bubble.received {
    background: var(--bg-3);
    color: var(--text);
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 3px;
    text-align: right;
}
.message-bubble.received + .message-time { text-align: left; }

.message-input-bar {
    border-top: 1px solid var(--border);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg);
}

.message-input-bar input {
    flex: 1;
    background: var(--bg-2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 10px 16px;
    color: var(--text);
    font-size: 0.92rem;
    outline: none;
    transition: border-color var(--transition);
}
.message-input-bar input:focus { border-color: var(--accent); }

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

@media (min-width: 600px) {
    .modal-overlay { align-items: center; }
}

.modal {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    width: 100%;
    max-width: 560px;
    max-height: 92vh;
    overflow-y: auto;
    animation: slideUp 0.25s ease;
}

@media (min-width: 600px) {
    .modal { border-radius: var(--radius); }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-1);
    z-index: 1;
}

.modal-header h2 { font-size: 1rem; }

.modal-body { padding: 16px; }
.modal-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ── Subscribe / Payment ──────────────────────────────────── */
.plan-card {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    position: relative;
    transition: border-color var(--transition);
    cursor: pointer;
}
.plan-card.selected { border-color: var(--gold); }
.plan-card:hover    { border-color: var(--text-dim); }

.plan-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gold);
}

.plan-price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
}

.payment-method-select {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 16px 0;
}

.payment-option {
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition);
}
.payment-option.selected { border-color: var(--accent); }
.payment-option i { font-size: 1.6rem; margin-bottom: 6px; }
.payment-option .label { font-size: 0.85rem; font-weight: 600; }

/* ── Auth Pages ───────────────────────────────────────────── */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: var(--bg);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo .logo-icon {
    width: 52px; height: 52px;
    background: var(--accent);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    margin: 0 auto 12px;
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── Spinner / Loading ────────────────────────────────────── */
.spinner {
    width: 24px; height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

.posts-loading {
    display: flex;
    justify-content: center;
    padding: 24px;
}

/* ── Empty State ──────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 14px;
    color: var(--bg-3);
}

.empty-state h3 {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 8px;
}

/* ── Alert / Toast ────────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: calc(var(--nav-height) + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-3);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 300;
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: none;
    max-width: 90vw;
    text-align: center;
    white-space: nowrap;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.toast.success { border-color: var(--green); color: var(--green); }
.toast.error   { border-color: var(--red);   color: var(--red); }

/* ── Inline Alert ─────────────────────────────────────────── */
.alert {
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 0.9rem;
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.alert-error   { background: var(--red-light);   color: var(--red);   border: 1px solid rgba(244,33,46,0.3); }
.alert-success { background: var(--green-light);  color: var(--green); border: 1px solid rgba(0,186,124,0.3); }
.alert-info    { background: var(--accent-light); color: var(--accent); border: 1px solid rgba(29,155,240,0.3); }

/* ── Verified Page ────────────────────────────────────────── */
.verify-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 20px 0;
}

.verify-type-card {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
}

.verify-type-card:hover { background: var(--bg-2); }
.verify-type-card.selected { border-color: var(--accent); }

.verify-type-card i {
    font-size: 2rem;
    margin-bottom: 10px;
}

/* ── Dropzone ─────────────────────────────────────────────── */
.image-preview-wrap {
    position: relative;
    margin-top: 8px;
}

.image-preview-wrap img {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    max-height: 200px;
    object-fit: cover;
}

.remove-image-btn {
    position: absolute;
    top: 8px; right: 8px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    border: none;
    width: 28px; height: 28px;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* ── Utilities ────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.w-full { width: 100%; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rounded-full { border-radius: var(--radius-pill); }
.hidden { display: none !important; }
.pointer { cursor: pointer; }
.no-scroll { overflow: hidden; }

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

/* ── Desktop ──────────────────────────────────────────────── */
@media (min-width: 768px) {
    .bottom-nav { display: none; }
    .main-content { padding-bottom: 0; }
}

@media (max-width: 767px) {
    .sidebar-left,
    .sidebar-right { display: none; }
}

@media (max-width: 900px) {
    .sidebar-right { display: none; }
}

/* ── Lazy image loading ───────────────────────────────────── */
img[data-src] { opacity: 0; transition: opacity 0.3s; }
img.loaded { opacity: 1; }

/* ── FAB (Compose, mobile) ────────────────────────────────── */
.fab {
    position: fixed;
    bottom: calc(var(--nav-height) + 16px);
    right: 16px;
    width: 52px; height: 52px;
    border-radius: var(--radius-pill);
    background: var(--accent);
    color: #fff;
    border: none;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 90;
    transition: background var(--transition), transform var(--transition);
}
.fab:hover { background: var(--accent-hover); transform: scale(1.05); }

@media (min-width: 768px) { .fab { display: none; } }

/* ── Reply chain indent ───────────────────────────────────── */
.reply-indent { padding-left: 52px; }
