:root {
  --primary: oklch(34.58% .1139 10.5424);
  --primary-foreground: oklch(98.5% 0 0);
  --destructive: oklch(57.7% .245 27.325); /* Vibrant Red */
  --destructive-foreground: oklch(100% 0 0);
}

.hidden {
  display: none !important;
}

/* Global Button Overrides */
.btn {
  border-radius: 0 !important; /* Square buttons */
}

/* Primary Buttons (Maroon) */
.btn-primary, .btn-jupyter {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: var(--primary-foreground) !important;
}

.btn-primary:hover, .btn-primary:focus,
.btn-jupyter:hover, .btn-jupyter:focus {
  filter: brightness(1.2); /* Slight lightening on hover */
}

/* Destructive Buttons (Red Outline for Accessibility/Contrast) */
.btn-danger {
  background-color: transparent !important;
  border: 1px solid var(--destructive) !important;
  color: var(--destructive) !important;
}

.btn-danger:hover, .btn-danger:focus {
  background-color: var(--destructive) !important;
  color: var(--destructive-foreground) !important;
}

/* Admin Page - Fix oversized caret toggle */
.user-row .btn-sm {
    padding: 1px 5px !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
}

/* Form Card Selection */
.profile-card {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    background-color: var(--bs-body-bg); /* Default Light Mode */
    border: 1px solid var(--bs-border-color);
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.profile-card.selected {
    border-color: var(--bs-gray-600) !important;
    border-width: 2px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* GPU Profile Cards */
.profile-card-gpu {
    border-color: var(--primary) !important;
    border-width: 2px;
}

.profile-card-gpu.selected {
    border-color: var(--primary) !important;
    border-width: 3px;
}

.profile-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1.5rem;
}

.profile-icon svg {
    width: 100%;
    height: 100%;
}

.checkmark {
    top: 15px; /* Moved down */
    right: 20px; /* Moved left relative to right edge */
    color: var(--primary);
    font-size: 1.25rem;
    display: none;
}

.profile-card.selected .checkmark {
    display: block;
}

/* Navbar Logo */
.navbar-logo {
    color: var(--primary);
}

/* Dark Mode Overrides */
[data-bs-theme="dark"] body {
    background-color: var(--bs-dark) !important;
    color: var(--bs-white);
}

/* Lighter Gray Elements (Cards & Terminal) */
[data-bs-theme="dark"] .profile-card,
[data-bs-theme="dark"] #progress-log {
    background-color: var(--bs-gray-800) !important; /* Lighter than body */
    color: var(--bs-white);
}

[data-bs-theme="dark"] .profile-card {
    border-color: var(--bs-gray-600);
}

[data-bs-theme="dark"] .profile-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.5) !important;
}

[data-bs-theme="dark"] .navbar-logo,
[data-bs-theme="dark"] .checkmark {
    color: var(--bs-white) !important;
}

[data-bs-theme="dark"] .text-muted {
    color: var(--bs-gray-400) !important;
}

/* Dark Mode Buttons */
[data-bs-theme="dark"] .btn-primary {
    background-color: var(--bs-gray-600) !important;
    border-color:    var(--bs-gray-600) !important;
    color:           var(--bs-white) !important;
}

[data-bs-theme="dark"] .btn-primary:hover,
[data-bs-theme="dark"] .btn-primary:focus {
    background-color: var(--bs-gray-500) !important;
    border-color:    var(--bs-gray-500) !important;
}

/* Theme Icons */
.theme-icon-light {
    transform: none;
}
.theme-icon-dark {
    transform: rotate(180deg);
}
.theme-icon-auto {
    transform: rotate(45deg);
}

/* Ensure dropdown items display correctly */
.dropdown-item .theme-checkmark {
    display: none;
}
.dropdown-item.active .theme-checkmark {
    display: block !important;
}

/* Custom Active State (Light Gray) */
.dropdown-item.active, .dropdown-item:active {
    background-color: var(--bs-gray-200) !important;
    color: var(--bs-dark) !important; /* Dark text for contrast */
}

/* Remove Button Outline/Box-Shadow on Focus */
#bd-theme:focus, #bd-theme:active, .show > #bd-theme.dropdown-toggle {
    box-shadow: none !important;
    border: none !important; /* Ensure no border if any */
    outline: 0 !important;
}

/* Remove the dropdown caret (triangle) */
#bd-theme::after {
    display: none !important;
    content: none !important;
}
