/* --- forms.css --- */
/* --- Greenhouse Form System --- */

/* Standard Labels (Data Text style) */
label {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* Base Form Control */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="tel"],
input[type="url"],
input[type="search"],
textarea,
select {
    width: 100%;
    height: 3rem;
    padding: 0 1rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    background-color: var(--bg-greenhouse-lines);
    color: var(--text-main);
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-size: 1rem;
    font-family: inherit;

    &:focus {
        outline: none;
        background-color: var(--glass-bg);
        border-color: var(--color-form-border-focus);
        box-shadow: 0 0 15px var(--sun-color);
    }

    &:disabled {
        background-color: var(--color-form-disabled-bg);
        color: var(--color-form-disabled-text);
        cursor: not-allowed;
        opacity: 0.5;
    }
}

/* File Input Styling */
input[type="file"] {
    width: 100%;
    height: auto;
    min-height: 3.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    background-color: var(--bg-greenhouse-lines);
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    cursor: pointer;
    box-sizing: border-box;
    display: flex;
    align-items: center;

    &:focus {
        outline: none;
        background-color: var(--glass-bg);
        border-color: var(--color-form-border-focus);
        box-shadow: 0 0 15px var(--sun-color);
    }
}

input[type="file"]::file-selector-button {
    background: var(--accent-navy);
    color: #FFF;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 2px;
    margin-right: 1.5rem;
    cursor: pointer;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.7rem;
    transition: all 0.3s ease;
}

input[type="file"]::file-selector-button:hover {
    background: var(--color-primary);
    color: var(--accent-navy);
}

[data-theme="dark"] input[type="file"]::file-selector-button {
    background: var(--color-primary);
    color: var(--accent-navy);
}

[data-theme="dark"] input[type="file"]::file-selector-button:hover {
    background: #FFF;
}

/* Input Groups (Suffix/Prefix support) */
.input-group {
    display: flex;
    align-items: center;
    width: 100%;
    height: 3rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    background-color: var(--bg-greenhouse-lines);
    transition: all 0.3s ease;
    overflow: hidden;
}

.input-group:focus-within {
    outline: none;
    background-color: var(--glass-bg);
    border-color: var(--color-form-border-focus);
    box-shadow: 0 0 15px var(--sun-color);
}

.input-group input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    height: 100% !important;
    padding: 0 1rem !important;
    box-shadow: none !important;
    margin: 0 !important;
    color: var(--text-main) !important;
}

.input-group .input-suffix {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.03);
    border-left: 1px solid var(--glass-border);
    white-space: nowrap;
    text-transform: lowercase;
}

[data-theme="dark"] .input-group .input-suffix {
    background: rgba(255, 255, 255, 0.03);
}

textarea {
    min-height: 120px;
    height: auto;
    padding: 1rem;
    resize: vertical;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Layout Primitives (Semantic) */
.field-group {
    margin-bottom: var(--space-lg);
    
    &:last-child {
        margin-bottom: 0;
    }

    .help-text {
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.65rem;
        text-transform: uppercase;
        color: var(--text-muted);
        margin-top: 0.5rem;
        opacity: 0.7;
    }
}

.field-row {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);

    & > * {
        flex: 1;
    }

    @media (max-width: 768px) {
        flex-direction: column;
        gap: var(--space-md);
    }
}

/* Fieldset & Legend (Greenhouse Style) */
fieldset {
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: var(--space-xl);
    margin: var(--space-xl) 0;
    background: var(--bg-greenhouse-lines);
    
    legend {
        padding: 0 1rem;
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--text-muted);
    }

    .form-group:first-of-type {
        margin-top: var(--space-sm);
    }
}

/* Radio & Checkbox Primitives */
.choice-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.choice-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-main);

    input {
        width: 1rem;
        height: 1rem;
        accent-color: var(--color-primary);
    }
}

/* Legacy Support (To be deprecated) */
.form-container {
    /* Redirect to Panel style */
    background: var(--glass-bg);
    backdrop-filter: blur(12px) saturate(120%);
    border: 1px solid var(--glass-border);
    padding: var(--space-xl);
    border-radius: var(--border-radius);
    margin-bottom: var(--space-xl);
}

.form-group {
    margin-bottom: 1rem;
}


/* --- tables.css --- */
/* --- Greenhouse Table System --- */

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;

    thead th {
        padding: 1rem;
        font-family: 'JetBrains Mono', monospace;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        font-size: 0.75rem;
        color: var(--text-muted);
        text-align: left;
        border-bottom: 1px solid var(--glass-border);
        white-space: nowrap;

        button {
            background: none;
            border: none;
            padding: 0;
            margin: 0;
            height: auto;
            width: auto;
            font-family: inherit;
            font-size: inherit;
            text-transform: inherit;
            letter-spacing: inherit;
            color: inherit;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            transition: color 0.3s ease;

            &:hover {
                color: var(--text-main) !important;
                background: none !important;
                box-shadow: none !important;
            }

            /* Sort indicators */
            &.ASC::after { 
                content: " \2193"; /* Arrow points down for ASC (A->Z) */
                color: var(--color-primary);
                font-weight: bold;
            }
            &.DESC::after { 
                content: " \2191"; /* Arrow points up for DESC (Z->A) */
                color: var(--color-primary);
                font-weight: bold;
            }
        }
    }

    tbody td {
        padding: 1.25rem 1rem;
        color: var(--text-main);
        border-bottom: 1px solid var(--bg-greenhouse-lines);
        vertical-align: middle;
    }

    tbody tr {
        transition: background-color 0.3s ease;

        &:hover {
            background-color: rgba(var(--color-primary), 0.03);
        }

        &:last-child td {
            border-bottom: none;
        }
    }

    /* Modifiers */
    &.table--compact {
        thead th { padding: 0.5rem 1rem; }
        tbody td { padding: 0.75rem 1rem; }
    }

    &.table--numeric, .td--numeric {
        text-align: right;
        font-family: 'JetBrains Mono', monospace;
    }

    &.table--metadata, .td--metadata {
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.75rem;
        text-transform: uppercase;
        color: var(--text-muted);
    }
}

/* Scroll Container Primitives */
.table-scroll {
    overflow-x: auto;
    width: 100%;
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) transparent;

    &::-webkit-scrollbar { height: 4px; }
    &::-webkit-scrollbar-track { background: var(--bg-greenhouse-lines); }
    &::-webkit-scrollbar-thumb { background: var(--accent-navy); }
}

/* Empty State Styling */
.table-empty {
    padding: var(--space-2xl);
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-style: italic;
    color: var(--text-muted);
    background: var(--bg-greenhouse-lines);
}


/* --- pagination.css --- */
/* Pagination styling */
.pagination {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    gap: 2rem;
    padding-left: 1rem;
    opacity: 0.5;
    transition: opacity 0.3s ease;

    &:hover {
        opacity: 1;
    }

    .page-info {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .page-numbers {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        flex: 1;

        .page-number {
            min-width: 2rem;
            text-align: center;
            padding: 0.5rem;
            border: 1px solid var(--glass-border);
            border-radius: 2px;
            color: var(--text-muted);
            text-decoration: none;
            background: var(--glass-bg);
            transition: all 0.3s ease;

            &:hover {
                background-color: var(--accent-navy);
                color: #FFF;
                border-color: var(--accent-navy);
            }

            &.current {
                background-color: var(--accent-navy);
                color: #FFF;
                border-color: var(--accent-navy);
            }
        }
    }

    .items-per-page {
        display: flex;
        justify-content: flex-end;
        gap: 0.5rem;
        align-items: center;
        flex: 0 0 auto;
        white-space: nowrap;

        label {
            font-weight: normal;
            color: var(--text-muted);
            white-space: nowrap;
        }

        select {
            padding: 0.4rem 2rem 0.4rem 0.75rem;
            border: 1px solid var(--glass-border);
            border-radius: 2px;
            background: var(--glass-bg);
            color: var(--text-main);
            font-family: inherit;
            font-size: 0.75rem;
            cursor: pointer;
            appearance: none;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 8px center;
            background-size: 12px;
        }
    }
}


/* --- sidebar.css --- */
/* Sidebar navigation - The Stem */

/* Legacy layout container support if needed */
.layout-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--space-xl);
    padding: var(--space-xl);
}

@media (min-width: 1025px) and (max-width: 1440px) {
    .layout-container {
        padding: var(--space-lg);
        gap: var(--space-lg);
    }

    main[style*="grid-column: span 8"] {
        grid-column: span 7 !important;
    }

    aside.g-col-4 {
        grid-column: span 5 !important;
    }
}

.main-content {
    grid-column: 4 / 12;
}


/* --- dropdown.css --- */
/* Dropdown menu styling */
.dropdown {
    position: relative;
    display: inline-block;

    & > .menu {
        display: none !important;
        position: absolute;
        right: 0;
        min-width: 150px;
        background: var(--glass-bg);
        backdrop-filter: blur(16px) saturate(120%);
        border: 1px solid var(--glass-border);
        border-radius: 2px;
        box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
        z-index: 100;
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        padding: 0.5rem 0;
        margin: 0;

        & > .item {
            display: block;
            padding: 0.75rem 1.25rem;
            text-decoration: none;
            color: var(--text-main);
            text-align: left;
            white-space: nowrap;
            transition: all 0.3s ease;

            &:hover {
                background: var(--bg-greenhouse-lines);
                color: var(--color-primary);
            }
        }
    }

    &.active > .menu {
        display: block !important;
    }
}

.locale-selector .menu {
    bottom: calc(100% + 1rem);
    left: 0;
    right: auto;

    .item {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
}



/* --- timeline.css --- */
.timeline {
    .item {
        display: flex;
        border: 1px solid var(--glass-border);
        background: var(--glass-bg);
        margin-bottom: 1rem;
        border-radius: 2px;
        overflow: hidden;

        --border-color: var(--glass-border);
        --border-text-color: var(--text-muted);

        &.notice {
            --border-color: var(--color-status-pending);
            background-color: var(--color-status-pending-light);
        }
        &.warning {
            --border-color: var(--color-status-quoting);
            background-color: var(--color-status-quoting-light);
        }

        &:before {
            padding: 0.5rem;
            content: attr(data-type);
            writing-mode: vertical-lr;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-main);
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            background-color: var(--border-color);
            border-right: 1px solid var(--glass-border);
        }

        & > div {
            display: grid;
            grid-template-columns: 1fr 1fr;
            padding: 1.5rem;
            flex-grow: 1;
        }
    }
}


/* --- hero.css --- */
.hero {
    background: none;
    color: var(--text-main);
    padding: 6rem 0;
    text-align: left;
    margin-bottom: 2rem;
    position: relative;
    overflow-x: clip;
    overflow-y: visible;

    h1 {
        font-family: 'Cormorant Garamond', serif;
        font-weight: 300;
        text-transform: lowercase;
        font-size: clamp(3rem, 8vw, 4.5rem);
        line-height: 1.1;
        margin-bottom: 1.5rem;
        color: var(--text-main);
        position: relative;
        z-index: 2;
        opacity: 0;
        animation: heroFadeUp 1s ease-out 0.2s forwards;
    }

    p {
        font-family: 'JetBrains Mono', monospace;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        font-size: 1rem;
        color: var(--text-muted);
        position: relative;
        z-index: 2;
        max-width: 800px;
        margin: 0;
        opacity: 0;
        animation: heroFadeUp 1s ease-out 0.4s forwards;
    }

    .brand-eyebrow {
        font-family: 'Cormorant Garamond', serif;
        display: block;
        font-size: 1.5rem;
        font-weight: 400;
        color: var(--color-primary);
        text-transform: lowercase;
        letter-spacing: 0.05em;
        margin-bottom: 1.5rem;
        position: relative;
        z-index: 2;
        opacity: 0;
        animation: heroFadeUp 1s ease-out forwards;
    }

    .hero-actions {
        margin-top: 3rem;
        position: relative;
        z-index: 2;
        display: flex;
        justify-content: flex-start;
        gap: 1.5rem;
        opacity: 0;
        animation: heroFadeUp 1s ease-out 0.6s forwards;
    }

    .hero-content {
        max-width: 900px;
        margin: 0;
        position: relative;
        z-index: 1;
    }

    .decorative-branches {
        position: absolute;
        top: -10%;
        left: -30%;
        width: 200%;
        height: 240%;
        overflow: visible;

        opacity: 0;
        background-color: var(--color-primary);
        -webkit-mask-image: var(--bouquet-url);
        mask-image: var(--bouquet-url);
        -webkit-mask-size: contain;
        mask-size: contain;
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
        -webkit-mask-position: center;
        mask-position: center;
        
        animation: heroImageFadeUp 3s ease-out 0s forwards;
    }

    @media (max-width: 1024px) {
        h1 {
            font-size: 3.5rem;
        }
    }

    @media (max-width: 768px) {
        padding: 4rem 1.5rem;
        text-align: center;

        h1 {
            font-size: 2.8rem;
        }

        .brand-eyebrow {
            font-size: 1.2rem;
        }

        .decorative-branches {
            right: -50px;
            width: 120%;
            height: 100%;
            top: 10%;
            opacity: 0.1;
        }

        .hero-actions {
            flex-direction: column;
            align-items: center;
            gap: 1rem;
            width: 100%;

            button, .btn {
                width: 100%;
            }
        }

        .hero-content {
            margin: 0 auto;
        }
    }

    @media (max-width: 480px) {
        h1 {
            font-size: 2.2rem;
        }
    }
}

/* Dark Mode override for bouquet visibility */
[data-theme="dark"] .hero .decorative-branches {
    background-color: var(--color-primary);
    animation: heroImageFadeUpDark 3s ease-out 0s forwards;
}

@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroImageFadeUp {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.4;
    }
}

@keyframes heroImageFadeUpDark {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.25;
    }
}


/* --- pricing.css --- */
.pricing {
    max-width: 1200px;
    margin: 5rem auto 1rem;

    h2, h3, h2 + p {
        text-align: center;
    }

    & > p {
        font-size: 1.2rem;
        line-height: 1.6;
        margin-bottom: 2rem;
    }
    & ul {
        text-align: left;

        & > li {
            list-style-type: "\2713";
            padding-left: 1rem;
        }
    }
    form {
        display: flex;
        width: 100%;
        button {
            margin: 0 auto;
        }
    }
}

.pricing-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
    font-weight: 500;
}

.toggle-label {
    color: #a0aec0;
    transition: color 0.3s;
}

.toggle-label.active {
    color: var(--primary-color, #2d3748);
}

.discount-badge {
    background: var(--sun-color);
    color: var(--accent-navy);
    padding: 0.25rem 0.5rem;
    border-radius: 2px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    margin-left: 0.5rem;
}

/* Switch styling */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-greenhouse-lines);
    border: 1px solid var(--glass-border);
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: .4s;
    border-radius: 1px;
}

input:checked + .slider {
    background-color: var(--accent-navy);
}

input:checked + .slider:before {
    transform: translateX(26px);
    background-color: #FFF;
}

/* --- landing.css --- */
/* --- Landing Layout --- */
.landing-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Toolkit Section --- */
.toolkit {
    margin-top: 8rem;
}

.toolkit .index {
    font-size: 1.5rem;
    opacity: 0.2;
}

.toolkit-item-1 { grid-column: 1 / 7; grid-row: 1; }
.toolkit-item-2 { grid-column: 7 / 12; grid-row: 2; margin-top: 2rem; }
.toolkit-item-3 { grid-column: 2 / 8; grid-row: 3; margin-top: -2rem; }
.toolkit-item-4 { grid-column: 7 / 13; grid-row: 4; margin-top: -1rem; }

/* --- Testimonial Section --- */
.testimonial-section {
    padding: 10rem 0;
}

.testimonial-quote {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    line-height: 1.2;
    font-style: italic;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

/* --- Pricing Section --- */
.pricing-container {
    margin-top: 12rem;
}

.pricing-grid {
    align-items: center;
}

.pricing-tier-1 {
    grid-column: 1 / 5;
    grid-row: 1;
    height: fit-content;
}

.pricing-tier-2 {
    grid-column: 5 / 9;
    grid-row: 1;
    z-index: 10;
    padding: 4rem 3rem !important;
    border-color: var(--color-primary);
    border-width: 2px;
}

.pricing-tier-3 {
    grid-column: 9 / 13;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pricing-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.pricing-toggle .switch {
    margin: 0 1.5rem;
}

.popular-badge-container {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
}

.popular-badge {
    background: var(--accent-navy);
    color: #FFF !important;
    padding: 0.4rem 0.8rem;
    border-radius: 2px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

[data-theme="dark"] .popular-badge {
    background: var(--color-primary);
    color: var(--accent-navy) !important;
}

.pricing-grid ul {
    list-style-type: "— ";
    padding-left: 1.2rem;
}

.pricing-tier-column .coming-soon {
    font-size: 0.6rem;
    opacity: 0.5;
}

/* --- Vision Section --- */
.vision-section {
    margin-top: 12rem;
    margin-bottom: 8rem;
}

.about-content p {
    font-size: 1rem;
    line-height: 1.8;
}

/* --- Responsive Layout --- */
@media (max-width: 1024px) {
    .landing-section {
        padding: 4rem 1.5rem;
    }

    .toolkit-item-1, .toolkit-item-2, .toolkit-item-3, .toolkit-item-4 {
        grid-column: 1 / -1;
        grid-row: auto;
        margin-top: 0;
        margin-left: 0;
    }

    .pricing-tier-1, .pricing-tier-2, .pricing-tier-3 {
        grid-column: 1 / -1;
        grid-row: auto;
        margin-top: 0;
        padding: 2rem !important;
        z-index: 1;
    }

    .pricing-tier-2 {
        border-width: 1px;
        box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
    }

    .testimonial-quote {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .g-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .g-col-1, .g-col-2, .g-col-3, .g-col-4, .g-col-5, .g-col-6, 
    .g-col-7, .g-col-8, .g-col-9, .g-col-10, .g-col-11, .g-col-12 {
        grid-column: 1 / -1 !important;
    }

    .toolkit {
        margin-top: 4rem;
    }

    .pricing-container {
        margin-top: 6rem;
    }

    .pricing-toggle {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .pricing-toggle .switch {
        margin: 0;
    }

    .vision-section {
        margin-top: 6rem;
    }
}


/* --- details.css --- */
.details {
    display: grid;
    grid-template-columns: 200px 1fr;
    row-gap: 1.5rem;
    column-gap: 2rem;
    padding: 1rem 0;

    label {
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--text-muted);
        font-weight: 400;
    }

    div, span, p {
        color: var(--text-main);
        line-height: 1.4;
    }
}

@media (max-width: 768px) {
    .details {
        grid-template-columns: 1fr;
    }
}

/* --- orders.css --- */
.order {
    tbody {
        &:has(.order-group) {
            tr {
                border: none;
            }
        }

        .order-group {
            border-left: 2px solid var(--accent-navy);

            > td > div {
                display: flex;
                width: 100%;
                align-items: center;
                gap: 1rem;
                padding: 1rem 0;
            }

            input {
                background: none;
                font-family: 'JetBrains Mono', monospace;
                font-size: 0.9rem;
            }
        }

        & > .order-group ~ .order-item {
            & > :first-child {
                padding-left: 3rem;
            }
        }

        &:hover {
            border-left: 2px solid var(--sun-color);
        }
    }
}

.order-items {
    padding: 0.5rem;

    tbody {
        border-left: 1px solid var(--color-primary);
    }

    table {
        width: 100%;
        margin-bottom: 0;
    }

    th {
        text-align: left;
        font-weight: bold;
    }

    td {
        width: 50%;
        padding: 0.5rem;
    }


    .add-item-after, .remove-item {
        background: none;
        border: none;
        cursor: pointer;
        font-size: 1.2rem;
        padding: 0.25rem;
    }
}

#order-groups-container > table {
    width: 100%;
    margin-bottom: 1rem;

    th {
        text-align: left;
        font-weight: bold;
    }

    .remove-group {
        background: none;
        border: none;
        cursor: pointer;
        font-size: 1.2rem;
        padding: 0.25rem;
    }
}

/* --- breadcrumbs.css --- */
.breadcrumbs {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;

    span {
        &:not(:last-child):after {
            content: "/";
            margin: 0 1rem;
            color: var(--glass-border);
        }

        a {
            color: var(--text-muted);
            text-decoration: none;
            transition: color 0.3s ease;

            &:hover {
                color: var(--text-main);
            }
        }
        
        &:last-child {
            color: var(--text-main);
            font-weight: 400;
        }
    }
}


/* --- dialog.css --- */
/* Dialog styles */
dialog, .modal {
    padding: 0;
    background-color: transparent;
    border: none;
    max-width: 100vw;
    max-height: 100vh;
    outline: none;
    color: var(--text-main);

    &[open] {
        display: grid;
        place-items: center;
        /* Ensure it covers viewport for backdrop but content centers */
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
        z-index: 1000;
    }

    &::backdrop {
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
        background: rgba(0,0,0,0.5);
    }

    .panel {
        width: 100%;
        max-width: 600px;
        box-sizing: border-box;
        margin: auto; /* Extra insurance for older browsers */
        background: var(--bg-primary);
    }

    .header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 2rem;

        h2 {
            margin: 0;
            font-family: 'Cormorant Garamond', serif;
            font-weight: 300;
            text-transform: lowercase;
            font-size: 2.2rem;
            color: var(--text-main);
        }
    }

    .close-button {
        background: none;
        border: none;
        font-family: 'JetBrains Mono', monospace;
        font-size: 1rem;
        cursor: pointer;
        color: var(--text-muted);
        transition: all 0.3s ease;

        &:hover {
            color: var(--text-main);
            transform: rotate(90deg);
        }
    }

    .body {
        margin-bottom: 2rem;
        font-family: inherit;
        color: var(--text-main);
        line-height: 1.6;
    }

    .footer {
        display: flex;
        justify-content: flex-end;
        gap: 1rem;
        margin-top: 2rem;
    }
}


/* --- pills.css --- */
/* Reusable pill component and Status indicators */
.pill, .info-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 2px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid var(--glass-border);
    white-space: nowrap;
    text-align: center;

    &.requested {
        background-color: var(--color-status-requested-light);
        color: var(--color-status-requested);
    }

    &.intake, &.contacted {
        background-color: var(--color-status-intake-light);
        color: var(--color-status-intake);
    }

    &.quoting, &.draft {
        background-color: var(--color-status-quoting-light);
        color: var(--color-status-quoting);
    }

    &.pending {
        background-color: var(--color-status-pending-light);
        color: var(--color-status-pending);
    }

    &.confirmed, &.converted, &.active, &.approved, &.available-tag, &.accepted, &.quoted {
        background-color: var(--color-status-confirmed-light);
        color: var(--color-status-confirmed);
    }

    &.refused, &.rejected, &.cancelled, &.busy-tag {
        background-color: var(--color-status-refused-light);
        color: var(--color-status-refused);
    }

    &.abandoned, &.archived, &.obsolete {
        background-color: var(--color-status-abandoned-light);
        color: var(--color-status-abandoned);
    }

    &.brand {
        background-color: var(--color-primary);
        color: var(--accent-navy);
        border-color: var(--color-primary);
        font-weight: 700;
    }

    /* Support for select inside pills (e.g. status dropdown) */
    select.themed-input {
        background-color: transparent !important;
        background-position: right 0 center;
        background-size: 12px;
        padding-right: 1.5rem !important;
        border: none !important;
        color: inherit !important;
        font-family: inherit !important;
        font-size: inherit !important;
        font-weight: inherit !important;
        text-transform: inherit !important;
        letter-spacing: inherit !important;
        height: auto !important;
        min-height: unset !important;
        cursor: pointer;
        box-shadow: none !important;
        width: auto;

        &:focus {
            outline: none !important;
            box-shadow: none !important;
        }
    }

    svg.ph-icon {
        width: 0.9rem;
        height: 0.9rem;
    }
}



.flex-column {
    display: flex;
    flex-direction: column;
}

.gap-1 { gap: 1rem; }
.gap-2 { gap: 2rem; }

.row {
    display: flex;
    flex-direction: row;
    width: 100%;
}

.items-center { align-items: center; }
.items-end { align-items: flex-end; }

.justify-between { justify-content: space-between; }

.header-actions {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.flex-1 { flex: 1; }
.large-text { font-size: 1.25rem; font-weight: 500; }
.text-danger { color: var(--color-status-refused) !important; }

/* Linked quotes in sidebar panels */
.quote-item-box {
    display: block;
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    margin-bottom: var(--space-md);
    cursor: pointer;
    transition: all 0.2s ease;

    &:hover {
        background: var(--glass-bg-hover);
        border-color: var(--color-primary);
        transform: translateX(4px);
    }

    .quote-number {
        font-family: var(--font-mono);
        font-weight: 700;
        font-size: 1rem;
        color: var(--color-primary);
        text-decoration: none;

        &:hover {
            text-decoration: underline;
        }
    }

    .quote-price {
        font-family: var(--font-mono);
        font-size: 1rem;
        font-weight: 400; /* Not bold */
        color: var(--color-primary);
    }
}
/* Unified Tab Navigation Styles */
.tabs {
    display: flex;
    gap: 2rem;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 3rem;

    .tab-item {
        background: none;
        border: none;
        padding: 1rem 0;
        cursor: pointer;
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--text-muted);
        border-bottom: 2px solid transparent;
        transition: all 0.3s ease;
        text-decoration: none;
        display: flex;
        align-items: center;

        &:hover {
            background: none !important;
            box-shadow: 0 8px 12px -8px var(--sun-color) !important;
            color: var(--text-main);
            border-bottom-color: var(--color-primary);
        }

        &.active {
            color: var(--color-primary);
            border-bottom-color: var(--color-primary);
            background: none !important;
            box-shadow: none !important;
        }
    }
}

.tabs-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 3rem;

    .tabs {
        border-bottom: none;
        margin-bottom: 0;
    }

    .header-actions {
        padding-bottom: 0.25rem;
    }
}

/* Tab content for in-page switching (like Settings) */
.tab-content {
    display: none;

    &.active {
        display: block;
        animation: tabsFadeIn 0.3s ease;
    }
}

@keyframes tabsFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}


/* --- admin.css --- */
/* --- Admin Styles --- */

.admin-tenants {
    margin: 0;
    width: 100%;
}

.delete-action {
    color: var(--color-status-refused);
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
}

.delete-action:hover {
    text-decoration: underline;
}


/* --- people.css --- */
/* Styles moved to pills.css */


/* --- quotes.css --- */
/* --- Public Quote View Styles --- */

.quote-public-container {
    max-width: 900px;
    margin: 0 auto;
}

.section-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--bg-greenhouse-lines);
    padding-bottom: 0.5rem;
}

.proposal-story {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-style: italic;
    line-height: 1.8;
    color: var(--text-main);
}

.quote-table {
    width: 100%;
    border-collapse: collapse;
}

.quote-table th, .quote-table td {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--bg-greenhouse-lines);
}

/* Align columns without using utility classes */
.quote-table th:nth-child(2), 
.quote-table td:nth-child(2),
.quote-table th:nth-child(3), 
.quote-table td:nth-child(3) {
    text-align: right;
}

.venue-row td {
    background: rgba(10, 25, 47, 0.03);
    font-weight: 500;
    border-bottom: 1px solid var(--bg-greenhouse-lines);
    text-align: left !important;
}

.total-row td {
    font-size: 1.2rem;
    font-weight: bold;
    border-bottom: none;
    padding-top: 2rem;
}

.approved-on {
    font-size: 1rem;
    color: var(--color-primary);
    letter-spacing: 0.1em;
}

.remarks ol {
    padding-left: 1.5rem;
}

:root {
    --font-size: 16px;
    --border-radius: 2px; /* Sharp corners as per Greenhouse spec */

    /* Spacing Tokens */
    --space-none: 0;
    --space-xs: 0.25rem;  /* 4px */
    --space-sm: 0.5rem;   /* 8px */
    --space-md: 1rem;     /* 16px */
    --space-lg: 1.5rem;   /* 24px */
    --space-xl: 2rem;     /* 32px */
    --space-2xl: 3rem;    /* 48px */
    --space-3xl: 4rem;    /* 64px */
    --space-4xl: 6rem;    /* 96px */
}


/* Design System Helpers (Not for production use) */
.ds-do {
    border-top: 4px solid var(--color-form-success) !important;
    padding: 1rem !important;
    background: rgba(90, 122, 90, 0.05) !important;
}
.ds-dont {
    border-top: 4px solid var(--color-form-error) !important;
    padding: 1rem !important;
    background: rgba(140, 74, 74, 0.05) !important;
}
.ds-grid-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
}
.ds-space-block {
    background: var(--color-primary);
    opacity: 0.3;
    height: 2rem;
}


/* Theme Variables */
:root[data-theme="light"] {
    --bg-primary: #F9F7F2; /* Textured Cream */
    --bg-greenhouse-lines: rgba(2, 43, 33, 0.05);
    --sun-color: rgba(255, 191, 0, 0.4); /* Brand Amber */
    --text-main: #1A1A1A;
    --text-muted: #555555;
    --accent-navy: #0A192F; /* Brand Navy */
    --glass-bg: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(255, 255, 255, 0.6);

    --color-background: var(--bg-primary);
    --color-text: var(--text-main);
    --color-text-secondary: var(--text-muted);
    --color-border-light: var(--glass-border);
    --color-text-light: white;
    --color-primary: #E5B76E;
    --color-primary-hover: #D4A65E;
    --color-primary-text: var(--accent-navy);
    --color-link: #C99A2E;
    --color-link-visited: #A88125;
    --color-link-hover: #D9AA3F;
    
    --color-form-background: var(--glass-bg);
    --color-form-border: var(--glass-border);
    --color-form-border-focus: var(--accent-navy);
    --color-form-text: var(--text-main);
    --color-form-placeholder: var(--text-muted);
    --color-form-shadow: rgba(0, 0, 0, 0.05);
    --color-form-error: #8C4A4A;
    --color-form-success: #5A7A5A;
    --color-form-disabled-bg: rgba(0, 0, 0, 0.05);
    --color-form-disabled-text: var(--text-muted);

    --color-status-requested: #5D70A3; /* Dusty Delphinium Blue */
    --color-status-requested-light: rgba(93, 112, 163, 0.1);
    --color-status-intake: #5A7A8C;
    --color-status-intake-light: rgba(90, 122, 140, 0.1);
    --color-status-quoting: #8A4F7D;
    --color-status-quoting-light: rgba(138, 79, 125, 0.1);
    --color-status-pending: #B37D52; /* Apricot/Terracotta */
    --color-status-pending-light: rgba(179, 125, 82, 0.1);
    --color-status-confirmed: #5A7A5A;
    --color-status-confirmed-light: rgba(90, 122, 90, 0.1);
    --color-status-refused: #8C4A4A;
    --color-status-refused-light: rgba(140, 74, 74, 0.1);
    --color-status-abandoned: #777;
    --color-status-abandoned-light: rgba(100, 100, 100, 0.1);

    --color-nav-gradient-start: var(--color-primary);
    --color-nav-gradient-end: var(--color-primary-hover);
    --color-nav-shadow: rgba(0, 0, 0, 0.05);

    --color-message-bg: var(--glass-bg);
    --color-message-border: var(--glass-border);
    --color-message-text: var(--text-main);
    --color-error-bg: rgba(140, 74, 74, 0.1);
    --color-error-border: rgba(140, 74, 74, 0.3);
    --color-error-text: var(--color-status-refused);
    --color-warning-bg: rgba(179, 125, 82, 0.1);
    --color-warning-border: rgba(179, 125, 82, 0.3);
    --color-warning-text: var(--color-status-pending);
    --color-info-bg: rgba(90, 122, 140, 0.1);
    --color-info-border: rgba(90, 122, 140, 0.3);
    --color-info-text: var(--color-status-intake);
}

:root[data-theme="dark"] {
    --bg-primary: #0B1210; /* Deep Ink/Forest */
    --bg-greenhouse-lines: rgba(255, 255, 255, 0.03);
    --sun-color: rgba(255, 191, 0, 0.15); /* Muted Amber Glow */
    --text-main: #E0E0E0;
    --text-muted: #A0A0A0;
    --accent-navy: #12263F;
    --glass-bg: rgba(15, 25, 22, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);

    --color-background: var(--bg-primary);
    --color-text: var(--text-main);
    --color-text-secondary: var(--text-muted);
    --color-border-light: var(--glass-border);
    --color-text-light: #e0e0e0;
    --color-primary: #E5C690;
    --color-primary-hover: #F5D6A0;
    --color-primary-text: #1A2B48;
    --color-link: #D9AA3F;
    --color-link-visited: #C99A2E;
    --color-link-hover: #E9BA4F;

    --color-form-background: var(--glass-bg);
    --color-form-border: var(--glass-border);
    --color-form-border-focus: var(--accent-navy);
    --color-form-text: var(--text-main);
    --color-form-placeholder: var(--text-muted);
    --color-form-shadow: rgba(0, 0, 0, 0.2);
    --color-form-error: #E0B0B0;
    --color-form-success: #B8E0C5;
    --color-form-disabled-bg: rgba(255, 255, 255, 0.05);
    --color-form-disabled-text: var(--text-muted);

    --color-status-requested: #7D8EB3; /* Dusty Blue (Dark) */
    --color-status-requested-light: rgba(125, 142, 179, 0.15);
    --color-status-intake: #A0C0D0;
    --color-status-intake-light: rgba(160, 192, 208, 0.15);
    --color-status-quoting: #B080A0;
    --color-status-quoting-light: rgba(176, 128, 160, 0.15);
    --color-status-pending: #C59275; /* Warm Apricot (Dark) */
    --color-status-pending-light: rgba(197, 146, 117, 0.15);
    --color-status-confirmed: #8DAD84;
    --color-status-confirmed-light: rgba(141, 173, 132, 0.15);
    --color-status-refused: #CD5C5C;
    --color-status-refused-light: rgba(205, 92, 92, 0.15);
    --color-status-abandoned: #888;
    --color-status-abandoned-light: rgba(136, 136, 136, 0.15);

    --color-nav-gradient-start: var(--color-primary);
    --color-nav-gradient-end: #D4B580;
    --color-nav-shadow: rgba(0, 0, 0, 0.3);

    --color-message-bg: var(--glass-bg);
    --color-message-border: var(--glass-border);
    --color-message-text: var(--text-main);
    --color-error-bg: rgba(224, 176, 176, 0.1);
    --color-error-border: rgba(224, 176, 176, 0.3);
    --color-error-text: var(--color-status-refused);
    --color-warning-bg: rgba(197, 146, 117, 0.1);
    --color-warning-border: rgba(197, 146, 117, 0.3);
    --color-warning-text: var(--color-status-pending);
    --color-info-bg: rgba(160, 192, 208, 0.1);
    --color-info-border: rgba(160, 192, 208, 0.3);
    --color-info-text: var(--color-status-intake);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --bg-primary: #0B1210;
        --bg-greenhouse-lines: rgba(255, 255, 255, 0.03);
        --sun-color: rgba(255, 191, 0, 0.15);
        --text-main: #E0E0E0;
        --text-muted: #A0A0A0;
        --accent-navy: #12263F;
        --glass-bg: rgba(15, 25, 22, 0.6);
        --glass-border: rgba(255, 255, 255, 0.1);

        --color-background: var(--bg-primary);
        --color-text: var(--text-main);
        --color-text-secondary: var(--text-muted);
        --color-border-light: var(--glass-border);
        --color-text-light: #e0e0e0;
        --color-primary: #E5C690;
        --color-primary-hover: #F5D6A0;
        --color-primary-text: #1A2B48;
        --color-link: #D9AA3F;
        --color-link-visited: #C99A2E;
        --color-link-hover: #E9BA4F;

        --color-form-background: var(--glass-bg);
        --color-form-border: var(--glass-border);
        --color-form-border-focus: var(--accent-navy);
        --color-form-text: var(--text-main);
        --color-form-placeholder: var(--text-muted);
        --color-form-error: #E0B0B0;
        --color-form-success: #B8E0C5;

        --color-status-requested: #E5C690;
        --color-status-requested-light: rgba(229, 198, 144, 0.15);
        --color-status-intake: #A0C0D0;
        --color-status-intake-light: rgba(160, 192, 208, 0.15);
        --color-status-quoting: #B080A0;
        --color-status-quoting-light: rgba(176, 128, 160, 0.15);
        --color-status-pending: #D4B580;
        --color-status-pending-light: rgba(212, 181, 128, 0.15);
        --color-status-confirmed: #8DAD84;
        --color-status-confirmed-light: rgba(141, 173, 132, 0.15);
        --color-status-refused: #CD5C5C;
        --color-status-refused-light: rgba(205, 92, 92, 0.15);
        --color-status-abandoned: #888;
        --color-status-abandoned-light: rgba(136, 136, 136, 0.15);
    }
}

/* --- Core Component Systems --- */

/* 1. Unified Button System */
button, a.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: var(--border-radius);
    line-height: 1;
    text-decoration: none;
    background: none;
    border: 1px solid var(--accent-navy);
    color: var(--text-main);
    height: 3rem;
    box-sizing: border-box;
    white-space: nowrap;

    svg.ph-icon {
        flex-shrink: 0;
    }

    /* Default Hover (Fallback) */
    &:hover {
        background: var(--accent-navy);
        color: #FFF;
        box-shadow: 0 0 15px var(--sun-color);
    }

    &.primary {
        border-color: var(--color-primary);
        color: var(--text-main);
        
        &:hover {
            background: var(--color-primary);
            color: var(--accent-navy);
            box-shadow: 0 0 15px var(--sun-color);
        }
    }

    &.secondary {
        background: var(--glass-bg);
        border-color: var(--glass-border);
        
        &:hover {
            background: var(--glass-border);
            border-color: var(--text-muted);
            color: var(--text-main);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }
    }

    &.ghost {
        border-color: transparent;
        background: none;
        
        &:hover {
            background: rgba(0, 0, 0, 0.05);
            box-shadow: none;
            color: var(--text-main);
        }
    }

    &.danger {
        background: rgba(140, 74, 74, 0.1);
        color: #8C4A4A;
        border-color: rgba(140, 74, 74, 0.3);

        &:hover {
            background: #8C4A4A;
            color: white;
            border-color: #8C4A4A;
            box-shadow: 0 0 15px rgba(140, 74, 74, 0.4);
        }
    }

    /* Sizes */
    &.sm {
        height: 2rem;
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
    }

    &.lg {
        height: 3.5rem;
        padding: 1rem 2.5rem;
        font-size: 1rem;
    }
}

[data-theme="dark"] {
    button, .btn {
        border-color: var(--glass-border);

        &.ghost {
            border-color: transparent;
        }

        &.primary {
            border-color: var(--color-primary);
        }

        &.ghost:hover {
            background: rgba(255, 255, 255, 0.05);
            box-shadow: none !important;
        }

        &.secondary:hover {
            background: var(--glass-border);
            box-shadow: none;
        }
    }
}

/* 2. Greenhouse Panel (Container) System */
.panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    backdrop-filter: blur(12px) saturate(120%);
    border: 1px solid var(--glass-border);
    padding: var(--space-xl);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden; /* Keep glass effect contained */

    /* Implicit spacing for children to reduce utility classes */
    & > *:first-child { margin-top: 0; }
    & > *:last-child { margin-bottom: 0; }

    &.interactive {
        cursor: pointer;
        
        &:hover {
            transform: translateY(-4px);
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
            border-color: var(--color-primary);
        }
    }

    &.highlighted {
        border-color: var(--color-primary);
        box-shadow: 0 0 20px var(--sun-color);
    }

    &.flat {
        box-shadow: none;
    }

    /* Modifiers to reduce utility usage */
    &.compact {
        padding: var(--space-md);
    }

    &.flush {
        padding: 0;
    }

    &.centered {
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
        padding: 4rem 2rem;
    }

    &.sidebar {
        background: rgba(var(--accent-navy), 0.02);
        border-right: 1px solid var(--glass-border);
        border-left: none;
        border-top: none;
        border-bottom: none;
        border-radius: 0;
        backdrop-filter: blur(20px);
    }
}

[data-theme="dark"] .panel {
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    
    &.interactive:hover {
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    }
}

/* 3. Layout Grid Utilities */
.g-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--space-xl);

    &.auto {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    &.compact {
        gap: 0;
    }

    &.halves {
        grid-template-columns: 1fr 1fr;
    }
}

.g-col-1  { grid-column: span 1; }
.g-col-2  { grid-column: span 2; }
.g-col-3  { grid-column: span 3; }
.g-col-4  { grid-column: span 4; }
.g-col-5  { grid-column: span 5; }
.g-col-6  { grid-column: span 6; }
.g-col-7  { grid-column: span 7; }
.g-col-8  { grid-column: span 8; }
.g-col-9  { grid-column: span 9; }
.g-col-10 { grid-column: span 10; }
.g-col-11 { grid-column: span 11; }
.g-col-12 { grid-column: span 12; }

.g-gap {
    &.xs { gap: var(--space-xs); }
    &.sm { gap: var(--space-sm); }
    &.md { gap: var(--space-md); }
    &.lg { gap: var(--space-lg); }
    &.xl { gap: var(--space-xl); }
}

/* 4. Header Groups */
.header-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: var(--space-2xl);

    &.row {
        flex-direction: row;
        justify-content: space-between;
        align-items: baseline;
    }

    .title {
        margin: 0;
        line-height: 1;
    }

    .meta {
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--text-muted);
    }
}

.icon-header {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--color-primary);
}

.info-section {
    margin: 3rem 0;
    width: 100%;
}

.section-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.step-card {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;

    .step-icon {
        font-size: 2rem;
        color: var(--color-primary);
        flex-shrink: 0;
        
        &.confirmed { color: var(--color-primary); }
        &.pending { opacity: 0.6; }
        &.intake { color: var(--sun-color); }
    }

    h4 {
        margin: 0 0 0.5rem 0;
        font-family: 'Cormorant Garamond', serif;
        font-size: 1.25rem;
    }

    .data-text {
        margin: 0;
        opacity: 0.8;
    }
}


* {
    box-sizing: border-box;
    line-height: 1.6;
}

html {
    font-size: var(--font-size);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) transparent;
}

html.no-transition body,
html.no-transition .dynamic-sun {
    transition: none !important;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;

    background-color: var(--bg-primary);
    color: var(--text-main);
    overflow-x: hidden;
    /* Greenhouse Grid Overlay */
    background-image: 
        linear-gradient(var(--bg-greenhouse-lines) 1px, transparent 1px),
        linear-gradient(90deg, var(--bg-greenhouse-lines) 1px, transparent 1px);
    background-size: 100px 100px; /* Large architectural panes */
    transition: background-color 0.8s ease;
}

/* The Sun Element */
.dynamic-sun {
    position: fixed;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--sun-color) 0%, transparent 70%);
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
    transition: all 2s cubic-bezier(0.4, 0, 0.2, 1);
    top: 10%;
    left: 70%;
}

/* Greenhouse Layout Classes */
.main-layout {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--space-xl);
    padding: 0 4rem;
    max-width: 100vw;
}

.nav-stem {
    grid-column: span 2;
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 4rem 2rem 4rem 0;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;

    /* Hide scrollbar for clean editorial look but allow scrolling */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
    &::-webkit-scrollbar {
        display: none;
    }

    .top {
        margin-bottom: 4rem;

        .brand {
            text-decoration: none;
            font-size: 2rem;
            font-family: 'Cormorant Garamond', serif;
            color: var(--color-primary);
            text-transform: lowercase;
        }
    }

    .menu {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;

    }

    .bottom {
        margin-top: auto;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        padding-top: 2rem;
        border-top: 1px solid var(--bg-greenhouse-lines);

        & > .nav-controls {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
    }

    a.data-text {
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        
        span {
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.15em;
            font-weight: 500;
        }
    }
}

.mobile-menu-toggle {
    display: none;
}

.theme-switcher {
    display: flex;
    align-items: center;

    .sun-icon { display: none; }
    .moon-icon { display: block; }
}

[data-theme="dark"] .theme-switcher {
    .sun-icon { display: block; }
    .moon-icon { display: none; }
}

.content-area {
    margin: 4rem 0;
    grid-column: 3 / 13;
    display: flex;
    flex-direction: column;

    & > div:first-child {
        flex-grow: 1;
    }
}

footer.data-text {
    opacity: 0.3;
    padding-top: 4rem;
    padding-bottom: 2rem;
    font-size: 0.65rem;

    a {
        color: inherit;
        text-decoration: underline;
    }
}

@media (max-width: 1024px) {
    .layout-container {
        grid-template-columns: 1fr;
        padding: 2rem 1.5rem;
    }

    main[style*="grid-column: span 8"] {
        grid-column: 1 / -1 !important;
    }

    aside.g-col-4 {
        grid-column: 1 / -1 !important;
    }

    .meeting-item .row.items-center.justify-between {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .meeting-item .meeting-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .sidebar-header-action span {
        display: none;
    }
}

/* Hide button text on medium screens if it gets too cramped */
@media (max-width: 1440px) {
    .sidebar-header-action span {
        display: none;
    }
}

/* --- Responsive Adaptations (Mobile Friendly) --- */

@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
        padding: 0 1.5rem;
    }

    .nav-stem {
        grid-column: 1;
        height: auto;
        max-height: none;
        position: sticky;
        top: 0;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        background: var(--color-background); /* Non-transparent */
        backdrop-filter: none;
        z-index: 1000;
        margin: 0 -1.5rem; /* Full width bleed */
        padding: 1rem 1.5rem;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start; /* Sit items together */
        gap: 1rem;
        overflow: visible; /* Fix: allow dropdown to be seen */
    }

    .nav-stem .top {
        margin-bottom: 0;

        small, br {
            display: none;
        }
    }

    .nav-stem .menu {
        display: none; /* Hidden by default on mobile */
        
        &.active {
            display: flex;
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: var(--color-background); /* Non-transparent, matches bar */
            backdrop-filter: none;
            padding: 2rem 1.5rem;
            border-bottom: 1px solid var(--glass-border);
            flex-direction: column;
            gap: 1.5rem;
            z-index: 999;
        }
    }

    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        color: var(--color-primary);
        cursor: pointer;
        padding: 0.5rem;
        order: 2; /* Put it after the brand */
        height: auto;
        width: auto;
        min-width: 0;
        margin-left: 0.5rem; /* Direct proximity to name */

        &:hover {
            background: rgba(0, 0, 0, 0.05);
            border-radius: var(--border-radius);
            color: var(--color-primary);
            box-shadow: none;
        }

        [data-theme="dark"] & {
            &:hover {
                background: rgba(255, 255, 255, 0.05);
            }
        }

        svg {
            width: 24px;
            height: 24px;
        }
    }

    .nav-stem .bottom {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
        flex-direction: row;
        align-items: center;
        gap: 1.5rem;
        order: 3;
        margin-left: auto; /* Push to the right */

        a.data-text span {
            display: none;
        }
    }

    .content-area {
        grid-column: 1;
        margin: 2rem 0;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero .hero-actions {
        flex-direction: column;
        width: 100%;
    }
}

/* Page Headers */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2rem;
    /*margin-bottom: 4rem;*/
}

.page-header h1 {
    margin: 0;
    font-size: 3.5rem;
}

@media (max-width: 1024px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 3rem;
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6, .serif-heading {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    letter-spacing: -0.02em;
    color: var(--text-main);
    text-transform: lowercase;
    margin: 0 0 1rem 0;
}

h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); }
h2 { font-size: clamp(2rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 1.8rem); }

.data-text, small, li {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

/* Basic link styling */
a {
    color: var(--color-link);
    text-decoration: underline;

    &.external:after {
        content: " \2197";
    }

    &:visited {
        color: var(--color-link-visited);
    }

    &:hover {
        color: var(--color-link-hover);
    }

    &.email-link {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        color: var(--color-primary);
        text-decoration: none;
    }
}

p.disabled {
    color: var(--color-text-secondary);
}

.message {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    border-width: 1px;
    border-style: solid;

    &.notification, &.notice, &.info {
        background-color: var(--color-info-bg);
        border: 1px solid var(--color-info-border);
        color: var(--color-info-text);
    }

    &.warning {
        background-color: var(--color-warning-bg);
        border-color: var(--color-warning-border);
        color: var(--color-warning-text);
    }

    &.error {
        background-color: var(--color-error-bg);
        border-color: var(--color-error-border);
        color: var(--color-error-text);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }
}

div.actions, form.actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;

    &.row {
        flex-direction: row;
    }

    &.center {
        justify-content: center;
    }

    &.end {
        justify-content: flex-end;
    }
}

/* Location details styling */
.location-details {
    margin-top: 10px;
    padding-left: 15px;
    border-left: 3px solid var(--color-primary);

    p {
        margin: 5px 0;
    }
}

.address {
    span {
        display: inline-block;
    }
}

/* Contact list styling */
ul.contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.page-wrapper {
    display: contents; /* Let children use main grid */
}

/* Phosphor Icons */
svg.ph-icon {
    width: 1.2rem;
    height: 1.2rem;
    vertical-align: text-bottom;
}

/* --- Master Layout: 3-Pane (Nav | Content | Info) --- */
.master-layout-3-pane {
    display: flex;
    min-height: calc(100vh - 8rem);
    margin: -4rem 0; /* Negate content-area margin */
}

.primary-pane {
    flex: 1;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.primary-pane .form-container {
    width: 100%;
    max-width: 500px;
}

.info-sidebar {
    width: 400px;
    background: var(--bg-greenhouse-lines);
    border-left: 1px solid var(--glass-border);
    padding: clamp(2rem, 5vh, 4rem);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 8rem);
    position: sticky;
    top: 4rem;
    overflow: hidden;
}

.info-sidebar .decorative-branches {
    position: absolute;
    top: -5%;
    right: -100%;
    width: 400%;
    height: 180%;
    opacity: 0.3;
    background-color: var(--color-primary);
    transform: rotate(-8deg);
    pointer-events: none;
    animation: none;
    -webkit-mask-image: var(--bouquet-url);
    mask-image: var(--bouquet-url);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

[data-theme="dark"] .info-sidebar .decorative-branches {
    opacity: 0.15;
}

.info-sidebar .sidebar-content {
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 4vh, 3rem);
    height: 100%;
}

.info-sidebar .value-props h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.6rem, 3.5vh, 2.2rem);
    font-weight: 300;
    margin: 1rem 0 clamp(1rem, 2vh, 2rem);
    line-height: 1.2;
}

.info-sidebar .value-props ul {
    list-style: none;
    padding: 0;
}

.info-sidebar .value-props li {
    margin-bottom: clamp(0.4rem, 1vh, 0.75rem);
}

.info-sidebar .testimonial-card {
    margin-top: auto;
}

.info-sidebar .testimonial-card .quote {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: clamp(1.1rem, 2.2vh, 1.4rem);
    line-height: 1.4;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.info-sidebar .sidebar-footer {
    margin-top: clamp(1.5rem, 3vh, 2rem);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    opacity: 0.7;
}

.info-sidebar .sidebar-footer p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

@media (max-width: 1024px) {
    .master-layout-3-pane {
        flex-direction: column;
        margin: 0;
    }
    
    .primary-pane {
        padding: 4rem 1.5rem;
    }

    .info-sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-left: none;
        border-top: 1px solid var(--glass-border);
        padding: 4rem 1.5rem;
    }
}

.eyebrow {
    font-size: 0.7rem;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
    display: block;
}

.d-none {
    display: none !important;
}

.user-type-selector {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.radio-card {
    flex: 1;
    cursor: pointer;
    position: relative;
}

.radio-card input {
    position: absolute;
    opacity: 0;
}

.radio-card-content {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    background: var(--bg-greenhouse-lines);
    transition: all 0.3s ease;
    text-align: center;
}

.radio-card input:checked + .radio-card-content {
    border-color: var(--color-primary);
    background: var(--glass-bg);
    box-shadow: 0 0 15px var(--sun-color);
}

.radio-card .title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
}



/* Quote Specific Styling */
.table-group-header {
    background: rgba(0, 0, 0, 0.02);
}

.quote-totals {
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

.pl-xl { padding-left: var(--space-xl) !important; }
.pr-xl { padding-right: var(--space-xl) !important; }
.py-3 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
.pt-3 { padding-top: 3rem !important; }
.pb-3 { padding-bottom: 3rem !important; }
.gap-3 { gap: 3rem; }
.full-width { width: 100%; }

[data-theme="dark"] .table-group-header {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .quote-totals {
    background: rgba(255, 255, 255, 0.01) !important;
}

/* Utilities */
.mt-1 { margin-top: 1rem !important; }
.mt-2 { margin-top: 2rem !important; }
.mb-1 { margin-bottom: 1rem !important; }
.mb-2 { margin-bottom: 2rem !important; }
.ml-1 { margin-left: 1rem !important; }
.mr-1 { margin-right: 1rem !important; }

.p-1 { padding: 1rem !important; }
.p-2 { padding: 2rem !important; }
.p-sm { padding: 0.5rem !important; }

.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-muted { color: var(--text-muted) !important; }
.font-bold { font-weight: bold !important; }
.d-block { display: block !important; }
.items-center { align-items: center !important; }
.justify-end { justify-content: flex-end !important; }

/* Meetings & AI Suggestions Styling */
.loading-pulse {
    animation: pulse-animation 2s infinite ease-in-out;
}

.loading-spin {
    display: inline-block;
    animation: spin-animation 1.5s infinite linear;
}

@keyframes pulse-animation {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes spin-animation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tabs Navigation for Meetings Index */
.tabs-container {
    display: flex;
    justify-content: flex-start;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: var(--space-lg);
}

.tab-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: -1px;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid transparent;
    border-bottom: none;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    transition: all 0.3s ease;
    background: transparent;
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(var(--color-primary), 0.03);
}

.tab-btn.active {
    color: var(--color-primary);
    background: var(--bg-greenhouse-lines);
    border-color: var(--glass-border);
    border-bottom: 1px solid var(--bg-greenhouse-lines);
    font-weight: bold;
}

/* AI suggestions border indicator */
.border-left-active {
    border-left: 3px solid var(--color-primary);
}

.mb-sm { margin-bottom: 0.5rem !important; }
.mt-sm { margin-top: 0.5rem !important; }

