/* Custom styles for WIP Smith */

:root {
    --wip-orange: #ff6d00;
    --wip-orange-light: #ff9e40;
    --wip-orange-dark: #c43c00;
    --wip-anvil-gray: #424242;
    --wip-background: #121212;
}

/* Light theme variables */
[data-bs-theme="light"] {
    --wip-logo-bg: #f8f9fa;
    --wip-logo-border: var(--wip-orange);
    --wip-brand-color: var(--wip-orange);
}

/* Dark theme variables */
[data-bs-theme="dark"] {
    --wip-logo-bg: #1a1a1a;
    --wip-logo-border: var(--wip-orange);
    --wip-brand-color: var(--wip-orange);
    --bs-body-bg: #1e1e1e;
    --bs-body-color: #f1f1f1;
    --bs-secondary-bg: #2a2a2a;
    --bs-tertiary-bg: #2a2a2a;
    --bs-link-color: #91caff;
    --bs-link-hover-color: #b3d6ff;
}

/* Theme transition effects */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Settings buttons consistent width */
.settings-btn {
    min-width: 170px !important;
    width: 170px !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: nowrap !important;
}

/* Theme toggle button styling */
#theme-toggle {
    transition: all 0.3s ease;
}

#theme-toggle:hover {
    transform: scale(1.1);
}

#theme-icon {
    transition: transform 0.3s ease;
}

#theme-toggle:active #theme-icon {
    transform: rotate(360deg);
}

/* Dark theme specific styling */
[data-bs-theme="dark"] body {
    background-color: #1e1e1e !important;
    color: #f1f1f1 !important;
}

/* Ensure page titles are visible in dark mode */
[data-bs-theme="dark"] h1, 
[data-bs-theme="dark"] h2, 
[data-bs-theme="dark"] h3, 
[data-bs-theme="dark"] h4, 
[data-bs-theme="dark"] h5, 
[data-bs-theme="dark"] h6 {
    color: #f1f1f1 !important;
}

[data-bs-theme="dark"] .navbar.bg-dark {
    background-color: #2a2a2a !important;
}

/* Light mode navbar styling */
[data-bs-theme="light"] .navbar.bg-light {
    background-color: #f8f9fa !important;
}

[data-bs-theme="light"] .navbar-light .navbar-nav .nav-link {
    color: #495057 !important;
}

[data-bs-theme="light"] .navbar-light .navbar-nav .nav-link:hover {
    color: var(--wip-orange) !important;
}

[data-bs-theme="light"] .navbar-light .navbar-nav .nav-link.active {
    color: var(--wip-orange) !important;
}

[data-bs-theme="light"] .navbar-brand .brand-text {
    color: var(--wip-orange) !important;
}

[data-bs-theme="light"] .navbar-toggler {
    border-color: rgba(0,0,0,.1) !important;
}

[data-bs-theme="light"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

[data-bs-theme="dark"] .card {
    background-color: #2a2a2a !important;
    border-color: #404040 !important;
}

[data-bs-theme="dark"] .card-header {
    background-color: #2a2a2a !important;
    border-bottom-color: #404040 !important;
}

[data-bs-theme="dark"] .card-footer {
    background-color: #2a2a2a !important;
    border-top-color: #404040 !important;
}

[data-bs-theme="dark"] footer {
    background-color: #2a2a2a !important;
}

[data-bs-theme="dark"] a {
    color: #91caff !important;
}

[data-bs-theme="dark"] a:hover {
    color: #b3d6ff !important;
}

[data-bs-theme="dark"] .dropdown-menu {
    background-color: #2a2a2a !important;
    border-color: #404040 !important;
}

[data-bs-theme="dark"] .dropdown-item {
    color: #f1f1f1 !important;
}

[data-bs-theme="dark"] .dropdown-item:hover {
    background-color: #404040 !important;
}

[data-bs-theme="dark"] .modal-content {
    background-color: #2a2a2a !important;
    border-color: #404040 !important;
}

[data-bs-theme="dark"] .modal-header {
    border-bottom-color: #404040 !important;
}

[data-bs-theme="dark"] .modal-footer {
    border-top-color: #404040 !important;
}

[data-bs-theme="dark"] .form-control {
    background-color: #1e1e1e !important;
    border-color: #404040 !important;
    color: #f1f1f1 !important;
}

[data-bs-theme="dark"] .form-control:focus {
    background-color: #1e1e1e !important;
    border-color: var(--wip-orange) !important;
    color: #f1f1f1 !important;
}

[data-bs-theme="dark"] .form-select {
    background-color: #1e1e1e !important;
    border-color: #404040 !important;
    color: #f1f1f1 !important;
}

[data-bs-theme="dark"] .alert {
    border-color: #404040 !important;
}

[data-bs-theme="dark"] .table {
    --bs-table-bg: #2a2a2a;
    --bs-table-border-color: #404040;
    color: #f1f1f1 !important;
}

[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > td,
[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > th {
    background-color: #333333 !important;
}

[data-bs-theme="dark"] .btn-outline-secondary {
    color: #f1f1f1 !important;
    border-color: #6c757d !important;
}

[data-bs-theme="dark"] .btn-outline-secondary:hover {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #fff !important;
}

[data-bs-theme="dark"] .text-muted {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .navbar-nav .nav-link {
    color: #f1f1f1 !important;
}

[data-bs-theme="dark"] .navbar-nav .nav-link:hover {
    color: var(--wip-orange) !important;
}

[data-bs-theme="dark"] .navbar-nav .nav-link.active {
    color: var(--wip-orange) !important;
}

[data-bs-theme="dark"] .navbar-brand .brand-text {
    color: var(--wip-orange) !important;
}

/* Search form styling */
.navbar .search-form {
    margin-right: 1rem;
}

.navbar .search-form .input-group {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 0.375rem;
    overflow: hidden;
}

.navbar .search-form .form-control {
    border: 1px solid #dee2e6;
    border-right: none;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.navbar .search-form .btn {
    border: 1px solid #dee2e6;
    border-left: none;
    padding: 0.375rem 0.75rem;
    background-color: #f8f9fa;
    color: #6c757d;
    transition: all 0.15s ease-in-out;
}

.navbar .search-form .btn:hover {
    background-color: #e9ecef;
    color: #495057;
}

/* Dark mode search styling */
[data-bs-theme="dark"] .navbar .search-form .input-group {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .navbar .search-form .form-control {
    background-color: #2b2b2b !important;
    border-color: #495057 !important;
    color: #f1f1f1 !important;
}

[data-bs-theme="dark"] .navbar .search-form .form-control:focus {
    background-color: #2b2b2b !important;
    border-color: var(--wip-orange) !important;
    box-shadow: 0 0 0 0.125rem rgba(255, 165, 0, 0.25) !important;
}

[data-bs-theme="dark"] .navbar .search-form .form-control::placeholder {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .navbar .search-form .btn {
    background-color: #2b2b2b !important;
    border-color: #495057 !important;
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .navbar .search-form .btn:hover {
    background-color: #404040 !important;
    border-color: #6c757d !important;
    color: #f1f1f1 !important;
}

[data-bs-theme="dark"] .navbar .search-form .btn:focus {
    box-shadow: 0 0 0 0.125rem rgba(255, 165, 0, 0.25) !important;
}

/* Light mode search styling */
[data-bs-theme="light"] .navbar .search-form .form-control:focus {
    border-color: var(--wip-orange) !important;
    box-shadow: 0 0 0 0.125rem rgba(255, 165, 0, 0.25) !important;
}

[data-bs-theme="light"] .navbar .search-form .btn:focus {
    box-shadow: 0 0 0 0.125rem rgba(255, 165, 0, 0.25) !important;
    border-color: var(--wip-orange) !important;
}

/* Footer actions styling */
.footer-actions h6 {
    color: var(--bs-body-color);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.footer-actions .btn {
    font-size: 0.875rem;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
}

/* Remove custom border-radius to match standard app buttons */

.footer-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Account section styling */
.account-section h6 {
    color: var(--bs-body-color);
}

.account-section .text-muted {
    font-size: 0.875rem;
}

/* Settings section styling */
.settings-section h6 {
    color: var(--bs-body-color);
}

.settings-section #theme-toggle {
    min-width: 120px;
    border-radius: 0.375rem; /* Match standard Bootstrap button radius */
}

/* Dark mode footer styling */
[data-bs-theme="dark"] .footer-actions h6 {
    color: #f1f1f1;
}

[data-bs-theme="dark"] .footer-actions .btn {
    background-color: #2a2a2a;
    border-color: #495057;
    color: #f1f1f1;
}

[data-bs-theme="dark"] .footer-actions .btn:hover {
    background-color: #404040;
    border-color: #6c757d;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .footer-actions .btn:focus {
    border-color: var(--wip-orange);
    box-shadow: 0 0 0 0.125rem rgba(255, 165, 0, 0.25);
}

[data-bs-theme="dark"] .footer-actions .btn-outline-primary:hover {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

[data-bs-theme="dark"] .footer-actions .btn-outline-danger:hover {
    background-color: var(--bs-danger);
    border-color: var(--bs-danger);
    color: white;
}

/* Light mode footer styling */
[data-bs-theme="light"] .footer-actions .btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

[data-bs-theme="light"] .footer-actions .btn:focus {
    border-color: var(--wip-orange);
    box-shadow: 0 0 0 0.125rem rgba(255, 165, 0, 0.25);
}

[data-bs-theme="light"] .footer-actions .btn-outline-primary:hover {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

[data-bs-theme="light"] .footer-actions .btn-outline-danger:hover {
    background-color: var(--bs-danger);
    border-color: var(--bs-danger);
    color: white;
}

/* Footer divider styling */
.footer-divider {
    border-top: 1px solid #dee2e6;
}

[data-bs-theme="dark"] .footer-divider {
    border-top-color: #495057;
}

/* Search results styling */
.search-results .card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: 1px solid var(--bs-border-color);
}

.search-results .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] .search-results .card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.search-results .card-title {
    color: var(--bs-body-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.search-results .card-text {
    color: var(--bs-text-muted);
    line-height: 1.4;
}

.search-results .badge {
    font-size: 0.75rem;
}

.search-results .btn-group-sm .btn {
    font-size: 0.775rem;
    padding: 0.25rem 0.5rem;
}

/* Search results section headers */
.search-results .card-header {
    background-color: var(--bs-tertiary-bg);
    border-bottom: 1px solid var(--bs-border-color);
}

.search-results .card-header h4 {
    color: var(--bs-body-color);
    font-weight: 600;
}

/* Empty state styling */
.search-results .alert {
    border-radius: 0.5rem;
}

.search-results .alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.2);
    color: var(--bs-warning-text);
}

.search-results .alert-info {
    background-color: rgba(13, 202, 240, 0.1);
    border-color: rgba(13, 202, 240, 0.2);
    color: var(--bs-info-text);
}

[data-bs-theme="dark"] .search-results .alert-warning {
    background-color: rgba(255, 193, 7, 0.15);
    color: #fff3cd;
}

[data-bs-theme="dark"] .search-results .alert-info {
    background-color: rgba(13, 202, 240, 0.15);
    color: #b6effb;
}

/* Override Bootstrap styles with WIP Smith branding */
.btn-primary {
    background-color: var(--wip-orange) !important;
    border-color: var(--wip-orange) !important;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--wip-orange-dark) !important;
    border-color: var(--wip-orange-dark) !important;
}

.btn-outline-primary {
    color: var(--wip-orange) !important;
    border-color: var(--wip-orange) !important;
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    background-color: var(--wip-orange) !important;
    color: white !important;
}

.bg-primary {
    background-color: var(--wip-orange) !important;
}

.text-primary {
    color: var(--wip-orange) !important;
}

.badge.bg-primary {
    background-color: var(--wip-orange) !important;
}

/* Logo styling */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: transparent;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--wip-orange);
}

.navbar-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.brand-text {
    font-weight: bold;
    color: var(--wip-brand-color);
    letter-spacing: 0.5px;
}

/* Dashboard stat circles */
.stat-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Army and miniature organization styles */
.army-section {
    border-left: 3px solid var(--wip-orange);
    padding-left: 1rem;
    margin-bottom: 1.5rem;
}

.army-title {
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 109, 0, 0.2);
    padding-bottom: 0.25rem;
}

.miniature-item {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.2s ease;
}

.miniature-item:hover {
    background-color: rgba(255, 109, 0, 0.1);
    border-color: var(--wip-orange) !important;
    transform: translateX(5px);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.army-section .text-warning {
    color: #ffc107 !important;
}
    font-weight: bold;
}

/* Status dots */
.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

/* Paint log timeline styling */
.paint-log-timeline {
    position: relative;
    padding: 20px 0;
}

.paint-log-timeline:before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 15px;
    width: 2px;
    background: var(--bs-secondary);
}

.paint-log-item {
    position: relative;
    margin-bottom: 25px;
    margin-left: 35px;
}

.paint-log-dot {
    position: absolute;
    left: -29px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bs-primary);
    border: 2px solid var(--bs-body-bg);
}

.paint-log-date {
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
    margin-bottom: 5px;
}

.paint-log-card {
    margin: 0;
}

/* Recipe colors pre formatting */
.recipe-colors {
    background: var(--bs-dark-bg-subtle);
    border-radius: 0.25rem;
    padding: 0.5rem;
    max-height: 120px;
    overflow-y: auto;
}

.recipe-colors pre {
    font-family: inherit;
    white-space: pre-wrap;
    font-size: 0.9rem;
}

/* Footer styling */
footer {
    margin-top: 100px;
}

/* Add space before nav tabs */
.card-header-tabs {
    margin-top: -0.5rem;
}

/* Custom styling for empty states */
.empty-state {
    padding: 3rem 1rem;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 0.75rem;
    border: 1px dashed var(--bs-border-color);
}

.empty-state-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--bs-secondary);
    opacity: 0.7;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--bs-body-color);
}

.empty-state-description {
    font-size: 0.95rem;
    color: var(--bs-secondary-color);
    margin-bottom: 1.25rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.empty-state .btn-primary {
    padding: 0.625rem 1.5rem;
}

.empty-state-secondary {
    display: block;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
}

.empty-state-secondary a {
    color: var(--bs-link-color);
}

[data-bs-theme="dark"] .empty-state {
    background-color: rgba(255, 255, 255, 0.02);
}

[data-bs-theme="dark"] .empty-state-icon {
    color: #91caff;
    opacity: 0.6;
}

.mobile-empty-state-full {
    padding: 2rem 1rem;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 0.5rem;
    margin: 0.5rem;
}

.mobile-empty-state-full .empty-state-icon {
    font-size: 2.5rem;
}

.mobile-empty-state-full .empty-state-title {
    font-size: 1.1rem;
}

.mobile-empty-state-full .empty-state-description {
    font-size: 0.9rem;
}

[data-bs-theme="dark"] .mobile-empty-state-full {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Custom styling for form validation messages */
.invalid-feedback {
    font-size: 0.8rem;
}

/* Improve contrast for form help text */
.form-text {
    color: var(--bs-secondary-color);
}

/* Make sure long text truncates properly in cards */
.card-text.text-truncate {
    max-width: 100%;
}

/* Custom style for feature icons on login page */
.feature i {
    opacity: 0.9;
}

/* Tutorial card URL overflow protection */
.tutorial-url {
    word-break: break-all;
}

/* Mobile search bar container */
.mobile-search-container {
    background-color: var(--bs-body-bg);
    border-bottom: 1px solid var(--bs-border-color);
}

[data-bs-theme="dark"] .mobile-search-container {
    background-color: #1e1e1e;
    border-bottom-color: #404040;
}

/* Mobile Offcanvas Navigation */
.offcanvas {
    max-width: 300px;
}

.offcanvas-header {
    border-bottom: 1px solid var(--bs-border-color);
    padding: 1rem 1.25rem;
}

.offcanvas-title {
    font-weight: 600;
    color: var(--wip-orange);
}

.offcanvas-body {
    padding: 1rem;
}

/* Mobile navigation links */
.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    color: var(--bs-body-color);
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    min-height: 48px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-nav-link i {
    width: 24px;
    text-align: center;
    font-size: 1.1rem;
    color: var(--wip-orange);
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
    background-color: rgba(255, 109, 0, 0.1);
    color: var(--wip-orange);
    text-decoration: none;
}

.mobile-nav-link.active {
    background-color: rgba(255, 109, 0, 0.15);
    color: var(--wip-orange);
    font-weight: 600;
}

.mobile-nav-link.text-danger {
    color: var(--bs-danger);
}

.mobile-nav-link.text-danger i {
    color: var(--bs-danger);
}

.mobile-nav-link.text-danger:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

/* Mobile offcanvas search */
.mobile-offcanvas-search .form-control {
    min-height: 44px;
    font-size: 1rem;
}

.mobile-offcanvas-search .btn {
    min-height: 44px;
}

/* Quick actions section */
.mobile-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Dark mode offcanvas */
[data-bs-theme="dark"] .offcanvas {
    background-color: #1e1e1e;
    color: #f1f1f1;
}

[data-bs-theme="dark"] .offcanvas-header {
    border-bottom-color: #404040;
}

[data-bs-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

[data-bs-theme="dark"] .mobile-nav-link {
    color: #f1f1f1;
}

[data-bs-theme="dark"] .mobile-nav-link:hover,
[data-bs-theme="dark"] .mobile-nav-link:focus {
    background-color: rgba(255, 109, 0, 0.15);
}

[data-bs-theme="dark"] .mobile-nav-link.active {
    background-color: rgba(255, 109, 0, 0.2);
}

/* Mobile Dashboard Styles */
.mobile-dashboard {
    padding-bottom: 1rem;
}

.mobile-section {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    overflow: hidden;
}

.mobile-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bs-tertiary-bg);
    border-bottom: 1px solid var(--bs-border-color);
}

.mobile-section-header h6 {
    font-weight: 600;
    margin: 0;
}

.mobile-section-body {
    padding: 0;
}

.mobile-mini-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    text-decoration: none;
    color: var(--bs-body-color);
    border-bottom: 1px solid var(--bs-border-color);
    min-height: 56px;
    transition: background-color 0.15s ease;
}

.mobile-mini-row:last-child {
    border-bottom: none;
}

.mobile-mini-row:hover,
.mobile-mini-row:focus {
    background-color: rgba(255, 109, 0, 0.05);
    text-decoration: none;
    color: var(--bs-body-color);
}

.mobile-mini-row:active {
    background-color: rgba(255, 109, 0, 0.1);
}

.mobile-mini-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    flex: 1;
    min-width: 0;
}

.mobile-mini-name {
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-mini-army {
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
}

.mobile-mini-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.mobile-mini-actions .badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.5rem;
}

.mobile-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem;
    color: var(--bs-secondary-color);
    font-size: 0.9rem;
}

.mobile-empty-state i {
    font-size: 1.1rem;
}

.mobile-quick-links {
    margin-top: 1.5rem;
}

/* Dark mode mobile dashboard */
[data-bs-theme="dark"] .mobile-section {
    background-color: #2a2a2a;
    border-color: #404040;
}

[data-bs-theme="dark"] .mobile-section-header {
    background-color: #1e1e1e;
    border-color: #404040;
}

[data-bs-theme="dark"] .mobile-mini-row {
    border-color: #404040;
}

[data-bs-theme="dark"] .mobile-mini-row:hover,
[data-bs-theme="dark"] .mobile-mini-row:focus {
    background-color: rgba(255, 109, 0, 0.1);
}

/* Mobile status change dropdown */
.mobile-status-btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    min-width: 80px;
    white-space: nowrap;
}

.mobile-status-dropdown {
    font-size: 0.875rem;
}

.mobile-status-dropdown .dropdown-item {
    padding: 0.5rem 1rem;
}

.mobile-status-dropdown .dropdown-item.active {
    background-color: var(--bs-primary);
    color: white;
}

.mobile-status-dropdown .dropdown-item.active i {
    color: white !important;
}

/* Toast notification for status change */
.status-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    z-index: 1100;
    min-width: 250px;
    max-width: 90%;
    margin: 0;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-size: 0.9rem;
}

.status-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

[data-bs-theme="dark"] .status-toast.alert-success {
    background-color: #198754;
    border-color: #198754;
    color: white;
}

[data-bs-theme="dark"] .status-toast.alert-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* =====================================================
   MOBILE OPTIMIZATIONS (<768px)
   Only affects small screens - desktop unchanged
   ===================================================== */
@media (max-width: 767.98px) {
    /* Navbar improvements */
    .navbar {
        padding: 0.5rem 0.75rem;
    }
    
    .navbar-brand .brand-text {
        font-size: 1.1rem;
    }
    
    .navbar-logo {
        width: 36px;
        height: 36px;
    }
    
    /* Hide search in navbar on mobile - will show below */
    .navbar .search-form {
        display: none !important;
    }
    
    /* Better mobile nav menu */
    .navbar-nav {
        padding: 0.5rem 0;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        border-radius: 0.375rem;
        margin: 0.125rem 0;
    }
    
    .navbar-nav .nav-link:active {
        background-color: rgba(255, 109, 0, 0.15);
    }
    
    /* Page title sizing */
    h1 {
        font-size: 1.5rem;
    }
    
    h5.card-title {
        font-size: 1rem;
    }
    
    /* Card improvements */
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
    }
    
    /* Dashboard stat circles */
    .stat-circle {
        width: 50px;
        height: 50px;
    }
    
    .stat-circle .fs-4 {
        font-size: 1.1rem !important;
    }
    
    /* Button touch targets - minimum 44px */
    .btn {
        min-height: 44px;
        padding: 0.5rem 1rem;
    }
    
    .btn-sm {
        min-height: 38px;
        padding: 0.375rem 0.75rem;
    }
    
    /* Full-width buttons in grids */
    .d-grid .btn {
        padding: 0.75rem 1rem;
    }
    
    /* Miniature list items */
    .miniature-item {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.5rem;
        padding: 0.75rem !important;
    }
    
    .miniature-item > div:last-child {
        width: 100%;
        justify-content: space-between;
    }
    
    /* Badge sizing */
    .badge {
        font-size: 0.75rem;
        padding: 0.35rem 0.5rem;
    }
    
    /* Form inputs - larger touch targets */
    .form-control,
    .form-select {
        min-height: 44px;
        font-size: 1rem;
        padding: 0.5rem 0.75rem;
    }
    
    textarea.form-control {
        min-height: auto;
    }
    
    /* Form labels */
    .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.375rem;
    }
    
    /* Table responsiveness */
    .table-responsive {
        margin: 0 -1rem;
        padding: 0 1rem;
    }
    
    .table {
        font-size: 0.85rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
        white-space: nowrap;
    }
    
    /* Footer spacing */
    footer {
        margin-top: 2rem;
        padding: 1rem 0;
    }
    
    footer .btn {
        margin-bottom: 0.5rem;
    }
    
    /* Alert improvements */
    .alert {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Army section headers */
    .army-section h6 {
        font-size: 0.9rem;
    }
    
    /* Paint log items */
    .paint-log-item {
        padding-left: 1rem;
    }
    
    .paint-log-card {
        padding: 0.75rem;
    }
    
    /* Recipe color list */
    .recipe-colors {
        max-height: 200px;
    }
    
    /* Settings buttons */
    .settings-btn {
        min-width: 100% !important;
        width: 100% !important;
    }
    
    /* Container padding */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Modal improvements */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    /* Collapse forms */
    .collapse .card-body {
        padding: 1rem;
    }
    
    /* Empty state */
    .empty-state {
        padding: 2rem 1rem;
    }
    
    .empty-state i {
        font-size: 2.5rem;
    }
    
    /* Page headers with buttons - stack on mobile */
    .page-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }
    
    .page-header h2 {
        margin-bottom: 0;
    }
    
    .page-header .d-flex.gap-2 {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .page-header .btn {
        flex: 1;
        min-width: 120px;
    }
    
    /* Nav tabs - scrollable on mobile */
    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .nav-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .nav-tabs .nav-link {
        white-space: nowrap;
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    /* Army cards - full width on very small screens */
    .col-md-6.col-lg-4.mb-4 {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    /* Footer sections - better mobile layout */
    .footer-actions {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .account-section,
    .settings-section {
        width: 100%;
    }
    
    /* Login/Register page improvements */
    .feature {
        padding: 1rem;
    }
    
    .feature i {
        font-size: 2rem;
    }
}
