/* Invoice Parser View Styles */

.invoice-parser-view {
    padding: 30px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.invoice-container {
    position: relative;
}

/* Header */
.invoice-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.invoice-header .header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.invoice-header .header-icon {
    font-size: 48px;
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary), #9333ea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.invoice-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.invoice-header .subtitle {
    font-size: 15px;
    color: var(--text-muted);
    margin: 5px 0 0;
}

/* Grid Layout */
.invoice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .invoice-grid {
        grid-template-columns: 1fr;
    }
}

/* Cards */
.invoice-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}

.invoice-card .card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-main);
    background: var(--bg-hover);
}

.invoice-card .card-header i {
    font-size: 18px;
    color: var(--primary);
}

.invoice-card .card-header .copy-btn {
    margin-left: auto;
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-body);
    color: var(--text-main);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.invoice-card .card-header .copy-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.invoice-card .card-header .copy-btn.copied {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

/* Input Section */
.input-section {
    display: flex;
    flex-direction: column;
}

.invoice-textarea {
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 300px;
    padding: 24px;
    border: none;
    resize: none;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-main);
    background: transparent;
    z-index: 2;
    position: relative;
}

.invoice-textarea::placeholder {
    color: transparent;
}

/* Enhanced Input Wrapper */
.invoice-input-wrapper {
    position: relative;
    width: 100%;
    min-height: 300px;
    background: var(--bg-body);
    border-radius: 12px;
    border: 2px dashed var(--border-color);
    transition: all 0.2s;
    overflow: hidden;
}

.invoice-input-wrapper:hover,
.invoice-input-wrapper:focus-within {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
}

.input-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
    pointer-events: none;
    color: var(--text-muted);
}

.placeholder-icon {
    font-size: 3rem;
    color: var(--text-muted);
    opacity: 0.5;
    margin-bottom: 20px;
}

.placeholder-options {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    background: var(--bg-card);
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.option span {
    font-size: 0.8rem;
    font-weight: 500;
}

.key-badge {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    padding: 4px 8px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
}

.divider {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    opacity: 0.6;
    text-transform: uppercase;
}

.placeholder-hint {
    font-size: 0.95rem;
    opacity: 0.7;
    font-weight: 500;
}

.invoice-textarea:focus {
    outline: none;
}

.analyze-btn {
    margin: 16px;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary), #9333ea);
    color: white;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.analyze-btn:hover {
    
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.35);
}

.analyze-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.analyze-btn i {
    font-size: 18px;
}

/* Results Section */
.results-section .result-content {
    padding: 20px;
}

.results-section.empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 64px;
    opacity: 0.3;
    margin-bottom: 16px;
    display: block;
}

.empty-state p {
    font-size: 15px;
    margin: 0;
}

/* Offer Summary */
.offer-summary {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1));
    border-radius: 12px;
    margin-bottom: 20px;
}

.offer-badge {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.offer-badge.box {
    background: linear-gradient(135deg, #d40000, #ff4444);
}

.offer-badge.mobile {
    background: linear-gradient(135deg, #cc0000, #ff5252);
    color: white;
}

.offer-details h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 6px;
}

.price-display {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.price-display .price {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.price-display .period {
    font-size: 14px;
    color: var(--text-muted);
}

.first-invoice-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    margin-left: auto;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

.summary-text {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    overflow-x: auto;
}

.summary-text pre {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-main);
    white-space: pre-wrap;
    margin: 0;
}

/* Service Sections */
.service-section {
    margin-bottom: 24px;
}

.service-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.service-section.included h4 i {
    color: #10b981;
}

.service-section.paid h4 i {
    color: #f59e0b;
}

/* Service Tags */
.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.service-tag {
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.service-tag.included {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Options List */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-hover);
    border-radius: 10px;
}

.option-name {
    font-size: 14px;
    color: var(--text-main);
}

.option-price {
    font-size: 14px;
    font-weight: 600;
    color: #f59e0b;
}

.option-item.remise {
    background: rgba(16, 185, 129, 0.1);
}

.option-price.remise-price {
    color: #10b981;
}

.included-badge {
    font-size: 11px;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    font-weight: 500;
}

.service-section.remises h4 i {
    color: #10b981;
}

/* No Extras */
.no-extras {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    background: var(--bg-hover);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 14px;
}

.no-extras i {
    font-size: 20px;
    color: var(--primary);
}

/* Copy Toast */
.copy-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #10b981;
    color: white;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.4);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
}

.copy-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.copy-toast i {
    font-size: 18px;
}

/* Debug Section */
.debug-section {
    margin-top: 20px;
    padding: 12px 16px;
    background: var(--bg-hover);
    border-radius: 10px;
    font-size: 13px;
}

.debug-section summary {
    cursor: pointer;
    font-weight: 500;
    color: var(--text-muted);
}

.debug-section ul {
    margin: 10px 0 0;
    padding-left: 20px;
    color: var(--text-main);
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 12px;
    line-height: 1.8;
}

/* Config Button */
.config-btn {
    padding: 10px 18px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.config-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Config Info */
.config-info {
    margin-top: 16px;
    padding: 10px 14px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.config-info i {
    color: #3b82f6;
}

/* Admin Config Modal */
.config-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.config-modal {
    background: var(--bg-card);
    border-radius: 20px;
    width: 100%;
    max-width: 700px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

.config-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-hover);
}

.config-modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Config Tabs */
.config-tabs {
    display: flex;
    gap: 8px;
}

.config-tabs button {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.config-tabs button:hover {
    background: var(--bg-body);
    color: var(--text-main);
}

.config-tabs button.active {
    background: var(--primary);
    color: white;
}

/* Services Config Tab */
.services-config {
    max-width: 600px;
    margin: 0 auto;
}

.services-list-config {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.service-item-config {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.service-item-config .service-name {
    flex: 1;
    font-size: 14px;
    color: var(--text-main);
}

.service-item-config .service-actions {
    display: flex;
    gap: 8px;
}

.service-item-config .edit-btn,
.service-item-config .delete-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.service-item-config .edit-btn {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.service-item-config .edit-btn:hover {
    background: #3b82f6;
    color: white;
}

.service-item-config .delete-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.service-item-config .delete-btn:hover {
    background: #ef4444;
    color: white;
}

.service-edit-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--primary);
    border-radius: 8px;
    background: var(--bg-main);
    color: var(--text-main);
    font-size: 14px;
}

.add-service-section {
    text-align: center;
    padding: 20px;
}

.add-service-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.add-service-btn:hover {
    background: #7c3aed;
}

.add-service-form {
    display: flex;
    gap: 10px;
    padding: 16px;
    background: var(--bg-hover);
    border-radius: 12px;
}

.service-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-main);
    color: var(--text-main);
    font-size: 14px;
}

.service-input:focus {
    outline: none;
    border-color: var(--primary);
}

.confirm-btn.small,
.cancel-btn.small {
    width: 32px;
    height: 32px;
    font-size: 14px;
}

.config-modal-header h2 i {
    color: var(--primary);
}

.config-modal-header .close-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: var(--bg-body);
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.config-modal-header .close-btn:hover {
    background: #ef4444;
    color: white;
}

.config-modal-body {
    padding: 24px;
    overflow-y: auto;
}

.config-hint {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 20px;
    line-height: 1.5;
}

.offers-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Wide modal for offers grid */
.config-modal.wide {
    max-width: 80%;
    width: 80%;
}

/* Offers grid layout - side by side with wrap */
.offers-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
}

.offers-grid .offer-config-card {
    flex: 1 1 320px;
    max-width: calc(50% - 10px);
    min-width: 300px;
}

@media (max-width: 900px) {
    .config-modal.wide {
        max-width: 95%;
        width: 95%;
    }

    .offers-grid .offer-config-card {
        max-width: 100%;
        flex: 1 1 100%;
    }
}

/* Drag handle */
.drag-handle {
    cursor: grab;
    color: var(--text-muted) !important;
    font-size: 16px !important;
}

.drag-handle:hover {
    color: var(--primary) !important;
}

/* Dragging state */
.offer-config-card.dragging {
    opacity: 0.5;
    transform: scale(0.98);
    border-color: var(--primary);
}

.offer-config-card[draggable="true"] {
    cursor: grab;
    transition: transform 0.2s, opacity 0.2s, box-shadow 0.2s;
}

.offer-config-card[draggable="true"]:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Add offer card in grid */
.offers-grid .add-offer-card {
    flex: 1 1 320px;
    max-width: calc(50% - 10px);
    min-width: 300px;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.offer-config-card {
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
}

.offer-config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: var(--bg-body);
    border-bottom: 1px solid var(--border-color);
}

.offer-config-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-main);
}

.offer-config-name i {
    color: #d40000;
    font-size: 18px;
}

.offer-config-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.offer-config-services {
    padding: 16px 18px;
}

.services-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    min-height: 32px;
}

.service-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.service-chip .remove-chip {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.service-chip .remove-chip:hover {
    background: #ef4444;
    color: white;
}

.no-services {
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
}

.add-service-row {
    display: flex;
    gap: 8px;
}

.service-select {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-main);
    color: var(--text-main);
    font-size: 14px;
    cursor: pointer;
}

.service-select:focus {
    outline: none;
    border-color: var(--primary);
}

.add-service-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    background: var(--primary);
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.add-service-btn:hover:not(:disabled) {
    background: #7c3aed;
    transform: scale(1.05);
}

.add-service-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Checkbox Grid */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.service-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.service-checkbox:hover {
    border-color: var(--primary);
}

.service-checkbox input[type="checkbox"] {
    display: none;
}

.service-checkbox .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.service-checkbox input:checked+.checkmark {
    background: #10b981;
    border-color: #10b981;
}

.service-checkbox input:checked+.checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.service-checkbox .service-label {
    font-size: 13px;
    color: var(--text-main);
}

/* Offer Actions */
.offer-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.delete-offer-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.delete-offer-btn:hover {
    background: #ef4444;
    color: white;
}

/* Add Offer Card */
.add-offer-card {
    border: 2px dashed var(--border-color);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.add-offer-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.add-offer-btn:hover {
    background: #7c3aed;
    transform: scale(1.02);
}

.add-offer-btn i {
    font-size: 18px;
}

/* New Offer Form */
.new-offer-form {
    display: flex;
    gap: 10px;
    padding: 16px;
    align-items: center;
}

.offer-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-body);
    color: var(--text-main);
    font-size: 14px;
}

.offer-input.price-input {
    max-width: 100px;
}

.offer-input:focus {
    outline: none;
    border-color: var(--primary);
}

.confirm-btn,
.cancel-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
}

.confirm-btn {
    background: #10b981;
    color: white;
}

.confirm-btn:hover:not(:disabled) {
    background: #059669;
}

.confirm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cancel-btn {
    background: var(--bg-hover);
    color: var(--text-muted);
}

.cancel-btn:hover {
    background: #ef4444;
    color: white;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.error-msg {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
}

.no-offers {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.no-offers i {
    font-size: 32px;
    opacity: 0.5;
}

.rotating {
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Dark Mode */
[data-theme="dark"] .invoice-textarea {
    background: transparent;
}

[data-theme="dark"] .offer-summary {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(236, 72, 153, 0.15));
}

[data-theme="dark"] .config-modal {
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .service-checkbox {
    background: var(--bg-hover);
}

/* New Analyze Button in Header */
.invoice-card .card-header .analyze-action-btn {
    margin-left: auto;
    padding: 6px 14px;
    border: none;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.invoice-card .card-header .analyze-action-btn:hover:not(:disabled) {
    opacity: 0.9;
}

.invoice-card .card-header .analyze-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--text-muted);
}

/* Ensure header text is strictly left aligned */
.invoice-header .header-content,
.invoice-header .header-content>div {
    text-align: left !important;
    justify-content: flex-start;
}

.invoice-header {
    justify-content: space-between;
    /* Keep spacing but ensure left part is left */
}

/* Legal Disclaimer */
.legal-disclaimer {
    margin-top: 20px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.disclaimer-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.4;
}

.disclaimer-item i {
    font-size: 16px;
    color: var(--primary);
    transform: translateY(2px);
    flex-shrink: 0;
}

.disclaimer-item.warning i {
    font-size: 16px;
    color: #eab308;
    /* Yellow/Orange for vigilance */
}

.disclaimer-item strong {
    color: var(--text-main);
    font-weight: 600;
}

[data-theme="dark"] .legal-disclaimer {
    background: rgba(255, 255, 255, 0.03);
}
