:root {
    --pastel-lilac: #d9d7f1;
    --pastel-mint: #c7e9b0;
    --pastel-peach: #f9e0d9;
    --deep-slate: #343957;
    --ink: #1d1f2b;
    --white: #ffffff;
    --border: rgba(52, 57, 87, 0.1);
    --radius-xl: 28px;
    font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top, rgba(217, 215, 241, 0.7), rgba(249, 224, 217, 0.4)), #f3f5f9;
    color: var(--ink);
}

.bg-haze {
    background-color: transparent;
}
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    z-index: 0;
}
.bg-glow--one {
    width: 420px;
    height: 420px;
    top: -120px;
    right: 5%;
    background: linear-gradient(135deg, #b5b0ff, #ffb3c1);
}
.bg-glow--two {
    width: 320px;
    height: 320px;
    bottom: 5%;
    left: 10%;
    background: linear-gradient(135deg, #6edcc4, #d9d7f1);
}
.bg-grid {
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(52,57,87,0.12) 1px, transparent 0);
    background-size: 40px 40px;
    opacity: 0.2;
    pointer-events: none;
    z-index: 0;
}

.neo-nav {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5vw;
    backdrop-filter: blur(24px);
    background: rgba(255, 255, 255, 0.65);
    border-bottom: 1px solid var(--border);
    z-index: 5;
}

.neo-nav__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-dot {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--pastel-lilac), var(--pastel-mint));
    box-shadow: 0 15px 35px rgba(217, 215, 241, 0.6);
}

.brand-label {
    font-weight: 600;
    margin: 0;
}

.brand-sub {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.7;
}

.neo-nav__links a {
    text-decoration: none;
    color: var(--ink);
    margin-left: 1rem;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
}

.neo-nav__links a.active {
    background: rgba(52, 57, 87, 0.08);
}

.app-shell {
    padding: 3rem 5vw 5rem;
    position: relative;
    z-index: 1;
}

.content-card {
    background: rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(52, 57, 87, 0.1);
    position: relative;
}
.toast-stack {
    position: fixed;
    top: 90px;
    right: 5vw;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 20;
}

.profile-hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.75rem;
    color: rgba(29, 31, 43, 0.6);
    margin-bottom: 0.5rem;
}

.lede {
    max-width: 48ch;
    color: rgba(29, 31, 43, 0.8);
}

.hero-card {
    min-width: 220px;
    padding: 1.5rem;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(199, 233, 176, 0.85), rgba(217, 215, 241, 0.9));
    box-shadow: inset 0 1px 15px rgba(255, 255, 255, 0.6);
}

.hero-title {
    margin: 0;
    font-weight: 600;
}

.hero-value {
    font-size: 2rem;
    margin: 0.25rem 0;
}

.hero-hint {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.7;
}

.wizard-grid {
    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr;
    gap: 2.5rem;
}
.wizard-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.wizard-pill {
    background: rgba(255,255,255,0.75);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 0.85rem 1.25rem;
    min-width: 140px;
    box-shadow: 0 12px 25px rgba(13,29,44,0.08);
}
.wizard-pill span {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
    color: rgba(13,29,44,0.6);
}
.wizard-pill strong {
    font-size: 1.25rem;
    font-weight: 600;
}

.wizard-progress {
    background: rgba(255, 255, 255, 0.65);
    border-radius: 24px;
    padding: 1.5rem;
    border: 1px solid var(--border);
}

.wizard-progress ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wizard-progress li {
    position: relative;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    margin-bottom: 0.5rem;
    border-radius: 16px;
    background: rgba(52, 57, 87, 0.04);
    cursor: pointer;
}

.wizard-progress li::before {
    content: '';
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--deep-slate);
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.wizard-progress li.active {
    background: linear-gradient(135deg, rgba(217, 215, 241, 0.8), rgba(249, 224, 217, 0.8));
}

.wizard-progress li.active::before {
    background: var(--deep-slate);
}

.timeline-foot {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.wizard-callout {
    margin-top: 1.25rem;
    border-radius: 18px;
    border: 1px dashed rgba(52,57,87,0.3);
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.6);
}
.wizard-callout summary {
    cursor: pointer;
    font-weight: 600;
}
.wizard-callout p {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    color: rgba(13,29,44,0.75);
}
.wizard-callout .mini {
    font-size: 0.8rem;
    opacity: 0.75;
}

form#profileWizard {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wizard-step {
    border: 1px solid var(--border);
    border-radius: 32px;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    display: none;
}

.wizard-step.active {
    display: block;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}
.field-grid.narrow {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.field-grid.narrow textarea {
    min-height: 72px;
}

label {
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

input,
select,
textarea {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.8);
}

footer {
    margin-top: 2rem;
    display: flex;
    gap: 0.75rem;
}
.summary-actions {
    flex-wrap: wrap;
}

button {
    font-family: inherit;
    border: none;
    cursor: pointer;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

button.primary {
    background: var(--deep-slate);
    color: var(--white);
    border-radius: 999px;
    padding: 0.85rem 1.75rem;
}

button.ghost {
    background: rgba(52, 57, 87, 0.08);
    color: var(--deep-slate);
    border-radius: 999px;
    padding: 0.85rem 1.75rem;
}
.btn.primary {
    background: var(--deep-slate);
    color: var(--white);
    border-radius: 999px;
    padding: 0.85rem 1.75rem;
}
.btn.ghost {
    background: rgba(52, 57, 87, 0.08);
    color: var(--deep-slate);
    border-radius: 999px;
    padding: 0.85rem 1.75rem;
}

.chip {
    border-radius: 18px;
    padding: 0.65rem 1.25rem;
    background: rgba(249, 224, 217, 0.6);
    border: 1px dashed rgba(52, 57, 87, 0.2);
}

.card-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card-stack::before {
    content: attr(data-empty);
    font-size: 0.95rem;
    color: rgba(52, 57, 87, 0.6);
    padding: 1rem;
    border: 1px dashed var(--border);
    border-radius: 24px;
    text-align: center;
}

.card-stack.has-items::before {
    display: none;
}

.asset-card,
.condition-card {
    border-radius: 24px;
    border: 1px solid var(--border);
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.04);
}

.asset-card header,
.condition-card header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.asset-card h3,
.condition-card h3 {
    margin: 0;
    font-size: 1rem;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.card-actions button {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
}
.stack-actions {
    margin: 1rem 0;
    display: flex;
    gap: 0.75rem;
}
.terms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.terms-grid textarea {
    width: 100%;
    min-height: 120px;
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 0.85rem 1rem;
    font-family: inherit;
}
.toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

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

.summary-panels dl {
    margin: 0;
}

dl dt {
    font-weight: 600;
    margin-top: 1rem;
}

dl dd {
    margin: 0;
    color: rgba(52, 57, 87, 0.7);
}

.json-panel {
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.85);
    color: #d1f5ff;
}

.json-panel__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

#jsonPreview {
    margin: 0;
    white-space: pre-wrap;
    font-family: 'JetBrains Mono', 'Space Grotesk', monospace;
    font-size: 0.85rem;
}

.badge {
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge.idle {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

.badge.success {
    background: rgba(199, 233, 176, 0.3);
    color: #d0ffd6;
}

.badge.error {
    background: rgba(255, 99, 132, 0.4);
    color: #ffe3ea;
}

.toast-inline {
    padding: 0.85rem 1.25rem;
    border-radius: 16px;
    background: rgba(255,255,255,0.85);
    box-shadow: 0 15px 35px rgba(13,29,44,0.12);
    border: 1px solid rgba(13,29,44,0.05);
}

.toast-inline.success {
    background: rgba(199, 233, 176, 0.45);
}

.toast-inline.danger {
    background: rgba(255, 99, 132, 0.2);
}

.hint {
    font-size: 0.9rem;
    color: rgba(52, 57, 87, 0.7);
    margin-top: 0.75rem;
}
.page-head {
    margin-bottom: 2rem;
}
.home-hero {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(280px, 420px);
    gap: 2.5rem;
    align-items: center;
    margin-bottom: 2.5rem;
}
.hero-cta {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}
.hero-panel {
    background: rgba(255,255,255,0.72);
    border-radius: 28px;
    padding: 2rem;
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 25px 45px rgba(13,29,44,0.12);
    backdrop-filter: blur(24px);
}
.hero-meter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.hero-meter strong {
    font-size: 1.5rem;
    font-weight: 600;
}
.hero-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: hero;
}
.hero-steps li {
    position: relative;
    padding-left: 2.5rem;
    margin-bottom: 1rem;
}
.hero-steps li::before {
    counter-increment: hero;
    content: counter(hero);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--pastel-lilac), var(--pastel-mint));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--deep-slate);
}
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stats-row article {
    background: rgba(255,255,255,0.78);
    border-radius: 20px;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    box-shadow: 0 15px 30px rgba(13,29,44,0.08);
}
.stat-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: rgba(13,29,44,0.6);
    margin-bottom: 0.35rem;
}
.stat-value {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}
.home-grid {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}
.home-card {
    padding: 1.5rem;
    border-radius: 24px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.85);
}
.home-card ul {
    list-style: none;
    padding-left: 0;
}
.home-card ul li span {
    font-weight: 600;
}
.cta-panel {
    margin-top: 3rem;
    border-radius: 28px;
    padding: 2rem;
    background: linear-gradient(120deg, rgba(199, 233, 176, 0.8), rgba(217,215,241,0.9));
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}
.cta-actions {
    display: flex;
    gap: 1rem;
}
.contact-panel {
    margin-top: 2rem;
    text-align: center;
}
.logo-row {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.logo-row img {
    max-height: 80px;
    object-fit: contain;
}
.mt-2 {
    margin-top: 0.75rem;
}
.knowledge-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.knowledge-card {
    border-radius: 24px;
    border: 1px solid var(--border);
    padding: 1.5rem;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 12px 30px rgba(13,29,44,0.08);
}
.knowledge-card ul {
    padding-left: 1rem;
    line-height: 1.6;
}
.step-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}
.step-list > div {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}
.step-chip {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--pastel-lilac), var(--pastel-mint));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--deep-slate);
}
.doc-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}
.doc {
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255,255,255,0.8);
    cursor: pointer;
}
.doc img {
    max-width: 100%;
    border-radius: 14px;
}
.upload-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.upload-steps article {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 1.1rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255,255,255,0.8);
}
.upload-steps .step-num {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--pastel-lilac), var(--pastel-mint));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--deep-slate);
}
.upload-form {
    border: 1px dashed var(--border);
    border-radius: 24px;
    padding: 2rem;
    background: rgba(255,255,255,0.8);
}
.library-form {
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2rem;
    background: rgba(255,255,255,0.85);
    margin-bottom: 2rem;
}
.library-hint {
    border: 1px dashed rgba(52,57,87,0.3);
    border-radius: 18px;
    padding: 0.85rem 1.25rem;
    background: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}
.library-results table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255,255,255,0.9);
    border-radius: 20px;
    overflow: hidden;
}
.library-results th,
.library-results td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.library-results tbody tr:last-child td {
    border-bottom: none;
}
.upload-drop {
    display: flex;
    flex-direction: column;
    border: 2px dashed rgba(52, 57, 87, 0.2);
    border-radius: 24px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1rem;
}
.upload-drop input[type=\"file\"] {
    opacity: 0;
    position: absolute;
    pointer-events: none;
}
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-dialog {
    background: #fff;
    padding: 1rem;
    border-radius: 24px;
    min-width: 300px;
    max-width: 640px;
}
.modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    position: absolute;
    top: 1rem;
    right: 1rem;
    cursor: pointer;
}
.modal[hidden] {
    display: none;
}

@media (max-width: 900px) {
    .wizard-grid {
        grid-template-columns: 1fr;
    }
    .wizard-progress {
        order: 2;
    }
    .home-hero {
        grid-template-columns: 1fr;
    }
}
