*{box-sizing:border-box}

:root{
    --bg:#030604;
    --panel:#07110a;
    --panel-2:#0a170d;
    --line:#17361f;
    --line-bright:#2e7d42;
    --glow:#72ff9a;
    --glow-soft:rgba(114,255,154,.12);
    --text:#dbffe5;
    --muted:#7cb68c;
    --muted-2:#5c8767;
    --danger:#ff8e8e;
    --shadow:0 18px 60px rgba(0,0,0,.45);
}

html, body{
    height:100%;
    overflow:hidden;
}

body{
    margin:0;
    color:var(--text);
    background:
        radial-gradient(circle at 10% 0%, rgba(114,255,154,.12), transparent 28%),
        radial-gradient(circle at 100% 10%, rgba(68,255,192,.08), transparent 22%),
        linear-gradient(180deg, #010302 0%, #040805 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.scanlines,
.glow{
    position:fixed;
    inset:0;
    pointer-events:none;
}

.scanlines{
    background-image:linear-gradient(transparent 50%, rgba(255,255,255,.025) 50%);
    background-size:100% 4px;
    opacity:.08;
}

.glow{
    background:
        radial-gradient(circle at 20% 10%, rgba(114,255,154,.06), transparent 35%),
        radial-gradient(circle at 80% 0%, rgba(114,255,154,.04), transparent 25%);
}

.app-shell{
    height:100vh;
    display:grid;
    grid-template-columns:390px 1fr;
    gap:18px;
    padding:18px;
    overflow:hidden;
}

.panel{
    border:1px solid var(--line);
    background:linear-gradient(180deg, rgba(8,20,11,.92), rgba(5,13,7,.92));
    border-radius:22px;
    box-shadow:var(--shadow);
    backdrop-filter:blur(10px);
}

.sidebar{
    height:calc(100vh - 36px);
    min-height:0;
    overflow-y:auto;
    display:flex;
    flex-direction:column;
    gap:18px;
    padding-right:4px;
}

.brand-panel,
.lead-panel,
.quote-panel,
.action-panel,
.portfolio-panel{
    padding:18px;
}

.brand-line{
    color:var(--glow);
    font-size:11px;
    letter-spacing:.22em;
    text-transform:uppercase;
    margin-bottom:14px;
}

.brand-lockup{
    display:flex;
    gap:14px;
    align-items:flex-start;
}

.brand-logo{
    width:76px;
    height:auto;
    filter:drop-shadow(0 0 10px rgba(114,255,154,.2));
    opacity:.96;
}

.brand-panel h1{
    margin:0 0 8px;
    font-size:28px;
    line-height:1;
}

.brand-copy{
    margin:0;
    color:var(--muted);
    line-height:1.65;
    font-size:14px;
}

.boot-lines{
    margin-top:16px;
    padding-top:14px;
    border-top:1px dashed rgba(114,255,154,.18);
    display:grid;
    gap:6px;
    color:var(--muted);
    font-size:12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.panel-head,
.summary-topline,
.composer-actions,
.terminal-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}

.panel-head span:first-child,
.composer-label{
    color:var(--glow);
    text-transform:uppercase;
    letter-spacing:.18em;
    font-size:11px;
}

.status-pill{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:4px 10px;
    border-radius:999px;
    border:1px solid rgba(114,255,154,.22);
    background:rgba(114,255,154,.08);
    color:var(--glow);
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:.12em;
    width:max-content;
}

.terminal{
    height:calc(100vh - 36px);
    min-height:0;
    overflow:hidden;
    display:flex;
    flex-direction:column;
}

.terminal-top{
    padding:16px 18px;
    border-bottom:1px solid var(--line);
    background:rgba(255,255,255,.015);
    flex:0 0 auto;
}

.terminal-dots{
    display:flex;
    gap:8px;
}

.terminal-dots span{
    width:10px;
    height:10px;
    border-radius:50%;
    border:1px solid rgba(114,255,154,.35);
    background:rgba(114,255,154,.12);
}

.terminal-title,
.terminal-meta{
    color:var(--muted);
    font-size:13px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.messages{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
    padding:20px;
    display:flex;
    flex-direction:column;
    gap:14px;
}

.message{
    display:flex;
}

.message.user{
    justify-content:flex-end;
}

.bubble{
    width:min(840px, 92%);
    border:1px solid var(--line);
    background:rgba(7,16,10,.95);
    border-radius:20px;
    padding:14px 15px;
    box-shadow:0 0 0 1px rgba(114,255,154,.04) inset;
}

.message.user .bubble{
    background:linear-gradient(180deg, rgba(114,255,154,.08), rgba(114,255,154,.04));
    border-color:rgba(114,255,154,.24);
}

.label{
    margin-bottom:8px;
    color:var(--glow);
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:.18em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.text{
    line-height:1.78;
    white-space:pre-wrap;
    font-size:14px;
}

.composer{
    border-top:1px solid var(--line);
    padding:16px;
    background:rgba(255,255,255,.02);
    flex:0 0 auto;
}

.composer-label{
    display:block;
    margin-bottom:8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

textarea,
input{
    width:100%;
    resize:none;
    border-radius:16px;
    border:1px solid rgba(114,255,154,.18);
    background:#051009;
    color:var(--text);
    padding:14px 15px;
    font:inherit;
    outline:none;
    transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

textarea{
    min-height:98px;
}

textarea:focus,
input:focus{
    border-color:rgba(114,255,154,.5);
    box-shadow:0 0 0 4px rgba(114,255,154,.07);
    background:#07140b;
}

.hint{
    color:var(--muted);
    font-size:12px;
}

.btn,
.action-btn,
.portfolio-link{
    display:inline-flex;
    align-items:center;
    gap:10px;
    border:none;
    border-radius:999px;
    padding:12px 16px;
    cursor:pointer;
    text-decoration:none;
    font-weight:700;
    letter-spacing:.02em;
    transition:transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.btn:hover,
.action-btn:hover,
.portfolio-link:hover{
    transform:translateY(-1px);
}

.btn-primary{
    color:#061108;
    background:linear-gradient(180deg, #7effa8, #55d27c);
    box-shadow:0 0 0 1px rgba(255,255,255,.06) inset, 0 8px 22px rgba(114,255,154,.14);
}

.btn-ghost,
.action-btn,
.portfolio-link{
    color:var(--text);
    background:rgba(114,255,154,.06);
    border:1px solid rgba(114,255,154,.18);
}

.btn:disabled{
    opacity:.55;
    cursor:not-allowed;
}

.btn-icon{
    width:16px;
    height:16px;
    display:inline-flex;
}

.btn-icon svg{
    width:100%;
    height:100%;
}

.field-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
    margin-top:14px;
}

.field-grid label{
    display:flex;
    flex-direction:column;
    gap:6px;
}

.field-grid label span{
    color:var(--muted);
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:.14em;
}

.form-actions{
    margin-top:14px;
    display:flex;
    justify-content:flex-end;
}

.summary-empty{
    color:var(--muted);
    line-height:1.7;
    font-size:14px;
    margin-top:12px;
}

.summary-body{
    display:flex;
    flex-direction:column;
    gap:12px;
    min-height:0;
    overflow-y:auto;
    margin-top:14px;
    padding-right:4px;
}

.hidden{
    display:none;
}

.summary-topline{
    padding-bottom:10px;
    border-bottom:1px solid rgba(114,255,154,.12);
}

.mini-label{
    display:block;
    margin-bottom:5px;
    color:var(--muted);
    font-size:10px;
    text-transform:uppercase;
    letter-spacing:.16em;
}

.summary-total{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:14px 16px;
    border:1px solid rgba(114,255,154,.14);
    border-radius:16px;
    background:rgba(114,255,154,.05);
}

.summary-total span{
    color:var(--muted);
    text-transform:uppercase;
    letter-spacing:.14em;
    font-size:12px;
}

.summary-total strong{
    font-size:19px;
}

.summary-items{
    display:flex;
    flex-direction:column;
    gap:10px;
}

.summary-item{
    border:1px solid rgba(114,255,154,.12);
    border-radius:15px;
    padding:12px 13px;
    background:rgba(10,20,12,.65);
}

.summary-item-top{
    display:flex;
    justify-content:space-between;
    gap:12px;
    margin-bottom:6px;
    font-size:14px;
}

.summary-item-desc{
    color:var(--muted);
    font-size:13px;
    line-height:1.55;
}

.summary-links,
.action-links{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

.portfolio-list{
    display:flex;
    flex-direction:column;
    gap:12px;
    margin-top:14px;
}

.portfolio-card{
    border:1px solid rgba(114,255,154,.14);
    border-radius:16px;
    overflow:hidden;
    background:rgba(9,20,12,.7);
}

.portfolio-thumb{
    aspect-ratio:16/9;
    overflow:hidden;
    background:#081109;
}

.portfolio-thumb img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.portfolio-body{
    padding:14px;
}

.portfolio-cats{
    color:var(--glow);
    font-size:11px;
    letter-spacing:.14em;
    text-transform:uppercase;
    margin-bottom:8px;
}

.portfolio-card h3{
    margin:0 0 8px;
    font-size:16px;
    line-height:1.35;
}

.portfolio-card p{
    margin:0 0 12px;
    color:var(--muted);
    font-size:13px;
    line-height:1.6;
}

.sidebar::-webkit-scrollbar,
.messages::-webkit-scrollbar,
.summary-body::-webkit-scrollbar{
    width:10px;
}

.sidebar::-webkit-scrollbar-thumb,
.messages::-webkit-scrollbar-thumb,
.summary-body::-webkit-scrollbar-thumb{
    background:rgba(114,255,154,.2);
    border-radius:999px;
    border:2px solid transparent;
    background-clip:padding-box;
}

.sidebar::-webkit-scrollbar-track,
.messages::-webkit-scrollbar-track,
.summary-body::-webkit-scrollbar-track{
    background:transparent;
}

@media (max-width: 1080px){
    html, body{
        overflow:auto;
    }

    .app-shell{
        height:auto;
        min-height:100vh;
        grid-template-columns:1fr;
        overflow:visible;
    }

    .sidebar,
    .terminal{
        height:auto;
        min-height:auto;
    }

    .sidebar{
        overflow:visible;
    }
}

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

    .summary-item-top,
    .composer-actions,
    .panel-head{
        flex-direction:column;
        align-items:flex-start;
    }

    .brand-lockup{
        flex-direction:column;
    }
}
