/* MindLink Custom Green Theme Override */
/* Primary Colors: #1b5e20 (dark green) and #4caf50 (light green) */

:root {
  --primary: #4caf50 !important;
  --primary-dark: #1b5e20 !important;
  --success: #4caf50 !important;
  --blue: #4caf50 !important;
}

/* Required field asterisk */
label:has(+ input[required])::after,
label:has(+ select[required])::after,
label:has(+ textarea[required])::after {
  content: ' *';
  color: #dc3545;
  font-weight: bold;
}

/* Button Primary */
.btn-primary {
  background-color: #4caf50 !important;
  border-color: #4caf50 !important;
  color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: #1b5e20 !important;
  border-color: #1b5e20 !important;
  color: #fff !important;
}

.btn-primary.disabled,
.btn-primary:disabled {
  background-color: #4caf50 !important;
  border-color: #4caf50 !important;
  opacity: 0.65;
}

/* Text Primary */
.text-primary {
  color: #4caf50 !important;
}

a.text-primary:hover,
a.text-primary:focus {
  color: #1b5e20 !important;
}

/* Background Primary */
.bg-primary {
  background-color: #4caf50 !important;
}

a.bg-primary:hover,
a.bg-primary:focus,
button.bg-primary:hover,
button.bg-primary:focus {
  background-color: #1b5e20 !important;
}

/* Border Primary */
.border-primary {
  border-color: #4caf50 !important;
}

.border-left-primary {
  border-left: 0.25rem solid #4caf50 !important;
}

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

/* Alerts */
.alert-primary {
  background-color: #e8f5e9 !important;
  border-color: #4caf50 !important;
  color: #1b5e20 !important;
}

/* Links */
a {
  color: #4caf50 !important;
}

a:hover {
  color: #1b5e20 !important;
}

/* Sidebar */
.sidebar {
  background-color: #1b5e20 !important;
}

.sidebar .nav-item {
  margin-bottom: 0 !important;
}

.sidebar .nav-item .nav-link {
  color: rgba(255, 255, 255, 0.8) !important;
  padding: 0.5rem 1rem !important;
}

.sidebar .nav-item .nav-link:hover,
.sidebar .nav-item .nav-link.active {
  color: #fff !important;
  background-color: rgba(76, 175, 80, 0.2) !important;
}

.sidebar .nav-item.active .nav-link {
  color: #fff !important;
  background-color: rgba(76, 175, 80, 0.3) !important;
  font-weight: 600 !important;
}

.sidebar .nav-item .nav-link i {
  color: rgba(255, 255, 255, 0.6) !important;
}

.sidebar .nav-item .nav-link.active i,
.sidebar .nav-item .nav-link:hover i,
.sidebar .nav-item.active .nav-link i {
  color: #fff !important;
}

/* Submenu items */
.collapse-item {
  color: #5a5c69 !important;
  padding: 0.5rem 1rem !important;
  display: block !important;
  text-decoration: none !important;
}

.collapse-item:hover {
  background-color: #f8f9fc !important;
  color: #4caf50 !important;
}

.collapse-item.active {
  background-color: #4caf50 !important;
  color: #fff !important;
  font-weight: 600 !important;
}

.sidebar-brand {
  background-color: #1b5e20 !important;
}

.sidebar-brand-icon i {
  color: #fff !important;
}

.sidebar-brand-text {
  color: #fff !important;
}

.sidebar.toggled {
  background-color: #1b5e20 !important;
}

.sidebar-dark .sidebar-brand {
  color: #fff !important;
}

.sidebar-dark hr.sidebar-divider {
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.sidebar-dark .sidebar-heading {
  color: rgba(255, 255, 255, 0.4) !important;
}

/* Topbar */
.topbar {
  background-color: #fff !important;
}

.topbar .navbar-search input {
  border-color: #4caf50 !important;
}

.topbar .navbar-search input:focus {
  border-color: #1b5e20 !important;
}

.topbar .nav-item .nav-link:hover {
  color: #4caf50 !important;
}

/* Dropdown */
.dropdown-item.active,
.dropdown-item:active {
  background-color: #4caf50 !important;
  color: #fff !important;
}

/* Progress Bars */
.progress-bar,
.progress-bar-primary {
  background-color: #4caf50 !important;
}

/* Cards */
.card-header {
  background-color: #f8f9fc !important;
}

.card-header .text-primary {
  color: #4caf50 !important;
}

/* Forms */
.form-control:focus {
  border-color: #4caf50 !important;
  box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25) !important;
}

.custom-control-input:checked~.custom-control-label::before {
  background-color: #4caf50 !important;
  border-color: #4caf50 !important;
}

.custom-checkbox .custom-control-input:checked~.custom-control-label::before {
  background-color: #4caf50 !important;
}

/* Tables */
.table-primary,
.table-primary>th,
.table-primary>td {
  background-color: #e8f5e9 !important;
}

/* Pagination */
.page-item.active .page-link {
  background-color: #4caf50 !important;
  border-color: #4caf50 !important;
  color: #fff !important;
}

.page-link {
  color: #4caf50 !important;
}

.page-link:hover {
  color: #1b5e20 !important;
  background-color: #e8f5e9 !important;
  border-color: #4caf50 !important;
}

/* Spinner */
.spinner-border.text-primary {
  color: #4caf50 !important;
}

/* Icons with primary colors */
.icon-circle.bg-primary {
  background-color: #4caf50 !important;
}

/* List Group */
.list-group-item.active {
  background-color: #4caf50 !important;
  border-color: #4caf50 !important;
  color: #fff !important;
}

/* Nav Pills */
.nav-pills .nav-link.active {
  background-color: #4caf50 !important;
  color: #fff !important;
}

/* Modal */
.modal-header {
  background-color: #f8f9fc !important;
  border-bottom: 1px solid #e3e6f0 !important;
}

.modal-header .close:hover {
  color: #1b5e20 !important;
}

/* Login Page */
.btn-user {
  background-color: #4caf50 !important;
  border-color: #4caf50 !important;
}

.btn-user:hover {
  background-color: #1b5e20 !important;
  border-color: #1b5e20 !important;
}

/* DataTables */
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: #4caf50 !important;
  border-color: #4caf50 !important;
  color: white !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: #1b5e20 !important;
  border-color: #1b5e20 !important;
  color: white !important;
}

/* Accordion */
.accordion .card-header button:not(.collapsed) {
  color: #4caf50 !important;
}

/* Chart colors (if using charts) */
.chart-area {
  border-color: #4caf50 !important;
}

/* Success color override to match primary green */
.btn-success {
  background-color: #4caf50 !important;
  border-color: #4caf50 !important;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active {
  background-color: #1b5e20 !important;
  border-color: #1b5e20 !important;
}

.text-success {
  color: #4caf50 !important;
}

.bg-success {
  background-color: #4caf50 !important;
}

.border-success,
.border-left-success {
  border-color: #4caf50 !important;
}

/* Custom button styles */
.btn-outline-primary {
  color: #4caf50 !important;
  border-color: #4caf50 !important;
  background-color: transparent !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  color: #fff !important;
  background-color: #4caf50 !important;
  border-color: #4caf50 !important;
}

/* Focus states */
*:focus {
  outline-color: #4caf50 !important;
}

/* Switch/Toggle */
.custom-switch .custom-control-input:checked~.custom-control-label::before {
  background-color: #4caf50 !important;
  border-color: #4caf50 !important;
}

/* Select dropdown */
select:focus,
.custom-select:focus {
  border-color: #4caf50 !important;
  box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25) !important;
}

/* HR divider */
hr.sidebar-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
  margin: 0.5rem 0 !important;
}

.sidebar-heading {
  padding: 0.5rem 1rem !important;
  margin: 0 !important;
}

/* Shadow on hover for cards */
.card:hover {
  box-shadow: 0 0.125rem 0.25rem rgba(27, 94, 32, 0.075) !important;
}

/* Active states */
.active {
  color: #4caf50 !important;
}

/* Badge success */
.badge-success {
  background-color: #4caf50 !important;
}

/* Info color also use green theme */
.bg-info {
  background-color: #4caf50 !important;
}

.text-info {
  color: #4caf50 !important;
}

.border-left-info {
  border-left-color: #4caf50 !important;
}