/* Custom color overrides - New Color Scheme */
/* Primary: #15487B (Dark Blue) - Main Color */
/* Accent: #f57a36 (Orange) - Hover/Accent Color */

/* Root Variables */
:root {
    --primary-color: #15487B;
    --primary-rgb: 21, 72, 123;
    --accent-color: #f57a36;
    --accent-rgb: 245, 122, 54;
    --primary-hover: #071e35;
    --accent-hover: #e06a2b;
}

/* Primary Button Styles */
.btn-primary {
    background-color: #15487B !important;
    border-color: #15487B !important;
    color: #fff !important;
}

.btn-primary:hover {
    background-color: #f57a36 !important;
    border-color: #f57a36 !important;
    color: #fff !important;
}

.btn-primary:focus {
    background-color: #15487B !important;
    border-color: #15487B !important;
    box-shadow: 0 0 0 0.2rem rgba(21, 72, 123, 0.25) !important;
}

/* Success Button - Use primary color */
.btn-success {
    background-color: #15487B !important;
    border-color: #15487B !important;
    color: #fff !important;
}

.btn-success:hover {
    background-color: #f57a36 !important;
    border-color: #f57a36 !important;
    color: #fff !important;
}

/* Info Button - Use primary color */
.btn-info {
    background-color: #15487B !important;
    border-color: #15487B !important;
    color: #fff !important;
}

.btn-info:hover {
    background-color: #f57a36 !important;
    border-color: #f57a36 !important;
    color: #fff !important;
}

/* Warning Button - Use accent color */
.btn-warning {
    background-color: #f57a36 !important;
    border-color: #f57a36 !important;
    color: #fff !important;
}

.btn-warning:hover {
    background-color: #e06a2b !important;
    border-color: #e06a2b !important;
    color: #fff !important;
}

/* Text Colors */
.text-primary {
    color: #15487B !important;
    opacity: 1;
}

.text-accent {
    color: #f57a36 !important;
}

/* Background Colors */
.bg-primary {
    background-color: #15487B !important;
}

.bg-accent {
    background-color: #f57a36 !important;
}

.bg-primary-transparent {
    background-color: rgba(21, 72, 123, 0.1) !important;
}

.bg-accent-transparent {
    background-color: rgba(245, 122, 54, 0.1) !important;
}

/* Border Colors */
.border-primary {
    border-color: #15487B !important;
}

.border-accent {
    border-color: #f57a36 !important;
}

/* Form Elements */
.form-check-input {
    border: 1px solid #15487B !important;
}

.form-check-input:checked {
    background-color: #15487B !important;
    border-color: #15487B !important;
}

.form-control:focus {
    border-color: #15487B !important;
    box-shadow: 0 0 0 0.2rem rgba(21, 72, 123, 0.25) !important;
}

/* Links */
a {
    color: #15487B;
}

a:hover {
    color: #f57a36;
}

/* Navigation and Menu */
.nav-pills .nav-link.active {
    background-color: #15487B !important;
    color: #fff !important;
}

.nav-pills .nav-link:hover {
    background-color: rgba(21, 72, 123, 0.1) !important;
    color: #15487B !important;
}

/* Cards */
.card {
    border-color: rgba(21, 72, 123, 0.1) !important;
}

.card-header {
    background-color: rgba(21, 72, 123, 0.05) !important;
    border-bottom: 1px solid rgba(21, 72, 123, 0.1) !important;
}

/* Tables */
.table-primary {
    background-color: rgba(21, 72, 123, 0.1) !important;
    color: #15487B !important;
}

.table-hover tbody tr:hover {
    background-color: rgba(21, 72, 123, 0.05) !important;
}

/* Badges */
.badge-primary {
    background-color: #15487B !important;
    color: #fff !important;
}

.badge-accent {
    background-color: #f57a36 !important;
    color: #fff !important;
}

/* Alerts */
.alert-primary {
    background-color: rgba(21, 72, 123, 0.1) !important;
    border-color: rgba(21, 72, 123, 0.2) !important;
    color: #15487B !important;
}

.alert-accent {
    background-color: rgba(245, 122, 54, 0.1) !important;
    border-color: rgba(245, 122, 54, 0.2) !important;
    color: #f57a36 !important;
}

/* Progress Bars */
.progress-bar {
    background-color: #15487B !important;
}

.progress-bar.accent {
    background-color: #f57a36 !important;
}

/* Charts and Graphs */
.chart-color-primary,
[data-primary-color="rgb(132, 90, 223)"] {
    color: #15487B !important;
}

.chart-color-accent {
    color: #f57a36 !important;
}

/* Charts and graphs - Replace all instances */
[style*="rgb(132, 90, 223)"] {
    color: #15487B !important;
    background-color: #15487B !important;
    border-color: #15487B !important;
    stroke: #15487B !important;
    fill: #15487B !important;
}

/* Dropdown */
.dropdown-menu {
    min-width: 350px !important;
    width: max-content !important;
    max-width: 600px !important;
}

.dropdown-menu.dropdown-menu-end {
    min-width: 350px !important;
    width: max-content !important;
    max-width: 600px !important;
}

.dropdown-item {
    white-space: nowrap !important;
    text-align: left !important;
}

.dropdown-item:hover {
    background-color: rgba(21, 72, 123, 0.1) !important;
    color: #15487B !important;
}

.dropdown-item.active {
    background-color: #15487B !important;
    color: #fff !important;
}

/* Modal - Solid Blue Background with Orange Close Button */
.modal-header.bg-gradient-primary {
    background: #15487B !important;
}

.modal-header.bg-gradient-primary .modal-title {
    color: #fff !important;
}

.modal-header.bg-gradient-primary .modal-title i {
    color: #fff !important;
}

.modal-header.bg-gradient-primary .btn-close-custom {
    color: #f57a36 !important;
}

.modal-header.bg-gradient-primary .btn-close-custom:hover {
    color: #e06a2b !important;
    background-color: rgba(245, 122, 54, 0.1) !important;
}

/* Action Cards — legacy pages; erp-actions-modal uses actions-modal.css */
.action-card:hover:not(.action-card--primary):not(.action-card--danger) {
    border-color: #f57a36 !important;
    box-shadow: 0 4px 12px rgba(245, 122, 54, 0.15) !important;
}

.action-icon.bg-primary-transparent {
    background-color: rgba(21, 72, 123, 0.1) !important;
}

.action-icon.bg-accent-transparent {
    background-color: rgba(245, 122, 54, 0.1) !important;
}

/* Pagination */
.page-link {
    color: #f57a36 !important;
}

.page-link:hover {
    color: #f57a36 !important;
    background-color: rgba(21, 72, 123, 0.1) !important;
    border-color: #15487B !important;
}

.page-item.active .page-link {
    background-color: #15487B !important;
    border-color: #15487B !important;
}

/* Breadcrumbs */
.breadcrumb-item.active {
    color: #15487B !important;
}

/* List Groups */
.list-group-item.active {
    background-color: #15487B !important;
    border-color: #15487B !important;
}

/* Tooltips */
.tooltip-inner {
    background-color: #15487B !important;
}

.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: #15487B !important;
}

/* Popovers */
.popover-header {
    background-color: rgba(21, 72, 123, 0.1) !important;
    color: #15487B !important;
}

/* Custom Scrollbar - Simple and subtle */
::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
}

::-webkit-scrollbar-thumb {
    background-color: #cbd5e0 !important;
    border-radius: 4px !important;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #a0aec0 !important;
}

::-webkit-scrollbar-track {
    background-color: #f7fafc !important;
    border-radius: 4px !important;
}

/* Focus States */
.btn:focus,
.form-control:focus,
.form-select:focus {
    border-color: #15487B !important;
    box-shadow: 0 0 0 0.2rem rgba(21, 72, 123, 0.25) !important;
}

/* Secondary Button - Use accent color */
.btn-secondary {
    background-color: #f57a36 !important;
    border-color: #f57a36 !important;
    color: #fff !important;
}

/* Disable hover for filter buttons */
.btn-secondary:hover,
.btn-primary:hover {
    background-color: inherit !important;
    border-color: inherit !important;
    color: inherit !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Outline Secondary Button - Use accent color */
.btn-outline-secondary {
    color: #f57a36 !important;
    border-color: #f57a36 !important;
}

.btn-outline-secondary:hover {
    color: #fff !important;
    background-color: #f57a36 !important;
    border-color: #f57a36 !important;
}

.btn-outline-secondary:focus {
    color: #fff !important;
    background-color: #f57a36 !important;
    border-color: #f57a36 !important;
    box-shadow: none !important;
}

/* Danger button - Keep red but with new hover */
.btn-danger {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}

.btn-danger:hover {
    background-color: #c82333 !important;
    border-color: #c82333 !important;
}

/* Text utilities */
.text-success {
    color: #28a745 !important;
}

.text-info {
    color: #17a2b8 !important;
}

.text-warning {
    color: #f57a36 !important;
}

.text-danger {
    color: #dc3545 !important;
}
