/**
 * Light Mode Theme Overrides for NMS Theme
 * This file provides light mode styling for the NMS template
 */

/* Root light theme variables */
[data-bs-theme="light"] {
    --bs-body-color: #333333;
    --bs-body-color-rgb: 51, 51, 51;
    --bs-body-bg: #f8f9fa;
    --bs-body-bg-rgb: 248, 249, 250;
    --bs-emphasis-color: #000000;
    --bs-emphasis-color-rgb: 0, 0, 0;
    --bs-secondary-color: rgba(51, 51, 51, 0.75);
    --bs-secondary-color-rgb: 51, 51, 51;
    --bs-secondary-bg: #e9ecef;
    --bs-secondary-bg-rgb: 233, 236, 239;
    --bs-tertiary-color: rgba(51, 51, 51, 0.5);
    --bs-tertiary-color-rgb: 51, 51, 51;
    --bs-tertiary-bg: #f8f9fa;
    --bs-tertiary-bg-rgb: 248, 249, 250;
    --bs-heading-color: #212529;
    --bs-border-color: rgba(0, 0, 0, 0.15);
    --bs-border-color-translucent: rgba(0, 0, 0, 0.15);
    --bs-link-color: #0066cc;
    --bs-link-hover-color: #004499;
    color-scheme: light;
}

/* App container light mode */
[data-bs-theme="light"] .app {
    background: #ffffff !important;
    min-height: 100vh;
}

[data-bs-theme="light"] .app:before,
[data-bs-theme="light"] .app::before {
    background: #ffffff !important;
    display: none !important;
}

[data-bs-theme="light"] .app.app-with-top-nav {
    background: #ffffff !important;
}

[data-bs-theme="light"] .app.app-with-top-nav:before,
[data-bs-theme="light"] .app.app-with-top-nav::before {
    background: #ffffff !important;
    display: none !important;
}

[data-bs-theme="light"] .app.app-without-sidebar {
    background: #ffffff !important;
}

[data-bs-theme="light"] body {
    background: #ffffff !important;
}

[data-bs-theme="light"] #app {
    background: #ffffff !important;
}

[data-bs-theme="light"] .row {
    background: transparent !important;
}

/* Header light mode - Keep dark for logo visibility */
[data-bs-theme="light"] .app-header {
    background: linear-gradient(135deg, #1a2a3a 0%, #2d3e50 100%) !important;
    border-bottom: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
}

[data-bs-theme="light"] .app-header .brand {
    background-color: transparent !important;
}

[data-bs-theme="light"] .app-header .menu-link {
    color: rgba(255, 255, 255, 0.85) !important;
}

[data-bs-theme="light"] .app-header .menu-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="light"] .app-header .menu-icon {
    color: rgba(255, 255, 255, 0.75) !important;
}

[data-bs-theme="light"] .app-header .menu-text {
    color: rgba(255, 255, 255, 0.9) !important;
}

[data-bs-theme="light"] .app-header .menu-search-inline {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
}

[data-bs-theme="light"] .app-header .menu-search-inline input {
    color: #ffffff !important;
    background-color: transparent !important;
}

[data-bs-theme="light"] .app-header .menu-search-inline input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

[data-bs-theme="light"] .app-header .menu-search-inline .menu-icon {
    color: rgba(255, 255, 255, 0.6) !important;
}

[data-bs-theme="light"] .app-header .dropdown-menu {
    background-color: #ffffff !important;
    border: none !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    border-radius: 12px !important;
}

[data-bs-theme="light"] .app-header .dropdown-header {
    color: #1a2a3a !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    font-weight: 600 !important;
}

[data-bs-theme="light"] .app-header .dropdown-item {
    color: #333333 !important;
}

[data-bs-theme="light"] .app-header .dropdown-item:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f7ff 100%) !important;
    color: #1565c0 !important;
}

[data-bs-theme="light"] .app-header .dropdown-item .text-white {
    color: #333333 !important;
}

[data-bs-theme="light"] .app-header .dropdown-item .text-white-50,
[data-bs-theme="light"] .app-header .dropdown-item .text-opacity-50 {
    color: #666666 !important;
}

[data-bs-theme="light"] .app-header .dropdown-item .text-opacity-75 {
    color: #555555 !important;
}

[data-bs-theme="light"] .app-header .dropdown-item .bg-white.bg-opacity-10 {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important;
    color: #1565c0 !important;
}

/* Top Navigation light mode */
[data-bs-theme="light"] .app-top-nav {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

[data-bs-theme="light"] .app-top-nav .menu .menu-item .menu-link {
    color: #4a5568 !important;
    border-radius: 6px !important;
    margin: 0 2px !important;
    transition: all 0.2s ease !important;
}

[data-bs-theme="light"] .app-top-nav .menu .menu-item .menu-link:hover {
    color: #1a202c !important;
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f7ff 100%) !important;
}

[data-bs-theme="light"] .app-top-nav .menu .menu-item.active > .menu-link {
    color: #1565c0 !important;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important;
    font-weight: 500 !important;
}

[data-bs-theme="light"] .app-top-nav .menu .menu-item .menu-link .menu-text {
    color: inherit !important;
}

[data-bs-theme="light"] .app-top-nav .menu .menu-item .menu-link .menu-icon {
    color: #64748b !important;
}

[data-bs-theme="light"] .app-top-nav .menu .menu-item.active > .menu-link .menu-icon {
    color: #1565c0 !important;
}

[data-bs-theme="light"] .app-top-nav .menu .menu-item .menu-link .menu-caret {
    color: inherit !important;
}

[data-bs-theme="light"] .app-top-nav .menu-submenu {
    background-color: #ffffff !important;
    border: none !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12) !important;
    border-radius: 12px !important;
    padding: 8px !important;
}

[data-bs-theme="light"] .app-top-nav .menu-submenu .menu-item .menu-link {
    color: #4a5568 !important;
    border-radius: 8px !important;
    padding: 10px 16px !important;
}

[data-bs-theme="light"] .app-top-nav .menu-submenu .menu-item .menu-link .menu-text {
    color: inherit !important;
}

[data-bs-theme="light"] .app-top-nav .menu-submenu .menu-item .menu-link:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f7ff 100%) !important;
    color: #1565c0 !important;
}

[data-bs-theme="light"] .app-top-nav .menu-submenu .menu-item.active .menu-link {
    color: #1565c0 !important;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important;
    font-weight: 500 !important;
}

/* Content area light mode */
[data-bs-theme="light"] .app-content {
    background: #ffffff !important;
}

[data-bs-theme="light"] #content {
    background: #ffffff !important;
}

[data-bs-theme="light"] .app-content.p-3 {
    background: #ffffff !important;
}

/* Cards light mode */
[data-bs-theme="light"] .card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    border: none !important;
    border-top: 3px solid #3b82f6 !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

[data-bs-theme="light"] .card-header {
    background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%) !important;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1) !important;
    color: #1e3a5f !important;
    font-weight: 600 !important;
}

[data-bs-theme="light"] .card-body {
    color: #4a5568 !important;
    background: transparent !important;
}

[data-bs-theme="light"] .card-footer {
    background: linear-gradient(135deg, #f1f5f9 0%, #f8fafc 100%) !important;
    border-top: 1px solid rgba(59, 130, 246, 0.1) !important;
}

/* Tables light mode */
[data-bs-theme="light"] .table {
    color: #4a5568 !important;
}

[data-bs-theme="light"] .table > thead {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
}

[data-bs-theme="light"] .table > thead th {
    color: #1a202c !important;
    font-weight: 600 !important;
}

[data-bs-theme="light"] .table > tbody > tr:hover {
    background: linear-gradient(135deg, #f0f7ff 0%, #e3f2fd 100%) !important;
}

[data-bs-theme="light"] .table-bordered {
    border-color: rgba(0, 0, 0, 0.08) !important;
}

/* Forms light mode */
[data-bs-theme="light"] .form-control {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #1a202c !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

[data-bs-theme="light"] .form-control:focus {
    background-color: #ffffff !important;
    border-color: #1565c0 !important;
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.15) !important;
    color: #1a202c !important;
}

[data-bs-theme="light"] .form-control::placeholder {
    color: #94a3b8 !important;
}

[data-bs-theme="light"] .form-select {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #1a202c !important;
    border-radius: 8px !important;
}

[data-bs-theme="light"] .input-group-text {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
    border: 1px solid #e2e8f0 !important;
    color: #4a5568 !important;
}

/* Buttons adjustments for light mode */
[data-bs-theme="light"] .btn-secondary {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%) !important;
    border: none !important;
    color: #1a202c !important;
    border-radius: 8px !important;
}

[data-bs-theme="light"] .btn-secondary:hover {
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%) !important;
    color: #000000 !important;
}

[data-bs-theme="light"] .btn-primary {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%) !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(21, 101, 192, 0.3) !important;
}

[data-bs-theme="light"] .btn-primary:hover {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%) !important;
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.4) !important;
}

/* Text colors override for light mode - exclude header */
[data-bs-theme="light"] .app-content .text-white {
    color: #1a202c !important;
}

[data-bs-theme="light"] .app-content .text-white-50 {
    color: rgba(26, 32, 44, 0.5) !important;
}

/* Background overrides */
[data-bs-theme="light"] .bg-dark {
    background: linear-gradient(135deg, #1a2a3a 0%, #2d3e50 100%) !important;
}

[data-bs-theme="light"] .bg-body {
    background: transparent !important;
}

/* Scrollbar light mode */
[data-bs-theme="light"] ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

[data-bs-theme="light"] ::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

[data-bs-theme="light"] ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    border-radius: 4px;
}

[data-bs-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
}

/* Sidebar light mode (if applicable) */
[data-bs-theme="light"] .app-sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    border-right: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04) !important;
}

/* Modal light mode */
[data-bs-theme="light"] .modal-content {
    background: #ffffff !important;
    color: #1a202c !important;
    border: none !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2) !important;
}

[data-bs-theme="light"] .modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%) !important;
}

[data-bs-theme="light"] .modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%) !important;
}

/* Alert adjustments */
[data-bs-theme="light"] .alert {
    border: none !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

/* Badge adjustments */
[data-bs-theme="light"] .badge.bg-secondary {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%) !important;
    color: #1a202c !important;
}

/* List group light mode */
[data-bs-theme="light"] .list-group-item {
    background-color: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.06) !important;
    color: #4a5568 !important;
}

[data-bs-theme="light"] .list-group-item:hover {
    background: linear-gradient(135deg, #f0f7ff 0%, #e3f2fd 100%) !important;
}

/* Nav tabs light mode */
[data-bs-theme="light"] .nav-tabs {
    border-bottom: 2px solid #e2e8f0 !important;
}

[data-bs-theme="light"] .nav-tabs .nav-link {
    color: #64748b !important;
    border: none !important;
    border-radius: 8px 8px 0 0 !important;
    padding: 10px 20px !important;
    transition: all 0.2s ease !important;
}

[data-bs-theme="light"] .nav-tabs .nav-link:hover {
    color: #1565c0 !important;
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f7ff 100%) !important;
}

[data-bs-theme="light"] .nav-tabs .nav-link.active {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%) !important;
    color: #ffffff !important;
    font-weight: 500 !important;
}

/* Pagination light mode */
[data-bs-theme="light"] .page-link {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #1565c0 !important;
    border-radius: 8px !important;
    margin: 0 2px !important;
}

[data-bs-theme="light"] .page-link:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f7ff 100%) !important;
    border-color: #bbdefb !important;
    color: #0d47a1 !important;
}

[data-bs-theme="light"] .page-item.active .page-link {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%) !important;
    border-color: transparent !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(21, 101, 192, 0.3) !important;
}

/* Breadcrumb light mode */
[data-bs-theme="light"] .breadcrumb {
    background-color: transparent !important;
}

[data-bs-theme="light"] .breadcrumb-item a {
    color: #1565c0 !important;
}

[data-bs-theme="light"] .breadcrumb-item.active {
    color: #64748b !important;
}

/* Progress bar light mode */
[data-bs-theme="light"] .progress {
    background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 100%) !important;
    border-radius: 10px !important;
    overflow: hidden !important;
}

[data-bs-theme="light"] .progress-bar {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%) !important;
}

/* Tooltip light mode */
[data-bs-theme="light"] .tooltip .tooltip-inner {
    background: linear-gradient(135deg, #1a2a3a 0%, #2d3e50 100%) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
}

/* Dropdown light mode */
[data-bs-theme="light"] .dropdown-menu {
    background-color: #ffffff !important;
    border: none !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12) !important;
    border-radius: 12px !important;
    padding: 8px !important;
}

[data-bs-theme="light"] .dropdown-item {
    color: #4a5568 !important;
    border-radius: 8px !important;
    padding: 10px 16px !important;
    transition: all 0.2s ease !important;
}

[data-bs-theme="light"] .dropdown-item:hover,
[data-bs-theme="light"] .dropdown-item:focus {
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f7ff 100%) !important;
    color: #1565c0 !important;
}

[data-bs-theme="light"] .dropdown-divider {
    border-top-color: rgba(0, 0, 0, 0.06) !important;
    margin: 8px 0 !important;
}

/* ApexCharts light mode adjustments */
[data-bs-theme="light"] .apexcharts-text {
    fill: #4a5568 !important;
}

[data-bs-theme="light"] .apexcharts-legend-text {
    color: #4a5568 !important;
}

[data-bs-theme="light"] .apexcharts-gridline {
    stroke: #e2e8f0 !important;
}

[data-bs-theme="light"] .apexcharts-xaxis-tick,
[data-bs-theme="light"] .apexcharts-yaxis-tick {
    stroke: #e2e8f0 !important;
}

[data-bs-theme="light"] .apexcharts-tooltip {
    background: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12) !important;
    border-radius: 8px !important;
}

[data-bs-theme="light"] .apexcharts-tooltip-title {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

/* DataTables light mode */
[data-bs-theme="light"] .dataTables_wrapper {
    color: #4a5568 !important;
}

[data-bs-theme="light"] table.dataTable {
    border: none !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

[data-bs-theme="light"] table.dataTable thead th {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
    border-bottom: none !important;
    color: #1a202c !important;
    font-weight: 600 !important;
    padding: 14px 16px !important;
}

[data-bs-theme="light"] table.dataTable tbody tr {
    background-color: #ffffff !important;
}

[data-bs-theme="light"] table.dataTable tbody tr:hover {
    background: linear-gradient(135deg, #f0f7ff 0%, #e3f2fd 100%) !important;
}

[data-bs-theme="light"] table.dataTable tbody td {
    border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
    padding: 12px 16px !important;
}

[data-bs-theme="light"] .dataTables_info,
[data-bs-theme="light"] .dataTables_length,
[data-bs-theme="light"] .dataTables_filter {
    color: #64748b !important;
}

[data-bs-theme="light"] .dataTables_filter input {
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
}

/* Additional enhancements for visual appeal */
[data-bs-theme="light"] .stat-card,
[data-bs-theme="light"] .widget {
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
}

[data-bs-theme="light"] .text-muted {
    color: #64748b !important;
}

[data-bs-theme="light"] hr {
    border-color: rgba(0, 0, 0, 0.06) !important;
}

/* Success, warning, danger colors adjustments */
[data-bs-theme="light"] .text-success {
    color: #16a34a !important;
}

[data-bs-theme="light"] .text-warning {
    color: #d97706 !important;
}

[data-bs-theme="light"] .text-danger {
    color: #dc2626 !important;
}

[data-bs-theme="light"] .text-info {
    color: #0891b2 !important;
}

/* Accent color for primary theme elements */
[data-bs-theme="light"] .text-primary {
    color: #1565c0 !important;
}

[data-bs-theme="light"] .bg-primary {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%) !important;
}
