/* Lorvix Billing light theme. Dark mode continues to use the existing theme unchanged. */
html[data-theme="light"] {
    color-scheme: light;
    --bs-body-color: #182230;
    --bs-body-color-rgb: 24, 34, 48;
    --bs-body-bg: #f4f7fb;
    --bs-body-bg-rgb: 244, 247, 251;
    --bs-emphasis-color: #101828;
    --bs-secondary-color: #5f6c7d;
    --bs-secondary-bg: #e9eef5;
    --bs-tertiary-bg: #f7f9fc;
    --bs-border-color: #d6dee9;
    --bs-link-color: #0b63ce;
    --bs-link-hover-color: #084f9f;
}

html[data-theme="light"] body {
    background: #f4f7fb;
    color: #182230;
}

html[data-theme="light"] .app-main {
    width: 100%;
}

html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] h5,
html[data-theme="light"] h6 {
    color: #101828;
}

/* Keep the branded navigation and footer intentionally dark. */
html[data-theme="light"] .navbar h1,
html[data-theme="light"] .navbar h2,
html[data-theme="light"] .navbar h3,
html[data-theme="light"] .navbar h4,
html[data-theme="light"] .navbar h5,
html[data-theme="light"] footer h5 {
    color: #fff;
}

html[data-theme="light"] .card.text-white,
html[data-theme="light"] .card.text-white h1,
html[data-theme="light"] .card.text-white h2,
html[data-theme="light"] .card.text-white h3,
html[data-theme="light"] .card.text-white h4,
html[data-theme="light"] .card.text-white h5,
html[data-theme="light"] .card.text-white h6 {
    color: #fff;
}

html[data-theme="light"] .text-muted {
    color: #667085 !important;
}

html[data-theme="light"] .card,
html[data-theme="light"] .modal-content,
html[data-theme="light"] .dropdown-menu,
html[data-theme="light"] .list-group-item {
    color: #182230;
    background-color: #fff;
    border-color: #d6dee9;
}

html[data-theme="light"] .card {
    border: 1px solid #dde4ee;
    box-shadow: 0 4px 16px rgba(31, 42, 68, 0.07);
}

html[data-theme="light"] .auth-card {
    color: #182230;
    background-color: #fff;
    border: 1px solid #dde4ee;
    box-shadow: 0 12px 32px rgba(31, 42, 68, 0.1);
}

html[data-theme="light"] .auth-card .form-label {
    color: #253044;
}

html[data-theme="light"] .auth-card .btn-secondary:disabled {
    color: #526072;
    background-color: #e9eef5;
    border-color: #cbd5e1;
    opacity: 1;
}

html[data-theme="light"] .card-header,
html[data-theme="light"] .modal-header,
html[data-theme="light"] .modal-footer {
    border-color: #e1e7ef;
}

html[data-theme="light"] .dropdown-menu {
    box-shadow: 0 12px 30px rgba(31, 42, 68, 0.16);
}

html[data-theme="light"] .dropdown-item {
    color: #253044;
}

html[data-theme="light"] .dropdown-item:hover,
html[data-theme="light"] .dropdown-item:focus {
    color: #0b63ce;
    background: #eef5ff;
}

html[data-theme="light"] .dropdown-divider {
    border-color: #e2e8f0;
}

.theme-switch-label {
    color: inherit;
    cursor: pointer;
    white-space: nowrap;
}

.theme-switch-row .form-switch {
    min-height: auto;
}

.theme-switch-row .form-check-input {
    cursor: pointer;
}

html[data-theme="light"] .theme-switch-row:hover {
    background: #f7f9fc;
}

html[data-theme="light"] .form-label,
html[data-theme="light"] .col-form-label {
    color: #253044;
}

html[data-theme="light"] .form-control,
html[data-theme="light"] .form-select,
html[data-theme="light"] .input-group-text {
    color: #182230;
    background-color: #fff;
    border-color: #cbd5e1;
}

html[data-theme="light"] .form-control::placeholder {
    color: #8a96a8;
}

html[data-theme="light"] .date-filter-group .date-picker-trigger {
    color: #475467;
    background: #fff;
    border-color: #cbd5e1;
}

html[data-theme="light"] .date-filter-group .date-picker-trigger:hover,
html[data-theme="light"] .date-filter-group .date-picker-trigger:focus {
    color: #fff;
    background: #0d6efd;
    border-color: #0d6efd;
}

html[data-theme="light"] .invoice-date-group .form-control[readonly] {
    color: #182230;
    background-color: #fff;
}

html[data-theme="light"] .form-control:disabled,
html[data-theme="light"] .form-select:disabled,
html[data-theme="light"] .form-control[readonly] {
    color: #526072;
    background-color: #eef2f6;
}

html[data-theme="light"] input:invalid {
    border-color: #cbd5e1 !important;
}

html[data-theme="light"] .table {
    --bs-table-color: #253044;
    --bs-table-bg: #fff;
    --bs-table-border-color: #e1e7ef;
    --bs-table-striped-bg: #f8fafc;
    --bs-table-hover-bg: #eef5ff;
    color: #253044;
    background: #fff;
}

html[data-theme="light"] .table th {
    color: #344054;
    background: #f1f5f9;
    border-color: #dce3ec;
}

html[data-theme="light"] .table td {
    border-color: #e5eaf1;
}

html[data-theme="light"] .table-hover tbody tr:hover {
    color: #182230;
    background: #eef5ff;
}

html[data-theme="light"] .table-hover tbody tr:hover > * {
    color: inherit;
    background-color: #eef5ff;
}

html[data-theme="light"] .table-sort-link,
html[data-theme="light"] .customer-name-link {
    color: #0b63ce;
}

html[data-theme="light"] .invoice-item-row,
html[data-theme="light"] #itemsTable tbody tr {
    background: #f8fafc;
    border-color: #dde4ee;
}

html[data-theme="light"] #itemsTable tbody td::before {
    color: #667085;
}

html[data-theme="light"] .invoice-totals {
    background: #eef5ff;
    border: 1px solid #d7e7fb;
}

html[data-theme="light"] .summary-card,
html[data-theme="light"] .purchase-card {
    color: #182230;
    background: #fff;
    border-color: #dbe3ed;
}

html[data-theme="light"] .purchase-form-card.bg-dark {
    color: #182230;
    background: #fff !important;
    border-color: #d6dee9 !important;
    box-shadow: 0 8px 24px rgba(31, 42, 68, 0.08);
}

html[data-theme="light"] .purchase-form-card .form-label {
    color: #344054;
}

html[data-theme="light"] .purchase-form-card .text-muted {
    color: #667085 !important;
}

html[data-theme="light"] .purchase-form-card .alert-info {
    color: #075985;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
}

html[data-theme="light"] .purchase-card {
    box-shadow: 0 8px 24px rgba(31, 42, 68, 0.08);
}

html[data-theme="light"] .summary-card .label,
html[data-theme="light"] .purchase-card-subtitle,
html[data-theme="light"] .purchase-card-field .label {
    color: #667085;
}

html[data-theme="light"] .progress {
    background: #e5eaf1;
}

html[data-theme="light"] .skeleton {
    background: linear-gradient(90deg, #e8edf3 25%, #f6f8fb 50%, #e8edf3 75%);
    background-size: 200% 100%;
}

html[data-theme="light"] ::-webkit-scrollbar-track {
    background: #edf1f5;
}

html[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: #b6c0cd;
}

html[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: #8f9baa;
}

/* Page-local dark panels */
html[data-theme="light"] .accounts-page,
html[data-theme="light"] .analytics-page,
html[data-theme="light"] .monthly-detail-page,
html[data-theme="light"] .templates-page {
    color: #182230;
}

html[data-theme="light"] .accounts-title,
html[data-theme="light"] .accounts-page h1,
html[data-theme="light"] .analytics-page h1,
html[data-theme="light"] .templates-page h1 {
    color: #101828;
}

html[data-theme="light"] .accounts-subtitle,
html[data-theme="light"] .analytics-subtitle,
html[data-theme="light"] .monthly-detail-subtitle,
html[data-theme="light"] .templates-intro {
    color: #667085;
}

html[data-theme="light"] .period-chip {
    color: #075985;
    background: #e0f2fe;
    border-color: #7dd3fc;
    box-shadow: 0 6px 16px rgba(14, 116, 144, 0.1);
}

html[data-theme="light"] .tax-panel,
html[data-theme="light"] .tax-panel h4,
html[data-theme="light"] .tax-panel h5,
html[data-theme="light"] .tax-panel p {
    color: #fff;
}

html[data-theme="light"] .analytics-shell h2,
html[data-theme="light"] .month-card-value,
html[data-theme="light"] .month-card-label,
html[data-theme="light"] .monthly-panel h5,
html[data-theme="light"] .revenue-stat strong {
    color: #182230;
}

html[data-theme="light"] .month-card-label,
html[data-theme="light"] .monthly-muted {
    color: #667085;
}

html[data-theme="light"] .monthly-panel,
html[data-theme="light"] .revenue-stat {
    color: #182230;
    background: #fff;
    border-color: #d8e0ea;
}

html[data-theme="light"] .monthly-panel {
    box-shadow: 0 8px 24px rgba(31, 42, 68, 0.08);
}

html[data-theme="light"] .customer-summary-actions .btn {
    width: auto;
    margin: 0;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    html[data-theme="light"] .customer-summary-header {
        align-items: flex-start !important;
        flex-direction: column;
    }

    html[data-theme="light"] .customer-summary-actions {
        flex-wrap: wrap;
    }
}

html[data-theme="light"] .accounts-filter,
html[data-theme="light"] .accounts-panel,
html[data-theme="light"] .analytics-panel,
html[data-theme="light"] .month-card,
html[data-theme="light"] .monthly-detail-card,
html[data-theme="light"] .template-list,
html[data-theme="light"] .template-preview-panel,
html[data-theme="light"] .template-option,
html[data-theme="light"] .product-suggestions {
    color: #182230;
    background: #fff;
    border-color: #d8e0ea;
}

html[data-theme="light"] .template-option:hover,
html[data-theme="light"] .template-option.active {
    background: #eef5ff;
}

html[data-theme="light"] .template-option h3,
html[data-theme="light"] .template-preview-panel h2,
html[data-theme="light"] .monthly-detail-card h2,
html[data-theme="light"] .product-suggestion-description {
    color: #182230;
}

html[data-theme="light"] .template-option p,
html[data-theme="light"] .template-option small,
html[data-theme="light"] .template-preview-panel p,
html[data-theme="light"] .product-suggestion-meta {
    color: #667085;
}

html[data-theme="light"] .product-suggestion:hover,
html[data-theme="light"] .product-suggestion.is-active {
    background: #eef5ff;
}

/* Existing profile sections use Bootstrap's dark utility inline. */
html[data-theme="light"] .profile-card,
html[data-theme="light"] [style*="background-color: var(--bs-dark)"] {
    color: #182230 !important;
    background-color: #fff !important;
    border: 1px solid #dbe3ed;
}

html[data-theme="light"] [style*="background-color: var(--bs-dark)"] .text-light {
    color: #253044 !important;
}

html[data-theme="light"] .form-control.bg-dark.text-light,
html[data-theme="light"] .form-select.bg-dark.text-light {
    color: #182230 !important;
    background: #fff !important;
    border-color: #cbd5e1 !important;
}

html[data-theme="light"] .subscription-date {
    color: #253044;
}

html[data-theme="light"] .referral-copy-btn {
    color: #344054;
    background: #fff;
    border-color: #98a2b3;
}

html[data-theme="light"] .referral-copy-btn:hover,
html[data-theme="light"] .referral-copy-btn:focus {
    color: #fff;
    background: #475467;
    border-color: #475467;
}

html[data-theme="light"] .modal-content.bg-dark,
html[data-theme="light"] .register-plan-modal .modal-content {
    color: #182230 !important;
    background: #fff !important;
}

html[data-theme="light"] .modal-content.bg-dark .text-white,
html[data-theme="light"] .register-plan-modal .text-white {
    color: #182230 !important;
}

html[data-theme="light"] .btn-close-white {
    filter: none;
}

/* Flatpickr */
html[data-theme="light"] .flatpickr-calendar {
    color: #182230;
    background: #fff;
    border: 1px solid #d6dee9;
    box-shadow: 0 18px 42px rgba(31, 42, 68, 0.18);
}

html[data-theme="light"] .flatpickr-current-month .flatpickr-monthDropdown-months,
html[data-theme="light"] .flatpickr-current-month input.cur-year,
html[data-theme="light"] .flatpickr-weekday,
html[data-theme="light"] .flatpickr-day,
html[data-theme="light"] .flatpickr-monthSelect-month {
    color: #253044;
}

html[data-theme="light"] .flatpickr-monthSelect-month {
    background: #f7f9fc;
    border: 1px solid #e0e6ee;
    border-radius: 8px;
}

html[data-theme="light"] .flatpickr-day:hover,
html[data-theme="light"] .flatpickr-monthSelect-month:hover {
    background: #e8f2ff;
    border-color: #b8d7fb;
}

html[data-theme="light"] .flatpickr-day.selected,
html[data-theme="light"] .flatpickr-day.startRange,
html[data-theme="light"] .flatpickr-day.endRange,
html[data-theme="light"] .flatpickr-monthSelect-month.selected {
    color: #fff;
    background: #0d6efd;
    border-color: #0d6efd;
}

/* A pricing shell may opt into the dark sales surface explicitly. */
html[data-theme="light"] .pricing-shell .plan-card {
    color: #f8fafc;
    background: #111827;
}

html[data-theme="light"] .pricing-shell .plan-card h3 {
    color: #f8fafc;
}

@media (max-width: 575.98px) {
    .theme-switch-row {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }
}
