/* ==========================================================================
   1. DASHBOARD LAYOUT (New Sidebar Structure)
   ========================================================================== */
.bpdm-dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background: #f0f2f5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* --- SIDEBAR --- */
.bpdm-sidebar {
    width: 260px;
    background: #1e1e1e; /* Dark Sidebar */
    color: #b3b3b3;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.bpdm-logo {
    padding: 20px;
    background: #151515;
    border-bottom: 1px solid #333;
}

.bpdm-logo h2 {
    color: #fff;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.bpdm-logo span {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bpdm-nav {
    flex-grow: 1;
    padding: 10px 0;
    overflow-y: auto;
}

.bpdm-nav-separator {
    padding: 15px 20px 5px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #555;
    font-weight: 600;
}

.bpdm-nav-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: #b3b3b3;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.bpdm-nav-item .dashicons {
    margin-right: 10px;
    font-size: 18px;
    color: #888;
}

.bpdm-nav-item:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.bpdm-nav-item:hover .dashicons {
    color: #fff;
}

.bpdm-nav-item.active {
    background: #2c2c2c;
    color: #fff;
    border-left-color: #3498db; /* Primary Blue */
}

.bpdm-nav-item.active .dashicons {
    color: #3498db;
}

/* --- CONTENT AREA --- */
.bpdm-content-area {
    flex-grow: 1;
    padding: 30px;
    overflow-x: hidden;
}

/* --- COMMON COMPONENTS --- */
.bpdm-section, 
.tab-content {
    background: #fff;
    border-radius: 8px; /* Card Style */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 25px;
    margin-bottom: 25px;
    border: none; /* Reset old border */
}

/* Hide tabs by default */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Headers */
h1, h2, h3 {
    color: #2c3e50;
}

/* Forms */
.form-table th { 
    padding: 20px 10px 20px 0; 
    width: 220px;
    font-weight: 600;
}
.form-table td { padding: 15px 10px; }

/* Buttons & Controls */
.button-primary {
    background: #3498db !important;
    border-color: #3498db !important;
    text-shadow: none !important;
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.3) !important;
    transition: all 0.2s;
}

.button-primary:hover {
    background: #2980b9 !important;
    transform: translateY(-1px);
}

.selection-controls {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

/* Metrics & Stats */
#selected-count, #selected-count-all {
    display: inline-block;
    background: #e1f0fa;
    color: #2c3e50;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
}

/* --- RESPONSIVE --- */
@media screen and (max-width: 960px) {
    .bpdm-dashboard-wrapper { flex-direction: column; }
    .bpdm-sidebar { width: 100%; height: auto; }
    .bpdm-nav { display: flex; overflow-x: auto; padding: 0; border-bottom: 1px solid #333; }
    .bpdm-nav-separator { display: none; }
    .bpdm-nav-item { flex-shrink: 0; border-left: none; border-bottom: 3px solid transparent; padding: 15px; }
    .bpdm-nav-item.active { border-left: none; border-bottom-color: #3498db; }
    .bpdm-logo { display: none; } /* Save space on mobile */
}

/* Author Tools Specific Styling */
.author-tools-wrapper {
    max-width: 100%;
}

.author-tools-wrapper .bpdm-section {
    margin: 20px 0;
    border-radius: 5px;
}

.author-tools-wrapper .bpdm-section:first-child {
    background: #fff8f0 !important;
    border-left: 5px solid #ff8c00 !important;
    border-top: 1px solid #ffb84d;
}

.author-tools-wrapper .bpdm-section:first-child h2 {
    color: #cc6600 !important;
    border-bottom: 2px solid #ff8c00;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.author-tools-wrapper .bpdm-section:last-child {
    background: #f0f8ff !important;
    border-left: 5px solid #0073aa !important;
    border-top: 1px solid #4da6d9;
}

.author-tools-wrapper .bpdm-section:last-child h2 {
    color: #005a87 !important;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.author-generator-info {
    background: #e6f3ff !important;
    border: 1px solid #b3d9ff !important;
    border-radius: 4px;
}

.generate-preview {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
}

#authors-preview {
    background: #fff !important;
    border: 1px solid #ccc !important;
    border-radius: 3px;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.4;
}

.author-item {
    transition: background-color 0.2s;
    border-radius: 3px !important;
}

.author-item:hover {
    background: #f0f8ff !important;
    border-color: #0073aa !important;
}

.post-item-author {
    transition: background-color 0.2s;
    border-radius: 3px;
}

.post-item-author:hover {
    background: #f0f8ff !important;
    border-left-color: #0073aa !important;
}

#generate-authors-btn {
    background: #ff8c00 !important;
    border-color: #e67300 !important;
    text-shadow: 0 -1px 1px rgba(0,0,0,0.1);
    box-shadow: 0 1px 0 #e67300;
}

#generate-authors-btn:hover {
    background: #e67300 !important;
    border-color: #cc6600 !important;
}

#randomize-authors-btn {
    background: #0073aa !important;
    border-color: #005a87 !important;
    text-shadow: 0 -1px 1px rgba(0,0,0,0.1);
    box-shadow: 0 1px 0 #005a87;
}

#randomize-authors-btn:hover {
    background: #005a87 !important;
    border-color: #004d73 !important;
}

.author-tools-wrapper > div[style*="border-top"] {
    background: linear-gradient(135deg, #fff8f0 0%, #f0f8ff 100%);
    border: 1px solid #ddd !important;
    border-radius: 5px;
    text-align: center;
    padding: 15px;
    margin: 25px 0;
}

.author-tools-wrapper > div[style*="border-top"] h2 {
    background: linear-gradient(135deg, #ff8c00, #0073aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
    margin: 0;
    font-size: 16px;
}

#existing-authors-loading,
#authors-loading,
#posts-author-loading,
#generate-loading,
#randomize-loading {
    color: #666;
    font-style: italic;
}

#author-generator-results .notice-success,
#author-randomizer-results .notice-success {
    border-left-color: #46b450 !important;
    background: #ecf7ed !important;
}

#author-generator-results .notice-error,
#author-randomizer-results .notice-error {
    border-left-color: #dc3232 !important;
    background: #fbeaea !important;
}

#selected-authors-count,
#selected-posts-author-count {
    font-weight: bold;
    color: #0073aa;
    background: #e7f3ff;
    padding: 2px 8px;
    border-radius: 3px;
    border: 1px solid #b3d9ff;
}

@media screen and (max-width: 768px) {
    .bpdm-section {
        margin: 10px 0;
        padding: 15px;
    }
    .form-table th,
    .form-table td {
        display: block;
        width: 100%;
        padding: 10px 0;
    }
    .selection-controls .button {
        display: block;
        margin: 5px 0;
        width: 100%;
        text-align: center;
    }
    .posts-container {
        max-height: 300px !important;
    }
    .author-tools-wrapper .bpdm-section {
        padding: 15px;
    }
    #authors-container,
    #posts-author-container {
        margin: 15px 0;
    }
    .generate-preview {
        padding: 10px;
    }
}

.notice-success {
    border-left-color: #46b450;
    background: #ecf7ed;
}

.notice-error {
    border-left-color: #dc3232;
    background: #fbeaea;
}

.wp-list-table th,
.wp-list-table td {
    padding: 8px 10px;
}

.wp-list-table .button-small {
    font-size: 11px;
    height: auto;
    line-height: 1.4;
    padding: 2px 6px;
}

.nav-tab-wrapper {
    margin-bottom: 20px;
}

.nav-tab {
    position: relative;
    display: inline-block;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.71428571;
    color: #555;
    text-decoration: none;
    border: 1px solid #ccd0d4;
    background: #f1f1f1;
    margin-right: 5px;
}

.nav-tab:hover {
    background: #fff;
    color: #444;
}

.nav-tab-active {
    background: #fff;
    border-bottom: 1px solid #fff;
    color: #000;
}

.bpdm-testimonial-item {
    background: #e8f6f3;
    border-left: 4px solid #3498db;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin: 15px 0;
    padding: 15px;
    text-align: center;
    font-style: italic;
    position: relative;
    overflow: hidden;
}

.bpdm-testimonial-item .bpdm-testimonial-text {
    font-size: 1.1em;
    line-height: 1.6;
    color: #444;
    margin-bottom: 10px;
}

.bpdm-testimonial-item .bpdm-testimonial-author {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.bpdm-testimonial-item .bpdm-testimonial-rating {
    margin-top: 10px;
    font-size: 1.2em;
}

.bpdm-testimonial-item .bpdm-star {
    color: #FFD700;
    margin: 0 1px;
}
.bpdm-testimonial-item .bpdm-star-empty {
    color: #ccc;
}

.bpdm-quote-fact-widget {
    background: #f0f8ff;
    border-left: 4px solid #0073aa;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    margin: 15px 0;
    padding: 15px;
    text-align: center;
    font-style: italic;
    position: relative;
    overflow: hidden;
}

.bpdm-quote-fact-widget .bpdm-quote-fact-text {
    font-size: 1.15em;
    line-height: 1.5;
    color: #333;
    margin: 0;
}

.sk-dynamic-footer-text {
    background-color: #f8f8f8;
    border-top: 1px solid #eee;
    padding: 15px;
    margin-top: 30px;
    font-size: 0.95em;
    color: #555;
    font-style: italic;
    text-align: center;
    line-height: 1.4;
    box-shadow: 0 -1px 3px rgba(0,0,0,0.05);
    border-radius: 8px;
    border: 1px solid #ddd;
    border-left: 4px solid #28a745;
}
@media screen and (max-width: 768px) {
    .sk-dynamic-footer-text {
        padding: 10px;
        margin: 20px 5px;
    }
}

.bpdm-quote-fact-archive-top {
    margin: 20px auto;
    padding: 15px;
    text-align: center;
    background: #f0f8ff;
    border: 1px solid #add8e6;
    border-left: 4px solid #0073aa;
    border-radius: 5px;
    max-width: 90%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    font-style: italic;
    color: #333;
    line-height: 1.5;
}
.bpdm-quote-fact-archive-top p {
    margin: 0;
    font-size: 1.1em;
}

@media screen and (max-width: 768px) {
    .bpdm-quote-fact-archive-top {
        margin: 15px 10px;
        padding: 10px;
    }
}

.sk-author-box {
    background: #f9f9f9;
    padding: 20px;
    margin-top: 40px;
    margin-bottom: 20px;
    border-radius: 8px;
    border-top: 2px solid #0073aa;
    display: flex;
    align-items: center;
    gap: 20px;
    line-height: 1.6;
}

.sk-author-avatar {
    border-radius: 50%;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border: 3px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sk-author-info {
    flex-grow: 1;
}

.sk-author-name {
    margin: 0 0 5px 0;
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
}

.sk-author-bio {
    margin: 0;
    font-size: 0.95em;
    color: #555;
}

.sk-author-bio strong {
    color: #222;
}

@media screen and (max-width: 480px) {
    .sk-author-box {
        flex-direction: column;
        text-align: center;
    }
}

/* --- KODE BARU: Table of Contents (ToC) Styles --- */
.sk-toc-container {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    width: auto;
    max-width: 100%;
}

.sk-toc-title {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
    color: #212529;
}

.sk-toc-container ul {
    list-style-type: disc;
    margin: 0;
    padding-left: 20px;
}

.sk-toc-container ul ul {
    list-style-type: circle;
    margin-top: 8px;
}

.sk-toc-container li {
    margin-bottom: 8px;
}

.sk-toc-container a {
    text-decoration: none;
    color: #0073aa;
    transition: color 0.2s;
}

.sk-toc-container a:hover {
    color: #005a87;
    text-decoration: underline;
}

.sk-toc-collapsible .sk-toc-title {
    cursor: pointer;
}

.sk-toc-toggle {
    font-size: 0.8em;
    font-weight: normal;
    color: #6c757d;
    margin-left: 8px;
}
/* --- AKHIR KODE BARU --- */