/*
 * Parikesit visual identity for the Vuexy light theme.
 * Loaded after Vuexy and page-level vendor styles so vendor files stay untouched.
 */

:root {
  --app-primary: #0bb7a5;
  --app-primary-dark: #087f76;
  --app-primary-deeper: #075f59;
  --app-secondary: #1db4c3;
  --app-accent: #dce714;
  --app-warning: #f7931e;
  --app-danger: #c83b4b;
  --app-success: #1d9f70;
  --app-text: #213547;
  --app-muted: #667085;
  --app-surface: #ffffff;
  --app-background: #f3f8f8;
  --app-border: #dce8e7;
  --app-shadow: 0 14px 38px rgba(25, 72, 70, 0.12);
  --app-focus-ring: 0 0 0 0.2rem rgba(11, 183, 165, 0.24);
  --bs-font-sans-serif: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

[data-bs-theme="light"] {
  --bs-primary: var(--app-primary);
  --bs-primary-rgb: 11, 183, 165;
  --bs-secondary: var(--app-secondary);
  --bs-secondary-rgb: 29, 180, 195;
  --bs-info: var(--app-secondary);
  --bs-info-rgb: 29, 180, 195;
  --bs-success: var(--app-success);
  --bs-success-rgb: 29, 159, 112;
  --bs-warning: var(--app-warning);
  --bs-warning-rgb: 247, 147, 30;
  --bs-danger: var(--app-danger);
  --bs-danger-rgb: 200, 59, 75;
  --bs-body-color: var(--app-text);
  --bs-body-color-rgb: 33, 53, 71;
  --bs-heading-color: var(--app-text);
  --bs-secondary-color: var(--app-muted);
  --bs-secondary-color-rgb: 102, 112, 133;
  --bs-body-bg: var(--app-background);
  --bs-body-bg-rgb: 243, 248, 248;
  --bs-paper-bg: var(--app-surface);
  --bs-paper-bg-rgb: 255, 255, 255;
  --bs-base-color: var(--app-text);
  --bs-base-color-rgb: 33, 53, 71;
  --bs-border-color: var(--app-border);
  --bs-border-color-translucent: rgba(33, 53, 71, 0.14);
  --bs-link-color: var(--app-primary-dark);
  --bs-link-hover-color: var(--app-primary-deeper);
  --bs-link-color-rgb: 8, 127, 118;
  --bs-link-hover-color-rgb: 7, 95, 89;
  --bs-primary-text-emphasis: var(--app-primary-deeper);
  --bs-primary-bg-subtle: #e2f7f4;
  --bs-primary-border-subtle: #a8e4dd;
  --bs-secondary-text-emphasis: #116c76;
  --bs-secondary-bg-subtle: #e3f7f9;
  --bs-secondary-border-subtle: #a7dfe5;
  --bs-success-text-emphasis: #116044;
  --bs-success-bg-subtle: #e2f4ed;
  --bs-success-border-subtle: #a8dac8;
  --bs-info-text-emphasis: #116c76;
  --bs-info-bg-subtle: #e3f7f9;
  --bs-info-border-subtle: #a7dfe5;
  --bs-warning-text-emphasis: #8f4c00;
  --bs-warning-bg-subtle: #fff0de;
  --bs-warning-border-subtle: #f9c98e;
  --bs-danger-text-emphasis: #7c2430;
  --bs-danger-bg-subtle: #f8e7e9;
  --bs-danger-border-subtle: #e3aab1;
  --bs-focus-ring-color: rgba(11, 183, 165, 0.24);
  --bs-form-valid-color: var(--app-success);
  --bs-form-valid-border-color: var(--app-success);
  --bs-form-invalid-color: var(--app-danger);
  --bs-form-invalid-border-color: var(--app-danger);
  --bs-box-shadow: var(--app-shadow);
  --bs-box-shadow-xs: 0 2px 8px rgba(25, 72, 70, 0.08);
  --bs-box-shadow-sm: 0 5px 16px rgba(25, 72, 70, 0.1);
  --bs-box-shadow-lg: 0 18px 46px rgba(25, 72, 70, 0.16);
  --bs-floating-component-shadow: 0 14px 38px rgba(25, 72, 70, 0.18);
  --bs-navbar-bg: var(--app-surface);
  --bs-navbar-border-color: var(--app-border);
  --bs-navbar-box-shadow: 0 8px 24px rgba(25, 72, 70, 0.08);
  --bs-menu-header-color: var(--app-muted);
  --bs-nav-border-color: var(--app-border);
}

body {
  font-family: var(--bs-font-sans-serif);
  font-weight: 400;
  line-height: 24px;
}

[data-bs-theme="light"] h1,
[data-bs-theme="light"] .h1,
[data-bs-theme="light"] .page-title,
[data-bs-theme="light"] .display-1,
[data-bs-theme="light"] .display-2,
[data-bs-theme="light"] .display-3,
[data-bs-theme="light"] .display-4,
[data-bs-theme="light"] .display-5,
[data-bs-theme="light"] .display-6 {
  font-weight: 700;
}

[data-bs-theme="light"] h2,
[data-bs-theme="light"] h3,
[data-bs-theme="light"] h4,
[data-bs-theme="light"] h5,
[data-bs-theme="light"] h6,
[data-bs-theme="light"] .card-title,
[data-bs-theme="light"] .card-header {
  font-weight: 600;
}

[data-bs-theme="light"] .form-label,
[data-bs-theme="light"] .form-check-label,
[data-bs-theme="light"] .nav-link,
[data-bs-theme="light"] .menu-link {
  font-weight: 500;
}

/* Layout, navigation, and cards */
[data-bs-theme="light"] body,
[data-bs-theme="light"] .content-wrapper {
  background-color: var(--app-background);
}

[data-bs-theme="light"] .layout-navbar,
[data-bs-theme="light"] .dropdown-menu {
  border-color: var(--app-border);
  box-shadow: var(--bs-navbar-box-shadow);
}

[data-bs-theme="light"] .layout-navbar .nav-link:hover,
[data-bs-theme="light"] .layout-navbar .nav-link:focus,
[data-bs-theme="light"] .dropdown-item:hover,
[data-bs-theme="light"] .dropdown-item:focus {
  color: var(--app-primary-dark);
}

[data-bs-theme="light"] .dropdown-item.active,
[data-bs-theme="light"] .dropdown-item:active {
  background-color: var(--bs-primary-bg-subtle);
  color: var(--app-primary-deeper);
}

[data-bs-theme="light"] .card {
  --bs-card-border-color: var(--app-border);
  --bs-card-box-shadow: var(--app-shadow);
  background-color: var(--app-surface);
  border-radius: 0.375rem;
}

[data-bs-theme="light"] .card-header,
[data-bs-theme="light"] .card-footer {
  border-color: var(--app-border);
}

[data-bs-theme="light"] .card-subtitle,
[data-bs-theme="light"] .text-body-secondary,
[data-bs-theme="light"] .text-muted {
  color: var(--app-muted) !important;
}

/* The vertical menu receives data-bs-theme=dark from Vuexy's semidark mode. */
html[data-bs-theme="light"] .layout-menu.menu-vertical {
  --bs-menu-bg: var(--app-primary-deeper);
  --bs-menu-color: rgba(255, 255, 255, 0.84);
  --bs-menu-hover-color: #ffffff;
  --bs-menu-hover-bg: rgba(255, 255, 255, 0.09);
  --bs-menu-sub-active-color: #ffffff;
  --bs-menu-sub-active-bg: rgba(255, 255, 255, 0.1);
  --bs-menu-active-color: #ffffff;
  --bs-menu-active-bg: rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, var(--app-primary-dark) 0%, var(--app-primary-deeper) 100%);
  box-shadow: 8px 0 30px rgba(7, 95, 89, 0.18);
}

html[data-bs-theme="light"] .layout-menu.menu-vertical .app-brand,
html[data-bs-theme="light"] .layout-menu.menu-vertical .menu-inner {
  background: transparent;
}

html[data-bs-theme="light"] .layout-menu.menu-vertical .menu-header-text {
  color: rgba(255, 255, 255, 0.58);
}

html[data-bs-theme="light"] .layout-menu.menu-vertical .menu-link,
html[data-bs-theme="light"] .layout-menu.menu-vertical .menu-icon,
html[data-bs-theme="light"] .layout-menu.menu-vertical .menu-toggle-icon {
  color: rgba(255, 255, 255, 0.84);
}

html[data-bs-theme="light"] .layout-menu.menu-vertical .menu-item.active > .menu-link,
html[data-bs-theme="light"] .layout-menu.menu-vertical .menu-item.open > .menu-link,
html[data-bs-theme="light"] .layout-menu.menu-vertical .menu-link:hover {
  color: #ffffff;
}

html[data-bs-theme="light"] .layout-menu.menu-vertical .menu-item.active > .menu-link::before {
  background-color: var(--app-accent);
  box-shadow: 0 0 0 3px rgba(220, 231, 20, 0.18);
}

[data-bs-theme="light"] .menu-horizontal .menu-inner > .menu-item.active > .menu-link,
[data-bs-theme="light"] .menu-horizontal .menu-item.active > .menu-link:not(.menu-toggle) {
  color: var(--app-primary-dark);
}

/* Buttons and interactive states */
[data-bs-theme="light"] .btn {
  font-weight: 600;
}

[data-bs-theme="light"] .btn-primary {
  --bs-btn-hover-bg: var(--app-primary-dark);
  --bs-btn-hover-border-color: var(--app-primary-dark);
  --bs-btn-active-bg: var(--app-primary-deeper);
  --bs-btn-active-border-color: var(--app-primary-deeper);
}

[data-bs-theme="light"] .btn-outline-primary,
[data-bs-theme="light"] .btn-label-primary,
[data-bs-theme="light"] .btn-text-primary {
  --bs-btn-hover-color: var(--app-primary-dark);
  --bs-btn-active-color: var(--app-primary-deeper);
}

[data-bs-theme="light"] :where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--app-primary);
  outline-offset: 2px;
}

/* Forms */
[data-bs-theme="light"] .form-control,
[data-bs-theme="light"] .form-select,
[data-bs-theme="light"] .input-group-text {
  border-color: var(--app-border);
}

[data-bs-theme="light"] .form-control:focus,
[data-bs-theme="light"] .form-select:focus,
[data-bs-theme="light"] .form-check-input:focus {
  border-color: var(--app-primary);
  box-shadow: var(--app-focus-ring);
}

[data-bs-theme="light"] .form-check-input:checked {
  background-color: var(--app-primary);
  border-color: var(--app-primary);
}

[data-bs-theme="light"] .form-switch .form-check-input:focus {
  border-color: var(--app-primary);
}

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

/* Tables and DataTables */
[data-bs-theme="light"] .table {
  --bs-table-color: var(--app-text);
  --bs-table-border-color: var(--app-border);
  --bs-table-hover-bg: #edf8f6;
}

[data-bs-theme="light"] .table > thead > tr > th,
[data-bs-theme="light"] table.dataTable > thead > tr > th {
  background-color: #eaf5f4;
  color: var(--app-primary-deeper);
  font-weight: 600;
}

[data-bs-theme="light"] div.dt-container .dt-search input,
[data-bs-theme="light"] div.dt-container .dt-length select {
  border-color: var(--app-border);
}

[data-bs-theme="light"] div.dt-container .dt-search input:focus,
[data-bs-theme="light"] div.dt-container .dt-length select:focus {
  border-color: var(--app-primary);
  box-shadow: var(--app-focus-ring);
}

/* Pagination, tabs, and breadcrumbs */
[data-bs-theme="light"] .pagination {
  --bs-pagination-color: var(--app-primary-dark);
  --bs-pagination-hover-color: var(--app-primary-deeper);
  --bs-pagination-hover-bg: var(--bs-primary-bg-subtle);
  --bs-pagination-focus-color: var(--app-primary-deeper);
  --bs-pagination-focus-bg: var(--bs-primary-bg-subtle);
  --bs-pagination-active-bg: var(--app-primary);
  --bs-pagination-active-border-color: var(--app-primary);
}

[data-bs-theme="light"] .nav-tabs .nav-link.active,
[data-bs-theme="light"] .nav-pills .nav-link.active {
  color: var(--app-primary-dark);
}

[data-bs-theme="light"] .nav-tabs .nav-link.active::after,
[data-bs-theme="light"] .nav-align-top .nav-tabs .nav-link.active::after {
  background-color: var(--app-primary);
}

[data-bs-theme="light"] .breadcrumb-item.active {
  color: var(--app-muted);
}

/* Alerts, badges, toasts, and overlays */
[data-bs-theme="light"] .badge.bg-label-primary,
[data-bs-theme="light"] .avatar-initial.bg-label-primary {
  background-color: var(--bs-primary-bg-subtle);
  color: var(--app-primary-deeper);
}

[data-bs-theme="light"] .alert,
[data-bs-theme="light"] .toast,
[data-bs-theme="light"] .modal-content {
  border-color: var(--app-border);
}

[data-bs-theme="light"] .modal-content,
[data-bs-theme="light"] .toast,
[data-bs-theme="light"] div:where(.swal2-container) div:where(.swal2-popup) {
  background-color: var(--app-surface);
  box-shadow: var(--app-shadow);
}

[data-bs-theme="light"] div:where(.swal2-container) h2:where(.swal2-title) {
  color: var(--app-text);
  font-family: var(--bs-font-sans-serif);
}

[data-bs-theme="light"] div:where(.swal2-container) .swal2-html-container,
[data-bs-theme="light"] div:where(.swal2-container) input:where(.swal2-input),
[data-bs-theme="light"] div:where(.swal2-container) textarea:where(.swal2-textarea) {
  color: var(--app-text);
  font-family: var(--bs-font-sans-serif);
}

[data-bs-theme="light"] div:where(.swal2-container) input:where(.swal2-input):focus,
[data-bs-theme="light"] div:where(.swal2-container) textarea:where(.swal2-textarea):focus {
  border-color: var(--app-primary);
  box-shadow: var(--app-focus-ring);
}

[data-bs-theme="light"] div:where(.swal2-container) button:where(.swal2-confirm) {
  background-color: var(--app-primary);
}

[data-bs-theme="light"] div:where(.swal2-container) button:where(.swal2-confirm):hover {
  background-color: var(--app-primary-dark);
}

/* Select2 and Flatpickr */
[data-bs-theme="light"] .select2-container--default .select2-selection,
[data-bs-theme="light"] .select2-dropdown,
[data-bs-theme="light"] .select2-search__field {
  border-color: var(--app-border);
}

[data-bs-theme="light"] .select2-container--default.select2-container--focus .select2-selection,
[data-bs-theme="light"] .select2-container--default.select2-container--open .select2-selection {
  border-color: var(--app-primary);
  box-shadow: var(--app-focus-ring);
}

[data-bs-theme="light"] .select2-container--default .select2-results__option--highlighted,
[data-bs-theme="light"] .select2-container--default .select2-results__option[aria-selected="true"] {
  background-color: var(--bs-primary-bg-subtle);
  color: var(--app-primary-deeper);
}

[data-bs-theme="light"] .select2-container--default .select2-selection--multiple .select2-selection__choice {
  background-color: var(--bs-primary-bg-subtle);
  color: var(--app-primary-deeper);
}

[data-bs-theme="light"] .flatpickr-calendar .flatpickr-day.selected,
[data-bs-theme="light"] .flatpickr-calendar .flatpickr-day.startRange,
[data-bs-theme="light"] .flatpickr-calendar .flatpickr-day.endRange {
  background-color: var(--app-primary);
  border-color: var(--app-primary);
}

[data-bs-theme="light"] .flatpickr-calendar .flatpickr-day.today {
  border-color: var(--app-primary);
  color: var(--app-primary-dark);
}

/* Authentication, empty, and loading states */
[data-bs-theme="light"] .authentication-wrapper .authentication-bg,
[data-bs-theme="light"] .authentication-wrapper .card {
  background-color: var(--app-surface);
}

[data-bs-theme="light"] .authentication-wrapper .auth-cover-bg {
  background-color: #e6f5f3;
}

[data-bs-theme="light"] .authentication-wrapper h1,
[data-bs-theme="light"] .authentication-wrapper h2,
[data-bs-theme="light"] .authentication-wrapper h3,
[data-bs-theme="light"] .authentication-wrapper h4 {
  color: var(--app-primary-deeper);
}

[data-bs-theme="light"] .authentication-wrapper .w-px-400 {
  max-width: 400px !important;
  width: 100% !important;
}

[data-bs-theme="light"] .spinner-border,
[data-bs-theme="light"] .spinner-grow {
  color: var(--app-primary);
}

[data-bs-theme="light"] :where(.empty-state, .dataTables_empty, .dt-empty) {
  color: var(--app-muted);
}

@media (max-width: 1199.98px) {
  html[data-bs-theme="light"] .layout-menu.menu-vertical {
    box-shadow: 12px 0 34px rgba(7, 95, 89, 0.24);
  }
}

@media (max-width: 575.98px) {
  [data-bs-theme="light"] .authentication-wrapper .d-flex.justify-content-between {
    column-gap: 0.75rem;
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
