/* =====================================================================
   communities.css — Halaman Komunitas
   Menggunakan CSS variables dari style.css:
     --bg-body, --text-main, --text-muted, --border-color,
     --input-bg, --modal-bg, --card-hover, --primary-color
   ===================================================================== */

/* ---- Wrapper utama ---- */
.community-wrapper {
    width: 100%;
    min-height: 100vh;
}

/* ---- Topbar ---- */
.community-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 53px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg-body);
}

.comm-topbar-title h2,
.comm-topbar-info h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    line-height: 1.2;
}

.comm-topbar-info span {
    font-size: 13px;
    color: var(--text-muted);
}

.comm-topbar-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

/* ---- Tombol icon bulat ---- */
.comm-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.15s;
    flex-shrink: 0;
}
.comm-icon-btn:hover { background: var(--card-hover); }

/* ---- Search bar ---- */
.comm-search-bar {
    padding: 8px 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-body);
}
.comm-search-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--input-bg);
    border-radius: 24px;
    padding: 8px 16px;
    border: 1px solid transparent;
    transition: border-color 0.2s;
}
.comm-search-inner:focus-within {
    border-color: var(--primary-color);
    background: var(--bg-body);
}
.comm-search-inner i { color: var(--text-muted); font-size: 15px; }
.comm-search-inner input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-main);
    font-size: 15px;
    width: 100%;
}
.comm-search-inner input::placeholder { color: var(--text-muted); }

/* ---- Sub navigasi ---- */
.comm-subnav {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}
.comm-subnav-item {
    flex: 1;
    text-align: center;
    padding: 14px 0 12px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: color 0.15s, background 0.15s;
    user-select: none;
}
.comm-subnav-item:hover { color: var(--text-main); background: var(--card-hover); }
.comm-subnav-item.active { color: var(--text-main); font-weight: 700; }
.comm-subnav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 3px;
    border-radius: 3px;
    background: var(--primary-color);
}

/* ---- Filter Kategori ---- */
.comm-category-bar {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-body);
}
.comm-category-bar::-webkit-scrollbar { display: none; }
.comm-cat-chip {
    flex-shrink: 0;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    line-height: 1.4;
}
.comm-cat-chip:hover { background: var(--card-hover); }
.comm-cat-chip.active {
    background: var(--text-main);
    color: var(--bg-body);
    border-color: var(--text-main);
}

/* ---- Kartu Komunitas ---- */
.comm-list { display: flex; flex-direction: column; }

.comm-card {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.15s;
    background: var(--bg-body);
}
.comm-card:hover { background: var(--card-hover); }

/* Cover */
.comm-card-cover {
    width: 100%;
    height: 88px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.comm-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.comm-card-cover-bg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: rgba(255,255,255,0.7);
}

.comm-joined-badge {
    position: absolute;
    top: 8px;
    right: 10px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 3px;
    backdrop-filter: blur(4px);
}

/* Body kartu */
.comm-card-body {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 0 14px 14px;
    background: var(--bg-body);
    position: relative;
    z-index: 1;
}

/* Avatar komunitas — solid, tidak transparan */
.comm-card-avatar {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid var(--border-community);
    margin-top: -30px;
    background: var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
    position: relative;
    z-index: 2;
}
.comm-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: var(--bg-body);
}

.comm-card-info { flex: 1; min-width: 0; padding-top: 36px; }

.comm-card-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.comm-card-meta {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 3px;
}

.comm-cat-badge-sm {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.comm-card-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.45;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.comm-card-action {
    flex-shrink: 0;
    padding-top: 10px;
}

/* ---- Tombol Gabung / Joined ---- */
.comm-join-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: 1.5px solid var(--text-main);
    background: var(--text-main);
    color: var(--bg-body);
    transition: opacity 0.15s, border-color 0.15s, color 0.15s, background 0.15s;
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
    min-width: 68px;
}
.comm-join-btn:hover { opacity: 0.85; }
.comm-join-btn.joined {
    background: transparent;
    color: var(--text-main);
    border-color: var(--border-color);
}
.comm-join-btn.joined:hover {
    border-color: #f4212e;
    color: #f4212e;
    background: rgba(244,33,46,0.07);
}
.comm-join-btn:disabled { opacity: 0.6; cursor: default; }

/* Spinner di dalam tombol */
.comm-btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: commSpin 0.7s linear infinite;
}
@keyframes commSpin { to { transform: rotate(360deg); } }

/* ---- Pemisah ---- */
.comm-dot { color: var(--text-muted); }

/* ---- Empty state ---- */
.comm-empty-state {
    text-align: center;
    padding: 64px 20px;
    color: var(--text-muted);
}
.comm-empty-state i { font-size: 44px; display: block; margin-bottom: 14px; opacity: 0.4; }
.comm-empty-state p { font-size: 15px; margin-bottom: 16px; line-height: 1.5; }

/* ====================================================
   HALAMAN DETAIL KOMUNITAS — Tampilan baru (gambar-2)
   ==================================================== */

/* Cover besar */
.comm-detail-cover-v2 {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}
.comm-detail-cover-v2 img { width: 100%; height: 100%; object-fit: cover; display: block; }
.comm-cover-bg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: rgba(255,255,255,0.55);
}

/* Tombol edit cover */
.comm-cover-edit-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.15s;
}
.comm-cover-edit-btn:hover { background: rgba(0,0,0,0.75); }

/* Nama komunitas tampil setelah action-row */
.comm-detail-name-over {
    padding: 6px 16px 4px;
    background: var(--bg-body);
}
.comm-detail-name-over h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 2px;
    line-height: 1.2;
}
.comm-website-link {
    font-size: 13px;
    color: var(--primary-color);
    text-decoration: none;
    display: block;
    margin-top: 2px;
}
.comm-website-link:hover { text-decoration: underline; }

/* Baris: avatar floating + member count + tombol-tombol */
.comm-detail-action-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px 12px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-body);
    flex-wrap: wrap;
}

/* Avatar V2 — floating di atas cover */
.comm-detail-avatar-v2 {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: visible;
    border: 3px solid var(--bg-body);
    margin-top: -42px;
    background: var(--input-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px var(--border-color);
    position: relative;
    z-index: 2;
}
.comm-detail-avatar-v2 > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* Tombol edit avatar */
.comm-avatar-edit-btn {
    position: absolute;
    bottom: -2px;
    right: -4px;
    background: var(--input-bg);
    color: var(--text-main);
    border: 1.5px solid var(--border-color);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    transition: background 0.15s;
}
.comm-avatar-edit-btn:hover { background: var(--card-hover); }

/* Jumlah anggota */
.comm-members-count {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: var(--text-muted);
    white-space: nowrap;
}
.comm-members-count strong {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
}

/* Avatar berjejer (overlapping) seperti referensi */
.comm-members-avatars {
    display: flex;
    align-items: center;
    flex-direction: row;
}
.comm-members-avatars img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bg-body);
    margin-left: -8px;
    flex-shrink: 0;
}
.comm-members-avatars img:first-child {
    margin-left: 0;
}

/* Tombol-tombol aksi */
.comm-action-btns {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    flex-wrap: nowrap;
}

/* Form posting komunitas */
.comm-compose-box {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-body);
}
.comm-compose-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.comm-compose-right { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.comm-compose-textarea {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 12px;
    color: var(--text-main);
    font-size: 15px;
    font-family: inherit;
    resize: none;
    outline: none;
    width: 100%;
    min-height: 40px;
    max-height: 40px;
    line-height: 1.4;
    overflow: hidden;
    transition: border-color 0.2s, background 0.2s, max-height 0.2s;
}
.comm-compose-textarea:focus {
    max-height: 120px;
    overflow: auto;
}
.comm-compose-textarea:focus { border-color: var(--primary-color); background: var(--bg-body); }
.comm-compose-textarea::placeholder { color: var(--text-muted); }
.comm-compose-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}
.comm-char-count { font-size: 12px; color: var(--text-muted); }
.comm-post-btn {
    padding: 6px 18px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s;
}
.comm-post-btn:hover { opacity: 0.85; }
.comm-post-btn:disabled { opacity: 0.5; cursor: default; }

/* Tombol upload gambar di compose */
.comm-img-upload-label {
    cursor: pointer;
    color: var(--primary-color);
    font-size: 18px;
    display: flex;
    align-items: center;
    padding: 4px 6px;
    border-radius: 50%;
    transition: background 0.15s;
    margin-right: auto;
}
.comm-img-upload-label:hover { background: var(--card-hover); }

/* Preview gambar di compose */
#comm-post-img-preview img {
    max-width: 100%;
    max-height: 160px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    object-fit: cover;
}
.comm-post-delete-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 13px;
    margin-left: auto;
    transition: color 0.15s, background 0.15s;
}
.comm-post-delete-btn:hover { color: #f4212e; background: rgba(244,33,46,0.08); }

/* Loading */
.comm-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

/* Media grid */
.comm-media-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    padding: 2px;
}

/* Loader di dalam media grid — tengah */
.comm-media-grid > .comm-loading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}
.comm-media-grid > .comm-empty-state {
    grid-column: 1 / -1;
}
.comm-media-item {
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    background: var(--input-bg);
}
.comm-media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.15s;
}
.comm-media-item:hover img { opacity: 0.85; }

/* Tentang — tambahan */
.comm-about-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.comm-about-row a { color: var(--primary-color); text-decoration: none; }
.comm-about-row a:hover { text-decoration: underline; }
.comm-about-rules { margin-top: 16px; }
.comm-about-rules h5 { font-size: 14px; font-weight: 700; color: var(--text-main); margin: 0 0 6px; }
.comm-about-rules p  { font-size: 13px; color: var(--text-muted); line-height: 1.55; }

/* Modal kecil */
.comm-modal-sm { max-width: 360px; }
.comm-img-preview { margin-top: 8px; }
.comm-img-preview-wide { min-height: 80px; }

/* Warisan detail lama — tetap ada untuk kompatibilitas */
.comm-detail-desc { font-size: 14px; color: var(--text-muted); margin-top: 8px; line-height: 1.55; }
.comm-cat-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 10px; font-size: 12px; font-weight: 600; }

/* ---- Tab detail ---- */
.comm-detail-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-body);
    position: sticky;
    top: 53px;
    z-index: 30;
}
.comm-detail-tab {
    flex: 1;
    text-align: center;
    padding: 14px 0 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: color 0.15s, background 0.15s;
    user-select: none;
}
.comm-detail-tab:hover { background: var(--card-hover); color: var(--text-main); }
.comm-detail-tab.active { color: var(--text-main); font-weight: 700; }
.comm-detail-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 40px; height: 3px;
    border-radius: 3px;
    background: var(--primary-color);
}

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

/* ---- Post dalam komunitas ---- */
.comm-post-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.15s;
}
.comm-post-item:hover { background: var(--card-hover); }

.comm-post-label {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
    font-weight: 600;
}

.comm-post-body { display: flex; gap: 10px; }
.comm-post-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comm-post-content { flex: 1; min-width: 0; }

.comm-post-author {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 4px;
    font-size: 14px;
}
.comm-post-name { font-weight: 700; color: var(--text-main); }
.comm-post-handle, .comm-post-dot, .comm-post-time { color: var(--text-muted); font-size: 13px; }
.comm-post-more {
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; padding: 2px 4px; border-radius: 50%;
    font-size: 14px; margin-left: auto; transition: background 0.15s, color 0.15s;
}
.comm-post-more:hover { background: var(--card-hover); color: var(--primary-color); }
.comm-post-text { font-size: 15px; color: var(--text-main); line-height: 1.5; margin-bottom: 8px; word-break: break-word; }
.comm-post-img {
    margin-top: 8px;
    margin-bottom: 8px;
}
.comm-post-img img {
    display: block;
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    object-fit: cover;
    cursor: default;
}
.comm-post-stats { display: flex; gap: 18px; font-size: 13px; color: var(--text-muted); }
.comm-post-stats span { display: flex; align-items: center; gap: 4px; }

/* ---- Tombol aksi postingan komunitas (like, retweet, komentar) ---- */
.comm-post-actions {
    display: flex;
    gap: 4px;
    margin-top: 10px;
    align-items: center;
}
.comm-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 20px;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
    flex-shrink: 0;
}
.comm-action-btn:hover { background: var(--card-hover); }
.comm-action-btn i { font-size: 16px; }
.comm-action-count { font-size: 13px; }

/* Komentar hover biru */
.comm-action-comment:hover { color: #1D9BF0; background: #1d9bf015; }
/* Retweet hover hijau */
.comm-action-retweet:hover, .comm-action-retweet.active { color: #00BA7C; }
.comm-action-retweet.active { background: #00ba7c15; }
/* Like hover merah */
.comm-action-like:hover, .comm-action-like.active { color: #f4212e; }
.comm-action-like.active { background: #f4212e15; }
/* Views (tidak bisa diklik) */
.comm-action-views { cursor: default; }
.comm-action-views:hover { background: none; }

/* ---- Anggota ---- */
.comm-member-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}
.comm-member-item:hover { background: var(--card-hover); }
.comm-member-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comm-member-name { font-size: 15px; font-weight: 700; color: var(--text-main); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.comm-member-handle { font-size: 13px; color: var(--text-muted); }
.comm-role-badge { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 10px; }
.comm-role-badge.admin { background: rgba(29,155,240,0.15); color: #1D9BF0; }
.comm-role-badge.mod   { background: rgba(0,186,124,0.15);  color: #00ba7c; }

/* ---- Tentang ---- */
.comm-about-section { padding: 20px 16px; }
.comm-about-section h4 { font-size: 16px; font-weight: 700; color: var(--text-main); margin: 0 0 10px; }
.comm-about-section > p { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin: 0 0 20px; }
.comm-about-stats { display: flex; gap: 28px; margin-bottom: 16px; }
.comm-about-stat { display: flex; flex-direction: column; }
.comm-about-stat strong { font-size: 18px; font-weight: 700; color: var(--text-main); }
.comm-about-stat span { font-size: 13px; color: var(--text-muted); }
.comm-about-creator { font-size: 14px; color: var(--text-muted); }
.comm-about-creator a { color: var(--primary-color); text-decoration: none; font-weight: 600; }

/* ====================================================
   MODAL BUAT KOMUNITAS — mengikuti tema style.css
   ==================================================== */
.comm-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(2px);
}

.comm-modal {
    background: var(--modal-bg, var(--bg-body));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    position: relative;
    z-index: 100000;
    /* Pastikan tidak ada transparansi */
    opacity: 1;
}

.comm-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--modal-bg, var(--bg-body));
    z-index: 2;
    border-radius: 16px 16px 0 0;
}

.comm-modal-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    flex: 1;
    text-align: center;
}

.comm-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    font-size: 18px;
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.comm-modal-close:hover { background: var(--card-hover); }

.comm-modal-submit {
    padding: 6px 16px;
    background: var(--text-main);
    color: var(--bg-body);
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s;
    white-space: nowrap;
}
.comm-modal-submit:hover { opacity: 0.85; }
.comm-modal-submit:disabled { opacity: 0.5; cursor: default; }

.comm-modal-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--modal-bg, var(--bg-body));
}

.comm-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.comm-form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.comm-form-group input,
.comm-form-group select,
.comm-form-group textarea {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    resize: vertical;
    font-family: inherit;
}

.comm-form-group input:focus,
.comm-form-group select:focus,
.comm-form-group textarea:focus {
    border-color: var(--primary-color);
    background: var(--bg-body);
}

.comm-form-group input::placeholder,
.comm-form-group textarea::placeholder {
    color: var(--text-muted);
}

.comm-form-group select option {
    background: var(--modal-bg);
    color: var(--text-main);
}

.comm-form-group small {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ---- Toggle row privat ---- */
.comm-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.comm-toggle-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    display: block;
    margin-bottom: 3px;
}

/* Toggle switch */
.comm-toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}
.comm-toggle-switch input {
    opacity: 0; width: 0; height: 0; position: absolute;
}
.comm-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--border-color);
    border-radius: 24px;
    transition: background 0.2s;
}
.comm-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    left: 3px; top: 3px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.comm-toggle-switch input:checked + .comm-toggle-slider { background: var(--primary-color); }
.comm-toggle-switch input:checked + .comm-toggle-slider::before { transform: translateX(20px); }

/* ---- Responsif ---- */
@media (max-width: 600px) {
    .comm-category-bar { padding: 8px 12px; }
    .comm-card-cover { height: 72px; }
    .comm-detail-cover { height: 110px; }
    .comm-about-stats { gap: 16px; }
    .comm-modal { border-radius: 12px; }
    .community-topbar { padding: 0 12px; }
}