@import "./auth-theme.css";
@import "./header.css";

        * { box-sizing: border-box; }
        body {
            margin: 0; min-height: 100vh; overflow-x: hidden;
            font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; color: #e2e8f0;
            background:
                radial-gradient(circle at top left, rgba(20,184,166,0.24), transparent 30%),
                linear-gradient(180deg, #001210 0%, #00100e 55%, #000806 100%);
        }
        @keyframes fadeIn  { from { opacity:0; transform:translateY(18px); } to { opacity:1; transform:translateY(0); } }
        @keyframes slideUp { from { transform:translateY(0); opacity:1; } to { transform:translateY(-100%); opacity:0; pointer-events:none; } }
        @keyframes pulse   { 0%,100% { opacity:0.5; r:2; } 50% { opacity:1; r:4; } }
        .node { fill: #14b8a6; animation: pulse 3s infinite; }
        .link { stroke: #475569; stroke-width: 1; opacity: 0.5; }
        #splash-screen {
            position: fixed; inset: 0; background: #000806; z-index: 100;
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            animation: slideUp 0.9s cubic-bezier(0.87,0,0.13,1) forwards 2.2s;
        }
        .reveal-1 { opacity:0; animation: fadeIn 0.8s ease-out 2.5s forwards; }
        .reveal-2 { opacity:0; animation: fadeIn 0.8s ease-out 2.7s forwards; }
        .reveal-3 { opacity:0; animation: fadeIn 0.8s ease-out 2.9s forwards; }

        /* Brand */
        .brand-lockup { display:flex; flex-direction:column; align-items:center; gap:1rem; margin-bottom:2rem; }
        .brand-kicker { display:inline-flex; align-items:center; gap:0.6rem; padding:0.6rem 1rem; border-radius:999px; border:1px solid rgba(255,255,255,0.08); background:rgba(10,10,20,0.42); color:#94a3b8; font-size:0.72rem; font-weight:800; letter-spacing:0.22em; text-transform:uppercase; }
        .brand-name { margin:0; font-size: clamp(3.2rem,10vw,5.5rem); font-weight:700; line-height:0.96; letter-spacing:-0.05em; }
        .brand-name span { background:linear-gradient(90deg,#f8fafc 0%,#5eead4 52%,#14b8a6 100%); -webkit-background-clip:text; background-clip:text; color:transparent; }
        .brand-meta { max-width:42rem; margin:0; color:#94a3b8; font-size:0.96rem; font-weight:600; letter-spacing:0.08em; text-transform:uppercase; }

        /* Module grid (3-column square cards) */
        .portal-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0.875rem; max-width:42rem; margin:0 auto; }
        .square-card {
            aspect-ratio:1; display:flex; flex-direction:column;
            align-items:center; justify-content:center;
            gap:0.75rem; padding:1rem; border-radius:1.5rem;
            border:1px solid var(--accent-border);
            text-decoration:none; color:inherit; cursor:pointer;
            position:relative; overflow:hidden;
            transition:transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
            background:var(--accent-soft);
        }
        .square-card::before {
            content:''; position:absolute; top:-40px; right:-40px;
            width:100px; height:100px; border-radius:999px;
            background:var(--accent-glow); filter:blur(24px);
            opacity:0.5; transition:opacity 0.25s ease; pointer-events:none;
        }
        .square-card:hover { transform:translateY(-2px) scale(1.02); box-shadow:0 10px 28px -8px rgba(0,0,0,0.5); border-color:var(--accent); }
        .square-card:hover::before { opacity:0.8; }
        .glass-card { backdrop-filter:blur(12px); }
        .square-icon {
            width:2.75rem; height:2.75rem; border-radius:0.875rem;
            display:flex; align-items:center; justify-content:center;
            background:rgba(0,0,0,0.25); border:1px solid var(--accent-border);
            color:var(--accent); position:relative; z-index:1;
        }
        .square-label { font-size:0.8rem; font-weight:700; color:#e2e8f0; text-align:center; line-height:1.2; position:relative; z-index:1; }

        @media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; } }

        /* ── Native App Shell ── */
        :root { --forms-header-h: 56px; --forms-nav-h: 64px; --forms-safe-top: env(safe-area-inset-top,0px); --forms-safe-bottom: env(safe-area-inset-bottom,0px); }

        #main-app { display: none; }
        #main-app.active { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }

        .forms-header {
            position: fixed; top: 0; left: 0; right: 0; z-index: 100;
            min-height: calc(var(--forms-header-h) + var(--forms-safe-top));
            padding: calc(var(--forms-safe-top) + 8px) 16px 8px;
            background: rgba(6,18,14,0.95); backdrop-filter: blur(12px);
            border-bottom: 1px solid rgba(20,184,166,0.28);
            display: flex; align-items: center; justify-content: space-between;
        }
        .forms-header-left { display: flex; align-items: center; gap: 12px; }
        .forms-header-title { font-size: 18px; font-weight: 700; color: #e2e8f0; }
        .forms-header-right { display: flex; align-items: center; gap: 8px; }
        .forms-back-btn, .forms-icon-btn {
            width: 36px; height: 36px; border-radius: 10px;
            background: rgba(255,255,255,0.12); border: none; color: #e2e8f0;
            display: flex; align-items: center; justify-content: center;
            cursor: pointer; font-size: 18px;
        }
        .forms-back-btn:active, .forms-icon-btn:active { background: rgba(255,255,255,0.22); }

        .forms-content {
            flex: 1; min-height: 0; overflow-y: auto;
            padding-top: calc(var(--forms-header-h) + var(--forms-safe-top) + 16px);
            padding-bottom: calc(var(--forms-nav-h) + max(var(--forms-safe-bottom),8px) + 8px);
            -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain;
        }

        .forms-bottom-nav {
            position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
            height: calc(var(--forms-nav-h) + max(var(--forms-safe-bottom),8px));
            padding-bottom: max(var(--forms-safe-bottom),8px);
            background: rgba(6,18,14,0.97); border-top: 1px solid rgba(20,184,166,0.25);
            display: flex; align-items: stretch;
        }
        .forms-nav-tab {
            flex: 1; display: flex; flex-direction: column; align-items: center;
            justify-content: center; gap: 3px; border: none; background: none;
            color: #64748b; font-size: 10px; font-weight: 600; cursor: pointer;
            transition: color 0.2s;
        }
        .forms-nav-tab i, .forms-nav-tab svg { font-size: 22px; width: 22px; height: 22px; }
        .forms-nav-tab.active { color: #14b8a6; }
        .forms-nav-tab:active { opacity: 0.7; }
    
