/* New UI Style based on stitch_lab_booking_system */
:root {
    --primary: #004253;
    --on-primary: #ffffff;
    --background: #f8f9fb;
    --on-background: #191c1e;
    --surface: #f8f9fb;
    --on-surface: #191c1e;
    --surface-container-lowest: #ffffff;
    --surface-container-low: #f2f4f6;
    --surface-container: #eceef0;
    --surface-container-high: #e6e8ea;
    --surface-container-highest: #e1e3e4;
    --outline: #70787d;
    --outline-variant: #bfc8cc;
    --error: #ba1a1a;
    --font-headline: 'Manrope', sans-serif;
    --font-body: 'Manrope', sans-serif;
    --font-label: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--background);
    color: var(--on-background);
    font-family: var(--font-body);
    line-height: 1.5;
    min-height: 100dvh;
}

.editorial-gradient {
    background: linear-gradient(135deg, #004253 0%, #005b71 100%);
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    display: inline-block;
    vertical-align: middle;
}

/* Base Card Style from the new UI */
.nexus-card {
    background: var(--surface-container-lowest);
    border-radius: 2.5rem;
    padding: 2.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 66, 83, 0.05), 0 8px 10px -6px rgba(0, 66, 83, 0.05);
}

/* Buttons */
.btn-nexus-primary {
    background: linear-gradient(135deg, #004253 0%, #005b71 100%);
    color: var(--on-primary);
    border-radius: 1rem;
    font-weight: 700;
    padding: 1rem 1.5rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 66, 83, 0.2);
}

.btn-nexus-primary:active {
    transform: scale(0.98);
}

/* Inputs */
.nexus-input {
    width: 100%;
    background: var(--surface-container-low);
    border: none;
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    color: var(--on-surface);
    outline: none;
    transition: all 0.2s;
}

.nexus-input:focus {
    background: var(--surface-container-lowest);
    box-shadow: 0 0 0 2px rgba(0, 66, 83, 0.1);
}

.nexus-label {
    font-family: var(--font-label);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-left: 0.25rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* Stagger Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

/* Desktop Application Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--surface-container-lowest);
    border-right: 1px solid var(--outline-variant);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}

.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 3rem 4rem;
    min-height: 100vh;
    background: var(--background);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--on-surface-variant);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 1rem;
    margin: 0.25rem 1rem;
    transition: all 0.2s;
}

.nav-item:hover {
    background: var(--surface-container-low);
    color: var(--primary);
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
}

.bento-card {
    grid-column: span 12;
}

@media (min-width: 1024px) {
    .span-8 {
        grid-column: span 8;
    }

    .span-4 {
        grid-column: span 4;
    }

    .span-6 {
        grid-column: span 6;
    }

    .span-3 {
        grid-column: span 3;
    }
}

/* --- ONBOARDING TOUR STYLES --- */
#tour-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9998;
    backdrop-filter: blur(2px);
    transition: opacity 0.3s;
}
.tour-highlight {
    position: relative;
    z-index: 9999 !important;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 0 4px rgba(255,255,255,0.2), 0 0 20px rgba(0,0,0,0.5);
    pointer-events: none;
}
.tour-popover {
    position: absolute;
    z-index: 10000;
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    width: 300px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: fade-in 0.3s ease-out;
}
.tour-popover h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}
.tour-popover p {
    font-size: 0.85rem;
    color: var(--on-surface-variant);
    margin-bottom: 1rem;
}
.tour-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--outline-variant);
    padding-top: 1rem;
}
.tour-progress {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--on-surface-variant);
}
.tour-buttons button {
    padding: 0.4rem 0.8rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-tour-next {
    background: var(--primary);
    color: white;
}
.btn-tour-prev {
    background: var(--surface-container-low);
    color: var(--primary);
    margin-right: 0.5rem;
}

/* Floating Help Button */
#floating-help-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 9990;
    transition: transform 0.2s;
}
#floating-help-btn:hover {
    transform: scale(1.05);
}
#floating-help-menu {
    position: fixed;
    bottom: 6.5rem;
    right: 2rem;
    background: white;
    border-radius: 1rem;
    width: 250px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 9990;
    overflow: hidden;
    display: none;
    flex-direction: column;
}
#floating-help-menu.active {
    display: flex;
    animation: fade-in 0.2s ease-out;
}
.help-menu-item {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--on-surface-variant);
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}
.help-menu-item:hover {
    background: var(--surface-container-low);
    color: var(--primary);
}
.help-menu-search {
    padding: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}
.help-menu-search input {
    width: 100%;
    padding: 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid #ddd;
    font-size: 0.8rem;
}

/* Modal styling */
.tour-modal-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    backdrop-filter: blur(4px);
}
.tour-modal {
    background: white;
    padding: 2.5rem;
    border-radius: 1.5rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    text-align: center;
    animation: fade-in 0.3s ease-out;
}
.tour-modal h2 {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 1rem;
}
.tour-modal p {
    color: var(--on-surface-variant);
    margin-bottom: 2rem;
    line-height: 1.5;
}
.flow-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
    background: #f8f9fb;
    padding: 1.5rem;
    border-radius: 1rem;
}
.flow-node {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--primary);
    color: var(--primary);
    font-weight: bold;
    font-size: 0.85rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.flow-arrow {
    color: var(--on-surface-variant);
    font-size: 1.2rem;
}