html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* Custom Primary Color - Black with Yellow Text */
:root {
  --bs-primary: #000000 !important;
  --bs-primary-rgb: 0, 0, 0 !important;
}

.btn-primary {
  --bs-btn-color: #ffd700 !important;
  --bs-btn-bg: #000000 !important;
  --bs-btn-border-color: #000000 !important;
  --bs-btn-hover-color: #ffd700 !important;
  --bs-btn-hover-bg: #333333 !important;
  --bs-btn-hover-border-color: #333333 !important;
  --bs-btn-focus-shadow-rgb: 0, 0, 0 !important;
  --bs-btn-active-color: #ffd700 !important;
  --bs-btn-active-bg: #444444 !important;
  --bs-btn-active-border-color: #444444 !important;
  --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125) !important;
  --bs-btn-disabled-color: #666666 !important;
  --bs-btn-disabled-bg: #000000 !important;
  --bs-btn-disabled-border-color: #000000 !important;
  
  color: #ffd700 !important;
  background-color: #000000 !important;
  border-color: #000000 !important;
}

.btn-primary:hover {
  color: #ffd700 !important;
  background-color: #333333 !important;
  border-color: #333333 !important;
}

.btn-primary:focus, .btn-primary.focus {
  color: #ffd700 !important;
  background-color: #333333 !important;
  border-color: #333333 !important;
  box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.5) !important;
}

.btn-primary:active, .btn-primary.active {
  color: #ffd700 !important;
  background-color: #444444 !important;
  border-color: #444444 !important;
}

.btn-primary:disabled, .btn-primary.disabled {
  color: #666666 !important;
  background-color: #000000 !important;
  border-color: #000000 !important;
}

/* Primary background utilities */
.bg-primary {
  background-color: #000000 !important;
}

/* Primary text utilities */
.text-primary {
  color: #000000 !important;
}

/* Primary border utilities */
.border-primary {
  border-color: #000000 !important;
}

/* Alert primary */
.alert-primary {
  --bs-alert-color: #ffd700;
  --bs-alert-bg: #1a1a1a;
  --bs-alert-border-color: #000000;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #000000;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* Login Form Centered Layout */
.min-vh-100 {
  min-height: 100vh;
  padding-top: 1.2rem;
  padding-bottom: 1.2rem;
}

.card {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid #dee2e6;
}

.card-body {
  padding: 2rem;
}

@media (max-width: 768px) {
  .min-vh-100 {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
  }
  
  .card-body {
    padding: 1.5rem;
  }
}

/* GLOBAL LINK COLOR OVERRIDE - Always Black */
a {
  color: #000000 !important;
  text-decoration: none;
}

a:hover {
  color: #333333 !important;
  text-decoration: underline;
}

a:visited {
  color: #000000 !important;
}

a:focus {
  color: #000000 !important;
}

/* Exception: Links that are styled as buttons should keep button colors */
/* This section moved to bottom of file for higher priority */

/* Bootstrap Link Override */
.link-primary {
  color: #000000 !important;
}

.link-primary:hover,
.link-primary:focus {
  color: #333333 !important;
}

/* Navigation Links */
.nav-link {
  color: #000000 !important;
}

.nav-link:hover,
.nav-link:focus {
  color: #333333 !important;
}

/* Navbar specific overrides for white text */
.navbar-dark .nav-link {
  color: #ffffff !important;
}

.navbar-dark .nav-link:hover,
.navbar-dark .nav-link:focus {
  color: #cccccc !important;
}

/* IMPORTANT: Button-Links Override - Must come AFTER global link rules */
/* Higher specificity to override global link rules */
a.btn.btn-danger,
a.btn.btn-danger:link,
a.btn.btn-danger:visited,
a.btn.btn-danger:hover,
a.btn.btn-danger:active,
a.btn.btn-danger:focus {
  color: #ffffff !important;
  text-decoration: none !important;
}

/* IMPORTANT: Button Elements Override */
button.btn.btn-danger,
input[type="submit"].btn.btn-danger,
.btn.btn-danger {
  color: #ffffff !important;
}

button.btn.btn-danger:hover,
button.btn.btn-danger:focus,
button.btn.btn-danger:active,
input[type="submit"].btn.btn-danger:hover,
input[type="submit"].btn.btn-danger:focus,
input[type="submit"].btn.btn-danger:active,
.btn.btn-danger:hover,
.btn.btn-danger:focus,
.btn.btn-danger:active {
  color: #ffffff !important;
}

a.btn.btn-primary,
a.btn.btn-primary:link,
a.btn.btn-primary:visited,
a.btn.btn-primary:hover,
a.btn.btn-primary:active,
a.btn.btn-primary:focus {
  color: #ffd700 !important;
  text-decoration: none !important;
}

a.btn.btn-success,
a.btn.btn-success:link,
a.btn.btn-success:visited,
a.btn.btn-success:hover,
a.btn.btn-success:active,
a.btn.btn-success:focus {
  color: #ffffff !important;
  text-decoration: none !important;
}

/* Button Elements - Success */
button.btn.btn-success,
input[type="submit"].btn.btn-success,
.btn.btn-success {
  color: #ffffff !important;
}

a.btn.btn-warning,
a.btn.btn-warning:link,
a.btn.btn-warning:visited,
a.btn.btn-warning:hover,
a.btn.btn-warning:active,
a.btn.btn-warning:focus {
  color: #000000 !important;
  text-decoration: none !important;
}

/* Button Elements - Warning */
button.btn.btn-warning,
input[type="submit"].btn.btn-warning,
.btn.btn-warning {
  color: #000000 !important;
}

a.btn.btn-info,
a.btn.btn-info:link,
a.btn.btn-info:visited,
a.btn.btn-info:hover,
a.btn.btn-info:active,
a.btn.btn-info:focus {
  color: #ffffff !important;
  text-decoration: none !important;
}

a.btn.btn-secondary,
a.btn.btn-secondary:link,
a.btn.btn-secondary:visited,
a.btn.btn-secondary:hover,
a.btn.btn-secondary:active,
a.btn.btn-secondary:focus {
  color: #ffffff !important;
  text-decoration: none !important;
}

a.btn.btn-light,
a.btn.btn-light:link,
a.btn.btn-light:visited,
a.btn.btn-light:hover,
a.btn.btn-light:active,
a.btn.btn-light:focus {
  color: #000000 !important;
  text-decoration: none !important;
}

a.btn.btn-dark,
a.btn.btn-dark:link,
a.btn.btn-dark:visited,
a.btn.btn-dark:hover,
a.btn.btn-dark:active,
a.btn.btn-dark:focus {
  color: #ffffff !important;
  text-decoration: none !important;
}

/* Button text color exceptions - Non-primary buttons should keep their original colors */
.btn:not(.btn-primary) {
  color: inherit !important;
}

.btn-danger {
  color: #ffffff !important;
}

.btn-success {
  color: #ffffff !important;
}

.btn-warning {
  color: #000000 !important;
}

.btn-info {
  color: #ffffff !important;
}

.btn-secondary {
  color: #ffffff !important;
}

.btn-light {
  color: #000000 !important;
}

.btn-dark {
  color: #ffffff !important;
}

/* FORCE PRIMARY COLOR OVERRIDE - Black with Yellow Text */
/* Bootstrap Button Primary Override */
.btn-primary,
button[type="submit"].btn-primary,
input[type="submit"].btn-primary,
.btn.btn-primary {
  color: #ffd700 !important;
  background-color: #000000 !important;
  border-color: #000000 !important;
  --bs-btn-color: #ffd700 !important;
  --bs-btn-bg: #000000 !important;
  --bs-btn-border-color: #000000 !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary.focus,
button[type="submit"].btn-primary:hover,
input[type="submit"].btn-primary:hover {
  color: #ffd700 !important;
  background-color: #333333 !important;
  border-color: #333333 !important;
}

.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle {
  color: #ffd700 !important;
  background-color: #444444 !important;
  border-color: #444444 !important;
}

.btn-primary:disabled,
.btn-primary.disabled {
  color: #666666 !important;
  background-color: #000000 !important;
  border-color: #000000 !important;
}

/* Navigation Pills Override */
.nav-pills .nav-link {
  color: #000000 !important;
  background-color: transparent !important;
}

.nav-pills .nav-link:hover,
.nav-pills .nav-link:focus {
  color: #333333 !important;
  background-color: #f8f9fa !important;
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  color: #ffd700 !important;
  background-color: #000000 !important;
}

/* Alert Primary */
.alert-primary {
  color: #ffd700 !important;
  background-color: #1a1a1a !important;
  border-color: #000000 !important;
}

/* Background and Text Utilities */
.bg-primary {
  background-color: #000000 !important;
}

.text-primary {
  color: #000000 !important;
}

.border-primary {
  border-color: #000000 !important;
}

/* Button Normalization - Ensure button and anchor elements look identical */
button.btn {
  border: none !important;
  text-decoration: none !important;
}

button.btn:focus {
  outline: none !important;
  box-shadow: 0 0 0 0.25rem rgba(108, 117, 125, 0.25) !important;
}

button.btn:active {
  transform: none !important;
}

/* Ensure secondary buttons have consistent styling */
.btn-secondary {
  color: #fff !important;
  background-color: #6c757d !important;
  border-color: #6c757d !important;
}

/* Force button elements to look identical to anchor elements */
button.btn.btn-secondary {
  color: #ffffff !important;
  background-color: #6c757d !important;
  border: 1px solid #6c757d !important;
}

button.btn.btn-secondary:hover {
  color: #ffffff !important;
  background-color: #5a6268 !important;
  border-color: #545b62 !important;
}

button.btn.btn-secondary:focus,
button.btn.btn-secondary.focus {
  color: #ffffff !important;
  background-color: #5a6268 !important;
  border-color: #545b62 !important;
  box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.5) !important;
}