:root {
    --theme-start: #4f46e5;
    --theme-end: #7c3aed;
    --quote-header-start: #1e3a8a;
    --quote-header-end: #3b82f6;
    --receipt-header-start: #065f46;
    --receipt-header-end: #10b981;
}

html.dark {
    color-scheme: dark;
}

body {
    font-family: 'Sarabun', 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.gradient-bg {
    background: linear-gradient(135deg, var(--theme-start), var(--theme-end));
}

/* Template Accent Colors */
.professional.quote-header-accent { border-image-source: linear-gradient(to left, var(--quote-header-start), var(--quote-header-end)); }
.professional.receipt-header-accent { border-image-source: linear-gradient(to left, var(--receipt-header-start), var(--receipt-header-end)); }
.modern.quote-header-accent { background-color: var(--quote-header-end); }
.modern.receipt-header-accent { background-color: var(--receipt-header-end); }
.compact.quote-header-accent { background-color: var(--quote-header-start); }
.compact.receipt-header-accent { background-color: var(--receipt-header-start); }
.creative.quote-header-accent { background: linear-gradient(135deg, var(--quote-header-start), var(--quote-header-end)); }
.creative.receipt-header-accent { background: linear-gradient(135deg, var(--receipt-header-start), var(--receipt-header-end)); }


.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.a4-container {
    width: 210mm;
    min-height: 297mm;
    margin: 2rem auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    background: white;
    color: #111827; /* Default text color for preview */
}

@media print {
    body * { visibility: hidden; }
    #preview-modal, #preview-modal * {
        visibility: visible;
    }
    #preview-modal {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        overflow: visible;
        background: none;
    }
    .a4-container {
        margin: 0;
        box-shadow: none;
        width: 100%;
        min-height: unset;
    }
    .print-hide {
        display: none;
    }
}
 /* Toggle Switch */
.toggle-checkbox:checked {
    right: 0;
    border-color: #4f46e5;
}
.toggle-checkbox:checked + .toggle-label {
    background-color: #4f46e5;
}
/* Template Selector */
.template-option {
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease-in-out;
}
.template-option.selected {
    border-color: #4f46e5; /* indigo-600 */
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}