:root {
    --bg: #030304;
    --gold: #E2B05E;
    --gold-dim: rgba(226, 176, 94, 0.1);
    --border: rgba(226, 176, 94, 0.2);
    --text: #FFFFFF;
    --muted: #71717A;
    --panel: rgba(10, 10, 12, 0.98);
    --mono: 'JetBrains Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

/* --- BACKGROUND ARCHITECTURE --- */
.grid-canvas {
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle at 2px 2px, var(--border) 1px, transparent 0);
    background-size: 40px 40px;
    opacity: 0.2;
    z-index: -1;
}

.glow-orb {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(226, 176, 94, 0.05) 0%, transparent 70%);
    z-index: -1;
}

/* --- TERMINAL CORE --- */
.terminal-container {
    width: 100%;
    max-width: 850px;
    background: var(--panel);
    border: 1px solid var(--border);
    position: relative;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.9);
}

.bracket {
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid var(--gold);
    z-index: 5;
}

.tl {
    top: -1px;
    left: -1px;
    border-right: 0;
    border-bottom: 0;
}

.tr {
    top: -1px;
    right: -1px;
    border-left: 0;
    border-bottom: 0;
}

.bl {
    bottom: -1px;
    left: -1px;
    border-right: 0;
    border-top: 0;
}

.br {
    bottom: -1px;
    right: -1px;
    border-left: 0;
    border-top: 0;
}

/* --- STATUS RIBBON --- */
.status-ribbon {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.brand .logo {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.brand span {
    color: var(--gold);
}

.step-indicator {
    display: flex;
    gap: 40px;
}

.s-node {
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.25;
    transition: 0.4s;
}

.s-node.active {
    opacity: 1;
}

.s-node .material-symbols-outlined {
    font-size: 1.1rem;
    color: var(--gold);
}

.s-node span {
    font-family: var(--mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
}

/* --- FORM ENGINE --- */
.viewport {
    padding: 50px 80px;
    min-height: 420px;
}

.step-panel {
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.v-header {
    margin-bottom: 40px;
    border-left: 3px solid var(--gold);
    padding-left: 20px;
}

.v-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 5px;
}

.v-header p {
    color: var(--muted);
    font-size: 0.85rem;
}

/* Role Selection Grid */
.role-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.role-card {
    border: 1px solid var(--border);
    padding: 35px 25px;
    cursor: pointer;
    transition: 0.3s;
    background: rgba(255, 255, 255, 0.01);
}

.role-card:hover {
    border-color: var(--gold);
    background: var(--gold-dim);
}

.role-card .material-symbols-outlined {
    font-size: 2.2rem;
    color: var(--gold);
    margin-bottom: 15px;
    display: block;
}

.role-card strong {
    display: block;
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.role-card p {
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.5;
}

/* Data Entry Grid */
.data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.span-2 {
    grid-column: span 2;
}

.field-box label {
    display: block;
    font-family: var(--mono);
    font-size: 0.6rem;
    color: var(--gold);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.field-box input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 15px;
    color: #fff;
    font-size: 0.9rem;
    transition: 0.3s;
}

.field-box input:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.06);
}

/* Navigation */
.nav-footer {
    margin-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn {
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 16px 35px;
    cursor: pointer;
    border: none;
    transition: 0.4s;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
}

.btn-primary {
    background: var(--gold);
    color: #000;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(226, 176, 94, 0.3);
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
    border: 1px solid transparent;
}

.btn-ghost:hover {
    color: #fff;
    border-color: var(--border);
}

.os-log {
    padding: 15px 40px;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid var(--border);
    font-family: var(--mono);
    font-size: 0.6rem;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
}

/* Error States */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #EF4444;
    color: #fff;
    padding: 15px 25px;
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: toastIn 0.3s ease-out;
}

/* --- MATERIAL ICON FIX & MAPPING --- */
.material-symbols-outlined {
    /* Force visibility and correct rendering */
    display: inline-block !important;
    font-family: 'Material Symbols Outlined' !important;
    font-weight: normal;
    font-style: normal;
    font-size: 20px;
    /* Standardizing tactical size */
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;

    /* JIVYOM Theme Mapping */
    color: var(--gold);
    text-shadow: 0 0 10px rgba(226, 176, 94, 0.3);
    /* Tactical Glow */
}

/* Ensure the nav container doesn't collapse them */
.step-indicator {
    display: flex;
    gap: 30px;
    align-items: center;
}

.s-node {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Precise gap between icon and text */
}

@keyframes toastIn {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .viewport {
        padding: 40px 25px;
    }

    .role-grid,
    .data-grid {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: auto;
    }

    .status-ribbon {
        flex-direction: column;
        gap: 20px;
    }
}

/* --- BRAND IDENTITY --- */
.logo {
    font-family: 'Inter', sans-serif; 
    font-size: 1.2rem;
    font-weight: 800; 
    color: #FFFFFF;
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.8;
}

/* Gold span for 'YOM' branding */
.logo span {
    color: #E2B05E; /* JIVYOM Gold */ 
    margin-left: 1px;
}

/* Optional: Adding a subtle glow effect to the gold portion */
.logo span {
    text-shadow: 0 0 15px rgba(226, 176, 94, 0.3);
}

/* Container for icon and checkbox alignment */
.card-header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 12px;
}

/* Custom High-Contrast Terminal Checkbox */
.role-card input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid #444;
    background: rgba(20, 20, 20, 0.8);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

/* Checked State - JIVYOM Signature Accent color match */
.role-card input[type="checkbox"]:checked {
    background: rgba(226, 176, 94, 0.2);
    border-color: #e2b05e; /* Gold signal accent */
}

/* Checkmark Indicator */
.role-card input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #e2b05e;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Ensure clicking the raw checkbox doesn't double-toggle via JS bubble */
.role-card input[type="checkbox"] {
    pointer-events: auto;
}

/* Active state for intent selection cards */
.role-card.active-intent {
    border-color: #e2b05e !important; /* JIVYOM Gold Accent */
    background: rgba(226, 176, 94, 0.03) !important;
    box-shadow: inset 0 0 12px rgba(226, 176, 94, 0.05), 
                0 0 20px rgba(226, 176, 94, 0.05);
}

/* Make text colors slightly brighter on selection */
.role-card.active-intent strong {
    color: #e2b05e;
}

/* SYSTEM MODAL INTERFACE LAYERS */
.system-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.system-modal-overlay.closing {
    animation: modalFadeOut 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.system-modal-box {
    background: #111111;
    border: 1px solid #2A2A2A;
    width: 100%;
    max-width: 420px;
    padding: 30px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

/* Internal Tech Brackets */
.m-bracket {
    position: absolute;
    width: 8px;
    height: 8px;
    border-color: #e2b05e; /* JIVYOM Signature Gold Accent */
    border-style: solid;
}
.m-bracket.tl { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.m-bracket.tr { top: -1px; right: -1px; border-width: 1px 1px 0 0; }
.m-bracket.bl { bottom: -1px; left: -1px; border-width: 0 0 1px 1px; }
.m-bracket.br { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.modal-icon {
    color: #e2b05e;
    font-size: 1.6rem;
}

.system-modal-box h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #fff;
    margin: 0;
}

.modal-body p {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    line-height: 1.6;
    color: #888;
    margin: 0 0 24px 0;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
}

.modal-footer .btn {
    padding: 10px 20px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* ANIMATIONS */
@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes modalFadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.96); }
}

/* ==========================================================================
   JIVYOM Obsidian Polish - Manifest Blueprint Overrides
   ========================================================================== */

.welcome-manifest {
    width: 100%;
    box-sizing: border-box;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.uf-manifest-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    text-align: left;
}

/* 1. Header Block with Solid Left-Border Anchor */
.uf-manifest-header-block {
    border-left: 3px solid var(--gold);
    padding-left: 20px;
    margin-bottom: 40px;
}

.uf-manifest-header-block .badge-signal {
    display: inline-block;
    font-family: var(--mono);
    color: var(--gold);
    background: var(--gold-dim);
    letter-spacing: 1.5px;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 4px 8px;
    margin-bottom: 12px;
}

.uf-manifest-header-block h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.uf-manifest-header-block p {
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0;
}

/* 2. Features Grid Layout (Aligned cleanly with Header text offset) */
.uf-manifest-features-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding-left: 23px; 
    margin-bottom: 48px;
}

/* Clean Horizontal Layout Row matching original dashboard cards */
.uf-manifest-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    width: 100%;
}

/* Precise Icon Framing */
.uf-manifest-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 2px;
}

.uf-manifest-icon-wrapper .material-symbols-outlined {
    font-size: 1.3rem;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(226, 176, 94, 0.3);
}

/* Feature Copy Text Aggregation */
.uf-feature-text {
    flex: 1;
}

.uf-feature-text strong {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.uf-feature-text p {
    color: var(--muted);
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.5;
}

/* 3. Footer Navigation Dock Layout */
.uf-manifest-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 23px;
    width: 100%;
    box-sizing: border-box;
}

/* Production-grade Action Controls */
.uf-manifest-navigation .uf-btn-primary {
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 16px 35px;
    background: var(--gold);
    color: #000;
    border: none;
    cursor: pointer;
    transition: 0.4s;
    text-transform: uppercase;
}

.uf-manifest-navigation .uf-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(226, 176, 94, 0.3);
}

.uf-manifest-navigation .uf-btn-outline {
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    background: transparent;
    color: var(--muted);
    border: 1px solid transparent;
    padding: 16px 0;
    cursor: pointer;
    transition: 0.4s;
    text-transform: uppercase;
}

.uf-manifest-navigation .uf-btn-outline:hover {
    color: #fff;
}