/* Professional Theme */
:root {
    --professional-navy: #1e3a5f;
    --professional-navy-dark: #2c5282;
    --professional-navy-light: #3b6fa8;
    --professional-blue-light: #f0f4f8;
    --professional-blue-lighter: #e8f0f7;
    --professional-text: #374151;
    --professional-text-light: #6b7280;
    --professional-border: #d1d5db;
    --professional-white: #ffffff;
    --win98-border-raised: 0 2px 4px rgba(0, 0, 0, 0.1);
    --win98-border-sunken: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #d8e0ea;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(30, 58, 95, 0.01) 10px,
            rgba(30, 58, 95, 0.01) 20px
        ),
        radial-gradient(circle at 20% 50%, rgba(30, 58, 95, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(44, 82, 130, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(30, 58, 95, 0.03) 0%, transparent 50%),
        linear-gradient(135deg, #e8f0f7 0%, #f0f4f8 25%, #ffffff 50%, #f0f4f8 75%, #e8f0f7 100%);
    background-attachment: fixed;
    background-size: 100% 100%;
    color: var(--professional-text);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Ensure content appears above background */
main, .container {
    position: relative;
}

/* Ensure modals are always above everything */
.modal,
.modal.show {
    z-index: 1055 !important;
}

.modal-backdrop {
    z-index: 1050 !important;
}

.modal-dialog {
    z-index: 1056 !important;
}

/* Navigation Bar - Professional Style */
.navbar {
    background: linear-gradient(135deg, var(--professional-navy) 0%, var(--professional-navy-dark) 100%) !important;
    border-bottom: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 0.75rem 0 !important;
}

.navbar-brand {
    color: var(--professional-white) !important;
    font-weight: 600;
    padding: 0.5rem 1rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    border: none;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--professional-white) !important;
}

/* Professional Buttons */
.btn {
    border: 1px solid transparent;
    box-shadow: var(--win98-border-raised);
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
}

/* Default button (no specific class) - navy background */
.btn:not(.btn-primary):not(.btn-secondary):not(.btn-light):not(.btn-success):not(.btn-danger):not(.btn-info):not(.btn-warning):not([class*="outline"]) {
    background-color: var(--professional-navy);
    color: var(--professional-white);
    border: none;
}

.btn:not(.btn-primary):not(.btn-secondary):not(.btn-light):not(.btn-success):not(.btn-danger):not(.btn-info):not(.btn-warning):not([class*="outline"]):hover {
    background-color: var(--professional-navy-dark);
    color: var(--professional-white);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:active {
    box-shadow: var(--win98-border-sunken);
    transform: translateY(0);
}

.btn-primary {
    background-color: var(--professional-navy);
    border-color: var(--professional-navy);
    color: var(--professional-white) !important;
}

.btn-primary:hover {
    background-color: var(--professional-navy-dark);
    border-color: var(--professional-navy-dark);
    color: var(--professional-white) !important;
}

.btn-outline-primary {
    background-color: transparent !important;
    color: var(--professional-navy) !important;
    border: 1px solid var(--professional-navy) !important;
}

.btn-outline-primary:hover {
    background-color: rgba(30, 58, 95, 0.1) !important;
    border-color: var(--professional-navy) !important;
    color: var(--professional-navy-dark) !important;
}

.btn-secondary {
    background-color: var(--professional-text-light);
    border-color: var(--professional-text-light);
    color: var(--professional-white);
}

.btn-secondary:hover {
    background-color: var(--professional-text);
    border-color: var(--professional-text);
    color: var(--professional-white);
}

.btn-outline-secondary {
    background-color: transparent !important;
    color: var(--professional-text) !important;
    border: 1px solid var(--professional-text-light) !important;
}

.btn-outline-secondary:hover {
    background-color: rgba(107, 114, 128, 0.1) !important;
    border-color: var(--professional-text) !important;
    color: var(--professional-text) !important;
}

.btn-light {
    background-color: var(--professional-white);
    border-color: var(--professional-border);
    color: var(--professional-text);
}

.btn-light:hover {
    background-color: #e8f0f7;
    border-color: var(--professional-border);
    color: var(--professional-text);
}

.btn-outline-light {
    background-color: transparent !important;
    color: var(--professional-white) !important;
    border: 1px solid var(--professional-white) !important;
}

.btn-outline-light:hover {
    background-color: var(--professional-white) !important;
    border-color: var(--professional-white) !important;
    color: var(--professional-navy) !important;
}

.btn-outline-success {
    background-color: transparent !important;
    color: #16a34a !important;
    border: 1px solid #16a34a !important;
}

.btn-outline-success:hover {
    background-color: rgba(22, 163, 74, 0.1) !important;
    border-color: #15803d !important;
    color: #15803d !important;
}

.btn-outline-danger {
    background-color: transparent !important;
    color: #dc2626 !important;
    border: 1px solid #dc2626 !important;
}

.btn-outline-danger:hover {
    background-color: rgba(220, 38, 38, 0.1) !important;
    border-color: #b91c1c !important;
    color: #b91c1c !important;
}

.btn-outline-info {
    background-color: transparent !important;
    color: #0891b2 !important;
    border: 1px solid #0891b2 !important;
}

.btn-outline-info:hover {
    background-color: rgba(8, 145, 178, 0.1) !important;
    border-color: #0e7490 !important;
    color: #0e7490 !important;
}

.btn-outline-warning {
    background-color: transparent !important;
    color: #d97706 !important;
    border: 1px solid #d97706 !important;
}

.btn-outline-warning:hover {
    background-color: rgba(217, 119, 6, 0.1) !important;
    border-color: #b45309 !important;
    color: #b45309 !important;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

/* Professional Cards */
.card {
    background-color: var(--professional-white);
    border: 1px solid var(--professional-border);
    box-shadow: var(--win98-border-raised);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.card-header {
    background: linear-gradient(135deg, var(--professional-navy) 0%, var(--professional-navy-dark) 100%);
    color: var(--professional-white);
    font-weight: 600;
    padding: 1rem;
    border-bottom: none;
    border-radius: 0.5rem 0.5rem 0 0;
}

/* Form Controls */
.form-control {
    background-color: var(--professional-white);
    border: 1px solid var(--professional-border);
    box-shadow: none;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    color: var(--professional-text);
}

.form-control:focus {
    border-color: var(--professional-navy);
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 95, 0.25);
    outline: none;
}

/* Professional Alert Messages */
.alert {
    background-color: var(--professional-white);
    border: 1px solid var(--professional-border);
    box-shadow: var(--win98-border-raised);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #f0fdf4;
    border-color: #86efac;
    color: #166534;
}

.alert-danger {
    background-color: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

.alert-info {
    background-color: #eff6ff;
    border-color: #93c5fd;
    color: #1e40af;
}

.alert-warning {
    background-color: #fffbeb;
    border-color: #fcd34d;
    color: #92400e;
}

/* Category and Product Cards */
.category-card, .product-card {
    background-color: var(--professional-white);
    border: 1px solid var(--professional-border);
    box-shadow: var(--win98-border-raised);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.category-card:hover, .product-card:hover {
    background-color: var(--professional-white);
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--professional-navy);
}

/* Price Badge */
.price-badge {
    background: linear-gradient(135deg, var(--professional-navy) 0%, var(--professional-navy-dark) 100%);
    color: var(--professional-white);
    padding: 0.375rem 0.75rem;
    border: none;
    box-shadow: var(--win98-border-raised);
    border-radius: 0.375rem;
    font-weight: 600;
}

/* Balance Display */
.balance-display {
    background: linear-gradient(135deg, var(--professional-navy) 0%, var(--professional-navy-dark) 100%);
    color: var(--professional-white);
    padding: 0.5rem 1rem;
    border: none;
    box-shadow: var(--win98-border-raised);
    margin-right: 8px;
    border-radius: 0.375rem;
    font-weight: 600;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--professional-navy) 0%, var(--professional-navy-dark) 100%);
    border-top: none;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    padding: 2rem 0;
    margin-top: 3rem;
    color: var(--professional-white);
}

/* Tables */
.table {
    background-color: var(--professional-white);
    border: 1px solid var(--professional-border);
    box-shadow: var(--win98-border-raised);
    border-radius: 0.5rem;
    overflow: hidden;
}

.table th {
    background: linear-gradient(135deg, var(--professional-navy) 0%, var(--professional-navy-dark) 100%);
    color: var(--professional-white);
    border: none;
    font-weight: 600;
    padding: 1rem;
}

.table td {
    border: 1px solid var(--professional-border);
    padding: 0.75rem 1rem;
}

/* Pagination */
.pagination .page-link {
    background-color: var(--professional-white);
    border: 1px solid var(--professional-border);
    box-shadow: var(--win98-border-raised);
    color: var(--professional-text);
    border-radius: 0.375rem;
    margin: 0 0.25rem;
    padding: 0.5rem 0.75rem;
}

.pagination .page-link:hover {
    background-color: #e8f0f7;
    border-color: var(--professional-navy);
    color: var(--professional-navy);
}

.pagination .active .page-link {
    background: linear-gradient(135deg, var(--professional-navy) 0%, var(--professional-navy-dark) 100%);
    border-color: var(--professional-navy);
    color: var(--professional-white);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--professional-navy) 0%, var(--professional-navy-dark) 100%);
    color: var(--professional-white);
    padding: 4rem 0;
    margin-bottom: 3rem;
}

.hero-section h1 {
    color: var(--professional-white);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero-section .lead {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
}

.hero-section .btn-light {
    background-color: var(--professional-white);
    color: var(--professional-navy);
    border: none;
    font-weight: 600;
}

.hero-section .btn-light:hover {
    background-color: var(--professional-gray-dark);
    color: var(--professional-navy);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.hero-section .btn-outline-light {
    border: 2px solid var(--professional-white);
    color: var(--professional-white);
    background-color: transparent;
    font-weight: 600;
}

.hero-section .btn-outline-light:hover {
    background-color: var(--professional-white);
    color: var(--professional-navy);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Section Backgrounds */
.bg-light {
    background-color: #f0f4f8 !important;
    background-image: linear-gradient(135deg, #e8f0f7 0%, #f0f4f8 100%);
}

/* Contact Card */
.card[data-bs-toggle="modal"] {
    background: linear-gradient(135deg, var(--professional-navy) 0%, var(--professional-navy-dark) 100%);
    color: var(--professional-white);
    border: none;
    transition: all 0.3s ease;
}

.card[data-bs-toggle="modal"]:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.card[data-bs-toggle="modal"] h2,
.card[data-bs-toggle="modal"] p {
    color: var(--professional-white);
}

/* Modal */
.modal {
    z-index: 1055 !important;
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5) !important;
    opacity: 1 !important;
    z-index: 1050 !important;
}

.modal-dialog {
    z-index: 1056 !important;
    position: relative;
}

.modal-content {
    background-color: var(--professional-white) !important;
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;
    color: var(--professional-text) !important;
    opacity: 1 !important;
    filter: none !important;
    -webkit-filter: none !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 1057 !important;
}

.modal-body {
    background-color: var(--professional-white) !important;
    color: var(--professional-text) !important;
    opacity: 1 !important;
    filter: none !important;
    -webkit-filter: none !important;
    position: relative !important;
}

.modal-header {
    background: linear-gradient(135deg, var(--professional-navy) 0%, var(--professional-navy-dark) 100%) !important;
    color: var(--professional-white) !important;
    border-bottom: none;
    border-radius: 0.5rem 0.5rem 0 0;
    opacity: 1 !important;
    filter: none !important;
    -webkit-filter: none !important;
    position: relative !important;
}

.modal-footer {
    opacity: 1 !important;
    background-color: var(--professional-white) !important;
    filter: none !important;
    -webkit-filter: none !important;
    position: relative !important;
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-footer .btn-secondary {
    background-color: var(--professional-text-light);
    border-color: var(--professional-text-light);
    color: var(--professional-white);
}

.modal-footer .btn-secondary:hover {
    background-color: var(--professional-text);
    border-color: var(--professional-text);
}

/* Card Footer */
.card-footer {
    background-color: #f0f4f8;
    background-image: linear-gradient(135deg, #e8f0f7 0%, #f0f4f8 100%);
    border-top: 1px solid var(--professional-border);
    border-radius: 0 0 0.5rem 0.5rem;
    padding: 1rem;
}

/* Remove any remaining Windows 98 styling */
* {
    box-sizing: border-box;
}

/* Ensure all buttons have consistent styling */
button.btn,
a.btn,
input[type="submit"].btn {
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
}

/* Override any Bootstrap default gray backgrounds */
.bg-secondary {
    background-color: var(--professional-text-light) !important;
}

.text-secondary {
    color: var(--professional-text-light) !important;
}

/* Additional professional overrides */
.badge {
    background-color: var(--professional-navy);
    color: var(--professional-white);
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-weight: 500;
}

.badge-primary {
    background-color: var(--professional-navy);
}

.badge-success {
    background-color: #16a34a;
}

.badge-danger {
    background-color: #dc2626;
}

.badge-warning {
    background-color: #d97706;
}

.badge-info {
    background-color: #0891b2;
}

/* List groups */
.list-group-item {
    background-color: var(--professional-white);
    border: 1px solid var(--professional-border);
    color: var(--professional-text);
}

.list-group-item:hover {
    background-color: #f0f4f8;
}

.list-group-item.active {
    background: linear-gradient(135deg, var(--professional-navy) 0%, var(--professional-navy-dark) 100%);
    border-color: var(--professional-navy);
    color: var(--professional-white);
}

/* Dropdown menus */
.dropdown-menu {
    background-color: var(--professional-white);
    border: 1px solid var(--professional-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
}

.dropdown-item {
    color: var(--professional-text);
    padding: 0.5rem 1rem;
}

.dropdown-item:hover {
    background-color: #f0f4f8;
    color: var(--professional-navy);
}

.dropdown-item.active {
    background: linear-gradient(135deg, var(--professional-navy) 0%, var(--professional-navy-dark) 100%);
    color: var(--professional-white);
}

/* Progress bars */
.progress {
    background-color: #e8f0f7;
    border-radius: 0.5rem;
    height: 1rem;
}

.progress-bar {
    background: linear-gradient(135deg, var(--professional-navy) 0%, var(--professional-navy-dark) 100%);
}

/* Breadcrumbs */
.breadcrumb {
    background-color: var(--professional-white);
    border: 1px solid var(--professional-border);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
}

.breadcrumb-item a {
    color: var(--professional-navy);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--professional-navy-dark);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--professional-text);
}

/* Input groups */
.input-group-text {
    background-color: #f0f4f8;
    border: 1px solid var(--professional-border);
    color: var(--professional-text);
}

/* Select elements */
select.form-control,
select.form-select {
    background-color: var(--professional-white);
    border: 1px solid var(--professional-border);
    color: var(--professional-text);
}

select.form-control:focus,
select.form-select:focus {
    border-color: var(--professional-navy);
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 95, 0.25);
}

/* Text areas */
textarea.form-control {
    background-color: var(--professional-white);
    border: 1px solid var(--professional-border);
    color: var(--professional-text);
}

textarea.form-control:focus {
    border-color: var(--professional-navy);
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 95, 0.25);
}

/* All outline buttons should have transparent backgrounds - final override */
[class*="outline"].btn {
    background-color: transparent !important;
}
