/* Light Theme Styles */

/* Body and background */
body {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

/* Navigation */
.navbar {
    background-color: #343a40 !important;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.75) !important;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 1) !important;
}

.navbar-dark .navbar-nav .nav-link.active {
    color: rgba(255, 255, 255, 1) !important;
}

/* Cards */
.card {
    background-color: #ffffff !important;
    border-color: #e3e6f0 !important;
}

.card-header {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e3e6f0 !important;
    color: #212529 !important;
}

.card-body {
    background-color: #ffffff !important;
    color: #212529 !important;
}

.card.border-0 {
    background-color: #ffffff !important;
}

/* Forms */
.form-control {
    background-color: #ffffff !important;
    border-color: #ced4da !important;
    color: #495057 !important;
}

.form-control:focus {
    background-color: #ffffff !important;
    border-color: #80bdff !important;
    color: #495057 !important;
}

.form-select {
    background-color: #ffffff !important;
    border-color: #ced4da !important;
    color: #495057 !important;
}

.form-control-sm {
    background-color: #ffffff !important;
    border-color: #ced4da !important;
    color: #495057 !important;
}

.input-group-text {
    background-color: #e9ecef !important;
    border-color: #ced4da !important;
    color: #495057 !important;
}

/* Tables */
.table {
    color: #212529 !important;
}

.table th {
    color: #495057 !important;
    background-color: #f8f9fa !important;
}

.table-light {
    background-color: #f8f9fa !important;
}

.table-light th {
    background-color: #f8f9fa !important;
    color: #495057 !important;
}

.table-striped tbody tr:nth-of-type(odd) td,
.table-striped tbody tr:nth-of-type(odd) th {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.075) !important;
}

/* Dropdowns */
.dropdown-menu {
    background-color: #ffffff !important;
    border-color: #e3e6f0 !important;
}

.dropdown-item {
    color: #212529 !important;
}

.dropdown-item:hover {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

/* Modals */
.modal-content {
    background-color: #ffffff !important;
    color: #212529 !important;
}

.modal-header {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e9ecef !important;
    color: #212529 !important;
}

.modal-body {
    background-color: #ffffff !important;
    color: #212529 !important;
}

.modal-footer {
    background-color: #ffffff !important;
    border-top: 1px solid #e9ecef !important;
}

/* Alerts (legacy — kept for non-flash alert usage) */
.alert {
    border-color: #000000 !important;
}

/* Flash Banners — Light Theme */
.flash-success {
    background: #f0fdf4;
    border-left: 4px solid #16a34a;
}
.flash-success .flash-icon { color: #16a34a; }
.flash-success .flash-msg  { color: #15803d; }
.flash-success .flash-close { color: #15803d; }
.flash-success .flash-progress { background: #dcfce7; }
.flash-success .flash-progress-bar { background: #16a34a; }

.flash-danger {
    background: #fef2f2;
    border-left: 4px solid #dc2626;
}
.flash-danger .flash-icon { color: #dc2626; }
.flash-danger .flash-msg  { color: #991b1b; }
.flash-danger .flash-close { color: #991b1b; }
.flash-danger .flash-progress { background: #fee2e2; }
.flash-danger .flash-progress-bar { background: #dc2626; }

.flash-warning {
    background: #fffbeb;
    border-left: 4px solid #d97706;
}
.flash-warning .flash-icon { color: #d97706; }
.flash-warning .flash-msg  { color: #92400e; }
.flash-warning .flash-close { color: #92400e; }
.flash-warning .flash-progress { background: #fef3c7; }
.flash-warning .flash-progress-bar { background: #d97706; }

.flash-info {
    background: #eff6ff;
    border-left: 4px solid #2563eb;
}
.flash-info .flash-icon { color: #2563eb; }
.flash-info .flash-msg  { color: #1e40af; }
.flash-info .flash-close { color: #1e40af; }
.flash-info .flash-progress { background: #dbeafe; }
.flash-info .flash-progress-bar { background: #2563eb; }

.flash-success .flash-msg a { color: #15803d; }
.flash-danger .flash-msg a  { color: #991b1b; }
.flash-warning .flash-msg a { color: #92400e; }
.flash-info .flash-msg a    { color: #1e40af; }

/* Breadcrumbs */
.breadcrumb {
    background-color: transparent !important;
}

.breadcrumb-item {
    color: #6c757d !important;
}

.breadcrumb-item.active {
    color: #6c757d !important;
}

.breadcrumb-item a {
    color: #0b5ed7 !important;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #6c757d !important;
}

/* Solid buttons — ensure white text on coloured backgrounds */
.btn-primary, .btn-primary *,
.btn-success, .btn-success *,
.btn-danger, .btn-danger *,
.btn-info, .btn-info *,
.btn-dark, .btn-dark * {
    color: #ffffff !important;
}

.btn-warning, .btn-warning * {
    color: #212529 !important;
}

/* Buttons */
.btn-outline-primary {
    border-color: #0b5ed7 !important;
    color: #0b5ed7 !important;
}

.btn-outline-primary:hover {
    background-color: #0b5ed7 !important;
    color: #ffffff !important;
}

.btn-outline-secondary {
    border-color: #6c757d !important;
    color: #565e64 !important;
}

.btn-outline-secondary:hover {
    background-color: #6c757d !important;
    color: #ffffff !important;
}

.btn-outline-info {
    border-color: #0a7ea8 !important;
    color: #0a7ea8 !important;
}

.btn-outline-info:hover {
    background-color: #0a7ea8 !important;
    color: #ffffff !important;
}

.btn-outline-success {
    border-color: #0d8a3e !important;
    color: #0d8a3e !important;
}

.btn-outline-success:hover {
    background-color: #0d8a3e !important;
    color: #ffffff !important;
}

.btn-outline-warning {
    border-color: #b45309 !important;
    color: #b45309 !important;
}

.btn-outline-warning:hover {
    background-color: #b45309 !important;
    color: #ffffff !important;
}

.btn-outline-danger {
    border-color: #b02a37 !important;
    color: #b02a37 !important;
}

.btn-outline-danger:hover {
    background-color: #b02a37 !important;
    color: #ffffff !important;
}

/* Badges */
.badge.bg-primary {
    background-color: #0b5ed7 !important;
}

.badge.bg-success {
    background-color: #00b74a !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
}

.badge.bg-info {
    background-color: #0a7ea8 !important;
}

/* Soft badges (bg-opacity-10): darken text for light-theme contrast */
.badge.bg-opacity-10.text-info {
    color: #055160 !important;
}

.badge.bg-opacity-10.text-warning {
    color: #664d03 !important;
}

.badge.bg-opacity-10.text-success {
    color: #0a5c36 !important;
}

.badge.bg-opacity-10.text-secondary {
    color: #41464b !important;
}

.badge.bg-opacity-10.text-primary {
    color: #052c65 !important;
}

.badge.bg-opacity-10.text-danger {
    color: #58151c !important;
}

.badge.bg-opacity-10.text-dark {
    color: #1a1e21 !important;
}

/* bg-light badges: make visible on white card backgrounds */
.badge.bg-light {
    background-color: #e9ecef !important;
    color: #495057 !important;
    border-color: #ced4da !important;
}

.badge.bg-light.text-dark {
    color: #495057 !important;
}

/* Text colors */
.text-primary {
    color: #0b5ed7 !important;
}

.text-secondary {
    color: #6c757d !important;
}

.text-info {
    color: #0a7ea8 !important;
}

.text-success {
    color: #00b74a !important;
}

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

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

.text-muted {
    color: #6c757d !important;
}

.text-gray-800 {
    color: #5a5c69 !important;
}

/* Invoice aging bucket backgrounds */
.aging-bucket-current   { background: rgba(25, 135, 84, .08); }
.aging-bucket-1-30      { background: rgba(255, 193, 7, .08); }
.aging-bucket-31-60     { background: rgba(253, 126, 20, .08); }
.aging-bucket-61-90     { background: rgba(220, 53, 69, .08); }
.aging-bucket-90-plus   { background: rgba(220, 53, 69, .15); }
.aging-bucket-total     { background: rgba(0, 0, 0, .06); }

/* Orange text (31-60 day aging) */
.text-orange {
    color: #c45a00 !important;
}

/* Background colors */
.bg-light {
    background-color: #f8f9fa !important;
}

.bg-white {
    background-color: #ffffff !important;
}

/* List groups */
.list-group-item {
    background-color: #ffffff !important;
    border-color: #e9ecef !important;
    color: #212529 !important;
}

.list-group-item:hover {
    background-color: #f8f9fa !important;
}

/* Form text and help */
.form-text {
    color: #6c757d !important;
}

/* Small text */
small, .small {
    color: #6c757d !important;
}

/* Avatar */
.avatar-sm {
    background-color: #0b5ed7 !important;
    color: #ffffff !important;
}

/* Borders */
.border {
    border-color: #e9ecef !important;
}

/* Links */
a {
    color: #0b5ed7 !important;
}

a:hover {
    color: #094db8 !important;
}

/* Tooltips */
.tooltip {
    background-color: #000000 !important;
    color: #ffffff !important;
}

.popover {
    background-color: #ffffff !important;
    border-color: #e9ecef !important;
    color: #212529 !important;
}

.popover-header {
    background-color: #f8f9fa !important;
    border-color: #e9ecef !important;
    color: #212529 !important;
}

.popover-body {
    background-color: #ffffff !important;
    color: #212529 !important;
}

/* Button groups */
.btn-group .btn {
    border-color: #e9ecef !important;
}

/* Stats circles */
.rounded-circle {
    background-color: rgba(78, 121, 167, 0.12) !important;
}

/* Shadows */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* Sidebar — always dark in light mode (standard admin pattern) */
.sidebar,
.sidebar * {
    /* Let the sidebar's own CSS variables handle colors */
}

/* Mobile top bar matches sidebar */
.main-topbar {
    background-color: var(--sidebar-bg) !important;
    color: #fff !important;
}

.main-topbar .mobile-toggle,
.main-topbar .brand-text {
    color: #fff !important;
}

/* Weekend columns in timesheet grid */
.ts-weekend {
    background-color: #f5f0e8 !important;
}
th.ts-weekend {
    background-color: #ede8dd !important;
}
