/* BikeFleet Tracker - Premium Design System */

:root {
    --primary: #EE4223;
    --secondary: #0b1814;
    --teal: #00edd3;
    --blue: #0090de;
    --available: #22c55e;
    --rented: #ee4223;
    --pending: #00edd3;
    --in-shop: #dc2626;
    --retired: #6b7280;
    --bg-light: #fafafa;
    --white: #ffffff;

    /* Light theme (default) */
    --bg-body: #fafafa;
    --bg-card: #ffffff;
    --bg-card-hover: #f9fafb;
    --bg-input: #ffffff;
    --bg-navbar: #ffffff;
    --text-primary: #0b1814;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --border-color-light: #f3f4f6;
    --shadow-sm: rgba(0, 0, 0, 0.05);
    --shadow-md: rgba(0, 0, 0, 0.08);
    --shadow-lg: rgba(0, 0, 0, 0.12);
}

/* Dark theme */
body.theme-dark {
    --bg-body: #111827;
    --bg-card: #1f2937;
    --bg-card-hover: #374151;
    --bg-input: #374151;
    --bg-navbar: #1f2937;
    --bg-light: #111827;
    --white: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --secondary: #f9fafb;
    --border-color: #374151;
    --border-color-light: #4b5563;
    --shadow-sm: rgba(0, 0, 0, 0.3);
    --shadow-md: rgba(0, 0, 0, 0.4);
    --shadow-lg: rgba(0, 0, 0, 0.5);
}

/* Auto theme - follows system preference */
@media (prefers-color-scheme: dark) {
    body.theme-auto {
        --bg-body: #111827;
        --bg-card: #1f2937;
        --bg-card-hover: #374151;
        --bg-input: #374151;
        --bg-navbar: #1f2937;
        --bg-light: #111827;
        --white: #1f2937;
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --text-muted: #9ca3af;
        --secondary: #f9fafb;
        --border-color: #374151;
        --border-color-light: #4b5563;
        --shadow-sm: rgba(0, 0, 0, 0.3);
        --shadow-md: rgba(0, 0, 0, 0.4);
        --shadow-lg: rgba(0, 0, 0, 0.5);
    }
}

/* Light-muted theme - reduced color variation, professional grayscale look */
body.theme-light-muted {
    /* Keep page background white/light gray */
    --bg-body: #f8f9fa;
    --bg-card: #ffffff;
    --bg-card-hover: #f3f4f6;

    /* Muted status colors - all grays */
    --primary: #6b7280;
    --available: #6b7280;
    --rented: #6b7280;
    --pending: #9ca3af;
    --in-shop: #4b5563;
    --retired: #9ca3af;
    --teal: #9ca3af;
    --blue: #6b7280;
}

/* Light-muted theme: Override ALL colorful buttons to muted grays */
body.theme-light-muted .btn-primary {
    background: #6b7280 !important;
    border-color: #6b7280 !important;
}

body.theme-light-muted .btn-primary:hover {
    background: #4b5563 !important;
    border-color: #4b5563 !important;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3) !important;
}

body.theme-light-muted .btn-success {
    background: #6b7280 !important;
    border-color: #6b7280 !important;
}

body.theme-light-muted .btn-success:hover {
    background: #4b5563 !important;
    border-color: #4b5563 !important;
}

body.theme-light-muted .btn-danger {
    background: #4b5563 !important;
    border-color: #4b5563 !important;
}

body.theme-light-muted .btn-danger:hover {
    background: #374151 !important;
    border-color: #374151 !important;
}

body.theme-light-muted .btn-warning {
    background: #9ca3af !important;
    border-color: #9ca3af !important;
    color: #1f2937 !important;
}

body.theme-light-muted .btn-warning:hover {
    background: #6b7280 !important;
    border-color: #6b7280 !important;
    color: white !important;
}

body.theme-light-muted .btn-info {
    background: #9ca3af !important;
    border-color: #9ca3af !important;
    color: #1f2937 !important;
}

body.theme-light-muted .btn-info:hover {
    background: #6b7280 !important;
    border-color: #6b7280 !important;
    color: white !important;
}

/* Light-muted: Outline button variants */
body.theme-light-muted .btn-outline-primary {
    border-color: #6b7280 !important;
    color: #6b7280 !important;
}

body.theme-light-muted .btn-outline-primary:hover {
    background: #6b7280 !important;
    color: white !important;
}

body.theme-light-muted .btn-outline-success {
    border-color: #6b7280 !important;
    color: #6b7280 !important;
}

body.theme-light-muted .btn-outline-success:hover {
    background: #6b7280 !important;
    color: white !important;
}

body.theme-light-muted .btn-outline-danger {
    border-color: #4b5563 !important;
    color: #4b5563 !important;
}

body.theme-light-muted .btn-outline-danger:hover {
    background: #4b5563 !important;
    color: white !important;
}

body.theme-light-muted .btn-outline-warning {
    border-color: #9ca3af !important;
    color: #6b7280 !important;
}

body.theme-light-muted .btn-outline-warning:hover {
    background: #9ca3af !important;
    color: #1f2937 !important;
}

body.theme-light-muted .btn-outline-info {
    border-color: #9ca3af !important;
    color: #6b7280 !important;
}

body.theme-light-muted .btn-outline-info:hover {
    background: #9ca3af !important;
    color: #1f2937 !important;
}

/* Light-muted: Action buttons (large buttons on bike detail page) */
body.theme-light-muted .action-btn {
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.15) !important;
    color: white !important;
}

body.theme-light-muted .action-btn:hover {
    box-shadow: 0 4px 16px rgba(107, 114, 128, 0.25) !important;
    color: white !important;
}

body.theme-light-muted .action-btn .action-title,
body.theme-light-muted .action-btn .action-subtitle {
    color: white !important;
}

/* Light-muted: Secondary action buttons (warning, info, dark) use lighter gray */
body.theme-light-muted .action-btn.btn-warning,
body.theme-light-muted .action-btn.btn-info,
body.theme-light-muted .action-btn.btn-dark {
    background-color: #9ca3af !important;
}

body.theme-light-muted .action-btn.btn-warning:hover,
body.theme-light-muted .action-btn.btn-info:hover,
body.theme-light-muted .action-btn.btn-dark:hover {
    background-color: #6b7280 !important;
}

/* Light-muted: Alerts - muted versions */
body.theme-light-muted .alert-success {
    background: #f3f4f6 !important;
    border-left-color: #6b7280 !important;
    color: #374151 !important;
}

body.theme-light-muted .alert-danger {
    background: #f3f4f6 !important;
    border-left-color: #4b5563 !important;
    color: #374151 !important;
}

body.theme-light-muted .alert-warning {
    background: #f3f4f6 !important;
    border-left-color: #9ca3af !important;
    color: #374151 !important;
}

body.theme-light-muted .alert-info {
    background: #f3f4f6 !important;
    border-left-color: #9ca3af !important;
    color: #374151 !important;
}

/* Light-muted: Badge colors */
body.theme-light-muted .badge.bg-primary,
body.theme-light-muted .bg-primary {
    background-color: #6b7280 !important;
}

body.theme-light-muted .badge.bg-success,
body.theme-light-muted .bg-success {
    background-color: #6b7280 !important;
}

body.theme-light-muted .badge.bg-danger,
body.theme-light-muted .bg-danger {
    background-color: #4b5563 !important;
}

body.theme-light-muted .badge.bg-warning,
body.theme-light-muted .bg-warning {
    background-color: #9ca3af !important;
    color: #1f2937 !important;
}

body.theme-light-muted .badge.bg-info,
body.theme-light-muted .bg-info {
    background-color: #9ca3af !important;
    color: #1f2937 !important;
}

/* Light-muted: Text color overrides for links and accents */
body.theme-light-muted a:not(.btn):not(.nav-link):not(.dropdown-item) {
    color: #4b5563;
}

body.theme-light-muted a:not(.btn):not(.nav-link):not(.dropdown-item):hover {
    color: #374151;
}

/* Light-muted: Brand logo uses muted color */
body.theme-light-muted .brand-logo,
body.theme-light-muted .brand-logo-large {
    background: #6b7280 !important;
    box-shadow: 0 10px 30px rgba(107, 114, 128, 0.2) !important;
}

/* Light-muted: Size count and other accent elements */
body.theme-light-muted .size-count {
    color: #4b5563 !important;
}

body.theme-light-muted .rental-duration {
    color: #4b5563 !important;
}

/* Light-muted: Status section borders */
body.theme-light-muted .available-section .status-header {
    border-left-color: #6b7280 !important;
    color: #4b5563 !important;
}

body.theme-light-muted .rented-section .status-header {
    border-left-color: #6b7280 !important;
    color: #4b5563 !important;
}

body.theme-light-muted .pending-section .status-header {
    border-left-color: #9ca3af !important;
    color: #6b7280 !important;
}

body.theme-light-muted .shop-section .status-header {
    border-left-color: #4b5563 !important;
    color: #374151 !important;
}

/* Light-muted: Focus ring colors */
body.theme-light-muted .form-control:focus,
body.theme-light-muted .form-select:focus {
    border-color: #6b7280 !important;
    box-shadow: 0 0 0 4px rgba(107, 114, 128, 0.15) !important;
}

/* Light-muted: Nav link hover */
body.theme-light-muted .nav-link:hover {
    color: #4b5563 !important;
}

/* Light-muted: Active pagination */
body.theme-light-muted .page-item.active .page-link {
    background-color: #6b7280 !important;
    border-color: #6b7280 !important;
}

/* Light-muted: Nav pills active */
body.theme-light-muted .nav-pills .nav-link.active {
    background-color: #6b7280 !important;
}

/* Light-muted: Table hover uses muted color */
body.theme-light-muted .bike-type-card:hover,
body.theme-light-muted a:hover .bike-type-card {
    border-color: #6b7280 !important;
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.15) !important;
}

body.theme-light-muted .rental-item:hover,
body.theme-light-muted .bike-list-item:hover {
    border-color: #6b7280 !important;
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.15) !important;
}

/* Light-muted: Override inline background colors on bike detail page */
body.theme-light-muted body {
    background: var(--bg-body) !important;
}

body.theme-light-muted .status-banner {
    background: var(--bg-card) !important;
    border-left-color: #6b7280 !important;
}

body.theme-light-muted .status-banner .status-badge {
    background: #6b7280 !important;
}

/* Light-muted: btn-dark should be gray, not black */
body.theme-light-muted .btn-dark {
    background-color: #6b7280 !important;
    border-color: #6b7280 !important;
}

body.theme-light-muted .btn-dark:hover {
    background-color: #4b5563 !important;
    border-color: #4b5563 !important;
}

body.theme-light-muted .action-btn.btn-dark {
    background-color: #6b7280 !important;
}

body.theme-light-muted .action-btn.btn-dark:hover {
    background-color: #4b5563 !important;
}

/* Light-muted: Override bike icon border color */
body.theme-light-muted .bike-icon img {
    border-color: #6b7280 !important;
}

body.theme-light-muted .bike-icon i {
    color: #6b7280 !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

/* Brand Logo */
.brand-logo {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-w {
    color: white;
    font-weight: 700;
    font-size: 24px;
}

.brand-logo-large {
    width: 80px;
    height: 80px;
    background: var(--primary);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(238, 66, 35, 0.2);
}

.brand-logo-large .brand-w {
    font-size: 48px;
}

/* Navigation */
.navbar {
    background: var(--bg-navbar) !important;
    box-shadow: 0 2px 10px var(--shadow-sm);
    transition: background-color 0.3s ease;
}

.navbar-brand {
    font-size: 1.25rem;
    color: var(--text-primary) !important;
}

.nav-link {
    font-weight: 500;
    color: var(--text-primary) !important;
    padding: 0.5rem 1rem !important;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary) !important;
}

/* Dark mode navbar adjustments */
body.theme-dark .navbar-toggler-icon {
    filter: invert(1);
}

/* Cards */
.card {
    border: none;
    border-radius: 16px;
    background: var(--bg-card);
    box-shadow: 0 2px 12px var(--shadow-md);
    margin-bottom: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--shadow-lg);
}

.card-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    border-radius: 16px 16px 0 0 !important;
    color: var(--text-primary);
}

.card-body {
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 0 0 16px 16px;
}

/* Buttons */
.btn {
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    border-radius: 12px;
    transition: all 0.2s;
    border: none;
}

.btn-lg {
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    min-height: 70px;
    border-radius: 16px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #d63821;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(238, 66, 35, 0.3);
}

.btn-success {
    background: var(--available);
}

.btn-success:hover {
    background: #16a34a;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--in-shop);
}

.btn-danger:hover {
    background: #b91c1c;
    transform: translateY(-2px);
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background: #d97706;
    transform: translateY(-2px);
}

.btn-info {
    background: var(--teal);
    color: var(--secondary);
}

.btn-info:hover {
    background: #00d4bb;
    transform: translateY(-2px);
}

/* Forms */
.form-control, .form-select {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background: var(--bg-input);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(238, 66, 35, 0.1);
    background: var(--bg-input);
    color: var(--text-primary);
}

.form-control-lg {
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    border-radius: 14px;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* Dark mode form placeholders */
body.theme-dark .form-control::placeholder,
body.theme-dark .form-select::placeholder {
    color: var(--text-muted);
}

/* Status Sections */
.status-section {
    margin-bottom: 2rem;
}

.status-header {
    background: var(--bg-card);
    padding: 1.25rem 1.5rem;
    border-radius: 16px 16px 0 0;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    border-left: 6px solid;
    transition: opacity 0.2s, background-color 0.3s ease;
}

a:hover .status-header {
    opacity: 0.9;
}

.status-header .badge {
    background: rgba(0, 0, 0, 0.1);
    color: inherit;
    font-size: 0.9rem;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
}

body.theme-dark .status-header .badge {
    background: rgba(255, 255, 255, 0.15);
}

.status-body {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 2px 12px var(--shadow-md);
    transition: background-color 0.3s ease;
}

.available-section .status-header {
    border-left-color: var(--available);
    color: var(--available);
}

.rented-section .status-header {
    border-left-color: var(--rented);
    color: var(--rented);
}

.pending-section .status-header {
    border-left-color: var(--pending);
    color: var(--pending);
}

.shop-section .status-header {
    border-left-color: var(--in-shop);
    color: var(--in-shop);
}

/* Bike Type Cards */
.bike-type-card {
    background: var(--bg-card-hover);
    border-radius: 12px;
    padding: 1.25rem;
    border: 2px solid var(--border-color);
    transition: all 0.2s;
}

a:hover .bike-type-card {
    border-color: var(--primary);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(238, 66, 35, 0.15);
}

.bike-type-header {
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-primary);
}

.size-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
}

.size-item {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    border: 2px solid var(--border-color);
}

.size-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.size-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

/* Rental List */
.rental-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rental-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-card-hover);
    border-radius: 12px;
    border: 2px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.rental-item:hover {
    border-color: var(--primary);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(238, 66, 35, 0.15);
}

.rental-bike-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.rental-customer {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.rental-duration {
    font-weight: 600;
    color: var(--primary);
    font-size: 1.1rem;
}

/* Bike List */
.bike-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bike-list-item {
    padding: 1rem 1.25rem;
    background: var(--bg-card-hover);
    border-radius: 12px;
    border: 2px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    display: block;
    transition: all 0.2s;
}

.bike-list-item:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

/* Status Banner */
.status-banner {
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.bike-icon {
    font-size: 3rem;
}

.bike-icon i {
    opacity: 0.3;
}

.bike-icon img {
    opacity: 1;
}

.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.action-btn {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    border-radius: 16px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    color: white;
}

.action-btn i {
    font-size: 2rem;
    margin-right: 1rem;
}

.action-title {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.action-subtitle {
    font-size: 0.85rem;
    opacity: 0.9;
}

.action-btn.btn-dark {
    background-color: #212529;
}

/* Dark mode: invert action-btn.btn-dark to be visible */
body.theme-dark .action-btn.btn-dark {
    background-color: var(--bg-card-hover);
    border: 1px solid var(--border-color);
}

@media (prefers-color-scheme: dark) {
    body.theme-auto .action-btn.btn-dark {
        background-color: var(--bg-card-hover);
        border: 1px solid var(--border-color);
    }
}

.action-btn-unavailable {
    cursor: not-allowed;
    background-color: #e9ecef; 
    border: 2px solid #adb5bd; 
    color: #495057;
}

/* QR Code Display */
.qr-code-display {
    background: white;
    padding: 2rem;
    border: 4px solid white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: inline-block;
    margin: 1rem auto;
}

.qr-code-display img {
    max-width: 300px;
    display: block;
}

/* Tables */
.table {
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card);
    color: var(--text-primary);
}

.table thead th {
    background: var(--bg-card-hover);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    color: var(--text-primary);
    padding: 1rem;
}

.table tbody tr {
    transition: background 0.2s;
    border-color: var(--border-color);
}

.table tbody tr:hover {
    background: var(--bg-card-hover);
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    border-color: var(--border-color);
    color: var(--text-primary);
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: var(--bg-card-hover);
    --bs-table-accent-bg: var(--bg-card-hover);
}

/* Search Form */
.search-form .input-group {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    overflow: hidden;
}

.search-form .input-group-text {
    border: none;
    padding: 1rem 1.25rem;
}

.search-form .form-control {
    border: none;
    padding: 1rem 1.25rem;
}

.search-form .form-control:focus {
    box-shadow: none;
}

/* Login Page - Marketing Theme */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(8, 145, 178, 0.1) 0%, transparent 50%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.login-card {
    background: rgba(255, 255, 255, 0.98);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    max-width: 450px;
    width: 100%;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-card .brand-logo-large {
    background: linear-gradient(135deg, #2563eb, #0891b2);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

.login-card h1 {
    color: #0f172a;
}

.login-card .text-muted {
    color: #64748b !important;
}

.login-card .form-label {
    color: #334155;
    font-weight: 500;
}

.login-card .form-control {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.login-card .form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: white;
}

.login-card .btn-primary {
    background: linear-gradient(135deg, #2563eb, #0891b2);
    border: none;
    border-radius: 12px;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.login-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.login-card a {
    color: #2563eb;
}

.login-card a:hover {
    color: #0891b2;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    border-left: 4px solid;
}

.alert-success {
    background: #f0fdf4;
    border-left-color: var(--available);
    color: #166534;
}

.alert-danger {
    background: #fef2f2;
    border-left-color: var(--in-shop);
    color: #991b1b;
}

.alert-warning {
    background: #fffbeb;
    border-left-color: #f59e0b;
    color: #92400e;
}

.alert-info {
    background: #f0fdfa;
    border-left-color: var(--teal);
    color: var(--secondary);
}

/* Dark mode alerts */
body.theme-dark .alert-success {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
}

body.theme-dark .alert-danger {
    background: rgba(220, 38, 38, 0.15);
    color: #fca5a5;
}

body.theme-dark .alert-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
}

body.theme-dark .alert-info {
    background: rgba(0, 237, 211, 0.15);
    color: var(--teal);
}

@media (prefers-color-scheme: dark) {
    body.theme-auto .alert-success {
        background: rgba(34, 197, 94, 0.15);
        color: #86efac;
    }

    body.theme-auto .alert-danger {
        background: rgba(220, 38, 38, 0.15);
        color: #fca5a5;
    }

    body.theme-auto .alert-warning {
        background: rgba(245, 158, 11, 0.15);
        color: #fcd34d;
    }

    body.theme-auto .alert-info {
        background: rgba(0, 237, 211, 0.15);
        color: var(--teal);
    }
}

/* Badges */
.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }

    .status-header {
        padding: 1rem;
        font-size: 1rem;
    }

    .status-body {
        padding: 1rem;
    }

    .bike-type-card {
        padding: 1rem;
    }

    .size-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 0.75rem;
    }

    .action-btn {
        padding: 1.25rem;
    }

    .action-btn i {
        font-size: 1.5rem;
    }

    .action-title {
        font-size: 1rem;
    }

    .action-subtitle {
        font-size: 0.8rem;
    }

    .login-card {
        padding: 2rem;
    }

    .qr-code-display img {
        max-width: 250px;
    }

    .navbar-brand {
        font-size: 1rem;
    }

    .nav-link {
        padding: 0.75rem 1rem !important;
    }
}

/* Touch-friendly */
@media (hover: none) {
    .btn-lg {
        min-height: 70px;
    }

    .action-btn {
        min-height: 80px;
    }
}

/* Dashboard View Layouts */
.dashboard-stacked .dashboard-card {
    margin-bottom: 1.5rem;
}

.dashboard-stacked .status-section {
    margin-bottom: 1.5rem;
}

.dashboard-quadrant {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    grid-template-rows: repeat(2, 1fr) !important;
    gap: 1rem;
    min-height: calc(100vh - 180px);
}

.dashboard-quadrant .dashboard-card,
.dashboard-quadrant .status-section {
    margin-bottom: 0 !important;
    display: flex;
    flex-direction: column;
}

.dashboard-quadrant .status-body {
    flex: 1;
    overflow-y: auto;
    max-height: calc(50vh - 120px);
}

/* TV Dashboard Mode - Enhanced for large screens */
.dashboard-quadrant .status-header {
    font-size: 1.3rem;
    padding: 1rem 1.25rem;
}

.dashboard-quadrant .status-header .badge {
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
}

.dashboard-quadrant .bike-type-header {
    font-size: 1.1rem;
}

.dashboard-quadrant .size-count {
    font-size: 1.75rem;
}

.dashboard-quadrant .size-label {
    font-size: 0.95rem;
}

.dashboard-quadrant .rental-bike-name {
    font-size: 1.1rem;
}

.dashboard-quadrant .rental-duration {
    font-size: 1.2rem;
}

/* Large TV screens */
@media (min-width: 1400px) {
    .dashboard-quadrant {
        gap: 1.5rem;
    }

    .dashboard-quadrant .status-header {
        font-size: 1.5rem;
        padding: 1.25rem 1.5rem;
    }

    .dashboard-quadrant .status-header .badge {
        font-size: 1.25rem;
    }

    .dashboard-quadrant .size-count {
        font-size: 2rem;
    }

    .dashboard-quadrant .rental-bike-name,
    .dashboard-quadrant .bike-list-item {
        font-size: 1.15rem;
    }
}

/* Responsive: Fall back to stacked on smaller screens */
@media (max-width: 992px) {
    .dashboard-quadrant {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
    }

    .dashboard-quadrant .status-body {
        max-height: none;
    }

    .dashboard-quadrant .dashboard-card,
    .dashboard-quadrant .status-section {
        margin-bottom: 1rem !important;
    }
}

/* Clickable Table Rows */
.clickable-row {
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.clickable-row:hover {
    background-color: var(--bg-card-hover) !important;
}

.clickable-row:active {
    background-color: var(--bg-card-hover) !important;
}

/* Search Form Dark Mode */
body.theme-dark .search-form .input-group,
body.theme-dark .input-group {
    background: var(--bg-card);
}

body.theme-dark .input-group-text {
    background: var(--bg-card);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

@media (prefers-color-scheme: dark) {
    body.theme-auto .search-form .input-group,
    body.theme-auto .input-group {
        background: var(--bg-card);
    }

    body.theme-auto .input-group-text {
        background: var(--bg-card);
        color: var(--text-secondary);
        border-color: var(--border-color);
    }
}

/* Modal Dark Mode */
body.theme-dark .modal-content {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-color);
}

body.theme-dark .modal-header {
    border-color: var(--border-color);
}

body.theme-dark .modal-footer {
    border-color: var(--border-color);
}

body.theme-dark .btn-close {
    filter: invert(1);
}

@media (prefers-color-scheme: dark) {
    body.theme-auto .modal-content {
        background: var(--bg-card);
        color: var(--text-primary);
        border-color: var(--border-color);
    }

    body.theme-auto .modal-header {
        border-color: var(--border-color);
    }

    body.theme-auto .modal-footer {
        border-color: var(--border-color);
    }

    body.theme-auto .btn-close {
        filter: invert(1);
    }
}

/* Dropdown Dark Mode */
body.theme-dark .dropdown-menu {
    background: var(--bg-card);
    border-color: var(--border-color);
}

body.theme-dark .dropdown-item {
    color: var(--text-primary);
}

body.theme-dark .dropdown-item:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

body.theme-dark .dropdown-divider {
    border-color: var(--border-color);
}

@media (prefers-color-scheme: dark) {
    body.theme-auto .dropdown-menu {
        background: var(--bg-card);
        border-color: var(--border-color);
    }

    body.theme-auto .dropdown-item {
        color: var(--text-primary);
    }

    body.theme-auto .dropdown-item:hover {
        background: var(--bg-card-hover);
        color: var(--text-primary);
    }

    body.theme-auto .dropdown-divider {
        border-color: var(--border-color);
    }
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-primary);
    border-radius: 8px;
    transition: background-color 0.2s;
}

.theme-toggle:hover {
    background: var(--bg-card-hover);
}

.theme-toggle i {
    font-size: 1.25rem;
}

/* Print Styles */
@media print {
    .navbar, .action-buttons, .card-header, .btn {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

.bike-id {
    font-size: 1.2rem;
    color: var(--secondary);
    margin-top: -0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

/* ===========================================
   Dark Mode: Bootstrap Utility Overrides
   =========================================== */

/* Background utilities */
body.theme-dark .bg-light {
    background-color: var(--bg-card-hover) !important;
}

body.theme-dark .bg-white {
    background-color: var(--bg-card) !important;
}

body.theme-dark .bg-body {
    background-color: var(--bg-body) !important;
}

/* Text utilities */
body.theme-dark .text-dark {
    color: var(--text-primary) !important;
}

body.theme-dark .text-body {
    color: var(--text-primary) !important;
}

body.theme-dark .text-muted {
    color: var(--text-muted) !important;
}

/* Button fixes for dark mode */
body.theme-dark .btn-dark {
    background-color: var(--bg-card-hover) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

body.theme-dark .btn-dark:hover {
    background-color: var(--border-color) !important;
}

body.theme-dark .btn-outline-dark {
    border-color: var(--text-secondary) !important;
    color: var(--text-primary) !important;
}

body.theme-dark .btn-outline-dark:hover {
    background-color: var(--bg-card-hover) !important;
    color: var(--text-primary) !important;
}

body.theme-dark .btn-light {
    background-color: var(--bg-card-hover) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

body.theme-dark .btn-outline-light {
    border-color: var(--border-color-light) !important;
    color: var(--text-secondary) !important;
}

body.theme-dark .btn-secondary {
    background-color: var(--bg-card-hover) !important;
    border-color: var(--border-color) !important;
}

body.theme-dark .btn-outline-secondary {
    border-color: var(--text-muted) !important;
    color: var(--text-secondary) !important;
}

/* Table fixes for dark mode */
body.theme-dark .table {
    --bs-table-bg: var(--bg-card);
    --bs-table-color: var(--text-primary);
    --bs-table-border-color: var(--border-color);
    --bs-table-striped-bg: var(--bg-card-hover);
    --bs-table-hover-bg: var(--bg-card-hover);
}

body.theme-dark .table > :not(caption) > * > * {
    background-color: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-color);
}

body.theme-dark .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: var(--bg-card-hover);
    --bs-table-accent-bg: var(--bg-card-hover);
}

/* Border utilities */
body.theme-dark .border {
    border-color: var(--border-color) !important;
}

body.theme-dark .border-bottom,
body.theme-dark .border-top,
body.theme-dark .border-start,
body.theme-dark .border-end {
    border-color: var(--border-color) !important;
}

/* List group */
body.theme-dark .list-group-item {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.theme-dark .list-group-item:hover {
    background-color: var(--bg-card-hover);
}

/* Pagination */
body.theme-dark .page-link {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.theme-dark .page-link:hover {
    background-color: var(--bg-card-hover);
    color: var(--text-primary);
}

body.theme-dark .page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
}

body.theme-dark .page-item.disabled .page-link {
    background-color: var(--bg-card);
    color: var(--text-muted);
}

/* Nav tabs */
body.theme-dark .nav-tabs {
    border-color: var(--border-color);
}

body.theme-dark .nav-tabs .nav-link {
    color: var(--text-secondary);
}

body.theme-dark .nav-tabs .nav-link:hover {
    border-color: var(--border-color);
}

body.theme-dark .nav-tabs .nav-link.active {
    background-color: var(--bg-card);
    border-color: var(--border-color) var(--border-color) var(--bg-card);
    color: var(--text-primary);
}

/* Nav pills */
body.theme-dark .nav-pills .nav-link {
    color: var(--text-secondary);
}

body.theme-dark .nav-pills .nav-link.active {
    background-color: var(--primary);
}

/* Breadcrumb */
body.theme-dark .breadcrumb {
    background-color: var(--bg-card-hover);
}

body.theme-dark .breadcrumb-item a {
    color: var(--text-secondary);
}

body.theme-dark .breadcrumb-item.active {
    color: var(--text-muted);
}

/* HR */
body.theme-dark hr {
    border-color: var(--border-color);
    opacity: 1;
}

/* ===========================================
   Auto Theme: Bootstrap Utility Overrides
   (duplicated for prefers-color-scheme: dark)
   =========================================== */

@media (prefers-color-scheme: dark) {
    body.theme-auto .bg-light {
        background-color: var(--bg-card-hover) !important;
    }

    body.theme-auto .bg-white {
        background-color: var(--bg-card) !important;
    }

    body.theme-auto .bg-body {
        background-color: var(--bg-body) !important;
    }

    body.theme-auto .text-dark {
        color: var(--text-primary) !important;
    }

    body.theme-auto .text-body {
        color: var(--text-primary) !important;
    }

    body.theme-auto .text-muted {
        color: var(--text-muted) !important;
    }

    body.theme-auto .btn-dark {
        background-color: var(--bg-card-hover) !important;
        border-color: var(--border-color) !important;
        color: var(--text-primary) !important;
    }

    body.theme-auto .btn-dark:hover {
        background-color: var(--border-color) !important;
    }

    body.theme-auto .btn-outline-dark {
        border-color: var(--text-secondary) !important;
        color: var(--text-primary) !important;
    }

    body.theme-auto .btn-outline-dark:hover {
        background-color: var(--bg-card-hover) !important;
        color: var(--text-primary) !important;
    }

    body.theme-auto .btn-light {
        background-color: var(--bg-card-hover) !important;
        border-color: var(--border-color) !important;
        color: var(--text-primary) !important;
    }

    body.theme-auto .btn-outline-light {
        border-color: var(--border-color-light) !important;
        color: var(--text-secondary) !important;
    }

    body.theme-auto .btn-secondary {
        background-color: var(--bg-card-hover) !important;
        border-color: var(--border-color) !important;
    }

    body.theme-auto .btn-outline-secondary {
        border-color: var(--text-muted) !important;
        color: var(--text-secondary) !important;
    }

    body.theme-auto .table {
        --bs-table-bg: var(--bg-card);
        --bs-table-color: var(--text-primary);
        --bs-table-border-color: var(--border-color);
        --bs-table-striped-bg: var(--bg-card-hover);
        --bs-table-hover-bg: var(--bg-card-hover);
    }

    body.theme-auto .table > :not(caption) > * > * {
        background-color: var(--bg-card);
        color: var(--text-primary);
        border-color: var(--border-color);
    }

    body.theme-auto .table-striped > tbody > tr:nth-of-type(odd) > * {
        background-color: var(--bg-card-hover);
        --bs-table-accent-bg: var(--bg-card-hover);
    }

    body.theme-auto .border {
        border-color: var(--border-color) !important;
    }

    body.theme-auto .border-bottom,
    body.theme-auto .border-top,
    body.theme-auto .border-start,
    body.theme-auto .border-end {
        border-color: var(--border-color) !important;
    }

    body.theme-auto .list-group-item {
        background-color: var(--bg-card);
        border-color: var(--border-color);
        color: var(--text-primary);
    }

    body.theme-auto .list-group-item:hover {
        background-color: var(--bg-card-hover);
    }

    body.theme-auto .page-link {
        background-color: var(--bg-card);
        border-color: var(--border-color);
        color: var(--text-primary);
    }

    body.theme-auto .page-link:hover {
        background-color: var(--bg-card-hover);
        color: var(--text-primary);
    }

    body.theme-auto .page-item.active .page-link {
        background-color: var(--primary);
        border-color: var(--primary);
    }

    body.theme-auto .page-item.disabled .page-link {
        background-color: var(--bg-card);
        color: var(--text-muted);
    }

    body.theme-auto .nav-tabs {
        border-color: var(--border-color);
    }

    body.theme-auto .nav-tabs .nav-link {
        color: var(--text-secondary);
    }

    body.theme-auto .nav-tabs .nav-link:hover {
        border-color: var(--border-color);
    }

    body.theme-auto .nav-tabs .nav-link.active {
        background-color: var(--bg-card);
        border-color: var(--border-color) var(--border-color) var(--bg-card);
        color: var(--text-primary);
    }

    body.theme-auto .nav-pills .nav-link {
        color: var(--text-secondary);
    }

    body.theme-auto .nav-pills .nav-link.active {
        background-color: var(--primary);
    }

    body.theme-auto .breadcrumb {
        background-color: var(--bg-card-hover);
    }

    body.theme-auto .breadcrumb-item a {
        color: var(--text-secondary);
    }

    body.theme-auto .breadcrumb-item.active {
        color: var(--text-muted);
    }

    body.theme-auto hr {
        border-color: var(--border-color);
        opacity: 1;
    }
}

/* ===========================================
   Dark Mode: Bike Detail Page Overrides
   Override inline status colors for dark mode
   =========================================== */

/* Override body background on bike detail */
body.theme-dark body {
    background: var(--bg-body) !important;
}

/* Override status banner background and text */
body.theme-dark .status-banner {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

body.theme-dark .status-banner h1,
body.theme-dark .status-banner h2,
body.theme-dark .status-banner h3,
body.theme-dark .status-banner p {
    color: var(--text-primary) !important;
}

/* Bike info card text */
body.theme-dark .card p,
body.theme-dark .card strong,
body.theme-dark .card-body,
body.theme-dark .card-body p,
body.theme-dark .card-body strong,
body.theme-dark .card-body span,
body.theme-dark .card-body label {
    color: var(--text-primary);
}

@media (prefers-color-scheme: dark) {
    body.theme-auto body {
        background: var(--bg-body) !important;
    }

    body.theme-auto .status-banner {
        background: var(--bg-card) !important;
        color: var(--text-primary) !important;
    }

    body.theme-auto .status-banner h1,
    body.theme-auto .status-banner h2,
    body.theme-auto .status-banner h3,
    body.theme-auto .status-banner p {
        color: var(--text-primary) !important;
    }

    body.theme-auto .card p,
    body.theme-auto .card strong {
        color: var(--text-primary);
    }
}

/* ===========================================
   Christmas Theme with Falling Snow
   =========================================== */

/* Christmas theme color variables */
body.theme-christmas {
    --bg-body: #1a472a;
    --bg-card: #0d2818;
    --bg-card-hover: #15351f;
    --bg-input: #0d2818;
    --bg-navbar: #8b0000;
    --bg-light: #1a472a;
    --white: #0d2818;
    --text-primary: #f5f5f5;
    --text-secondary: #d4d4d4;
    --text-muted: #a3a3a3;
    --secondary: #f5f5f5;
    --border-color: #2d5a3d;
    --border-color-light: #3d6a4d;
    --shadow-sm: rgba(0, 0, 0, 0.3);
    --shadow-md: rgba(0, 0, 0, 0.4);
    --shadow-lg: rgba(0, 0, 0, 0.5);

    /* Christmas accent colors */
    --primary: #c41e3a;
    --available: #228b22;
    --rented: #c41e3a;
    --pending: #ffd700;
    --in-shop: #8b0000;
    --retired: #6b7280;
    --teal: #ffd700;
    --blue: #87ceeb;
}

/* Christmas navbar styling */
body.theme-christmas .navbar {
    background: linear-gradient(135deg, #8b0000 0%, #c41e3a 50%, #8b0000 100%) !important;
    border-bottom: 3px solid #ffd700;
}

body.theme-christmas .navbar .nav-link,
body.theme-christmas .navbar .navbar-brand {
    color: #ffffff !important;
}

body.theme-christmas .navbar .nav-link:hover {
    color: #ffd700 !important;
}

body.theme-christmas .navbar-toggler-icon {
    filter: invert(1);
}

/* Christmas brand logo */
body.theme-christmas .brand-logo,
body.theme-christmas .brand-logo-large {
    background: linear-gradient(135deg, #c41e3a, #8b0000) !important;
    box-shadow: 0 10px 30px rgba(196, 30, 58, 0.3) !important;
}

/* Christmas buttons */
body.theme-christmas .btn-primary {
    background: linear-gradient(135deg, #c41e3a, #8b0000) !important;
    border-color: #c41e3a !important;
}

body.theme-christmas .btn-primary:hover {
    background: linear-gradient(135deg, #d63a50, #a31515) !important;
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.4) !important;
}

body.theme-christmas .btn-success {
    background: linear-gradient(135deg, #228b22, #166616) !important;
    border-color: #228b22 !important;
}

body.theme-christmas .btn-warning {
    background: linear-gradient(135deg, #ffd700, #daa520) !important;
    border-color: #ffd700 !important;
    color: #1a1a1a !important;
}

/* Christmas cards */
body.theme-christmas .card {
    border: 1px solid #2d5a3d;
}

body.theme-christmas .card-header {
    background: linear-gradient(135deg, #0d2818, #15351f) !important;
    border-bottom-color: #2d5a3d;
}

/* Christmas status sections */
body.theme-christmas .status-header {
    background: linear-gradient(135deg, #0d2818, #15351f) !important;
}

body.theme-christmas .status-body {
    background: #0d2818 !important;
}

/* Christmas alerts */
body.theme-christmas .alert-success {
    background: rgba(34, 139, 34, 0.2) !important;
    border-left-color: #228b22 !important;
    color: #90ee90 !important;
}

body.theme-christmas .alert-danger {
    background: rgba(196, 30, 58, 0.2) !important;
    border-left-color: #c41e3a !important;
    color: #ffa0a0 !important;
}

body.theme-christmas .alert-warning {
    background: rgba(255, 215, 0, 0.2) !important;
    border-left-color: #ffd700 !important;
    color: #ffd700 !important;
}

body.theme-christmas .alert-info {
    background: rgba(135, 206, 235, 0.2) !important;
    border-left-color: #87ceeb !important;
    color: #87ceeb !important;
}

/* Christmas dropdowns */
body.theme-christmas .dropdown-menu {
    background: #0d2818;
    border-color: #2d5a3d;
}

body.theme-christmas .dropdown-item {
    color: #f5f5f5;
}

body.theme-christmas .dropdown-item:hover {
    background: #15351f;
    color: #ffd700;
}

body.theme-christmas .dropdown-divider {
    border-color: #2d5a3d;
}

/* Christmas modal */
body.theme-christmas .modal-content {
    background: #0d2818;
    border-color: #2d5a3d;
}

body.theme-christmas .modal-header {
    border-color: #2d5a3d;
}

body.theme-christmas .modal-footer {
    border-color: #2d5a3d;
}

body.theme-christmas .btn-close {
    filter: invert(1);
}

/* Christmas tables */
body.theme-christmas .table {
    --bs-table-bg: #0d2818;
    --bs-table-color: #f5f5f5;
    --bs-table-border-color: #2d5a3d;
    --bs-table-striped-bg: #15351f;
    --bs-table-hover-bg: #15351f;
}

body.theme-christmas .table > :not(caption) > * > * {
    background-color: #0d2818;
    color: #f5f5f5;
    border-color: #2d5a3d;
}

/* Christmas forms */
body.theme-christmas .form-control:focus,
body.theme-christmas .form-select:focus {
    border-color: #c41e3a !important;
    box-shadow: 0 0 0 4px rgba(196, 30, 58, 0.2) !important;
}

/* Christmas Bootstrap utility overrides */
body.theme-christmas .bg-light {
    background-color: #15351f !important;
}

body.theme-christmas .bg-white {
    background-color: #0d2818 !important;
}

body.theme-christmas .text-dark {
    color: #f5f5f5 !important;
}

body.theme-christmas .text-muted {
    color: #a3a3a3 !important;
}

body.theme-christmas .border {
    border-color: #2d5a3d !important;
}

/* Christmas action buttons */
body.theme-christmas .action-btn.btn-dark {
    background-color: #15351f;
    border: 1px solid #2d5a3d;
}

body.theme-christmas .btn-dark {
    background-color: #15351f !important;
    border-color: #2d5a3d !important;
    color: #f5f5f5 !important;
}

/* Christmas list groups */
body.theme-christmas .list-group-item {
    background-color: #0d2818;
    border-color: #2d5a3d;
    color: #f5f5f5;
}

body.theme-christmas .list-group-item:hover {
    background-color: #15351f;
}

/* Christmas pagination */
body.theme-christmas .page-link {
    background-color: #0d2818;
    border-color: #2d5a3d;
    color: #f5f5f5;
}

body.theme-christmas .page-link:hover {
    background-color: #15351f;
    color: #ffd700;
}

body.theme-christmas .page-item.active .page-link {
    background-color: #c41e3a;
    border-color: #c41e3a;
}

/* Christmas search/input group */
body.theme-christmas .search-form .input-group,
body.theme-christmas .input-group {
    background: #0d2818;
}

body.theme-christmas .input-group-text {
    background: #0d2818 !important;
    color: #f5f5f5;
    border-color: #2d5a3d;
}

body.theme-christmas .input-group-text.bg-white {
    background: #0d2818 !important;
}

body.theme-christmas .form-control {
    background: #0d2818;
    color: #f5f5f5;
    border-color: #2d5a3d;
}

body.theme-christmas .form-control::placeholder {
    color: #a3a3a3;
}

/* Christmas bike detail overrides */
body.theme-christmas body {
    background: #1a472a !important;
}

body.theme-christmas .status-banner {
    background: #0d2818 !important;
}

body.theme-christmas .card p,
body.theme-christmas .card strong,
body.theme-christmas .card-body,
body.theme-christmas .card-body p,
body.theme-christmas .card-body strong,
body.theme-christmas .card-body span,
body.theme-christmas .card-body label {
    color: #f5f5f5;
}

/* Christmas nav tabs */
body.theme-christmas .nav-tabs {
    border-color: #2d5a3d;
}

body.theme-christmas .nav-tabs .nav-link {
    color: #d4d4d4;
    background-color: transparent;
    border-color: transparent;
}

body.theme-christmas .nav-tabs .nav-link:hover {
    border-color: #2d5a3d;
    color: #ffd700;
}

body.theme-christmas .nav-tabs .nav-link.active {
    background-color: #0d2818;
    border-color: #2d5a3d #2d5a3d #0d2818;
    color: #f5f5f5;
}

body.theme-christmas .card-header-tabs {
    margin-bottom: -1px;
}

/* Christmas nav pills */
body.theme-christmas .nav-pills .nav-link {
    color: #d4d4d4;
}

body.theme-christmas .nav-pills .nav-link.active {
    background-color: #c41e3a;
    color: #ffffff;
}

/* ===========================================
   Falling Snow Animation
   =========================================== */

/* Snow container */
.snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

/* Individual snowflake */
.snowflake {
    position: absolute;
    top: -10px;
    color: white;
    font-size: 1em;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    -webkit-animation: fall linear infinite;
    animation: fall linear infinite;
    opacity: 0.8;
}

/* Snowflake fall animation - Safari needs -webkit- prefix */
@-webkit-keyframes fall {
    0% {
        -webkit-transform: translateY(-10px) rotate(0deg);
        transform: translateY(-10px) rotate(0deg);
        opacity: 1;
    }
    100% {
        -webkit-transform: translateY(100vh) rotate(360deg);
        transform: translateY(100vh) rotate(360deg);
        opacity: 0.3;
    }
}

@keyframes fall {
    0% {
        -webkit-transform: translateY(-10px) rotate(0deg);
        transform: translateY(-10px) rotate(0deg);
        opacity: 1;
    }
    100% {
        -webkit-transform: translateY(100vh) rotate(360deg);
        transform: translateY(100vh) rotate(360deg);
        opacity: 0.3;
    }
}

/* Different snowflake sizes and speeds - with webkit prefixes for iOS */
.snowflake:nth-child(5n+1) {
    font-size: 0.8em;
    -webkit-animation-duration: 12s;
    animation-duration: 12s;
}

.snowflake:nth-child(5n+2) {
    font-size: 1.2em;
    -webkit-animation-duration: 10s;
    animation-duration: 10s;
}

.snowflake:nth-child(5n+3) {
    font-size: 0.6em;
    -webkit-animation-duration: 15s;
    animation-duration: 15s;
}

.snowflake:nth-child(5n+4) {
    font-size: 1em;
    -webkit-animation-duration: 11s;
    animation-duration: 11s;
}

.snowflake:nth-child(5n+5) {
    font-size: 1.4em;
    -webkit-animation-duration: 9s;
    animation-duration: 9s;
}

/* Different horizontal positions and delays - with webkit prefixes for iOS */
.snowflake:nth-child(10n+1) { left: 5%; -webkit-animation-delay: 0s; animation-delay: 0s; }
.snowflake:nth-child(10n+2) { left: 15%; -webkit-animation-delay: 2s; animation-delay: 2s; }
.snowflake:nth-child(10n+3) { left: 25%; -webkit-animation-delay: 4s; animation-delay: 4s; }
.snowflake:nth-child(10n+4) { left: 35%; -webkit-animation-delay: 1s; animation-delay: 1s; }
.snowflake:nth-child(10n+5) { left: 45%; -webkit-animation-delay: 3s; animation-delay: 3s; }
.snowflake:nth-child(10n+6) { left: 55%; -webkit-animation-delay: 5s; animation-delay: 5s; }
.snowflake:nth-child(10n+7) { left: 65%; -webkit-animation-delay: 0.5s; animation-delay: 0.5s; }
.snowflake:nth-child(10n+8) { left: 75%; -webkit-animation-delay: 2.5s; animation-delay: 2.5s; }
.snowflake:nth-child(10n+9) { left: 85%; -webkit-animation-delay: 4.5s; animation-delay: 4.5s; }
.snowflake:nth-child(10n+10) { left: 95%; -webkit-animation-delay: 1.5s; animation-delay: 1.5s; }

/* Additional random positions for more coverage */
.snowflake:nth-child(20n+11) { left: 10%; -webkit-animation-delay: 6s; animation-delay: 6s; }
.snowflake:nth-child(20n+12) { left: 20%; -webkit-animation-delay: 7s; animation-delay: 7s; }
.snowflake:nth-child(20n+13) { left: 30%; -webkit-animation-delay: 8s; animation-delay: 8s; }
.snowflake:nth-child(20n+14) { left: 40%; -webkit-animation-delay: 6.5s; animation-delay: 6.5s; }
.snowflake:nth-child(20n+15) { left: 50%; -webkit-animation-delay: 7.5s; animation-delay: 7.5s; }
.snowflake:nth-child(20n+16) { left: 60%; -webkit-animation-delay: 8.5s; animation-delay: 8.5s; }
.snowflake:nth-child(20n+17) { left: 70%; -webkit-animation-delay: 6.2s; animation-delay: 6.2s; }
.snowflake:nth-child(20n+18) { left: 80%; -webkit-animation-delay: 7.2s; animation-delay: 7.2s; }
.snowflake:nth-child(20n+19) { left: 90%; -webkit-animation-delay: 8.2s; animation-delay: 8.2s; }
.snowflake:nth-child(20n+20) { left: 3%; -webkit-animation-delay: 5.5s; animation-delay: 5.5s; }

/* Sway animation for more natural movement */
@-webkit-keyframes sway {
    0%, 100% { -webkit-transform: translateX(0); transform: translateX(0); }
    50% { -webkit-transform: translateX(20px); transform: translateX(20px); }
}

@keyframes sway {
    0%, 100% { -webkit-transform: translateX(0); transform: translateX(0); }
    50% { -webkit-transform: translateX(20px); transform: translateX(20px); }
}

.snowflake:nth-child(3n) {
    -webkit-animation: fall linear infinite, sway ease-in-out infinite;
    animation: fall linear infinite, sway ease-in-out infinite;
}

.snowflake:nth-child(3n+1) {
    -webkit-animation: fall linear infinite, sway ease-in-out infinite reverse;
    animation: fall linear infinite, sway ease-in-out infinite reverse;
}

/* Hide snow on non-christmas themes */
body.theme-light .snow-container,
body.theme-dark .snow-container,
body.theme-auto .snow-container,
body.theme-light-muted .snow-container {
    display: none;
}