/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: url('z7291678369186_d294643f0876869014da14d7e57bac05.jpg') center center / cover no-repeat fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.65);
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header */
.header {
    margin-bottom: 2rem;
}

.header-content {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo svg {
    flex-shrink: 0;
}

.logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.logo p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Card */
.card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.card-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

.card-header > div:first-child {
    flex: 1;
}

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.card-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

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

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s;
    margin-left: 0.25rem;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.1);
}

.info-icon:hover {
    opacity: 1;
    background: rgba(102, 126, 234, 0.2);
    transform: scale(1.1);
}

.info-icon:active {
    transform: scale(0.95);
}

.required {
    color: var(--error);
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
    font-family: inherit;
    width: 100%;
}

.form-group select {
    cursor: pointer;
    background-color: white;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.help-text {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.help-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.help-text-collapsible {
    overflow: hidden;
    transition: all 0.3s ease;
    animation: slideDown 0.3s ease;
}

.help-text-collapsible.hidden {
    max-height: 0;
    margin-top: 0 !important;
    padding: 0;
    opacity: 0;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.checkbox-group {
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 400;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

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

/* Progress Section */
.progress-content {
    padding: 1rem 0;
}

.progress-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.progress-step {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: 12px;
    opacity: 0.5;
    transition: all 0.3s;
}

.progress-step.active {
    opacity: 1;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 2px solid var(--primary);
}

.progress-step.completed {
    opacity: 1;
}

.step-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.25rem;
    flex-shrink: 0;
    border: 2px solid var(--border);
}

.progress-step.active .step-icon {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.progress-step.completed .step-icon {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.progress-step.completed .step-icon::before {
    content: "✓";
}

.step-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.step-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    width: 0%;
    transition: width 0.5s ease;
}

.progress-note {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

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

/* Metadata Grid */
.metadata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.metadata-item {
    padding: 1.25rem;
    background: var(--bg-primary);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.metadata-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.metadata-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.metadata-value.small {
    font-size: 1rem;
}

/* Scenarios */
.scenarios-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0;
    color: var(--text-primary);
}

.scenarios-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-1px);
}

.btn-action svg {
    flex-shrink: 0;
}

.scenario-card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 2px solid var(--border);
    transition: all 0.2s;
}

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

.scenario-header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
    border-radius: 8px;
    padding: 0.5rem;
    margin: -0.5rem;
    margin-bottom: 0.5rem;
}

.scenario-header-wrapper:hover {
    background: rgba(102, 126, 234, 0.05);
}

.scenario-toggle-btn {
    background: transparent;
    border: 2px solid var(--border);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    color: var(--text-secondary);
}

.scenario-toggle-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: scale(1.05);
}

.scenario-toggle-btn .toggle-icon {
    transition: transform 0.3s ease;
}

.scenario-toggle-btn.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.scenario-content {
    max-height: 5000px;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 1;
}

.scenario-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.scenario-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.scenario-id {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary);
    color: white;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 0.75rem;
}

.scenario-name-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.scenario-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.scenario-hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 400;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.scenario-header-wrapper:hover .scenario-hint {
    opacity: 1;
    color: var(--primary);
}

.scenario-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.scenario-section {
    margin-bottom: 1.5rem;
}

.scenario-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.35rem 0.75rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.script-flow {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.script-step {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
}

.script-step-number {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.script-step-content {
    flex: 1;
}

.script-step-goal {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.script-step-template {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.examples {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.example {
    padding: 1rem;
    background: white;
    border-radius: 8px;
}

.example-message {
    margin-bottom: 0.75rem;
}

.example-message:last-child {
    margin-bottom: 0;
}

.example-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.example-text {
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* Conversation Flow */
.conversation-flow {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.flow-step {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.flow-step-number {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.flow-step-content {
    flex: 1;
}

.flow-step-when {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: #f0f7ff;
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.flow-step-when strong {
    color: var(--primary);
    margin-right: 0.5rem;
}

.flow-step-response {
    padding: 0.5rem;
    background: #f0fdf4;
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.flow-step-response strong {
    color: var(--success);
    margin-right: 0.5rem;
}

/* Copy Button Styles */
.copy-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
    opacity: 0.6;
}

.copy-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
    opacity: 1;
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn.copied {
    color: var(--success);
    opacity: 1;
}

.copy-btn svg {
    width: 14px;
    height: 14px;
}

.scenario-name .copy-btn svg {
    width: 16px;
    height: 16px;
}

/* Flow step text wrapper for copy button alignment */
.flow-step-when,
.flow-step-response {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.flow-step-text {
    flex: 1;
}

/* Questions and Answers Lists (Legacy support) */
.questions-list,
.answers-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.question-item,
.answer-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 8px;
    align-items: flex-start;
}

.question-item .bullet {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.answer-item .bullet {
    color: var(--success);
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.question-item span:last-child,
.answer-item span:last-child {
    flex: 1;
    line-height: 1.6;
}

/* Error Section */
.error-content {
    text-align: center;
    padding: 2rem;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.error-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--error);
}

.error-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .logo {
        flex-direction: column;
        align-items: flex-start;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .header-actions {
        width: 100%;
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .scenario-header {
        flex-direction: column;
    }

    .metadata-grid {
        grid-template-columns: 1fr;
    }
    
    .flow-step {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .flow-step-number {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }
    
    .scenario-name {
        font-size: 1.1rem;
    }
    
    .copy-btn {
        padding: 0.35rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease;
}

/* Summaries */
.summary-card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 2px solid var(--border);
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.summary-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-stage {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
}

.badge-result {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-result.lost {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.badge-result.pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.summary-content {
    display: grid;
    gap: 1rem;
}

.summary-field {
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
}

.summary-field-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.summary-field-value {
    color: var(--text-primary);
}

.summary-field-value ul {
    list-style: none;
    padding-left: 0;
}

.summary-field-value li {
    padding: 0.25rem 0;
    padding-left: 1.25rem;
    position: relative;
}

.summary-field-value li::before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: var(--primary);
}

/* Saved Pages */
/* Custom Select Dropdown */
.custom-select-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.custom-select {
    position: relative;
    width: 100%;
}

.select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 48px;
}

.select-trigger:hover {
    border-color: var(--primary);
}

.custom-select.open .select-trigger {
    border-color: var(--primary);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.select-trigger span {
    flex: 1;
    color: var(--text-primary);
}

.select-trigger span.placeholder {
    color: var(--text-secondary);
}

.select-arrow {
    transition: transform 0.2s ease;
    color: var(--text-secondary);
}

.custom-select.open .select-arrow {
    transform: rotate(180deg);
}

.select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 2px solid var(--primary);
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 400px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.select-dropdown.hidden {
    display: none;
}

.select-search {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 1;
}

.select-search input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.select-search input:focus {
    border-color: var(--primary);
}

.select-options {
    overflow-y: auto;
    max-height: 320px;
}

.select-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--border);
}

.select-option:last-child {
    border-bottom: none;
}

.select-option:hover {
    background: var(--bg-primary);
}

.select-option.selected {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
    font-weight: 600;
}

.select-option.loading,
.select-option.no-results {
    text-align: center;
    color: var(--text-secondary);
    cursor: default;
    padding: 1.5rem;
}

.select-option.no-results:hover {
    background: transparent;
}

.option-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.option-name {
    font-weight: 600;
    color: var(--text-primary);
}

.option-id {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.option-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
}

.option-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

.option-badge.category {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
}

/* Old styles - keep for backward compatibility */
.saved-pages-container {
    margin-bottom: 1.5rem;
}

.page-info {
    flex: 1;
}

.page-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.page-id {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: monospace;
    margin-bottom: 0.25rem;
}

.page-last-analyzed {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.page-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem;
    transition: transform 0.2s ease;
}

.btn-icon:hover {
    transform: scale(1.2);
}

.no-pages-text, .error-text {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.loading-text {
    text-align: center;
    padding: 1rem;
    color: var(--text-secondary);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 2rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.divider span {
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Manual input section */
#manualInputSection {
    transition: all 0.3s ease;
}

#manualInputDivider {
    transition: all 0.3s ease;
}

/* Deselect button */
#deselectPageBtn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* History Section */
.history-section {
    max-height: 80vh;
    overflow-y: auto;
}

.history-search-container {
    background: var(--bg-primary);
    position: sticky;
    top: 0;
    z-index: 10;
}

.history-search-container input {
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    transition: all 0.2s ease;
}

.history-search-container input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.history-list {
    display: grid;
    gap: 1rem;
    padding: 1.5rem;
}

.history-card {
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.history-page-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.history-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.history-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.no-history-text {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

/* Remove compact date input - now using grid-2 */

