@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* ==========================================================================
   DESIGN SYSTEM & COLOR TOKENS (AQ BLOG - LIGHT MODE GREEN)
   ========================================================================== */
:root {
    /* Color Palette - Modern Emerald / Forest Tech */
    --primary: #059669;           /* Emerald 600 */
    --primary-hover: #047857;     /* Emerald 700 */
    --primary-active: #065f46;    /* Emerald 800 */
    --primary-light: #ecfdf5;     /* Emerald 50 */
    --primary-border: #a7f3d0;    /* Emerald 200 */
    --primary-ring: rgba(5, 150, 105, 0.18);

    /* Neutral Scale */
    --bg-main: #ffffff;
    --bg-card: #ffffff;
    --bg-surface: #f8fafc;
    --border-color: #e2e8f0;
    --border-focus: #10b981;

    /* Typography Colors */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-on-primary: #ffffff;

    /* System Status */
    --success: #10b981;
    --success-bg: #ecfdf5;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --error: #ef4444;
    --error-bg: #fef2f2;

    /* Spacing & Geometry */
    --border-radius-sm: 8px;
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --transition-speed: 0.2s;
    
    /* Fonts */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Plus Jakarta Sans', sans-serif;
    
    /* Elevation / Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
    --shadow-card: 0 20px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.03);
}

/* Brand Header & Centered Logo Styling */
.login-logo-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
}

.brand-header-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-logo-box .brand-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
}

.brand-header-box .brand-logo {
    height: 38px;
    width: auto;
    object-fit: contain;
}

.brand-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.login-logo-box .brand-name {
    font-size: 2rem;
    color: #0f172a;
}

/* Reset & Global styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Reset & Global styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: #ffffff;
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

.glow-container {
    display: none;
}

.login-logo, .logo, .login-title, h1, h2, h3, .client-grid-title, .tab-btn {
    font-family: var(--font-display);
}

/* App screens container */
.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: block;
}

/* 1. LOGIN SCREEN STYLING */
#login-screen {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #cbd5e1 100%);
    display: none;
}

#login-screen.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background-color: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--border-radius-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-card);
    text-align: center;
}

.login-title {
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 32px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Form controls styling */
.form-group {
    margin-bottom: 22px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 14px;
    color: var(--text-primary);
    background-color: #ffffff;
    transition: all var(--transition-speed);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-ring);
}

/* Buttons styling */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    border: none;
    line-height: 1.4;
}

.btn-primary {
    background-color: #059669;
    color: #ffffff !important;
}

.btn-primary:hover {
    background-color: #047857;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.btn-primary:active {
    background-color: #065f46;
    color: #ffffff !important;
    transform: translateY(0);
}

.btn-secondary {
    background-color: #f8fafc;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #e2e8f0;
    color: var(--text-primary) !important;
    border-color: #cbd5e1;
}

.btn-success {
    background-color: #059669;
    color: #ffffff !important;
}

.btn-success:hover {
    background-color: #047857;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.btn-success:active {
    background-color: #065f46;
    color: #ffffff !important;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-large {
    padding: 14px 20px;
    font-size: 15px;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--border-radius);
    font-size: 13px;
    margin-top: 16px;
}

.alert-success {
    background-color: #ecfdf5;
    color: var(--success-hover);
    border: 1px solid #a7f3d0;
}

.alert-error {
    background-color: #fef2f2;
    color: var(--error);
    border: 1px solid #fca5a5;
}

.hidden {
    display: none !important;
}

/* 2. DASHBOARD SCREEN & MAIN HEADER STYLING */
.main-header {
    width: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
}

.header-inner {
    max-width: 1700px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.client-badge {
    background-color: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary-border);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 14px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.dashboard-container {
    max-width: 1700px;
    margin: 60px auto;
    padding: 0 20px;
}

/* Top row styling for creating a client */
.create-section-row {
    margin-bottom: 48px;
}

.create-client-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px 40px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    width: 100%;
}

.create-client-card h2 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.form-inline {
    display: flex;
    gap: 16px;
    align-items: center;
    width: 100%;
}

.form-group-inline {
    flex: 1;
}

.form-group-inline input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 14px;
    color: var(--text-primary);
    background-color: #ffffff;
    transition: all var(--transition-speed);
}

.form-group-inline input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-ring);
}

/* Bottom row clients listing */
.clients-section-row h2 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.clients-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.client-grid-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.client-grid-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -4px rgba(15, 23, 42, 0.08);
}

.client-avatar {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary-border);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
}

.client-grid-meta {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
}

.client-grid-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}



/* 3. WORKSPACE SCREEN STYLING */
.workspace-container {
    max-width: 1700px;
    margin: 40px auto;
    width: 100%;
    padding: 0 20px;
}

/* Sidebar & Config Drawer Styling */
.workspace-sidebar {
    display: none; /* Replaced by top actions & drawer config */
}

/* Main workspace area */
.workspace-main {
    padding: 0;
    background-color: transparent;
    display: flex;
    flex-direction: column;
}

/* Custom Tabs styling */
.tabs-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
    gap: 8px;
}

.tab-btn {
    padding: 12px 24px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-speed);
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--primary);
    border-color: var(--primary);
    font-weight: 700;
}

.tab-pane {
    display: none;
    flex: 1;
}

.tab-pane.active {
    display: block;
}

/* TAB 1: Writing layout - Clean 2-column or Full-width Workflow */
.writing-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 28px;
    min-height: calc(100vh - 240px);
}

.proposal-panel {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.proposal-box {
    margin-top: 24px;
    padding: 16px;
    background-color: var(--info-bg);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.markdown-preview {
    font-size: 13px;
    line-height: 1.5;
    max-height: 200px;
    overflow-y: auto;
    background: #ffffff;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin: 12px 0;
}

.editor-panel {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

#editor-textarea {
    flex: 1;
    width: 100%;
    resize: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 16px;
    font-family: "Courier New", Courier, monospace;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* Raw Markdown textarea for polished article - no TinyMCE, no content loss */
#editor-textarea-polished {
    width: 100%;
    min-height: 450px;
    resize: vertical;
    border: none;
    border-radius: 0;
    padding: 16px;
    font-family: "Courier New", Courier, monospace;
    font-size: 12.5px;
    line-height: 1.7;
    background: transparent;
    color: var(--text-primary);
    box-sizing: border-box;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    outline: none;
}

.editor-footer {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* TAB 2: Quality checks layout */
.quality-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 32px;
}

.quality-actions {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
}

.quality-actions p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 8px 0 20px 0;
}

.quality-results-panel {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.logs-container {
    flex: 1;
    background-color: #0f172a;
    border-radius: 6px;
    padding: 20px;
    color: #f8fafc;
    font-family: "Courier New", Courier, monospace;
    font-size: 13px;
    line-height: 1.6;
    overflow-y: auto;
    max-height: 500px;
}

.log-pass { color: var(--success); margin-bottom: 6px; }
.log-warn { color: #f59e0b; margin-bottom: 6px; }
.log-fail { color: var(--error); margin-bottom: 6px; }
.log-info { color: #94a3b8; margin-bottom: 6px; }

/* TAB 3: Publishing layout */
.publishing-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.image-panel, .wp-panel {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
}

.image-preview-container {
    margin-top: 20px;
    text-align: left;
}

.image-batch-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 10px 0;
}

.image-option-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--border-color);
    background: rgba(0, 0, 0, 0.04);
    aspect-ratio: 16 / 9;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-option-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.image-option-card.selected {
    border: 3px solid #10b981;
    box-shadow: 0 0 0 1px #10b981, 0 8px 18px rgba(16, 185, 129, 0.35);
}

.image-option-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0 !important;
}

.image-option-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #10b981;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    display: none;
    letter-spacing: 0.3px;
}

.image-option-card.selected .image-option-badge {
    display: block;
}

.wp-status-box {
    padding: 16px;
    background-color: var(--info-bg);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    font-size: 13px;
}

/* Toast messaging */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: #0f172a;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 6px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    transition: opacity var(--transition-speed);
}

/* Modal Popup Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity var(--transition-speed) ease;
}

.modal.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-speed);
}

.close-modal-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.modal-body p {
    margin-bottom: 12px;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 16px;
}

/* Proposal loader styling */
.proposal-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    background-color: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius);
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.proposal-loader.hidden {
    display: none !important;
}

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(79, 70, 229, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.modal-config-section {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.modal-config-section h3 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.modal-config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.form-group-full {
    grid-column: span 3;
}

/* Generation Overlay */
.generation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4); /* Lighter backdrop overlay */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.generation-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.overlay-card {
    width: 90%;
    max-width: 450px;
    padding: 35px 30px;
    text-align: center;
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.9) !important; /* Premium light white background */
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.overlay-card h3 {
    margin-top: 0;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a !important; /* Dark slate blue text */
    margin-bottom: 12px;
}

.overlay-card p {
    font-size: 14px;
    color: #475569 !important; /* Slate grey body text */
    margin-bottom: 28px;
    line-height: 1.5;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.08); /* Darker track for light background */
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--primary-hover));
    border-radius: 4px;
    transition: width 0.2s cubic-bezier(0.1, 0.8, 0.25, 1);
}

.overlay-percentage {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary) !important; /* Premium violet percentage text */
}

.overlay-step-badge {
    display: none !important;
}

.overlay-stop-btn {
    margin-top: 20px;
    background: transparent;
    border: 1px solid #e2e8f0;
    color: #94a3b8;
    font-size: 12px;
    padding: 6px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.overlay-stop-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
}

/* Spinner and loading row styles */
.overlay-loading-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.spinner-mini {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(99, 102, 241, 0.15);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin-overlay 0.8s linear infinite;
}

@keyframes spin-overlay {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Proposal Panel Markdown Typography */
#panel-proposal-text {
    line-height: 1.7;
    font-size: 14px;
    color: var(--text-primary);
}

#panel-proposal-text h1,
#panel-proposal-text h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 24px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

#panel-proposal-text h3 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary);
    margin-top: 20px;
    margin-bottom: 6px;
}

#panel-proposal-text p {
    margin-top: 0;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

#panel-proposal-text ul,
#panel-proposal-text ol {
    margin: 8px 0 16px 20px;
    padding: 0;
}

#panel-proposal-text li {
    margin-bottom: 6px;
    color: var(--text-secondary);
}

#panel-proposal-text a {
    color: var(--primary);
    text-decoration: none;
}

#panel-proposal-text a:hover {
    text-decoration: underline;
}

#panel-proposal-text strong {
    color: var(--text-primary);
    font-weight: 700;
}

#panel-proposal-text hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 20px 0;
}

/* Accordion Styling for Proposals */
.proposals-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.accordion-item {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-card);
    overflow: hidden;
    transition: all var(--transition-speed);
}

.accordion-item.active {
    border-color: var(--primary);
}

.accordion-item.selected {
    border-color: var(--success);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}

.accordion-item.selected .accordion-header {
    background-color: rgba(16, 185, 129, 0.03);
}

.accordion-header {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.02);
    font-weight: 600;
    transition: background var(--transition-speed);
    user-select: none;
}

.accordion-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.proposal-radio {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--success);
}

.accordion-header:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.accordion-title {
    font-size: 14px;
    color: var(--text-primary);
}

.accordion-icon {
    font-size: 10px;
    color: var(--text-muted);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: #ffffff;
}

.accordion-content.show {
    max-height: 450px;
    overflow-y: auto;
    border-top: 1px solid var(--border-color);
}

.accordion-content .markdown-preview {
    padding: 24px 32px;
    font-size: 14px;
    line-height: 1.7;
}

.accordion-content ul,
.accordion-content ol {
    margin: 10px 0 18px 24px;
    padding: 0;
}

.accordion-content li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* Score badge styling */
.score-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

.score-badge-green {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.score-badge-yellow {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.score-badge-red {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}
