html { scroll-behavior: smooth; }
body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 15%, #16213e 35%, #0f3460 50%, #533a7d 70%, #8b5a8c 85%, #a0616a 100%);
    min-height: 100vh;
    overflow-x: hidden;
    color: white;
    transition: background 0.3s, color 0.3s;
}
.bg-shapes { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; overflow: hidden; }
.shape { position: absolute; background: rgba(255, 255, 255, 0.08); animation: float 6s ease-in-out infinite; box-shadow: 0 8px 32px rgba(255, 255, 255, 0.1); }
.shape:nth-child(1) { width: 120px; height: 80px; border-radius: 15px; top: 20%; left: 10%; animation-delay: 0s; transform: rotate(15deg); }
.shape:nth-child(2) { width: 90px; height: 140px; border-radius: 12px; top: 60%; right: 15%; animation-delay: 2s; transform: rotate(-20deg); }
.shape:nth-child(3) { width: 100px; height: 60px; border-radius: 10px; bottom: 20%; left: 20%; animation-delay: 4s; transform: rotate(25deg); }
@keyframes float { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-20px); } }
.glass { background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 20px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); transition: all 0.3s ease; position: relative; padding: 2rem; }
.form-group input, .form-group select, .form-group textarea { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 10px; color: white; backdrop-filter: blur(10px); transition: all 0.3s ease; }
.form-group select option { color: black; }
.form-group textarea:read-only { background: rgba(0, 0, 0, 0.2); cursor: not-allowed; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; background: rgba(255, 255, 255, 0.15); border-color: rgba(255, 255, 255, 0.4); box-shadow: 0 0 20px rgba(255, 255, 255, 0.1); }
.form-group input::placeholder { color: rgba(255, 255, 255, 0.6); }
.slider { background-color: rgba(255, 255, 255, 0.2); }
input:checked + .slider { background-color: #3b82f6; }
.btn-success-feedback { animation: success-flash 0.7s ease-out; }
@keyframes success-flash { 0% { background-color: rgba(255, 255, 255, 0.2); } 50% { background-color: #16a34a; } 100% { background-color: rgba(255, 255, 255, 0.2); } }
.row-remove-feedback { animation: fade-out 0.5s ease-out forwards; }
@keyframes fade-out { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(0.95); } }
.total-updated { animation: total-flash 0.8s ease-out; }
@keyframes total-flash { 0% { color: white; transform: scale(1); } 50% { color: #69f0ae; transform: scale(1.05); } 100% { color: white; transform: scale(1); } }

/* CTA Button Styles */
.cta-button {
    padding: 0.8rem 1.8rem;
    border-radius: 9999px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    
    /* Enhanced Glassmorphism */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.cta-button:hover:not(:disabled):not(.disabled) {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2), 0 0 30px rgba(255, 255, 255, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

/* Primary action button (e.g., Next, Confirm) */
.cta-button.primary {
    background: rgba(96, 165, 250, 0.25); /* Tailwind's blue-400 with opacity */
    border-color: rgba(96, 165, 250, 0.5);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), 0 0 15px rgba(96, 165, 250, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.cta-button.primary:hover:not(:disabled):not(.disabled) {
    background: rgba(96, 165, 250, 0.35);
    border-color: rgba(96, 165, 250, 0.7);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2), 0 0 30px rgba(96, 165, 250, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

/* Positive action button (e.g., Add) */
.cta-button.positive {
    background: rgba(74, 222, 128, 0.2); /* green-400 */
    border-color: rgba(74, 222, 128, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), 0 0 15px rgba(74, 222, 128, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.cta-button.positive:hover:not(:disabled):not(.disabled) {
    background: rgba(74, 222, 128, 0.3);
    border-color: rgba(74, 222, 128, 0.6);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2), 0 0 30px rgba(74, 222, 128, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

/* Destructive action button (e.g., Delete, Clear) */
.cta-button.destructive {
    background: rgba(239, 68, 68, 0.25); /* red-500 */
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), 0 0 15px rgba(239, 68, 68, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.cta-button.destructive:hover:not(:disabled):not(.disabled) {
    background: rgba(239, 68, 68, 0.35);
    border-color: rgba(239, 68, 68, 0.7);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2), 0 0 30px rgba(239, 68, 68, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}


.cta-button:disabled,
.cta-button.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    background: rgba(108, 122, 137, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
    text-shadow: none;
}

body.high-contrast { background: #000000; color: #ffffff; }
body.high-contrast .bg-shapes { display: none; }
body.high-contrast .glass { background: #111827; backdrop-filter: none; border: 2px solid #f3f4f6; }
body.high-contrast .form-group input, body.high-contrast .form-group select, body.high-contrast .form-group textarea { background: #1f2937; border-color: #9ca3af; color: #ffffff; }
body.high-contrast .cta-button {
    background: #374151; /* gray-700 */
    color: #ffffff;
    backdrop-filter: none;
    border: 2px solid #f3f4f6;
    box-shadow: none;
}
body.high-contrast .cta-button:hover:not(:disabled):not(.disabled) {
    background: #4b5563; /* gray-600 */
    border-color: #ffffff;
    transform: none;
}
body.high-contrast .cta-button.primary {
    background: #3b82f6; /* blue-500 */
}
body.high-contrast .cta-button.primary:hover:not(:disabled):not(.disabled) {
    background: #2563eb; /* blue-600 */
}
body.high-contrast .cta-button.positive {
    background: #166534; /* green-800 */
}
body.high-contrast .cta-button.positive:hover:not(:disabled):not(.disabled) {
    background: #15803d; /* green-700 */
}
body.high-contrast .cta-button.destructive {
    background: #b91c1c; /* red-700 */
}
body.high-contrast .cta-button.destructive:hover:not(:disabled):not(.disabled) {
    background: #991b1b; /* red-800 */
}
body.high-contrast .cta-button:disabled,
body.high-contrast .cta-button.disabled {
    background: #1f2937; /* gray-800 */
    color: #6b7280; /* gray-500 */
    border-color: #4b5563; /* gray-600 */
    opacity: 1; /* override default disabled opacity */
}
body.high-contrast h1, body.high-contrast h2 { text-shadow: none; }

/* Slider styles for What-If Analysis */
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; background: rgba(255, 255, 255, 0.2); border-radius: 5px; outline: none; transition: opacity .2s; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; background: #3b82f6; border-radius: 50%; cursor: pointer; border: 2px solid white; box-shadow: 0 0 5px rgba(59, 130, 246, 0.5); }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; background: #3b82f6; border-radius: 50%; cursor: pointer; border: 2px solid white; box-shadow: 0 0 5px rgba(59, 130, 246, 0.5); }

/* New Styles for Wizard Layout */
/* Stepper */
.stepper-container { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-bottom: 1rem; padding: 1rem; }
.stepper-item { display: flex; flex-direction: column; align-items: center; text-align: center; transition: all 0.3s ease; }
.step-circle { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; border: 2px solid rgba(255, 255, 255, 0.3); background-color: rgba(255, 255, 255, 0.1); transition: all 0.3s ease; }
.step-name { margin-top: 0.5rem; font-size: 0.875rem; color: rgba(255, 255, 255, 0.7); }
.stepper-line { flex-grow: 1; height: 2px; background-color: rgba(255, 255, 255, 0.3); margin: 0 1rem; }
.stepper-item.completed .step-circle { background-color: #3b82f6; border-color: #3b82f6; color: white; }
.stepper-item.active .step-circle { background-color: rgba(255, 255, 255, 0.2); border-color: #60a5fa; transform: scale(1.1); box-shadow: 0 0 15px rgba(96, 165, 250, 0.5); }
.stepper-item.active .step-name { color: white; font-weight: 600; }
.stepper-item.skipped .step-circle {
    background-color: rgba(248, 113, 113, 0.2);
    border-color: #f87171;
    color: white;
    filter: none; /* Override inactive grayscale */
    opacity: 1; /* Override inactive opacity */
}
.stepper-item:not(.completed):not(.active):not(.skipped) .step-circle { filter: grayscale(80%); opacity: 0.7; }
.stepper-item.clickable { cursor: pointer; }


/* Tabs */
.tabs-container { display: flex; gap: 0.5rem; border-bottom: 2px solid rgba(255, 255, 255, 0.2); }
.tab-item { padding: 0.75rem 1.5rem; font-size: 1rem; font-weight: 500; cursor: pointer; border-radius: 10px 10px 0 0; border: 2px solid transparent; border-bottom: none; transition: all 0.3s ease; color: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.05); }
.tab-item:hover { background-color: rgba(255, 255, 255, 0.15); color: white; }
.tab-item.active {
    color: white;
    font-weight: 600;
    background-color: #3b82f6; /* Solid blue for high contrast */
    border-color: rgba(96, 165, 250, 0.8);
    border-bottom: 2px solid transparent;
    box-shadow: 0 -5px 15px -5px rgba(96, 165, 250, 0.4);
}
body.high-contrast .tab-item.active {
    background-color: #3b82f6;
    color: #ffffff;
    border-color: #f3f4f6;
    box-shadow: none;
}


/* Sidebar */
.sidebar-sticky { position: sticky; top: 1rem; align-self: start; }

/* BSUS/BLUS Form Tints */
.good-features { background-color: rgba(74, 222, 128, 0.25); border: 1px solid rgba(74, 222, 128, 0.4); }
.good-features-title { color: #4ade80; } /* Tailwind green-400 */
.bad-features { background-color: rgba(248, 113, 113, 0.25); border: 1px solid rgba(248, 113, 113, 0.4); }
.bad-features-title { color: #f87171; } /* Tailwind red-400 */

/* Reusable Slide-out Panel */
.slide-out-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 40;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
}
.slide-out-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}
.slide-out-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 350px;
    max-width: 90vw;
    z-index: 50;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
}
.slide-out-panel.open {
    transform: translateX(0);
}

/* Add-ons Table */
#add-ons-table-body td {
    padding: 0.25rem;
}
#add-ons-table-body input {
    background: transparent;
    border: 1px solid transparent;
    color: white;
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    transition: background 0.2s, border-color 0.2s;
}
#add-ons-table-body input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    outline: none;
}


/* Helper class for hiding elements */
.hidden {
    display: none !important;
}