:root {
    --bg-color: #16191f;
    --text-color: #f8f9fa;
    --primary-color: #5a9eef;
    --primary-gradient: linear-gradient(90deg, #5a9eef 0%, #4a90e2 100%);
    --secondary-color: #2a2f3a;
    --danger-color: #ff6b6b;
    --success-color: #51cf66;
    --input-bg: #2a2f3a;
    --input-border: #4a5568;
    --card-bg: #252a34;
    --header-color: #6bb6ff;
}

/* Override Bootstrap's text-muted for better contrast in dark theme */
.text-muted {
    color: #cbd5e1 !important;
}

/* Override other Bootstrap text utilities for better contrast */
.text-secondary {
    color: #94a3b8 !important;
}

.text-gray-500, .text-gray, .text-grey {
    color: #cbd5e1 !important;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Custom scrollbar styles with better contrast */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-thumb {
  background-color: #6b7280;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background-color: #9ca3af;
}

/* Default heading color */
h2, h3, h4, h5, h6 {
  color: #ffffff;
}

label {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}h1 {
  color: var(--primary-color);
}

/* Default paragraph color */
p {
    color: var(--text-color);
}body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.7;
    font-size: 1.08rem;
    letter-spacing: 0.01em;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 16px;
}

.navbar {
    background: var(--secondary-color);
    padding: 1.1rem 2rem;
    border-radius: 1.2rem;
    margin: 24px 10px 0 10px !important;
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 3;
}

.navbar-brand {
    color: var(--header-color) !important;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-size: 1.6rem;
}

.navbar-nav {
    display: flex;
    gap: 20px;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0;
}

.nav-link {
    color: var(--primary-color) !important;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 7px;
    transition: background 0.2s, color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary-gradient);
    color: #fff !important;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.9rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-color);
    border-radius: 7px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

/* Ensure all input types have proper text color in dark mode */
.form-control,
input[type="text"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    color: var(--text-color) !important;
    background: var(--input-bg) !important;
    border-color: var(--input-border) !important;
}

/* Placeholder text styling for dark mode */
.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
    opacity: 1;
}

/* Webkit browsers */
.form-control::-webkit-input-placeholder,
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Firefox */
.form-control::-moz-placeholder,
input::-moz-placeholder,
textarea::-moz-placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Microsoft Edge */
.form-control::-ms-input-placeholder,
input::-ms-input-placeholder,
textarea::-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Select dropdown styling */
select.form-control {
    color: var(--text-color) !important;
    background: var(--input-bg) !important;
}

select.form-control option {
    color: var(--text-color);
    background: var(--card-bg);
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
}

.btn {
    padding: 0.8rem 1.7rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.23s ease;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.6px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(90deg, #357abd 0%, #4a90e2 100%);
    transform: translateY(-2px) scale(1.04);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

.btn-danger {
    background-color: var(--danger-color);
    color: #fff;
}

.btn-success {
    background-color: var(--success-color);
    color: #fff;
}

.card {
    background: var(--card-bg);
    border: none;
    border-radius: 18px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto 22px auto;
    padding: 26px 28px;
    transition: transform 0.22s ease;
}

.card:hover {
    transform: translateY(-5px) scale(1.01);
}

.card-title {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card .card-body {
    color: var(--text-color) !important;
}

.display-4 {
    color: var(--header-color);
    font-size: 2.55rem;
    margin-bottom: 2rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.home-content {
    text-align: center;
    padding: 48px 0 32px 0;
}

.sale-banner {
    border-radius: 1.2rem;
    width: 100%;
    padding: 20px 0;
    color: white;
    text-align: center;
    position: relative;
    margin-bottom: 32px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.sale-banner-content {
    max-width: 750px;
    margin: 0 auto;
}

.sale-banner h2 {
    font-size: 2.7rem;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.sale-text {
    font-size: 1.4rem;
    margin: 8px 0;
    font-weight: 500;
}

.price-text {
    font-size: 1.18rem;
    font-weight: 600;
}

.regular-price {
    text-decoration: line-through;
    opacity: 0.68;
    margin-right: 18px;
}

.sale-price {
    font-weight: bold;
    font-size: 1.4rem;
    color: #fff;
}

.button-group {
    display: flex;
    gap: 19px;
    justify-content: center;
    margin-top: 24px;
}

.mt-4 { margin-top: 2.2rem; }
.mb-4 { margin-bottom: 2.2rem; }

.booking-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 500;
    background: var(--input-bg);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    transition: background 0.2s, color 0.2s;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-gradient);
    color: #fff;
    border-color: var(--primary-color);
}

.table-responsive { overflow-x: auto; }

.table {
    width: 100%;
    margin-bottom: 1.1rem;
    color: #000000;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #dddddd;
}

.table th,
.table td {
    padding: 1.1rem;
    vertical-align: middle;
    border-bottom: 1px solid #dddddd;
    color: #000000;
}

/* Ensure strong text in tables has proper contrast */
.table td strong,
.table th strong {
    color: #000000 !important;
    font-weight: 700 !important;
}

/* Ensure text-muted in tables has good contrast on white background */
.table .text-muted {
    color: #6c757d !important;
}

th {
    background: #f8f9fa;
    color: #000000;
    font-weight: 600;
    letter-spacing: 0.03em;
    border-bottom: 2px solid #cccccc;
}

.status-select {
    width: 140px;
    padding: 6px;
    border-radius: 5px;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text-color);
}

.status-pending {
    background: #f39c12;
    color: #fff;
}
.status-approved {
    background: #2ecc71;
    color: #fff;
}
.status-denied {
    background: #e74c3c;
    color: #fff;
}
.status-in_progress {
    background: #3498db;
    color: #fff;
}
.status-completed {
    background: #2c3e50;
    color: #fff;
}

.pricing-card {
    background: var(--secondary-color);
    margin: 22px 0;
    border-radius: 10px;
    box-shadow: var(--shadow);
    color: #fff;
    padding: 20px 24px;
}

.total-cost {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0;
    color: var(--primary-color);
}

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    font-weight: 500;
}

.alert-danger {
    background: rgba(231,76,60,0.13);
    color: var(--danger-color);
    border-left: 5px solid var(--danger-color);
}

.alert-success {
    background: rgba(46,204,113,0.14);
    color: var(--success-color);
    border-left: 5px solid var(--success-color);
}

/* Modal styling */
.modal-content {
    background: var(--bg-color);
    color: var(--text-color);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.modal-header {
    border-bottom: 1px solid var(--input-border);
}

.modal-footer {
    border-top: 1px solid var(--input-border);
}

.close {
    color: var(--text-color);
}

/* Color picker styling */
input[type="color"] {
    appearance: none;
    padding: 0;
    width: 60px;
    height: 40px;
    cursor: pointer;
    border-radius: 7px;
    background: var(--input-bg);
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 7px;
}

.sale-form {
    max-width: 500px;
    margin-bottom: 2rem;
}

#costEstimate {
    font-size: 1.22rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 10px;
}

/* Contrast and accessibility tweaks */
::selection {
    background: var(--primary-color);
    color: #fff;
}

/* Custom responsive containers */
.content-container,
.footer-container {
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 1.5rem;
    margin-left: auto;
    margin-right: auto;
}

/* Large screens: constrain width like Bootstrap container */
@media (min-width: 1200px) {
    .content-container,
    .footer-container {
        max-width: 1140px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .content-container,
    .footer-container {
        max-width: 960px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .content-container,
    .footer-container {
        max-width: 720px;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .content-container,
    .footer-container {
        max-width: 540px;
    }
}

/* Small screens: full width with minimal padding */
@media (max-width: 575px) {
    .content-container,
    .footer-container {
        padding-left: 10px;
        padding-right: 10px;
        padding-top: 1.5rem;
    }
}

/* Footer specific styling */
.footer-container {
    background: var(--bg-color);
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.footer-container .card {
    margin-bottom: 1rem;
}

/* Navbar hamburger icon */
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255,255,255,1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

.navbar-toggler:focus {
    outline: none;
    box-shadow: none;
}

/* Utility text colors */
.text-primary {
    color: var(--primary-color)!important;
}
.text-secondary {
    color: #94a3b8 !important;
}
.text-danger {
    color: var(--danger-color)!important;
}
.text-warning {
    color: #fbbf24 !important;
}
.text-info {
    color: #60a5fa !important;
}
.text-success {
    color: var(--success-color)!important;
}

/* Form help text styling */
.form-text {
    color: #cbd5e1 !important;
}

/* Animal Selection Styles */
.animal-selection .animal-card {
    border: 2px solid var(--input-border);
    background: var(--card-bg);
    transition: all 0.3s ease;
    cursor: pointer;
}

.animal-selection .animal-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(90, 158, 239, 0.2);
}

.animal-selection .animal-card.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(90, 158, 239, 0.1) 0%, rgba(74, 144, 226, 0.1) 100%);
}

.animal-selection .form-check-input:checked ~ .form-check-label .animal-card {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(90, 158, 239, 0.1) 0%, rgba(74, 144, 226, 0.1) 100%);
}

.animal-info h6 {
    color: var(--text-color);
    font-weight: 600;
}

.animal-info p {
    margin-bottom: 0.25rem;
    color: #cbd5e0;
}

/* My Animals Page Styles */
.animal-card {
    border: 1px solid var(--input-border);
    background: var(--card-bg);
    transition: all 0.3s ease;
}

.animal-link {
    text-decoration: none;
    color: inherit;
}

.animal-link:hover .animal-card {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.animal-info strong {
    color: #000000 !important;
    font-weight: 700 !important;
}

.animal-info .text-muted {
    color: #cbd5e1 !important;
}

.animal-info .text-warning {
    color: #fbbf24 !important;
}