/* ============================================================
   features.css - CSS tambahan untuk fitur baru Cuiter
   Jangan edit style.css asli. Semua fitur baru ada di sini.
   Support dark mode (default) dan light mode (body.light-mode)
   ============================================================ */

/* ---- PHOTO GRID (multi-foto post) ---- */
.post-photo-grid {
    display: grid;
    gap: 3px;
    border-radius: 14px;
    overflow: hidden;
    margin-top: 10px;
    width: 100%;
}
.post-photo-grid .photo-grid-item {
    overflow: hidden;
    background: var(--input-bg, #1a1a1a);
}
.post-photo-grid .photo-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: opacity 0.15s;
}
.post-photo-grid .photo-grid-item img:hover {
    opacity: 0.9;
}

/* 2 foto: dua kolom setara */
.post-photo-grid-2 {
    grid-template-columns: 1fr 1fr;
}
.post-photo-grid-2 .photo-grid-item {
    height: 220px;
}

/* 3 foto: satu besar di kiri, dua kecil di kanan */
.post-photo-grid-3 {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 110px 110px;
}
.post-photo-grid-3 .photo-grid-item:first-child {
    grid-row: 1 / 3;
    height: 223px;
}
.post-photo-grid-3 .photo-grid-item:not(:first-child) {
    height: 110px;
}

/* 4 foto: 2x2 */
.post-photo-grid-4 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 150px 150px;
}
.post-photo-grid-4 .photo-grid-item {
    height: 150px;
}

/* 5 foto: baris pertama 2 besar, baris kedua 3 kecil */
.post-photo-grid-5 {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 160px 110px;
}
.post-photo-grid-5 .photo-grid-item:nth-child(1) {
    grid-column: 1 / 3;
    height: 160px;
}
.post-photo-grid-5 .photo-grid-item:nth-child(2) {
    grid-column: 3 / 4;
    height: 160px;
}
.post-photo-grid-5 .photo-grid-item:nth-child(3),
.post-photo-grid-5 .photo-grid-item:nth-child(4),
.post-photo-grid-5 .photo-grid-item:nth-child(5) {
    height: 110px;
}

/* ---- PHOTO VIEWER MODAL ---- */
.photo-viewer-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.92);
    align-items: center;
    justify-content: center;
}
.photo-viewer-modal.active {
    display: flex;
}
.photo-viewer-modal .pv-img-wrap {
    max-width: 90vw;
    max-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.photo-viewer-modal .pv-img-wrap img {
    max-width: 90vw;
    max-height: 88vh;
    border-radius: 8px;
    object-fit: contain;
    display: block;
}
.photo-viewer-modal .pv-close {
    position: fixed;
    top: 16px;
    right: 20px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}
.photo-viewer-modal .pv-prev,
.photo-viewer-modal .pv-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}
.photo-viewer-modal .pv-prev { left: 12px; }
.photo-viewer-modal .pv-next { right: 12px; }
.photo-viewer-modal .pv-prev:disabled,
.photo-viewer-modal .pv-next:disabled { opacity: 0.25; cursor: default; }
.photo-viewer-modal .pv-counter {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    background: rgba(0,0,0,0.5);
    padding: 4px 12px;
    border-radius: 20px;
}

/* ---- COMPOSER MULTI-IMAGE PREVIEW ---- */
.composer-multi-images {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.composer-img-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
}
.composer-img-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.composer-img-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ---- YOUTUBE EMBED ---- */
.yt-embed-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    border-radius: 12px;
    overflow: hidden;
    margin-top: 10px;
    background: #000;
}
.yt-embed-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 12px;
}
/* YouTube embed di dalam quote card modal */
.yt-embed-quote {
    border-radius: 10px;
    overflow: hidden;
}
/* Slot link preview di dalam quote card */
.quote-card-link-preview {
    margin-top: 4px;
}
.quote-card-link-preview .link-preview-card {
    margin-top: 6px;
    max-height: 110px;
}
.quote-card-link-preview .link-preview-thumb {
    width: 110px;
    min-width: 110px;
    max-height: 110px;
}
.quote-card-link-preview .link-preview-thumb-placeholder {
    width: 110px;
    min-width: 110px;
    max-height: 110px;
}

/* ---- LINK PREVIEW CARD ---- */
.link-preview-card {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 10px;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    color: inherit;
    max-height: 130px;
}
.link-preview-card:hover {
    background: var(--card-hover);
}
.link-preview-thumb {
    width: 130px;
    min-width: 130px;
    max-height: 130px;
    object-fit: cover;
    background: var(--input-bg);
    flex-shrink: 0;
}
.link-preview-thumb-placeholder {
    width: 130px;
    min-width: 130px;
    max-height: 130px;
    background: var(--input-bg);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 28px;
}
.link-preview-info {
    flex: 1;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    overflow: hidden;
}
.link-preview-domain {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.link-preview-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.link-preview-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- NOTIFIKASI ---- */
#notifications-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.15s;
}
.notif-item:hover { background: var(--card-hover); }
.notif-unread { background: rgba(14, 135, 216, 0.06); }
body.light-mode .notif-unread { background: rgba(14, 135, 216, 0.04); }

.notif-icon-area { font-size: 20px; min-width: 28px; margin-top: 2px; }
.notif-body { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.notif-actor-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; margin-bottom: 6px; border: 1px solid var(--border-color); }
.notif-text { font-size: 14px; color: var(--text-main); line-height: 1.5; }
.notif-actor-name { font-weight: 700; color: var(--text-main); }
.notif-label { color: var(--text-main); }
.notif-time { color: var(--text-muted); font-size: 13px; }
.notif-post-snippet { color: var(--text-muted); font-size: 13px; margin-top: 4px; font-style: italic; }
.notif-mark-all-btn { margin-left: auto; background: none; border: none; color: var(--primary-color); font-size: 20px; cursor: pointer; padding: 4px 8px; border-radius: 50%; transition: background 0.15s; }
.notif-mark-all-btn:hover { background: var(--card-hover); }

/* ---- PESAN / DM ---- */
#messages-container { display: flex; min-height: 100vh; }
.messages-sidebar { width: 360px; border-right: 1px solid var(--border-color); display: flex; flex-direction: column; height: 100vh; position: sticky; top: 0; overflow-y: auto; }
.messages-chat-area { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; height: 100vh; max-height: 100vh; }

.dm-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border-bottom: 1px solid var(--border-color);
    cursor: pointer; transition: background 0.15s;
}
.dm-item:hover { background: var(--card-hover); }
.dm-item.active { background: rgba(14, 135, 216, 0.1); }
.dm-item-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.dm-item-info { flex: 1; min-width: 0; }
.dm-item-name { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 4px; }
.dm-item-preview { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-unread-dot { width: 8px; height: 8px; background: var(--primary-color); border-radius: 50%; flex-shrink: 0; }

#chat-content { width: 100%; box-sizing: border-box; display: flex; flex-direction: column; height: 100vh; max-height: 100vh; overflow: hidden; }
.chat-header { padding: 12px 16px; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 16px; flex-shrink: 0; }
.chat-messages { flex: 1; padding: 16px; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 8px; min-height: 0; width: 100%; box-sizing: border-box; }
.chat-bubble { max-width: 85%; min-width: fit-content; padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.5; word-break: normal; white-space: normal; display: inline-block; }
.chat-bubble.mine { background: var(--primary-color); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-bubble.theirs { background: var(--input-bg); color: var(--text-main); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-bubble-time { font-size: 11px; color: var(--text-muted); text-align: right; margin-top: 2px; }

.chat-input-area { padding: 12px 16px; border-top: 1px solid var(--border-color); display: flex; align-items: center; gap: 10px; background: var(--bg-body); flex-shrink: 0; }
.chat-input-area input#chat-input { flex: 1; padding: 10px 16px; border: 1px solid var(--border-color); border-radius: 999px; background: var(--input-bg); color: var(--text-main); font-size: 14px; outline: none; min-height: 40px; display: block; visibility: visible; opacity: 1; }
.chat-input-area input:focus { border-color: var(--primary-color); }
.chat-send-btn { background: var(--primary-color); color: #fff; border: none; border-radius: 50%; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 16px; transition: opacity 0.15s; }
.chat-send-btn:hover { opacity: 0.85; }
.chat-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; gap: 12px; color: var(--text-muted); text-align: center; padding: 40px; }
.chat-new-btn { background: var(--primary-color); color: #fff; border: none; border-radius: 999px; padding: 10px 24px; font-size: 15px; font-weight: 700; cursor: pointer; margin-top: 8px; transition: opacity 0.15s; }
.chat-new-btn:hover { opacity: 0.85; }

/* ---- CHAT PROFILE CARD ---- */
.chat-profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 28px 24px 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4px;
    text-align: center;
    flex-shrink: 0;
}
.chat-profile-card-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin-bottom: 6px;
    border: 2px solid var(--border-color);
}
.chat-profile-card-name {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 4px;
}
.chat-profile-card-handle {
    font-size: 14px;
    color: var(--text-muted);
}
.chat-profile-card-joined {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 1px;
}
.chat-profile-card-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 22px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s;
    background: transparent;
}
.chat-profile-card-btn:hover {
    background: var(--hover-bg);
    text-decoration: none;
    color: var(--text-main);
}

/* DM Search User */
.dm-search-container { padding: 10px 12px; border-bottom: 1px solid var(--border-color); }
.dm-search-input { width: 100%; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-color); background: var(--input-bg); color: var(--text-main); font-size: 14px; outline: none; }
.dm-search-input:focus { border-color: var(--primary-color); }
.dm-search-results { position: absolute; background: var(--modal-bg); border: 1px solid var(--border-color); border-radius: 12px; width: 320px; z-index: 200; box-shadow: 0 8px 32px rgba(0,0,0,0.3); max-height: 250px; overflow-y: auto; }
.dm-search-result-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; transition: background 0.15s; }
.dm-search-result-item:hover { background: var(--card-hover); }
.dm-search-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }

/* ---- MODAL EDIT PROFIL ---- */
#edit-profile-modal {
    display: none; position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.6); align-items: center; justify-content: center;
}
#edit-profile-modal.active { display: flex; }
.edit-profile-panel {
    background: var(--modal-bg); border-radius: 16px; width: 600px; max-width: 96vw;
    max-height: 90vh; overflow-y: auto; box-shadow: 0 16px 64px rgba(0,0,0,0.4);
}
.edit-profile-header { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--border-color); position: sticky; top: 0; background: var(--modal-bg); z-index: 10; }
.edit-profile-header h2 { font-size: 18px; font-weight: 700; flex: 1; }
.edit-profile-save-btn { background: var(--text-main); color: var(--bg-body); border: none; border-radius: 999px; padding: 6px 18px; font-size: 14px; font-weight: 700; cursor: pointer; }
.edit-profile-save-btn:hover { opacity: 0.85; }

.edit-profile-cover-area { height: 120px; background: var(--primary-color); position: relative; cursor: pointer; overflow: hidden; }
.edit-profile-cover-area img { width: 100%; height: 100%; object-fit: cover; }
.edit-cover-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; gap: 16px; }
.edit-cover-overlay button { background: rgba(0,0,0,0.7); color: #fff; border: none; border-radius: 50%; width: 40px; height: 40px; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; }

.edit-profile-avatar-area { padding: 12px 16px; display: flex; align-items: flex-start; }
.edit-profile-avatar-wrap { position: relative; cursor: pointer; }
.edit-profile-avatar-wrap img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid var(--modal-bg); }
.edit-avatar-btn { position: absolute; inset: 0; background: rgba(0,0,0,0.5); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; opacity: 0; transition: opacity 0.15s; }
.edit-profile-avatar-wrap:hover .edit-avatar-btn { opacity: 1; }

.edit-profile-fields { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.edit-profile-field { position: relative; border: 1px solid var(--border-color); border-radius: 8px; padding: 8px 12px; transition: border-color 0.2s; }
.edit-profile-field:focus-within { border-color: var(--primary-color); }
.edit-profile-field label { font-size: 12px; color: var(--primary-color); font-weight: 600; display: block; margin-bottom: 2px; }
.edit-profile-field input,
.edit-profile-field textarea { width: 100%; background: transparent; border: none; outline: none; color: var(--text-main); font-size: 15px; resize: none; font-family: inherit; }
.edit-profile-field textarea { min-height: 80px; }
.edit-field-counter { font-size: 11px; color: var(--text-muted); text-align: right; margin-top: 2px; }

/* ---- REPORT MODAL ---- */
#report-modal {
    display: none; position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.6); align-items: center; justify-content: center;
}
#report-modal.active { display: flex; }
.report-panel {
    background: var(--modal-bg); border-radius: 16px; width: 440px; max-width: 96vw;
    box-shadow: 0 16px 64px rgba(0,0,0,0.4); overflow: hidden;
}
.report-header { padding: 14px 16px; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 18px; }
.report-body { padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.report-opt { padding: 12px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; gap: 12px; font-size: 15px; transition: background 0.15s; border: 1px solid transparent; }
.report-opt:hover { background: var(--card-hover); border-color: var(--border-color); }
.report-opt i { font-size: 18px; color: var(--text-muted); }
.report-submit-btn { width: 100%; margin-top: 12px; padding: 10px; background: #f4212e; color: #fff; border: none; border-radius: 999px; font-size: 15px; font-weight: 700; cursor: pointer; }
.report-submit-btn:hover { opacity: 0.85; }

/* ---- BOOKMARKS ---- */
#bookmarks-container { display: flex; flex-direction: column; min-height: 100vh; }

#bookmarks-list .post-item {
    display: flex;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}
#bookmarks-list .post-item:hover { background-color: rgba(255,255,255,0.02); }

#bookmarks-list .post-item .post-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    flex-shrink: 0;
}
#bookmarks-list .post-item .post-body-wrap {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
#bookmarks-list .post-item .post-header {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
#bookmarks-list .post-item .bk-name-row {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    flex-shrink: 0;
}
#bookmarks-list .post-item .bk-name-row .post-name {
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
}
#bookmarks-list .post-item .bk-name-row i {
    font-size: 13px;
    line-height: 1;
    flex-shrink: 0;
}
#bookmarks-list .post-item .post-handle {
    color: var(--text-muted);
    font-size: 14px;
    white-space: nowrap;
}
#bookmarks-list .post-item .post-text {
    color: var(--text-main);
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 8px;
    font-size: 15px;
}
#bookmarks-list .post-item .post-img-wrap {
    margin-top: 8px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    max-width: 100%;
}
#bookmarks-list .post-item .post-img-wrap img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 360px;
    object-fit: cover;
}
#bookmarks-list .post-item .post-actions {
    display: flex;
    margin-top: 10px;
}
#bookmarks-list .post-item .action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 13px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 999px;
    transition: color 0.15s, background 0.15s;
}
#bookmarks-list .post-item .action-btn:hover { color: var(--primary-color); background: rgba(14,135,216,0.08); }
#bookmarks-list .post-item .action-btn.active { color: var(--primary-color); }
#bookmarks-list .post-item .action-btn i { font-size: 16px; }

/* ---- FOLLOWERS / FOLLOWING ---- */
#followers-container { display: flex; flex-direction: column; min-height: 100vh; }
.followers-tabs { display: flex; border-bottom: 1px solid var(--border-color); }
.followers-tab { flex: 1; text-align: center; padding: 14px 16px; font-size: 15px; font-weight: 600; color: var(--text-muted); text-decoration: none; border-bottom: 3px solid transparent; transition: color 0.15s, border-color 0.15s; }
.followers-tab:hover { background: var(--card-hover); color: var(--text-main); }
.followers-tab.active { color: var(--text-main); border-bottom-color: var(--primary-color); }

/* follow-item adalah class yang dipakai di template/followers.php */
.follow-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border-color); }
.follow-item-avatar { flex-shrink: 0; }
.follow-item-avatar img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; cursor: pointer; }
.follow-item-info { flex: 1; min-width: 0; }
.follow-item-name { font-weight: 700; font-size: 15px; color: var(--text-main); text-decoration: none; display: flex; align-items: center; gap: 4px; }
.follow-item-name:hover { text-decoration: underline; }
.follow-item-handle { font-size: 14px; color: var(--text-muted); text-decoration: none; display: block; }
.follow-item-bio { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.follow-item-btn { padding: 6px 16px; border-radius: 999px; font-size: 14px; font-weight: 700; cursor: pointer; border: 1px solid var(--text-main); background: var(--text-main); color: var(--bg-body); transition: background 0.15s, color 0.15s, opacity 0.15s; flex-shrink: 0; }
.follow-item-btn.following { background: transparent; color: var(--text-main); border-color: var(--border-color); }
.follow-item-btn:hover { opacity: 0.85; }

/* Legacy classes untuk kompatibilitas */
.follow-user-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border-color); }
.follow-user-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; cursor: pointer; }
.follow-user-info { flex: 1; }
.follow-user-name { font-weight: 700; font-size: 15px; cursor: pointer; color: var(--text-main); }
.follow-user-handle { font-size: 14px; color: var(--text-muted); }
.follow-user-bio { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.follow-action-btn { padding: 6px 16px; border-radius: 999px; font-size: 14px; font-weight: 700; cursor: pointer; border: 1px solid var(--border-color); background: transparent; color: var(--text-main); transition: background 0.15s, color 0.15s; }
.follow-action-btn.following-btn { background: transparent; color: var(--text-main); }
.follow-action-btn.follow-btn { background: var(--text-main); color: var(--bg-body); border-color: var(--text-main); }

/* ---- ADMIN PANEL ---- */
#admin-container { display: flex; flex-direction: column; }
.admin-nav { display: flex; gap: 0; border-bottom: 1px solid var(--border-color); overflow-x: auto; }
.admin-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border-color); overflow-x: auto; padding: 0 16px; }
.admin-tab { padding: 14px 20px; cursor: pointer; font-size: 15px; font-weight: 600; color: var(--text-muted); border-bottom: 3px solid transparent; white-space: nowrap; transition: color 0.15s, border-color 0.15s; background: none; border-left: none; border-right: none; border-top: none; }
.admin-tab.active { color: var(--text-main); border-bottom-color: var(--primary-color); }
.admin-section { padding: 16px; }
.admin-card { background: var(--input-bg); border-radius: 12px; padding: 16px; margin-bottom: 12px; display: flex; align-items: flex-start; gap: 12px; border: 1px solid var(--border-color); }
.admin-card-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.admin-btn { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border-color); background: transparent; color: var(--text-main); font-size: 13px; cursor: pointer; transition: background 0.15s; }
.admin-btn:hover { background: var(--card-hover); }
.admin-btn.danger { border-color: #f4212e; color: #f4212e; }
.admin-btn.danger:hover { background: rgba(244,33,46,0.1); }
.admin-btn.success { border-color: #00ba7c; color: #00ba7c; }
.admin-btn.success:hover { background: rgba(0,186,124,0.1); }
/* Kedua class untuk kompatibilitas */
.admin-stat-grid,
.admin-stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 16px; }
.admin-stat-card { background: var(--input-bg); border-radius: 12px; padding: 16px; border: 1px solid var(--border-color); text-align: center; }
.admin-stat-card .stat-num,
.admin-stat-val { font-size: 28px; font-weight: 800; color: var(--primary-color); }
.admin-stat-card .stat-label,
.admin-stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.admin-stat-card i,
.admin-stats-grid .admin-stat-card i { font-size: 24px; color: var(--primary-color); margin-bottom: 8px; display: block; }

/* Admin Reports */
.admin-reports-list { padding: 0; }
.admin-report-item { padding: 16px; border-bottom: 1px solid var(--border-color); }
.admin-report-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.admin-report-reason { font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: rgba(244,33,46,0.12); color: #f4212e; }
.admin-report-time { font-size: 12px; color: var(--text-muted); }
.admin-report-content { font-size: 14px; color: var(--text-main); font-style: italic; margin-bottom: 6px; }
.admin-report-meta { font-size: 13px; color: var(--text-muted); }
.admin-report-meta a { color: var(--primary-color); }
.admin-report-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.admin-btn-ignore { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border-color); background: transparent; color: var(--text-muted); font-size: 13px; cursor: pointer; transition: background 0.15s; }
.admin-btn-ignore:hover { background: var(--card-hover); }
.admin-btn-delete { padding: 6px 14px; border-radius: 999px; border: 1px solid #f4212e; background: transparent; color: #f4212e; font-size: 13px; cursor: pointer; transition: background 0.15s; }
.admin-btn-delete:hover { background: rgba(244,33,46,0.1); }
.admin-btn-ban { padding: 6px 14px; border-radius: 999px; border: 1px solid #f90; background: transparent; color: #f90; font-size: 13px; cursor: pointer; transition: background 0.15s; }
.admin-btn-ban:hover { background: rgba(255,153,0,0.1); }

/* Admin Users */
.admin-users-list { padding: 16px; }
.admin-users-search { margin-bottom: 12px; }
.admin-users-search input { width: 100%; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-color); background: var(--input-bg); color: var(--text-main); font-size: 14px; outline: none; }
.admin-users-search input:focus { border-color: var(--primary-color); }
.admin-user-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-color); }
.admin-user-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.admin-user-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.admin-user-name { font-weight: 700; font-size: 14px; }
.admin-user-handle { font-size: 13px; color: var(--text-muted); }
.admin-user-date { font-size: 12px; color: var(--text-muted); }
.admin-user-actions { display: flex; align-items: center; gap: 8px; }
.admin-role-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.admin-role-badge.admin { background: rgba(244,33,46,0.12); color: #f4212e; }
.admin-role-badge.user { background: var(--input-bg); color: var(--text-muted); border: 1px solid var(--border-color); }
.admin-btn-sm { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; border: 1px solid var(--border-color); background: transparent; color: var(--text-muted); transition: background 0.15s; }
.admin-btn-sm:hover { background: var(--card-hover); }
.admin-tab-panel { display: none; }
.admin-tab-panel.active { display: block; }

/* ---- POLL VOTING ---- */
.poll-options-area { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.poll-option-bar {
    position: relative; padding: 10px 14px; border-radius: 8px;
    border: 1px solid var(--border-color); cursor: pointer;
    overflow: hidden; transition: border-color 0.15s;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 14px; min-height: 42px;
}
.poll-option-bar:hover { border-color: var(--primary-color); }
.poll-option-bar.voted { border-color: var(--primary-color); cursor: default; }
.poll-option-bar.voted.winner { border-color: var(--primary-color); }
.poll-bar-fill {
    position: absolute; left: 0; top: 0; bottom: 0;
    background: rgba(14, 135, 216, 0.15); border-radius: 7px;
    transition: width 0.5s ease;
    z-index: 0;
}
.poll-option-bar.winner .poll-bar-fill { background: rgba(14, 135, 216, 0.25); }
.poll-option-text { position: relative; z-index: 1; font-weight: 500; }
.poll-option-pct { position: relative; z-index: 1; font-size: 13px; font-weight: 700; color: var(--text-muted); }
.poll-meta { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* ---- THREAD NAV BAR FLEX (Untuk Notif mark-all btn) ---- */
.thread-nav-bar { display: flex; align-items: center; }

/* ---- WELCOME / EMPTY STATES ---- */
.welcome-container { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.welcome-container h3 { font-size: 20px; font-weight: 800; color: var(--text-main); margin-bottom: 8px; }
.welcome-container p { font-size: 15px; line-height: 1.5; max-width: 320px; margin: 0 auto; }

/* ---- BLOCK / MUTE TOAST ---- */
.feature-toast {
    position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
    background: var(--text-main); color: var(--bg-body); padding: 10px 24px;
    border-radius: 999px; font-size: 14px; font-weight: 600;
    z-index: 99999; opacity: 0; pointer-events: none;
    transition: opacity 0.3s; white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.feature-toast.show { opacity: 1; }

/* ============================================================
   LIGHT MODE OVERRIDES
   ============================================================ */

/* Notifikasi - light mode */
body.light-mode .notif-item:hover { background: var(--card-hover); }

/* Modal backgrounds - light mode auto via CSS vars */
body.light-mode .edit-profile-panel,
body.light-mode .report-panel { box-shadow: 0 8px 32px rgba(0,0,0,0.15); }

/* Admin stat cards - light mode */
body.light-mode .admin-stat-card { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
body.light-mode .admin-report-item:hover { background: var(--card-hover); }

/* Follow tabs - light mode */
body.light-mode .followers-tab:hover { background: var(--card-hover); }

/* Chat bubbles - light mode */
body.light-mode .chat-bubble.theirs { background: var(--input-bg); }

/* Report modal options - light mode */
body.light-mode .report-opt:hover { background: var(--card-hover); }

/* DM search - light mode */
body.light-mode .dm-search-results { box-shadow: 0 8px 24px rgba(0,0,0,0.12); }

/* ============================================================
   POLL ENHANCEMENTS
   ============================================================ */
body.light-mode .poll-bar-fill { background: rgba(14, 135, 216, 0.12); }
body.light-mode .poll-option-bar.winner .poll-bar-fill { background: rgba(14, 135, 216, 0.2); }

/* Sticky header chat agar tidak tumpang tindih saat scroll */
.chat-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg-body);
    border-bottom: 1px solid var(--border-color);
}

/* ============================================================
   RESPONSIVE: Mobile messages
   ============================================================ */
/* ============================================================
   RESPONSIVE: Mobile messages (semua layar mobile dengan header)
   ============================================================ */
@media (max-width: 1265px) {
    #messages-container {
        flex-direction: row;
        position: fixed;
        top: 50px;
        left: 0;
        right: 0;
        bottom: 60px; /* tinggi mobile nav dock */
        overflow: hidden;
        height: auto;
        min-height: unset;
        z-index: 50;
        background: var(--bg-body);
    }

    /* Sidebar: tampil penuh */
    .messages-sidebar {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        border-right: none;
        border-bottom: none;
        max-height: none;
        z-index: 5;
        background: var(--bg-body);
        transform: translateX(0);
        transition: transform 0.25s ease;
        overflow-y: auto;
    }
    .messages-sidebar.mobile-hidden {
        transform: translateX(-100%);
        pointer-events: none;
    }

    /* Chat area: tampil penuh, slide dari kanan */
    .messages-chat-area {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        min-height: unset;
        max-height: unset;
        z-index: 4;
        background: var(--bg-body);
        transform: translateX(100%);
        transition: transform 0.25s ease;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    .messages-chat-area.mobile-visible {
        transform: translateX(0);
        z-index: 6;
    }

    /* Chat content di mobile harus mengisi sisa tinggi */
    #chat-content {
        height: 100% !important;
        max-height: 100% !important;
    }

    .edit-profile-panel { border-radius: 0; max-height: 100vh; }
    .admin-stats-grid, .admin-stat-grid { grid-template-columns: repeat(2, 1fr); margin: 12px; }
}

@media (max-width: 700px) {
    .admin-stats-grid, .admin-stat-grid { grid-template-columns: repeat(2, 1fr); margin: 12px; }
}

@media (max-width: 480px) {
    .admin-stats-grid, .admin-stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px; }
    .chat-bubble { max-width: 85%; }
}

.thread-nav-bar {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

/* Khusus mobile */
@media (max-width: 768px) {
    .thread-nav-bar {
        padding: 16px 16px 8px 16px;
    }
}

/* ============================================================
   FEATURE MODAL BASE (repost, dm-share, dll)
   ============================================================ */
.feature-modal {
    display: none; position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.6); align-items: flex-end; justify-content: center;
}
.feature-modal.active { display: flex; }
.feature-modal-box {
    background: var(--modal-bg); border-radius: 16px 16px 0 0; width: 100%;
    max-width: 480px; overflow: hidden; padding: 8px 0 24px;
    animation: slideUp 0.2s ease;
}
@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.feature-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; border-bottom: 1px solid var(--border-color);
}
.feature-modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close-btn { background: none; border: none; cursor: pointer; color: var(--text-main); font-size: 18px; display: flex; align-items: center; padding: 4px; border-radius: 50%; transition: background 0.15s; }
.modal-close-btn:hover { background: var(--card-hover); }

/* Repost modal */
.repost-modal-box { border-radius: 16px; max-width: 340px; padding: 8px 0 8px; }
.repost-opt {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 20px; cursor: pointer; font-size: 16px; font-weight: 600;
    transition: background 0.15s;
}
.repost-opt:hover { background: var(--card-hover); }
.repost-opt i { font-size: 20px; }

/* DM Share modal wider */
#dm-share-modal .feature-modal-box { border-radius: 16px 16px 0 0; }

/* ============================================================
   QUOTE CARD - kartu preview post yang dikutip
   ============================================================ */
.quote-card {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 12px 14px;
    margin-top: 10px;
    cursor: pointer;
    transition: background 0.15s;
    overflow: hidden;
}
.quote-card:hover { background: var(--card-hover); }

.quote-card-preview {
    margin: 10px 0 0 0;
    cursor: default;
}
.quote-card-preview:hover { background: transparent; }

.quote-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    flex-wrap: nowrap;
    overflow: hidden;
}
.quote-card-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.quote-card-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}
.quote-card-badge { font-size: 13px; flex-shrink: 0; }
.quote-card-handle {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.quote-card-content {
    font-size: 14px;
    color: var(--text-main);
    line-height: 1.5;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.quote-card-image {
    margin-top: 8px;
    border-radius: 10px;
    overflow: hidden;
    max-height: 220px;
}
.quote-card-image img {
    width: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}
body.light-mode .quote-card { border-color: var(--border-color); }

/* ============================================================
   RIGHTBAR GUEST (untuk pengguna yang belum login)
   ============================================================ */
.rightbar-guest-box {
    background: var(--modal-bg); border: 1px solid var(--border-color);
    border-radius: 16px; padding: 24px 20px; margin: 16px 0;
}
.rightbar-guest-box h3 { font-size: 24px; font-weight: 800; color: var(--text-main); margin-bottom: 8px; }
.rightbar-guest-box p { font-size: 14px; color: var(--text-muted); margin-bottom: 10px; line-height: 1.5; }
.rightbar-guest-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 10px 20px; border-radius: 999px; font-size: 15px;
    font-weight: 700; cursor: pointer; border: 1px solid var(--border-color);
    transition: opacity 0.15s, background 0.15s; margin-bottom: 10px; text-decoration: none;
}
.rightbar-guest-btn.btn-google { background: var(--bg-body); color: var(--text-main); }
.rightbar-guest-btn.btn-create { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.rightbar-guest-btn.btn-login  { background: transparent; color: var(--text-main); border-color: var(--border-color); }
.rightbar-guest-btn:hover { opacity: 0.85; }
.rightbar-guest-terms { font-size: 12px; color: var(--text-muted); margin-top: 16px; line-height: 1.6; }
.rightbar-guest-terms a { color: var(--primary-color); text-decoration: none; }
.rightbar-guest-terms a:hover { text-decoration: underline; }

/* ============================================================
   ADMIN PANEL BARU: SEO, Logo, Email, Premium, Badge, Ads
   ============================================================ */
.admin-setting-section { padding: 20px 16px; border-bottom: 1px solid var(--border-color); }
.admin-setting-section h4 { font-size: 16px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.admin-setting-section h4 i { color: var(--primary-color); }
.admin-form-group { margin-bottom: 14px; }
.admin-form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.admin-form-input {
    width: 100%; padding: 10px 14px; border-radius: 8px;
    border: 1px solid var(--border-color); background: var(--input-bg);
    color: var(--text-main); font-size: 14px; outline: none;
    transition: border-color 0.2s;
}
.admin-form-input:focus { border-color: var(--primary-color); }
.admin-form-input[type="color"] { padding: 4px 8px; height: 40px; cursor: pointer; }
.admin-save-btn {
    background: var(--primary-color); color: #fff; border: none;
    border-radius: 999px; padding: 10px 28px; font-size: 14px;
    font-weight: 700; cursor: pointer; transition: opacity 0.15s;
}
.admin-save-btn:hover { opacity: 0.85; }
.admin-img-preview { width: 80px; height: 80px; object-fit: contain; border-radius: 8px; border: 1px solid var(--border-color); margin-top: 8px; background: var(--input-bg); display: block; }
.admin-logo-preview-area { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.admin-logo-preview-item { text-align: center; font-size: 12px; color: var(--text-muted); }
.admin-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.admin-toggle { position: relative; width: 44px; height: 24px; }
.admin-toggle input { opacity: 0; width: 0; height: 0; }
.admin-toggle-slider { position: absolute; cursor: pointer; inset: 0; background: var(--border-color); border-radius: 999px; transition: background 0.2s; }
.admin-toggle-slider::before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: transform 0.2s; }
.admin-toggle input:checked + .admin-toggle-slider { background: var(--primary-color); }
.admin-toggle input:checked + .admin-toggle-slider::before { transform: translateX(20px); }
.admin-badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
.admin-badge-card { background: var(--input-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 14px; }
.admin-badge-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.admin-badge-icon { font-size: 24px; }
.admin-badge-name { font-weight: 700; font-size: 15px; }

/* ---- ADMIN BANK CARD (redesigned) ---- */
.admin-bank-card {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.admin-bank-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
.bank-card-active { border-color: rgba(0, 186, 124, 0.35); }
.bank-card-inactive { opacity: 0.65; }
.admin-bank-card-header {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--border-color);
}
.admin-bank-card-icon {
    width: 38px; height: 38px; border-radius: 10px;
    background: rgba(0, 186, 124, 0.12);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #00ba7c; flex-shrink: 0;
}
.admin-bank-card-name { font-weight: 700; font-size: 14px; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-bank-card-currency { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.admin-bank-card-status {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 700; padding: 3px 8px;
    border-radius: 999px; flex-shrink: 0;
}
.bstatus-on  { background: rgba(0,186,124,0.12); color: #00ba7c; }
.bstatus-off { background: rgba(var(--text-muted-rgb,130,130,130),0.1); color: var(--text-muted); }
.admin-bank-card-body { padding: 12px 16px; display: flex; flex-direction: column; gap: 7px; }
.admin-bank-card-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.admin-bank-card-label { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.admin-bank-card-value { font-size: 13px; font-weight: 600; color: var(--text-main); text-align: right; word-break: break-all; }
.admin-bank-card-actions {
    display: flex; gap: 0;
    border-top: 1px solid var(--border-color);
}
.admin-bank-btn-edit, .admin-bank-btn-delete {
    flex: 1; padding: 9px 0; font-size: 13px; font-weight: 600;
    border: none; cursor: pointer; transition: background 0.15s;
    display: flex; align-items: center; justify-content: center; gap: 5px;
}
.admin-bank-btn-edit { background: transparent; color: var(--primary-color); border-right: 1px solid var(--border-color); }
.admin-bank-btn-edit:hover { background: rgba(14,135,216,0.08); }
.admin-bank-btn-delete { background: transparent; color: #f91880; }
.admin-bank-btn-delete:hover { background: rgba(249,24,128,0.08); }
.admin-bank-empty { text-align: center; padding: 32px 16px; color: var(--text-muted); font-size: 14px; }
.admin-bank-empty p { margin: 0; }

/* ---- ADMIN PREMIUM GATEWAY CARDS ---- */
.admin-premium-gw-card {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px 14px;
    display: flex; flex-direction: column; align-items: center;
    text-align: center; gap: 0;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.admin-premium-gw-card.gw-active { border-color: rgba(0,186,124,0.3); }
.admin-premium-gw-card.gw-inactive { opacity: 0.5; }
.admin-premium-gw-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.admin-premium-gw-status {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 700; padding: 3px 9px;
    border-radius: 999px; margin-top: 8px;
}
.status-on  { background: rgba(0,186,124,0.12); color: #00ba7c; }
.status-off { background: rgba(130,130,130,0.1); color: var(--text-muted); }

/* ---- ADMIN BADGE CARDS (redesigned) ---- */
.admin-badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 14px; }
.admin-badge-new-card {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px; overflow: hidden;
    transition: box-shadow 0.2s;
}
.admin-badge-new-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.14); }
.admin-badge-new-header { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px; border-bottom: 1px solid var(--border-color); }
.admin-badge-new-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.admin-badge-new-name { font-weight: 700; font-size: 14px; color: var(--text-main); }
.admin-badge-new-price { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.admin-badge-new-swatch { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; border: 2px solid rgba(255,255,255,0.15); }
.admin-badge-new-actions { display: flex; border-top: 1px solid var(--border-color); }
.admin-badge-new-actions .admin-bank-btn-edit,
.admin-badge-new-actions .admin-bank-btn-delete { flex: 1; padding: 8px 0; }

/* ---- PREMIUM BADGES SECTION ---- */
.premium-badges-section { padding: 24px 16px 8px; }
.premium-badges-sub { font-size: 14px; color: var(--text-muted); margin: 4px 0 18px; }
.premium-badges-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 12px; }
.premium-badge-item {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    background: var(--card-bg); border: 1px solid var(--border-color);
    border-radius: 16px; padding: 18px 12px 14px; gap: 8px;
    transition: box-shadow 0.2s, transform 0.2s;
}
.premium-badge-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.15); transform: translateY(-2px); }
.premium-badge-icon-wrap { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.premium-badge-item-name { font-weight: 700; font-size: 14px; color: var(--text-main); }
.premium-badge-item-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.premium-badge-item-price { font-size: 13px; font-weight: 700; color: var(--primary-color); margin-top: 2px; }
.premium-badge-order-btn {
    margin-top: 4px; width: 100%; padding: 7px 0;
    background: transparent; border: 1.5px solid; border-radius: 999px;
    font-size: 12px; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 5px;
    transition: background 0.15s, opacity 0.15s;
}
.premium-badge-order-btn:hover { opacity: 0.75; }
.premium-badge-included-tag {
    margin-top: 4px; padding: 4px 12px; border-radius: 999px;
    font-size: 11px; font-weight: 700;
    display: inline-flex; align-items: center; gap: 4px;
}

/* ---- ADMIN TRANSFER APPROVAL ---- */
.admin-transfer-approval-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
}

.admin-badge-new-actions {
    position: relative;
    z-index: 2;
}
.admin-badge-new-actions .admin-bank-btn-edit,
.admin-badge-new-actions .admin-bank-btn-delete {
    position: relative;
    z-index: 2;
    pointer-events: auto !important;
}

/* ============================================================
   UI REFINEMENT — Perbaikan tampilan menyeluruh
   Fokus: spacing konsisten, transisi halus, tipografi rapi,
   komponen lebih polish tanpa mengubah warna/tema.
   ============================================================ */

/* --- Tipografi global lebih rapi --- */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    letter-spacing: -0.01em;
}

/* --- Post: hover lebih halus --- */
.post {
    transition: background-color 0.15s ease;
}
html[data-theme="dark"] .post:hover,
body:not(.light-mode) .post:hover {
    background-color: rgba(255,255,255,0.03);
}
html[data-theme="light"] .post:hover,
body.light-mode .post:hover {
    background-color: rgba(0,0,0,0.025);
}

/* --- Post nama: lebih rapi wrap --- */
.post-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;
}
.post-meta {
    gap: 6px;
}

/* --- Post content: spasi baris lebih nyaman --- */
.post-content {
    line-height: 1.55;
    letter-spacing: 0;
}

/* --- Post image: rounded lebih konsisten --- */
.post-image {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-top: 12px;
}
.post-image img {
    transition: opacity 0.2s;
}

/* --- Action buttons: padding dan hover lebih halus --- */
.action-item i {
    transition: background-color 0.15s ease, color 0.15s ease;
}

/* --- Composer: padding sedikit lebih longgar --- */
.composer {
    padding: 14px 16px 12px;
    gap: 0;
}
.composer-input {
    font-size: 18px;
    line-height: 1.5;
    padding-top: 8px;
}
.composer-tools {
    padding-top: 10px;
    margin-top: 2px;
}

/* --- Tool buttons: ukuran dan spacing konsisten --- */
.tool-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 17px;
    transition: background-color 0.15s ease;
    flex-shrink: 0;
}
.tool-icons {
    gap: 2px;
}

/* --- Post button: transisi lebih smooth --- */
.post-btn-small {
    transition: opacity 0.2s ease, background-color 0.2s ease;
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 14px;
    letter-spacing: 0.01em;
}

/* --- Tab bar: indicator lebih rapi --- */
.tab-item {
    font-size: 15px;
    transition: background-color 0.15s ease;
    letter-spacing: -0.01em;
}
.tab-indicator {
    height: 3px;
    border-radius: 3px;
    width: 48px;
    bottom: 0;
}

/* --- Timeline header: backdrop blur lebih bersih --- */
.timeline-header {
    border-bottom: 1px solid var(--border-color);
}

/* --- Sidebar nav item: transisi halus --- */
.nav-item {
    transition: background-color 0.12s ease;
    border-radius: 999px;
}

/* --- Widget box: border lebih subtle --- */
.widget-box {
    border-radius: 16px;
    overflow: hidden;
}
.widget-header {
    font-size: 19px;
    margin-bottom: 14px;
}

/* --- Trending: hover lebih halus --- */
.trend-item {
    border-radius: 8px;
    padding: 12px 4px;
    transition: background-color 0.12s ease;
}
.trend-item:hover {
    background-color: var(--card-hover);
}
.trend-title {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

/* --- Follow/connect cards: spacing konsisten --- */
.connect-item,
.trending-connect-item {
    padding: 10px 12px;
    border-radius: 8px;
    transition: background-color 0.12s ease;
}

/* --- Notifikasi: unread indicator lebih jelas --- */
.notif-item {
    padding: 14px 16px;
    transition: background-color 0.12s ease;
    border-radius: 0;
}
.notif-unread {
    border-left: 3px solid var(--primary-color);
    padding-left: 13px;
}

/* --- DM / Messages: bubble lebih rapi --- */
.chat-bubble {
    border-radius: 18px;
    padding: 10px 14px;
    line-height: 1.5;
    font-size: 14px;
    max-width: 80%;
}
.chat-bubble.mine {
    border-bottom-right-radius: 5px;
}
.chat-bubble.theirs {
    border-bottom-left-radius: 5px;
}
.chat-input-area {
    padding: 10px 14px;
    gap: 8px;
}
.chat-input-area input#chat-input {
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 14px;
    transition: border-color 0.15s ease;
}

/* --- Modal overlay: backdrop lebih gelap & blur --- */
.comment-modal-overlay,
.feature-modal {
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
html[data-theme="light"] .comment-modal-overlay,
html[data-theme="light"] .feature-modal,
body.light-mode .comment-modal-overlay,
body.light-mode .feature-modal {
    background: rgba(0, 0, 0, 0.45);
}

/* --- Comment modal container: shadow lebih baik --- */
.comment-modal-container {
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.35);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

/* --- Post menu dropdown: shadow & radius lebih polish --- */
.post-menu-dropdown,
.share-dropdown {
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.28);
    border: 1px solid var(--border-color);
    overflow: hidden;
}
.post-menu-opt {
    padding: 13px 16px;
    font-size: 15px;
    transition: background-color 0.12s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}
.post-menu-opt i {
    font-size: 17px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}
.share-opt {
    padding: 13px 16px;
    font-size: 15px;
    transition: background-color 0.12s ease;
    gap: 12px;
}
.share-opt i {
    font-size: 17px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* --- Feature toast: lebih modern --- */
.feature-toast {
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    letter-spacing: 0.01em;
}

/* --- Image preview di composer: rounded lebih konsisten --- */
.composer-image-preview,
.composer-gif-preview,
.composer-video-preview {
    border-radius: 14px;
    overflow: hidden;
    margin-top: 10px;
    border: 1px solid var(--border-color);
}
.composer-preview-remove {
    background: rgba(0,0,0,0.65);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.composer-preview-remove:hover {
    background: rgba(0,0,0,0.85);
}

/* --- Badge popover: bayangan lebih halus --- */
.badge-popover {
    border-radius: 18px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.22);
}

/* --- Scrollbar: lebih tipis dan halus --- */
::-webkit-scrollbar {
    width: var(--scroll-w, 6px);
}
::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 99px;
    border: 2px solid transparent;
    background-clip: content-box;
    transition: background-color 0.2s;
}
::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-muted);
    background-clip: content-box;
}

/* --- Quote card: lebih rapi --- */
.quote-card {
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-top: 10px;
    overflow: hidden;
    transition: background-color 0.15s;
}
.quote-card:hover {
    background-color: var(--card-hover);
}

/* --- Profile edit modal input: focus state lebih jelas --- */
.edit-profile-input,
.edit-profile-textarea {
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.edit-profile-input:focus,
.edit-profile-textarea:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 2px rgba(14, 135, 216, 0.12);
    outline: none;
}

/* --- Auth halaman: tombol & input lebih rapi --- */
.auth-btn {
    transition: opacity 0.2s ease, transform 0.1s ease;
    letter-spacing: 0.01em;
}
.auth-btn:active {
    transform: scale(0.98);
}
.auth-input {
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(14, 135, 216, 0.12);
}

/* --- Clipboard paste indicator di textarea --- */
.composer-input:focus,
#composer-textarea:focus,
#compose-modal-textarea:focus,
#comment-modal-textarea:focus {
    outline: none;
    caret-color: var(--primary-color);
}

/* --- Spinner: lebih kecil dan smooth --- */
.spinner {
    border-width: 2px;
    animation-timing-function: cubic-bezier(0.5, 0, 0.5, 1);
}

/* --- Link preview: transisi hover --- */
.link-preview-card {
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.link-preview-card:hover {
    border-color: var(--text-muted);
}

/* --- Mobile: perbaikan spacing umum --- */
@media (max-width: 700px) {
    .post {
        padding: 12px 14px;
    }
    .post-avatar {
        width: 38px;
        height: 38px;
    }
    .post-content {
        font-size: 15px;
    }
    .widget-box {
        border-radius: 12px;
        margin-bottom: 12px;
    }
    .feature-toast {
        bottom: 72px;
        left: 14px;
        right: 14px;
        text-align: center;
    }
}

/* ============================================================
   STATUS LIGHTBOX — Hanya digunakan di halaman status/thread
   ============================================================ */
.status-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.92);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: lightboxFadeIn 0.18s ease;
}
.status-lightbox.active {
    display: flex;
}
@keyframes lightboxFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Thumbnail strip di atas */
.lightbox-thumbs {
    display: flex;
    gap: 6px;
    padding: 10px 16px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    justify-content: center;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 100%);
    z-index: 2;
}
.lightbox-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.55;
    transition: opacity 0.15s, border-color 0.15s;
    flex-shrink: 0;
}
.lightbox-thumb.active,
.lightbox-thumb:hover {
    opacity: 1;
    border-color: #fff;
}

/* Tombol tutup */
.lightbox-close {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 3;
    background: rgba(0,0,0,0.55);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.15s;
}
.lightbox-close:hover {
    background: rgba(255,255,255,0.18);
}

/* Tombol panah navigasi */
.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background: rgba(0,0,0,0.45);
    border: 1.5px solid rgba(255,255,255,0.25);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: background 0.15s, border-color 0.15s;
}
.lightbox-arrow:hover {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.6);
}
.lightbox-prev { left: 14px; }
.lightbox-next { right: 14px; }
.lightbox-arrow.hidden { display: none; }

/* Area gambar utama */
.lightbox-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 72px 56px;
    width: 100%;
    max-height: 100vh;
}
.lightbox-main img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    display: block;
    user-select: none;
    animation: lightboxImgIn 0.15s ease;
}
@keyframes lightboxImgIn {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
}

/* Counter posisi bawah */
.lightbox-counter {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.75);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    pointer-events: none;
    z-index: 2;
}

/* Mobile: panah lebih kecil, padding lebih tipis */
@media (max-width: 600px) {
    .lightbox-main {
        padding: 72px 52px 48px;
    }
    .lightbox-arrow {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    .lightbox-prev { left: 6px; }
    .lightbox-next { right: 6px; }
    .lightbox-thumbs {
        padding: 8px 10px;
    }
    .lightbox-thumb {
        width: 38px;
        height: 38px;
    }
}