* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --column-width: 467px;
    --preview-column-width: 1000px;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text: #1e293b;
    --text-light: #64748b;
    --bg: #ffffff;
    --bg-gray: #f8fafc;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg-gray);
    height: 100vh;
    overflow: hidden;
}


/* Workflow Container */
.workflow-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    background: var(--bg-gray);
}

.workflow-container::-webkit-scrollbar {
    height: 12px;
}

.workflow-container::-webkit-scrollbar-track {
    background: var(--bg-gray);
}

.workflow-container::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 6px;
}

.workflow-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* Workflow Columns */
.workflow-column {
    width: var(--column-width);
    min-width: var(--column-width);
    height: 100%;
    background: var(--bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.workflow-column:last-child {
    border-right: none;
}

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

.column-title {
    font-size: 20px;
    font-weight: 600;
}

.column-status {
    font-size: 12px;
    color: var(--text-light);
    background: var(--bg-gray);
    padding: 4px 8px;
    border-radius: 4px;
}


.column-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    position: relative;
}

/* Special padding for feeds column to accommodate chrome extension callout */
[data-column="feeds"] .column-content {
    padding-bottom: 140px;
}

.column-content::-webkit-scrollbar {
    width: 8px;
}

.column-content::-webkit-scrollbar-track {
    background: transparent;
}

.column-content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

/* Cards */
.card {
    background: var(--bg-gray);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.card.expanded {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

.card-title {
    font-size: 14px;
    font-weight: 600;
}

.card-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-light);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-light);
}

.status-dot.pending {
    background: var(--warning);
}

.status-dot.working {
    background: var(--primary);
    animation: pulse 1.5s infinite;
}

.status-dot.success {
    background: var(--success);
}

.status-dot.error {
    background: var(--danger);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.card-content {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.card-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 13px;
    background: var(--bg);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:hover {
    background: var(--bg-gray);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-success {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.btn-danger {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

.btn-xs {
    padding: 2px 6px;
    font-size: 11px;
    min-width: 24px;
    height: 24px;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 13px;
    transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-dialog {
    background: var(--bg);
    border-radius: 6px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: 60vh;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.close-btn:hover {
    background: var(--bg-gray);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: flex-end;
}

/* Toast */
.toast-container {
    position: fixed;
    top: calc(var(--header-height) + 16px);
    right: 16px;
    z-index: 1000;
}

.toast {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 8px;
    box-shadow: var(--shadow);
    min-width: 250px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 3px solid var(--success);
}

.toast.error {
    border-left: 3px solid var(--danger);
}

.toast.warning {
    border-left: 3px solid var(--warning);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-light);
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text);
}

.empty-state p {
    font-size: 13px;
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Author Column */
.author-column-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

.author-column-card .column-content {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.author-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.author-image-section {
    text-align: center;
    margin-bottom: 24px;
}

.author-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 3px solid var(--border);
    object-fit: cover;
    margin: 0 auto 16px;
    display: block;
    cursor: pointer;
    transition: all 0.2s;
}

.author-avatar:hover {
    border-color: var(--primary);
    transform: scale(1.02);
}

.author-placeholder {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--bg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--text-light);
    margin: 0 auto 16px;
    border: 3px dashed var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.author-placeholder:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--bg);
}

.author-image-upload {
    display: none;
}

.author-image-hint {
    font-size: 12px;
    color: var(--text-light);
    margin-top: -8px;
}

.author-name-input {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    border: none;
    background: transparent;
    width: 100%;
    padding: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.author-name-input:focus {
    outline: none;
    border-bottom-color: var(--primary);
}

.author-name-input:hover {
    background: var(--bg-gray);
    border-radius: 4px;
}

.author-description-input {
    font-size: 14px;
    line-height: 1.6;
    border: 1px solid transparent;
    background: transparent;
    width: 100%;
    flex: 1;
    padding: 16px;
    border-radius: 6px;
    resize: none;
    font-family: inherit;
    transition: all 0.2s;
}

.author-description-input:hover {
    background: var(--bg-gray);
    border-color: var(--border);
}

.author-description-input:focus {
    outline: none;
    background: var(--bg);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.author-save-section {
    height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    border-top: 0;
}

.author-save-section.show {
    height: auto;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid var(--border);
}

.author-save-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.author-save-section .btn {
    min-width: 120px;
}

/* Extension Modal Styling */
.extension-modal .modal-dialog {
    max-width: 800px;
    width: 95%;
}

.extension-modal .modal-header {
    display: none;
}

.extension-modal .modal-body {
    padding: 0;
    max-height: 85vh;
}

.extension-help-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.extension-hero {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    padding: 48px 32px;
    text-align: center;
}

.hero-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.extension-hero h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.extension-hero p {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
}

.extension-content {
    padding: 32px;
    overflow-y: auto;
    flex: 1;
}

.extension-section {
    margin-bottom: 40px;
}

.extension-section:last-child {
    margin-bottom: 0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.section-number {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.section-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--text);
}

.download-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--primary);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 24px;
}

.download-button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.download-icon {
    font-size: 24px;
}

.file-size {
    font-size: 12px;
    opacity: 0.8;
    margin-left: auto;
}

.install-steps {
    display: grid;
    gap: 16px;
}

.step {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-gray);
    border-radius: 8px;
    transition: all 0.2s;
}

.step:hover {
    background: #e5e7eb;
}

.step-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.step-content strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
}

.step-content p {
    margin: 0;
    font-size: 13px;
    color: var(--text-light);
}

.step-content code {
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    color: var(--primary);
    border: 1px solid var(--border);
}

.usage-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px;
    background: var(--bg-gray);
    border-radius: 8px;
    margin-bottom: 24px;
}

.usage-step {
    text-align: center;
}

.usage-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.usage-step span {
    font-size: 13px;
    color: var(--text);
}

.usage-arrow {
    font-size: 24px;
    color: var(--text-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.feature {
    display: flex;
    gap: 12px;
}

.feature-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.feature-text strong {
    display: block;
    margin-bottom: 2px;
    font-size: 14px;
}

.feature-text p {
    margin: 0;
    font-size: 12px;
    color: var(--text-light);
}

.extension-footer {
    padding: 24px 32px;
    background: var(--bg-gray);
    border-top: 1px solid var(--border);
    text-align: center;
}

.btn-lg {
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 500;
}

/* Chrome Extension Callout */
.chrome-extension-callout {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    flex-shrink: 0;
}

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

.callout-header h4 {
    margin: 0;
    color: #0369a1;
    font-size: 16px;
    font-weight: 600;
}

.chrome-extension-callout p {
    margin: 0 0 12px 0;
    color: #0f172a;
    font-size: 14px;
}

.close-callout-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #0369a1;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1;
}

.close-callout-btn:hover {
    background: rgba(14, 165, 233, 0.1);
    color: #0284c7;
}

/* Progress stats */
.progress-stats {
    display: flex;
    gap: 20px;
    padding: 16px;
    background: var(--bg-gray);
    border-radius: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 80px;
}

.stat-number {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Truncated content */
.truncated {
    max-height: 60px;
    overflow: hidden;
    position: relative;
}

.truncated::after {
    content: '...';
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--bg-gray);
    padding-left: 20px;
}

.expand-btn {
    color: var(--primary);
    cursor: pointer;
    font-size: 12px;
    margin-top: 8px;
}

.expand-btn:hover {
    text-decoration: underline;
}

/* Feed type icons */
.feed-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: 4px;
    font-size: 12px;
    margin-right: 8px;
}

/* JSON preview */
.json-preview {
    background: var(--bg-gray);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
}

/* Medium modal for forms and content */
.modal-md {
    max-width: 800px;
    max-height: 85vh;
}

.modal-md .modal-body {
    max-height: 65vh;
}

/* Large modal for expanded views */
.modal-lg {
    max-width: 90vw;
    max-height: 90vh;
}

.modal-lg .modal-body {
    max-height: 70vh;
}

/* Modal form styling */
.modal-body h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--primary);
}

.modal-body ol, .modal-body ul {
    margin-bottom: 20px;
}

.modal-body ol li, .modal-body ul li {
    margin-bottom: 12px;
    line-height: 1.5;
}

.modal-body code {
    background: var(--bg-gray);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    color: var(--danger);
}

.setup-steps, .usage-steps {
    padding-left: 20px;
}

.setup-steps li strong, .usage-steps li strong {
    color: var(--primary);
    display: inline-block;
    min-width: 80px;
}

.tips-list {
    list-style: none;
    padding-left: 0;
}

.tips-list li {
    padding-left: 20px;
    position: relative;
}

.tips-list li:before {
    content: '💡';
    position: absolute;
    left: 0;
}

.extension-help {
    line-height: 1.5;
}

.extension-help a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.extension-help a:hover {
    text-decoration: underline;
}

.detail-row {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.detail-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.detail-row strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.content-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

/* Newsletter Preview Rendering */
.newsletter-render-container {
    margin: 16px 0;
    min-height: 200px;
}

.render-placeholder {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
    background: var(--bg-gray);
    border-radius: 6px;
}

.render-loading {
    text-align: center;
    padding: 40px;
    color: var(--primary);
}

.render-error {
    text-align: center;
    padding: 20px;
    color: var(--danger);
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 6px;
}

.email-preview-frame {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 6px;
    height: calc(100vh - 200px);
    overflow-y: auto;
}

.email-container {
    background: white;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
    
    /* Reset styles to prevent interference */
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    color: #000;
}

/* Reset any inherited styles inside email container */
.email-container * {
    box-sizing: content-box;
}

.email-container table {
    border-collapse: collapse;
    mso-table-lspace: 0pt;
    mso-table-rspace: 0pt;
}

.email-container img {
    border: 0;
    height: auto;
    line-height: 100%;
    outline: none;
    text-decoration: none;
    display: block;
}

/* Preview header */
.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.preview-actions {
    display: flex;
    gap: 8px;
}

/* Help Modal Styling */
.help-modal .modal-dialog {
    max-width: 900px;
    width: 95%;
}

.help-modal .modal-header {
    display: none;
}

.help-modal .modal-body {
    padding: 0;
    max-height: 85vh;
}

.help-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.help-hero {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    padding: 48px 32px;
    text-align: center;
}

.help-hero .hero-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.help-hero h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.help-hero p {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
}

.help-content {
    padding: 32px;
    overflow-y: auto;
    flex: 1;
}

.help-section {
    margin-bottom: 40px;
}

.help-section:last-child {
    margin-bottom: 0;
}

.workflow-overview {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
}

.workflow-step {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-gray);
    border-radius: 8px;
    transition: all 0.2s;
}

.workflow-step:hover {
    background: #e5e7eb;
    transform: translateX(4px);
}

.generation-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px;
    background: var(--bg-gray);
    border-radius: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.flow-step {
    text-align: center;
    min-width: 120px;
}

.flow-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.flow-step span {
    font-size: 12px;
    color: var(--text);
    font-weight: 500;
}

.flow-arrow {
    font-size: 20px;
    color: var(--text-light);
}

.key-features {
    margin-top: 32px;
}

.key-features h4 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: var(--text);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.tip {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--bg-gray);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.tip-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.tip-content strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
    font-size: 14px;
}

.tip-content p {
    margin: 0;
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.4;
}

.chrome-extension-tip {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #0ea5e9;
}

.tip-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.tip-header h4 {
    margin: 0;
    color: #0369a1;
    font-size: 16px;
    font-weight: 600;
}

.chrome-extension-tip p {
    margin: 0;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.5;
}

.help-footer {
    padding: 24px 32px;
    background: var(--bg-gray);
    border-top: 1px solid var(--border);
    text-align: center;
}

/* Special Agent Cards */
.agent-card-special {
    position: relative;
}

.agent-card {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
    position: relative;
    overflow: hidden;
}

.agent-card:hover {
    border-color: var(--primary-hover);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
    transform: translateY(-2px);
}


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

.agent-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-agent {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn-agent:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.agent-content {
    color: var(--text);
}

.agent-content p {
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 12px 0;
    color: var(--text-light);
}

.agent-model-info {
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
    background: rgba(37, 99, 235, 0.1);
    padding: 6px 12px;
    border-radius: 4px;
    display: inline-block;
    font-family: monospace;
}

.agent-error {
    font-size: 12px;
    color: var(--danger);
    font-style: italic;
}

/* Generation Status Card */
.generation-status-card {
    position: relative;
}

.status-card {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

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

.status-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-content {
    color: var(--text);
}

.status-content p {
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 12px 0;
    color: var(--text-light);
}

.status-info {
    font-size: 12px;
    color: var(--text-dark);
    font-weight: 500;
    background: var(--bg-gray);
    padding: 6px 12px;
    border-radius: 4px;
    display: inline-block;
}

/* Equal height cards */
.generation-top-row {
    align-items: stretch;
}

.agent-card, .status-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.agent-content, .status-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Generation stats */
.generation-stats {
    display: flex;
    gap: 16px;
    padding: 12px;
    background: var(--bg-gray);
    border-radius: 6px;
    margin: 12px 0;
    font-size: 12px;
    flex-wrap: wrap;
}

.generation-stats div {
    color: var(--text);
}

/* Status actions */
.status-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 16px;
}

.status-actions .btn {
    flex: 1;
}

/* Newsletter Creation Modal */
.newsletter-creation-modal-overlay .modal {
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

.newsletter-creation-modal {
    padding: 20px;
}

.newsletter-creation-modal .form-group {
    margin-bottom: 20px;
}

.newsletter-creation-modal .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text);
}

.newsletter-creation-modal .form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.newsletter-creation-modal .form-group input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.sources-section {
    margin-top: 30px;
    padding: 20px;
    background: var(--bg-gray);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.sources-section h3 {
    margin-bottom: 8px;
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
}

.sources-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.sources-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.source-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: border-color 0.2s;
}

.source-item:hover {
    border-color: var(--primary);
}

.source-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.source-type {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 120px;
}

.source-icon {
    font-size: 16px;
}

.source-type-label {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
}

.source-url {
    flex: 1;
}

.source-url input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 13px;
    transition: border-color 0.2s;
}

.source-url input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.source-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.source-actions select {
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 12px;
    background: white;
    min-width: 100px;
}

.source-actions select:focus {
    border-color: var(--primary);
    outline: none;
}

.source-actions .btn {
    padding: 4px 8px;
    font-size: 11px;
    min-width: auto;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.form-actions .btn {
    min-width: 120px;
}

/* Inactive Block Cards */
.card.is-off {
    background-color: #f1f3f5;
    opacity: 0.7;
    padding: 12px 16px;
    cursor: default;
}

.card.is-off:hover {
    transform: none;
    box-shadow: var(--shadow);
}

.card.is-off .card-header {
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

.card.is-off .card-title {
    font-size: 14px;
    color: var(--text-light);
    text-decoration: line-through;
    font-weight: normal;
}

.card.is-off .card-content,
.card.is-off .card-status,
.card.is-off .card-actions {
    display: none;
}

.card.is-off .off-actions {
    display: flex;
    gap: 8px;
}

.card.is-off .off-actions .btn {
    padding: 4px 8px;
    font-size: 11px;
}