/* ==========================================================
   Media Semesta Community Add-on — Contributor Dashboard CSS
   Clean, Professional, Zero-Emoji Typography
   ========================================================== */

.ms-dash-wrapper {
    max-width: 1080px;
    margin: 32px auto;
    padding: 0 16px;
}

/* Header Card */
.ms-dash-header-card {
    background-color: var(--fp-bg-secondary, #ffffff);
    border: 1px solid var(--fp-border-color, #e2e8f0);
    border-radius: var(--fp-radius-lg, 14px);
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: var(--fp-shadow-sm, 0 4px 14px rgba(0, 0, 0, 0.04));
    margin-bottom: 24px;
}

[data-theme="dark"] .ms-dash-header-card,
[data-scheme="presisi-gold"] .ms-dash-header-card,
.theme-presisi-gold .ms-dash-header-card {
    background-color: var(--fp-bg-tertiary, #141412);
    border-color: var(--fp-border-color, rgba(229, 184, 42, 0.25));
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.ms-dash-profile-brief {
    display: flex;
    align-items: center;
    gap: 18px;
}

.ms-dash-avatar-box {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--fp-accent-primary, #c62828);
    flex-shrink: 0;
}

[data-scheme="presisi-gold"] .ms-dash-avatar-box,
.theme-presisi-gold .ms-dash-avatar-box {
    border-color: #E5B82A;
}

.ms-dash-avatar-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    aspect-ratio: 1 / 1 !important;
    display: block !important;
}

.ms-dash-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #166534;
    background: #dcfce7;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 4px;
}

[data-theme="dark"] .ms-dash-role-badge {
    background: #052e16;
    color: #86efac;
}

[data-scheme="presisi-gold"] .ms-dash-role-badge,
.theme-presisi-gold .ms-dash-role-badge {
    background: rgba(229, 184, 42, 0.15);
    color: #E5B82A;
    border: 1px solid rgba(229, 184, 42, 0.3);
}

.ms-dash-name {
    margin: 0 0 4px 0;
    font-family: var(--fp-font-heading, inherit);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--fp-text-primary, #0f172a);
}

[data-theme="dark"] .ms-dash-name,
[data-scheme="presisi-gold"] .ms-dash-name,
.theme-presisi-gold .ms-dash-name {
    color: #ffffff;
}

.ms-dash-meta {
    margin: 0;
    font-size: 0.82rem;
    color: var(--fp-text-secondary, #64748b);
    display: flex;
    align-items: center;
    gap: 8px;
}

[data-theme="dark"] .ms-dash-meta,
[data-scheme="presisi-gold"] .ms-dash-meta,
.theme-presisi-gold .ms-dash-meta {
    color: var(--fp-text-muted, #cbd5e1);
}

.ms-dash-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Common Buttons */
.ms-dash-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ms-dash-btn--primary {
    background-color: var(--fp-accent-primary, #c62828);
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(var(--fp-accent-primary-rgb, 198, 40, 40), 0.25);
}

[data-scheme="presisi-gold"] .ms-dash-btn--primary,
.theme-presisi-gold .ms-dash-btn--primary {
    background-color: #E5B82A;
    color: #0A0A0A !important;
    box-shadow: 0 3px 10px rgba(229, 184, 42, 0.3);
}

.ms-dash-btn--secondary {
    background-color: #f1f5f9;
    color: #334155 !important;
}

[data-theme="dark"] .ms-dash-btn--secondary {
    background-color: #1e293b;
    color: #e2e8f0 !important;
}

.ms-dash-btn--outline {
    background: transparent;
    border: 1px solid var(--fp-border-color, #cbd5e1);
    color: var(--fp-text-secondary, #64748b) !important;
}

.ms-dash-btn:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

/* Tabs */
.ms-dash-nav {
    margin-bottom: 24px;
    border-bottom: 1px solid var(--fp-border-color, #e2e8f0);
}

.ms-dash-tabs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.ms-dash-tabs::-webkit-scrollbar {
    display: none;
}

.ms-dash-tab-item {
    flex-shrink: 0;
}

.ms-dash-tab-item a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    text-decoration: none !important;
    font-size: 0.92rem;
    font-weight: 700;
    white-space: nowrap !important;
    color: var(--fp-text-secondary, #64748b);
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.ms-dash-tab-item a:hover {
    color: var(--fp-accent-primary, #c62828);
}

.ms-dash-tab-item--active a {
    color: var(--fp-accent-primary, #c62828) !important;
    border-bottom-color: var(--fp-accent-primary, #c62828) !important;
}

[data-scheme="presisi-gold"] .ms-dash-tab-item--active a,
.theme-presisi-gold .ms-dash-tab-item--active a {
    color: #E5B82A !important;
    border-bottom-color: #E5B82A !important;
}

/* Content Pane Container */
.ms-dash-content-pane {
    background-color: var(--fp-bg-secondary, #ffffff);
    border: 1px solid var(--fp-border-color, #e2e8f0);
    border-radius: var(--fp-radius-lg, 14px);
    padding: 30px;
    box-shadow: var(--fp-shadow-sm, 0 4px 14px rgba(0, 0, 0, 0.04));
}

[data-theme="dark"] .ms-dash-content-pane,
[data-scheme="presisi-gold"] .ms-dash-content-pane,
.theme-presisi-gold .ms-dash-content-pane {
    background-color: var(--fp-bg-tertiary, #141412);
    border-color: var(--fp-border-color, rgba(229, 184, 42, 0.25));
}

/* Stats Summary */
.ms-dash-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.ms-dash-stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 10px;
    background: var(--fp-bg-primary, #f8fafc);
    border: 1px solid var(--fp-border-color, #e2e8f0);
}

[data-theme="dark"] .ms-dash-stat-card,
[data-scheme="presisi-gold"] .ms-dash-stat-card,
.theme-presisi-gold .ms-dash-stat-card {
    background: #0d0d0c;
    border-color: rgba(255, 255, 255, 0.1);
}

.ms-dash-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(var(--fp-accent-primary-rgb, 198, 40, 40), 0.1);
    color: var(--fp-accent-primary, #c62828);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.ms-dash-stat-icon--green { background: #dcfce7; color: #166534; }
.ms-dash-stat-icon--amber { background: #fef3c7; color: #92400e; }
.ms-dash-stat-icon--blue  { background: #e0f2fe; color: #075985; }

.ms-dash-stat-data {
    display: flex;
    flex-direction: column;
}

.ms-dash-stat-val {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--fp-text-primary, #0f172a);
    line-height: 1.2;
}

[data-theme="dark"] .ms-dash-stat-val,
[data-scheme="presisi-gold"] .ms-dash-stat-val,
.theme-presisi-gold .ms-dash-stat-val {
    color: #ffffff;
}

.ms-dash-stat-lbl {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--fp-text-secondary, #64748b);
}

/* Filter Bar */
.ms-dash-filter-bar {
    margin-bottom: 20px;
}

.ms-dash-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ms-dash-filter-btn {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    background: var(--fp-bg-primary, #f1f5f9);
    color: var(--fp-text-secondary, #475569);
    text-decoration: none !important;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.ms-dash-filter-btn--active {
    background: var(--fp-accent-primary, #c62828);
    color: #ffffff !important;
}

[data-scheme="presisi-gold"] .ms-dash-filter-btn--active,
.theme-presisi-gold .ms-dash-filter-btn--active {
    background: #E5B82A;
    color: #0A0A0A !important;
}

.ms-dash-filter-btn--alert {
    border-color: #f59e0b;
    color: #b45309;
}

/* Post Cards */
.ms-dash-posts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ms-dash-post-card {
    display: flex;
    gap: 18px;
    padding: 18px;
    border-radius: 10px;
    border: 1px solid var(--fp-border-color, #e2e8f0);
    background: var(--fp-bg-primary, #ffffff);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="dark"] .ms-dash-post-card,
[data-scheme="presisi-gold"] .ms-dash-post-card,
.theme-presisi-gold .ms-dash-post-card {
    background: #0d0d0c;
    border-color: rgba(255, 255, 255, 0.1);
}

.ms-dash-post-thumb {
    width: 120px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.ms-dash-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ms-dash-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 24px;
}

.ms-dash-post-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ms-dash-post-status-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.78rem;
    color: var(--fp-text-secondary, #64748b);
}

/* Badges */
.ms-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ms-status-badge--publish { background: #dcfce7; color: #166534; }
.ms-status-badge--pending { background: #fef3c7; color: #92400e; }
.ms-status-badge--revisi  { background: #fee2e2; color: #991b1b; }
.ms-status-badge--draft   { background: #f1f5f9; color: #475569; }

[data-theme="dark"] .ms-status-badge--publish { background: #052e16; color: #86efac; }
[data-theme="dark"] .ms-status-badge--pending { background: #451a03; color: #fde68a; }
[data-theme="dark"] .ms-status-badge--revisi  { background: #450a0a; color: #fca5a5; }
[data-theme="dark"] .ms-status-badge--draft   { background: #1e293b; color: #cbd5e1; }

.ms-dash-post-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.4;
}

.ms-dash-post-title a {
    color: var(--fp-text-primary, #0f172a);
    text-decoration: none;
}

.ms-dash-post-title a:hover {
    color: var(--fp-accent-primary, #c62828);
}

/* Revision Box */
.ms-dash-revision-box {
    padding: 10px 14px;
    border-radius: 6px;
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #92400e;
    font-size: 0.85rem;
    line-height: 1.45;
}

[data-theme="dark"] .ms-dash-revision-box {
    background: #451a03;
    color: #fde68a;
}

.ms-dash-revision-box p {
    margin: 4px 0 0 0;
}

/* Actions */
.ms-dash-post-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.ms-dash-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ms-dash-action-btn--edit   { background: #e0f2fe; color: #0369a1; }
.ms-dash-action-btn--view   { background: #f1f5f9; color: #475569; }
.ms-dash-action-btn--delete { background: #fee2e2; color: #b91c1c; }

[data-theme="dark"] .ms-dash-action-btn--edit   { background: #082f49; color: #7dd3fc; }
[data-theme="dark"] .ms-dash-action-btn--view   { background: #1e293b; color: #cbd5e1; }
[data-theme="dark"] .ms-dash-action-btn--delete { background: #450a0a; color: #fca5a5; }

/* Editor Form Styles */
.ms-editor-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.ms-editor-header {
    margin-bottom: 24px;
}

.ms-editor-heading {
    margin: 0 0 6px 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--fp-text-primary, #0f172a);
}

.ms-editor-subheading {
    margin: 0;
    font-size: 0.88rem;
    color: var(--fp-text-secondary, #64748b);
}

.ms-editor-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ms-editor-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--fp-text-primary, #1e293b);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

[data-theme="dark"] .ms-editor-label,
[data-scheme="presisi-gold"] .ms-editor-label {
    color: #f1f5f9;
}

.ms-req {
    color: #ef4444;
}

.ms-editor-title-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1.15rem;
    font-weight: 700;
    border-radius: 8px;
    border: 1px solid var(--fp-border-color, #cbd5e1);
    background: var(--fp-bg-primary, #ffffff);
    color: var(--fp-text-primary, #0f172a);
    box-sizing: border-box;
}

.ms-editor-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

@media (max-width: 640px) {
    .ms-editor-grid-2 {
        grid-template-columns: 1fr;
    }
}

.ms-editor-select,
.ms-editor-input {
    width: 100%;
    padding: 11px 14px;
    font-size: 0.92rem;
    border-radius: 8px;
    border: 1px solid var(--fp-border-color, #cbd5e1);
    background: var(--fp-bg-primary, #ffffff);
    color: var(--fp-text-primary, #0f172a);
    box-sizing: border-box;
}

[data-theme="dark"] .ms-editor-select,
[data-theme="dark"] .ms-editor-input,
[data-theme="dark"] .ms-editor-title-input,
[data-scheme="presisi-gold"] .ms-editor-select,
[data-scheme="presisi-gold"] .ms-editor-input,
[data-scheme="presisi-gold"] .ms-editor-title-input,
.theme-presisi-gold .ms-editor-select,
.theme-presisi-gold .ms-editor-input,
.theme-presisi-gold .ms-editor-title-input {
    background: #141416 !important;
    color: #f4f4f5 !important;
    border-color: #2e2e32 !important;
}

.ms-editor-select optgroup {
    font-weight: 800;
    color: #475569;
    background: #f1f5f9;
    padding: 6px 0;
}

.ms-editor-select option {
    font-weight: 500;
    color: #1e293b;
    background: #ffffff;
    padding: 6px 10px;
}

[data-theme="dark"] .ms-editor-select optgroup,
[data-scheme="presisi-gold"] .ms-editor-select optgroup,
.theme-presisi-gold .ms-editor-select optgroup {
    background: #27272a !important;
    color: #fbbf24 !important;
}

[data-theme="dark"] .ms-editor-select option,
[data-scheme="presisi-gold"] .ms-editor-select option,
.theme-presisi-gold .ms-editor-select option {
    background: #18181b !important;
    color: #f4f4f5 !important;
}

/* Thumb Uploader Box */
.ms-thumb-uploader-box {
    border: 2px dashed var(--fp-border-color, #cbd5e1);
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    background: var(--fp-bg-primary, #f8fafc);
    position: relative;
}

[data-theme="dark"] .ms-thumb-uploader-box {
    background: #0d0d0c;
    border-color: rgba(255, 255, 255, 0.15);
}

.ms-thumb-upload-placeholder {
    position: relative;
    cursor: pointer;
}

.ms-thumb-upload-icon {
    font-size: 32px;
    color: var(--fp-accent-primary, #c62828);
    margin-bottom: 8px;
}

[data-scheme="presisi-gold"] .ms-thumb-upload-icon {
    color: #E5B82A;
}

.ms-thumb-file-input {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    cursor: pointer;
}

.ms-thumb-preview-box {
    position: relative;
    display: inline-block;
    max-width: 360px;
}

.ms-thumb-preview-img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.ms-thumb-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 11px;
    cursor: pointer;
}

/* Toolbar & Textarea */
.ms-editor-field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ms-word-counter {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--fp-text-secondary, #64748b);
    background: var(--fp-bg-secondary, #f1f5f9);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--fp-border-color, #e2e8f0);
}

.ms-word-counter #ms-live-word-count {
    font-weight: 800;
    color: var(--fp-accent-primary, #e63946);
}

.ms-editor-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--fp-bg-secondary, #f8fafc);
    border: 1px solid var(--fp-border-color, #cbd5e1);
    border-bottom: 1px solid var(--fp-border-color, #cbd5e1);
    border-radius: 8px 8px 0 0;
}

.ms-toolbar-btn {
    padding: 6px 12px;
    border-radius: 5px;
    border: 1px solid var(--fp-border-color, #e2e8f0);
    background: var(--fp-bg-elevated, #ffffff);
    color: var(--fp-text-primary, #1e293b);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ms-toolbar-btn i {
    color: var(--fp-text-secondary, #475569);
    font-size: 12px;
    transition: color 0.15s ease;
}

.ms-toolbar-btn:hover {
    background: var(--fp-accent-primary, #e63946) !important;
    border-color: var(--fp-accent-primary, #e63946) !important;
    color: #ffffff !important;
}

.ms-toolbar-btn:hover i {
    color: #ffffff !important;
}

.ms-toolbar-sep {
    width: 1px;
    height: 18px;
    background: var(--fp-border-color, #cbd5e1);
    margin: 0 4px;
}

.ms-toolbar-btn--image {
    color: var(--fp-accent-primary, #c62828);
    font-weight: 600;
}

[data-scheme="presisi-gold"] .ms-toolbar-btn--image,
.theme-presisi-gold .ms-toolbar-btn--image {
    color: #E5B82A;
}

/* Inline Image Insertion Panel */
.ms-inline-img-panel {
    background: var(--fp-bg-secondary, #f8fafc);
    border: 1px solid var(--fp-border-color, #e2e8f0);
    border-radius: 8px;
    padding: 16px;
    margin: 12px 0 16px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.ms-inline-img-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--fp-border-color, #e2e8f0);
}

.ms-inline-img-panel-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--fp-text-primary, #1e293b);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ms-inline-img-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    transition: color 0.15s ease;
}

.ms-inline-img-close:hover {
    color: #ef4444;
}

.ms-inline-img-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.ms-inline-img-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ms-inline-img-status {
    font-size: 13px;
    font-weight: 600;
}

/* Content Image inside Article */
.ms-content-image {
    margin: 24px auto;
    text-align: center;
    max-width: 100%;
}

.ms-content-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

.ms-content-image .wp-caption-text {
    font-size: 13px;
    color: var(--fp-text-muted, #64748b);
    margin-top: 8px;
    font-style: italic;
    line-height: 1.4;
}

.ms-editor-textarea {
    width: 100%;
    padding: 16px;
    font-size: 0.98rem;
    line-height: 1.6;
    border-radius: 0 0 8px 8px;
    border: 1px solid var(--fp-border-color, #cbd5e1);
    border-top: none;
    background: var(--fp-bg-primary, #ffffff);
    color: var(--fp-text-primary, #0f172a);
    box-sizing: border-box;
    font-family: inherit;
}

.ms-editor-textarea:focus {
    outline: none;
    border-color: var(--fp-accent-primary, #e63946);
}

/* ── WYSIWYG Mode Switcher & Visual Editor Container ── */
.ms-editor-mode-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.ms-editor-mode-btn {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid var(--fp-border-color, #cbd5e1);
    background: var(--fp-bg-secondary, #f8fafc);
    color: var(--fp-text-muted, #64748b);
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ms-editor-mode-btn:hover {
    color: var(--fp-text-primary, #0f172a);
    border-color: var(--fp-accent-primary, #2563EB);
}

.ms-editor-mode-btn--active {
    background: var(--fp-accent-primary, #2563EB);
    color: #ffffff !important;
    border-color: var(--fp-accent-primary, #2563EB);
}

.ms-editor-visual-box {
    width: 100%;
    min-height: 380px;
    max-height: 800px;
    overflow-y: auto;
    padding: 16px 20px;
    border-radius: 8px;
    border: 1px solid var(--fp-border-color, #cbd5e1);
    background: var(--fp-bg-secondary, #ffffff);
    color: var(--fp-text-primary, #0f172a);
    font-size: 15px;
    line-height: 1.75;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ms-editor-visual-box:focus {
    border-color: var(--fp-accent-primary, #2563EB);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.ms-editor-visual-box[data-placeholder]:empty:before {
    content: attr(data-placeholder);
    color: var(--fp-text-muted, #94a3b8);
    pointer-events: none;
    font-style: italic;
}

.ms-editor-visual-box h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 1.2em 0 0.5em;
    color: var(--fp-text-primary, #0f172a);
    line-height: 1.3;
}

.ms-editor-visual-box h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 1em 0 0.4em;
    color: var(--fp-text-primary, #0f172a);
    line-height: 1.35;
}

.ms-editor-visual-box p {
    margin: 0 0 1em 0;
}

.ms-editor-visual-box p,
.ms-editor-visual-box span,
.ms-editor-visual-box div:not(.ms-inline-img-panel),
.ms-editor-visual-box h1,
.ms-editor-visual-box h2,
.ms-editor-visual-box h3,
.ms-editor-visual-box h4,
.ms-editor-visual-box h5,
.ms-editor-visual-box h6,
.ms-editor-visual-box ul,
.ms-editor-visual-box ol,
.ms-editor-visual-box li,
.ms-editor-visual-box b,
.ms-editor-visual-box strong,
.ms-editor-visual-box i,
.ms-editor-visual-box em {
    background-color: transparent !important;
    background: transparent !important;
    color: inherit !important;
    font-family: inherit !important;
    border-color: transparent !important;
}

[data-theme="dark"] .ms-editor-visual-box,
.ms-theme-presisi-gold .ms-editor-visual-box,
body.scheme-presisi-gold .ms-editor-visual-box {
    background: #141414 !important;
    color: #f1f5f9 !important;
    border-color: #262626 !important;
}

.ms-editor-visual-box blockquote {
    margin: 1.2em 0;
    padding: 12px 18px;
    border-left: 4px solid var(--fp-accent-primary, #2563EB);
    background: rgba(37, 99, 235, 0.05);
    color: var(--fp-text-secondary, #334155);
    font-style: italic;
    border-radius: 0 6px 6px 0;
}

.ms-editor-visual-box ul,
.ms-editor-visual-box ol {
    margin: 0.8em 0 1em 1.5em;
    padding: 0;
}

.ms-editor-visual-box ul li {
    list-style-type: disc;
    margin-bottom: 0.4em;
}

/* ── Visual Inline Image Card Inside Editor ── */
.ms-editor-visual-box figure.wp-caption,
.ms-editor-visual-box .ms-visual-image-card {
    display: block;
    margin: 1.5em auto;
    max-width: 100%;
    border: 1px solid var(--fp-border-color, #e2e8f0);
    border-radius: 8px;
    background: var(--fp-bg-primary, #ffffff);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    user-select: none;
}

.ms-visual-img-container {
    position: relative;
    background: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ms-editor-visual-box figure img,
.ms-visual-img-container img {
    display: block;
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    margin: 0 auto;
}

.ms-visual-img-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(16, 185, 129, 0.9);
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
}

.ms-visual-img-delete {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: rgba(220, 38, 38, 0.9);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, background 0.15s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.ms-visual-img-delete:hover {
    transform: scale(1.1);
    background: #DC2626;
}

.ms-editor-visual-box figcaption,
.ms-editor-visual-box .wp-caption-text {
    padding: 10px 14px;
    font-size: 12.5px;
    color: var(--fp-text-muted, #64748b);
    background: var(--fp-bg-secondary, #f8fafc);
    border-top: 1px solid var(--fp-border-color, #e2e8f0);
    text-align: center;
    font-style: normal;
    line-height: 1.5;
}


.ms-editor-guide-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 8px;
    background: var(--fp-bg-secondary, #f8fafc);
    border: 1px solid var(--fp-border-color, #e2e8f0);
    font-size: 0.84rem;
    color: var(--fp-text-secondary, #475569);
    line-height: 1.5;
}

.ms-editor-guide-notice strong {
    color: var(--fp-text-primary, #1e293b);
}

.ms-editor-guide-notice p {
    color: var(--fp-text-secondary, #64748b);
    margin: 4px 0 0;
}

.ms-editor-guide-notice i {
    color: var(--fp-accent-primary, #e63946);
    font-size: 16px;
    margin-top: 2px;
}

.ms-editor-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Profile Form Elements */
.ms-profile-avatar-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.ms-profile-current-avatar {
    width: 80px;
    height: 80px;
    min-width: 80px;
    min-height: 80px;
    max-width: 80px;
    max-height: 80px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1e293b;
    border: 2px solid var(--fp-accent-primary, #c62828);
    box-sizing: border-box;
}

[data-scheme="presisi-gold"] .ms-profile-current-avatar,
.theme-presisi-gold .ms-profile-current-avatar {
    border-color: #E5B82A;
}

.ms-profile-avatar-large {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    aspect-ratio: 1 / 1 !important;
    display: block !important;
    border: none !important;
}

.ms-input-with-prefix {
    display: flex;
    align-items: center;
    border: 1px solid var(--fp-border-color, #cbd5e1);
    border-radius: 8px;
    overflow: hidden;
    background: var(--fp-bg-primary, #ffffff);
}

.ms-input-prefix {
    padding: 10px 12px;
    background: #f1f5f9;
    color: #64748b;
    font-weight: 700;
    font-size: 0.9rem;
    border-right: 1px solid #cbd5e1;
}

.ms-input-with-prefix .ms-editor-input {
    border: none;
    border-radius: 0;
}

.ms-editor-section-divider {
    margin-top: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--fp-border-color, #e2e8f0);
}

.ms-editor-sub-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--fp-text-primary, #0f172a);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================================
   Mobile & Responsive Layout Enhancements
   ========================================================== */
@media (max-width: 768px) {
    .ms-dash-wrapper {
        margin: 16px auto;
        padding: 0 10px;
    }

    .ms-dash-header-card {
        padding: 18px 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .ms-dash-profile-brief {
        flex-direction: row;
        align-items: center;
        gap: 14px;
    }

    .ms-dash-name {
        font-size: 1.15rem;
    }

    .ms-dash-meta {
        font-size: 0.78rem;
        flex-wrap: wrap;
        gap: 4px 8px;
    }

    .ms-dash-header-actions {
        width: 100%;
        display: flex;
        gap: 8px;
    }

    .ms-dash-header-actions .ms-dash-btn {
        flex: 1;
        justify-content: center;
        padding: 10px 14px;
        font-size: 0.84rem;
    }

    /* ─── 3-Column Segmented Tab Bar on Mobile (No cut-offs) ─── */
    .ms-dash-nav {
        border-bottom: none !important;
        margin-bottom: 20px !important;
    }

    .ms-dash-tabs {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
        padding: 5px !important;
        background: #f1f5f9 !important;
        border-radius: 12px !important;
        border: 1px solid var(--fp-border-color, #e2e8f0) !important;
        overflow: visible !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    [data-theme="dark"] .ms-dash-tabs,
    [data-scheme="presisi-gold"] .ms-dash-tabs,
    .theme-presisi-gold .ms-dash-tabs,
    body.scheme-presisi-gold .ms-dash-tabs,
    body.theme-presisi-gold .ms-dash-tabs {
        background: #141412 !important;
        border-color: rgba(229, 184, 42, 0.25) !important;
    }

    .ms-dash-tab-item {
        width: 100% !important;
        flex-shrink: 1 !important;
    }

    .ms-dash-tab-item a {
        width: 100% !important;
        justify-content: center !important;
        padding: 9px 4px !important;
        font-size: 0.8rem !important;
        border-radius: 8px !important;
        border-bottom: none !important;
        text-align: center !important;
        white-space: nowrap !important;
        color: var(--fp-text-secondary, #64748b) !important;
        transition: all 0.2s ease !important;
    }

    .ms-dash-tab-item a i {
        font-size: 0.85rem !important;
        margin-right: 2px !important;
    }

    .ms-dash-tab-item--active a {
        background: var(--fp-accent-primary, #c62828) !important;
        color: #ffffff !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
    }

    [data-scheme="presisi-gold"] .ms-dash-tab-item--active a,
    .theme-presisi-gold .ms-dash-tab-item--active a,
    body.scheme-presisi-gold .ms-dash-tab-item--active a,
    body.theme-presisi-gold .ms-dash-tab-item--active a {
        background: #E5B82A !important;
        color: #0A0A0A !important;
        font-weight: 800 !important;
        box-shadow: 0 2px 8px rgba(229, 184, 42, 0.3) !important;
    }

    .ms-dash-content-pane {
        padding: 18px 14px;
        border-radius: 12px;
    }

    .ms-dash-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .ms-dash-stat-card {
        padding: 12px 14px;
    }

    .ms-dash-stat-val {
        font-size: 1.35rem;
    }

    .ms-dash-filter-group {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .ms-dash-filter-btn {
        flex: 1 1 calc(50% - 6px);
        text-align: center;
        padding: 8px 10px;
        font-size: 0.78rem;
    }

    /* ─── Mobile Post Card View ─── */
    .ms-dash-post-card {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        padding: 14px !important;
    }

    .ms-dash-post-thumb {
        width: 100% !important;
        height: 160px !important;
        max-height: 160px !important;
    }

    .ms-dash-post-thumb img {
        width: 100% !important;
        height: 160px !important;
        object-fit: cover !important;
    }

    .ms-dash-post-body {
        width: 100% !important;
    }

    .ms-dash-post-title {
        font-size: 1.05rem !important;
        line-height: 1.4 !important;
    }

    .ms-dash-post-actions {
        width: 100% !important;
        display: flex !important;
        gap: 8px !important;
        padding-top: 10px !important;
        border-top: 1px solid var(--fp-border-color, #e2e8f0) !important;
    }

    .ms-dash-action-btn {
        flex: 1 !important;
        justify-content: center !important;
        padding: 8px 12px !important;
        font-size: 0.82rem !important;
    }

    .ms-editor-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .ms-editor-toolbar {
        gap: 3px;
        padding: 6px 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .ms-editor-toolbar::-webkit-scrollbar {
        display: none;
    }

    .ms-editor-tool-btn {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }

    .ms-editor-card {
        padding: 18px 14px;
    }
}

@media (max-width: 480px) {
    .ms-dash-stats-grid {
        grid-template-columns: 1fr;
    }

    .ms-dash-profile-brief {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .ms-dash-meta {
        justify-content: center;
    }

    .ms-profile-avatar-row {
        flex-direction: column;
        text-align: center;
    }
}

/* ── Premium Interactive Tag Box & Recommendations ── */
.ms-tag-input-box,
.ms-tag-input-wrapper {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    min-height: 46px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    cursor: text;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.ms-tag-input-box:hover,
.ms-tag-input-wrapper:hover {
    border-color: #cbd5e1;
    background: #ffffff;
}

.ms-tag-input-box:focus-within,
.ms-tag-input-wrapper:focus-within {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

[data-theme="dark"] .ms-tag-input-box,
[data-theme="dark"] .ms-tag-input-wrapper {
    background: #0f172a;
    border-color: #334155;
}

[data-theme="dark"] .ms-tag-input-box:hover,
[data-theme="dark"] .ms-tag-input-wrapper:hover {
    border-color: #475569;
}

[data-theme="dark"] .ms-tag-input-box:focus-within,
[data-theme="dark"] .ms-tag-input-wrapper:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}

.ms-tag-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.ms-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    border-radius: 9999px;
    padding: 4px 10px 4px 12px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.3;
    user-select: none;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.06);
    animation: msTagPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.15s ease;
}

.ms-tag-badge:hover {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #93c5fd;
    transform: translateY(-1px);
}

[data-theme="dark"] .ms-tag-badge {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #93c5fd;
    border-color: #3b82f6;
}

.ms-tag-badge-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(29, 78, 216, 0.1);
    color: #1d4ed8;
    border: none;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
    margin-left: 2px;
    transition: all 0.15s ease;
}

.ms-tag-badge-remove:hover {
    background: #ef4444;
    color: #ffffff;
    transform: scale(1.15);
}

.ms-tag-input-inner {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 160px;
}

.ms-tag-hash-icon {
    font-size: 14px;
    font-weight: 700;
    color: #94a3b8;
    user-select: none;
}

.ms-tag-input-field {
    flex: 1;
    min-width: 140px;
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 6px 4px !important;
    font-size: 13.5px !important;
    color: #1e293b !important;
    line-height: 1.4 !important;
}

[data-theme="dark"] .ms-tag-input-field {
    color: #f1f5f9 !important;
}

.ms-tag-input-field::placeholder {
    color: #94a3b8;
    font-size: 13px;
}

/* Quick recommendation chips */
.ms-tag-recommendations {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.ms-tag-recom-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ms-tag-chip-btn {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    color: #475569;
    border: 1px dashed #cbd5e1;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ms-tag-chip-btn:hover {
    background: #eff6ff;
    color: #2563eb;
    border-color: #93c5fd;
    border-style: solid;
    transform: translateY(-1px);
}

.ms-tag-chip-btn.is-active {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
    border-style: solid;
    font-weight: 600;
}

[data-theme="dark"] .ms-tag-chip-btn {
    background: #1e293b;
    color: #94a3b8;
    border-color: #334155;
}

[data-theme="dark"] .ms-tag-chip-btn:hover {
    background: #334155;
    color: #60a5fa;
    border-color: #3b82f6;
}

.ms-tag-kbd {
    display: inline-block;
    padding: 1px 5px;
    font-size: 10.5px;
    font-family: inherit;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

/* Autocomplete suggestions dropdown */
.ms-tag-suggestions-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.12), 0 4px 10px -2px rgba(0, 0, 0, 0.05);
    padding: 6px;
    list-style: none;
    z-index: 120;
    max-height: 220px;
    overflow-y: auto;
    margin: 0;
}

[data-theme="dark"] .ms-tag-suggestions-dropdown {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.3);
}

.ms-tag-suggestion-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: #334155;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.ms-tag-suggestion-item:before {
    content: "#";
    font-weight: 700;
    color: #94a3b8;
}

.ms-tag-suggestion-item:hover,
.ms-tag-suggestion-item.is-selected {
    background: #eff6ff;
    color: #1d4ed8;
}

.ms-tag-suggestion-item:hover:before,
.ms-tag-suggestion-item.is-selected:before {
    color: #2563eb;
}

[data-theme="dark"] .ms-tag-suggestion-item {
    color: #cbd5e1;
}

[data-theme="dark"] .ms-tag-suggestion-item:hover,
[data-theme="dark"] .ms-tag-suggestion-item.is-selected {
    background: #334155;
    color: #93c5fd;
}

.ms-visual-img-delete,
.ms-visual-img-badge {
    display: none !important;
}

@keyframes msTagPopIn {
    0% {
        opacity: 0;
        transform: scale(0.85);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}


