
/* ==========================================================================
   Delete Account Confirm modal
   ========================================================================== */
.dc-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 10002;
    display: none; align-items: center; justify-content: center;
}
.dc-card { background: #fff; border-radius: 16px; width: 360px; max-width: 92vw; padding: 28px 24px; text-align: center; }
.dc-icon {
    width: 52px; height: 52px; border-radius: 50%; background: #fef2f2;
    display: flex; align-items: center; justify-content: center; font-size: 24px; margin: 0 auto 16px;
}
.dc-title { font-size: 16px; font-weight: 700; color: #111827; margin-bottom: 10px; }
.dc-text { font-size: 13px; color: #6b7280; line-height: 1.6; margin-bottom: 22px; }
.dc-btns { display: flex; gap: 10px; }
.dc-btn { flex: 1; border-radius: 8px; padding: 10px 0; font-size: 13px; font-weight: 600; cursor: pointer; }
.dc-btn-cancel { border: 1px solid #e5e7eb; background: #f9fafb; color: #374151; }
.dc-btn-confirm { border: none; background: #ef4444; color: #fff; }

/* ==========================================================================
   News Center modal
   ========================================================================== */
.nc-overlay {
    display: none; position: fixed; top: 56px; left: 0; right: 0; bottom: 0;
    background: rgba(7,26,46,0.55); backdrop-filter: blur(2px); z-index: 10001;
    justify-content: center;
}
.nc-panel {
    position: relative; width: 50vw; max-width: 100vw; height: calc(100vh - 56px);
    background: #060e1a; display: flex; flex-direction: column;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6); font-family: 'Inter', sans-serif; overflow: hidden;
}
.nc-header {
    display: flex; align-items: center; gap: 8px; padding: 10px 12px;
    flex-shrink: 0; background: #09172C; border-bottom: 1px solid #1c2e50;
}
.nc-home-btn { display: none; }
.nc-back-btn { display: none; cursor: pointer; color: #6b7280; padding: 4px; }
.nc-title { display: none; }
.nc-search-wrap { position: relative; flex: 1; }
.nc-search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #9ca3af; font-size: 12px; }
.nc-search-input {
    width: 100%; border: 1.5px solid #e5e7eb; border-radius: 20px;
    padding: 7px 12px 7px 30px; font-size: 12px; color: #e2e8f0; outline: none;
    box-sizing: border-box; background: #1c2e50; transition: background 0.2s;
}
.nc-search-input:focus { background: #243558; }
.nc-close-btn { background: none; border: none; cursor: pointer; color: #9ca3af; font-size: 18px; padding: 4px; flex-shrink: 0; }
.nc-content { flex: 1; overflow-y: auto; overscroll-behavior: contain; background: #060e1a; padding: 8px; }
.nc-loading { text-align: center; padding: 30px; color: #9ca3af; font-size: 13px; }
.nc-loading i { display: block; font-size: 22px; margin-bottom: 8px; }
.nc-newpost-btn {
    width: 100%; margin-top: 14px; padding: 11px; background: #0B132B;
    border: none; border-radius: 10px; font-size: 13px; font-weight: 600;
    color: #e8a020; cursor: pointer; display: flex; align-items: center;
    justify-content: center; gap: 8px; transition: opacity .2s;
}
.nc-newpost-btn:hover { opacity: .85; }
.nc-detail-image {}
.nc-detail-body { padding: 20px 24px; }
.nc-post-title { font-size: 16px; font-weight: 700; color: #111827; margin: 0 0 8px; line-height: 1.4; }
.nc-post-meta { font-size: 11px; color: #9ca3af; margin-bottom: 16px; }
.nc-post-content { font-size: 13px; color: #374151; line-height: 1.7; white-space: pre-wrap; }
.nc-comments { border-top: 1px solid #f3f4f6; padding: 16px 24px; }
.nc-comments-title { font-size: 10px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.nc-comment-row { display: flex; gap: 8px; margin-top: 10px; }
.nc-comment-input { flex: 1; border: 1.5px solid #e5e7eb; border-radius: 20px; padding: 7px 14px; font-size: 12px; color: #111827; outline: none; transition: border-color 0.2s; }
.nc-comment-input:focus { border-color: #0B132B; }
.nc-comment-send { background: #0B132B; color: #fff; border: none; border-radius: 20px; padding: 7px 14px; font-size: 12px; font-weight: 600; cursor: pointer; }

/* Phones: the News Center is a full-screen page (like a social feed) with a Home button back to the dashboard */
@media (max-width: 767px) {
    .nc-overlay { top: 0; bottom: 0; background: #060e1a; backdrop-filter: none; }
    .nc-panel { width: 100%; max-width: none; height: 100vh; height: 100dvh; box-shadow: none; }
    .nc-header { padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px; gap: 8px; min-height: 56px; }
    .nc-home-btn {
        display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex-shrink: 0;
        min-height: 44px; padding: 0 14px; border-radius: 22px; cursor: pointer;
        background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14);
        color: #E2E8F0; font: 600 14px/1 'Inter', system-ui, sans-serif;
    }
    #newsBackBtn.nc-back-btn { min-width: 44px; min-height: 44px; box-sizing: border-box; text-align: center; padding: 12px 14px; font-size: 16px; line-height: 20px; color: #E2E8F0; }   /* 44px tap target (JS toggles display) */
    .nc-search-input { min-height: 44px; font-size: 16px; }   /* 16px: no iOS zoom on focus */
    .nc-close-btn { display: none; }                          /* replaced by the Home button */
    .nc-content { padding: 0; -webkit-overflow-scrolling: touch; }
    #newsListItems { padding: 8px 8px calc(16px + env(safe-area-inset-bottom, 0px)); }
    .nc-detail-body { padding: 16px; }
    .nc-post-title { font-size: 18px; }
    .nc-post-content { font-size: 15px; }
    .nc-comments { padding: 16px; }
    .nc-comment-input { min-height: 44px; font-size: 16px; }
    .nc-comment-send { min-height: 44px; min-width: 44px; }
}

/* Post page of the user's News Center: dark like the rest of the platform (#09172C), on every screen size */
.nc-overlay #newsDetailView { background: #09172C; min-height: 100%; }
.nc-overlay .nc-post-title { color: #e2e8f0; }
.nc-overlay .nc-post-meta { color: #94a3b8; }
.nc-overlay .nc-post-content { color: #cbd5e1; }
.nc-overlay .nc-comments { border-top-color: #1c2e50; }
.nc-overlay .nc-comments-title { color: #94a3b8; }
.nc-overlay .nc-comment-input { border: none; background: #1c2e50; color: #e2e8f0; }
.nc-overlay .nc-comment-input::placeholder { color: #94a3b8; }
.nc-overlay .nc-comment-input:focus { background: #243558; }
.nc-overlay .nc-comment-send { background: #e8a020; }
.nc-overlay #newsDetailView .nc-cm-name { color: #e2e8f0; }
.nc-overlay #newsDetailView .nc-cm-time { color: #94a3b8; }
.nc-overlay #newsDetailView .nc-cm-body { color: #cbd5e1; }
.nc-overlay #newsDetailView .nc-cm-to { color: #e8a020; }
.nc-overlay #newsDetailView .nc-cm-reply { color: #94a3b8; }
.nc-overlay #newsDetailView .nc-replying { color: #cbd5e1; }
.nc-overlay .nc-back-btn { color: #e2e8f0; }
.nc-overlay .nc-cm-avatar { background: #1c2e50; color: #cbd5e1; }

/* News Admin Form */
.na-form { padding: 20px 24px; }
.na-form-title { font-size: 12px; font-weight: 600; color: #374151; margin-bottom: 14px; }
.na-field { margin-bottom: 12px; }
.na-field-last { margin-bottom: 14px; }
.na-label { display: block; font-size: 11px; font-weight: 600; color: #374151; margin-bottom: 4px; }
.na-input, .na-textarea {
    width: 100%; border: 1.5px solid #e5e7eb; border-radius: 8px; padding: 9px 12px;
    font-size: 13px; color: #111827; outline: none; box-sizing: border-box;
    transition: border-color 0.2s;
}
.na-textarea { resize: vertical; font-family: inherit; line-height: 1.6; }
.na-input:focus, .na-textarea:focus { border-color: #0B132B; }
.na-image-input { font-size: 12px; color: #6b7280; }
.na-preview-wrap { display: none; margin-top: 8px; position: relative; }
.na-preview-img { width: 100%; height: 80px; object-fit: cover; border-radius: 8px; border: 1px solid #e5e7eb; display: block; }
.na-preview-remove {
    position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,0.6); color: #fff;
    border: none; border-radius: 50%; width: 20px; height: 20px; font-size: 10px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.na-status { font-size: 11px; color: #dc2626; margin-bottom: 8px; display: none; }
.na-btnrow { display: flex; gap: 8px; }
.na-publish-btn { flex: 1; background: #0B132B; color: #fff; border: none; border-radius: 8px; padding: 9px; font-size: 13px; font-weight: 600; cursor: pointer; }
.na-cancel-btn { background: #f3f4f6; color: #374151; border: none; border-radius: 8px; padding: 9px 16px; font-size: 13px; cursor: pointer; }
.na-existing-posts { margin-top: 16px; border-top: 1px solid #f3f4f6; padding-top: 12px; }

/* ==========================================================================
   Support Center modal
   ========================================================================== */
.sup-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 10001; }
.sup-panel {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    background: #fff; border-radius: 16px; width: 33vw; min-width: 360px;
    height: 50vh; min-height: 400px; display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3); font-family: 'Inter', sans-serif;
}
.sup-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid #f3f4f6; flex-shrink: 0; }
.sup-header-left { display: flex; align-items: center; gap: 10px; }
.sup-back-btn { display: none; background: none; border: none; cursor: pointer; color: #6b7280; padding: 4px 8px 4px 0; }
.sup-icon-box { width: 32px; height: 32px; background: #0B132B; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sup-icon-box i { color: #4CC9F0; font-size: 14px; }
.sup-title { font-size: 16px; font-weight: 700; color: #111827; margin: 0; }
.sup-subtitle { font-size: 11px; color: #9ca3af; margin: 0; }
.sup-header-right { display: flex; align-items: center; gap: 8px; }
.sup-close-btn { background: none; border: none; cursor: pointer; color: #9ca3af; font-size: 20px; line-height: 1; }
.sup-content { flex: 1; overflow-y: auto; }
.sup-list-view { padding: 16px; }
.sup-loading { text-align: center; padding: 40px 0; color: #9ca3af; }
.sup-loading i { font-size: 24px; margin-bottom: 12px; display: block; }
.sup-new-ticket-view { display: none; padding: 20px; }
.sup-new-ticket-title { font-size: 14px; font-weight: 600; color: #111827; margin: 0 0 16px; }
.sup-field { margin-bottom: 14px; }
.sup-field-label { font-size: 12px; color: #6b7280; display: block; margin-bottom: 6px; }
.sup-input, .sup-textarea {
    width: 100%; border: 1.5px solid #e5e7eb; border-radius: 8px; padding: 9px 12px;
    font-size: 13px; color: #111827; outline: none; box-sizing: border-box;
    transition: border-color 0.2s;
}
.sup-textarea { resize: none; line-height: 1.5; }
.sup-input:focus, .sup-textarea:focus { border-color: #6366f1; }
.sup-type-row { display: flex; gap: 8px; }
.sup-type-btn {
    flex: 1; width: 0; display: flex; align-items: center; justify-content: center;
    gap: 6px; height: 36px; border-radius: 20px; font-size: 12px; font-weight: 600;
    cursor: pointer; border: 1.5px solid #d1d5db; background: #f9fafb; color: #9ca3af;
    transition: all 0.2s; outline: none;
}
.sup-type-emoji { font-size: 16px; line-height: 1; }
.sup-char-count { font-size: 11px; color: #9ca3af; }
.sup-status-msg { display: none; font-size: 12px; margin-bottom: 10px; }
.sup-send-row { display: flex; justify-content: flex-end; }
.sup-send-btn { background: #0B132B; color: #fff; border: none; border-radius: 8px; padding: 8px 22px; font-size: 13px; font-weight: 600; cursor: pointer; }
.sup-detail-view { display: none; flex-direction: column; height: 100%; }
.sup-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.sup-reply-bar { padding: 12px 16px; border-top: 1px solid #f3f4f6; flex-shrink: 0; }
.sup-reply-row { display: flex; gap: 8px; align-items: flex-end; }
.sup-reply-textarea { flex: 1; border: 1.5px solid #e5e7eb; border-radius: 8px; padding: 8px 12px; font-size: 13px; color: #111827; outline: none; resize: none; line-height: 1.5; transition: border-color 0.2s; }
.sup-reply-textarea:focus { border-color: #6366f1; }
.sup-reply-send { background: #0B132B; color: #fff; border: none; border-radius: 8px; padding: 9px 16px; font-size: 13px; cursor: pointer; flex-shrink: 0; }
.sup-footer { padding: 12px 20px; border-top: 1px solid #f3f4f6; display: flex; justify-content: flex-end; flex-shrink: 0; }
.sup-newticket-btn { background: #0B132B; color: #fff; border: none; border-radius: 8px; padding: 8px 18px; font-size: 13px; font-weight: 600; cursor: pointer; }
