:root{
    --bg:#f7f8f6;
    --panel:#ffffff;
    --line:#dfe4dc;
    --soft:#f1f3f0;
    --text:#1f2623;
    --muted:#6f7a75;
    --green:#173f38;
}

*{
    box-sizing:border-box;
}

html, body{
    margin:0;
    padding:0;
    min-height:100%;
    font-family:Inter, Arial, sans-serif;
    background:var(--bg);
    color:var(--text);
}

.assistant-page{
    min-height:100vh;
    display:grid;
    grid-template-columns:minmax(0, 1fr) 560px;
}

.assistant-side{
    padding:56px;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    background:
        radial-gradient(circle at 12% 18%, rgba(23,63,56,.10), transparent 28%),
        radial-gradient(circle at 88% 82%, rgba(23,63,56,.08), transparent 30%),
        var(--bg);
}

.assistant-brand{
    display:flex;
    align-items:center;
    gap:14px;
}

.assistant-brand-badge{
    width:42px;
    height:42px;
    border-radius:12px;
    background:var(--green);
    color:white;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:20px;
    font-weight:700;
}

.assistant-brand h1{
    margin:0;
    font-size:22px;
    font-weight:600;
    letter-spacing:-.03em;
}

.assistant-brand span{
    display:block;
    margin-top:4px;
    color:#74807a;
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.12em;
    font-weight:600;
}

.eyebrow{
    color:#7d8882;
    font-size:13px;
    text-transform:uppercase;
    letter-spacing:.16em;
    font-weight:600;
    margin-bottom:14px;
}

.assistant-copy{
    max-width:680px;
}

.assistant-copy h2{
    margin:0;
    font-size:60px;
    line-height:1;
    font-weight:500;
    letter-spacing:-.06em;
}

.assistant-copy p{
    margin:22px 0 0;
    max-width:560px;
    color:var(--muted);
    font-size:18px;
    line-height:1.65;
}

.assistant-info-list{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:18px;
    max-width:960px;
}

.assistant-info-list div{
    background:#fff;
    border:1px solid var(--line);
    border-radius:18px;
    padding:22px;
}

.assistant-info-list span{
    display:block;
    color:#7d8882;
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.14em;
    font-weight:600;
    margin-bottom:18px;
}

.assistant-info-list strong{
    display:block;
    font-size:17px;
    font-weight:600;
    margin-bottom:8px;
}

.assistant-info-list p{
    margin:0;
    color:var(--muted);
    font-size:14px;
    line-height:1.5;
}

.assistant-main{
    padding:34px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#fafbf8;
    border-left:1px solid var(--line);
}

.assistant-card{
    width:100%;
    max-width:460px;
    height:min(760px, calc(100vh - 68px));
    background:#fff;
    border:1px solid var(--line);
    border-radius:26px;
    display:flex;
    flex-direction:column;
    overflow:hidden;
}

.assistant-card-header{
    padding:26px;
    border-bottom:1px solid #edf0eb;
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:18px;
}

.assistant-card-icon{
    width:46px;
    height:46px;
    border-radius:14px;
    background:var(--soft);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:22px;
    margin-bottom:16px;
}

.assistant-card-header h2{
    margin:0;
    font-size:24px;
    font-weight:500;
    letter-spacing:-.035em;
}

.assistant-card-header p{
    margin:7px 0 0;
    color:var(--muted);
    font-size:14px;
}

.assistant-status{
    height:34px;
    padding:0 12px;
    border-radius:999px;
    background:#f0fdf4;
    color:#166534;
    display:flex;
    align-items:center;
    gap:7px;
    font-size:13px;
    font-weight:600;
    white-space:nowrap;
}

.assistant-status span{
    width:8px;
    height:8px;
    border-radius:999px;
    background:#22c55e;
}

.chat-window{
    flex:1;
    padding:24px;
    overflow-y:auto;
    background:#fbfcfa;
    display:flex;
    flex-direction:column;
    gap:12px;
}

.chat-window::-webkit-scrollbar{
    width:8px;
}

.chat-window::-webkit-scrollbar-thumb{
    background:#dfe4dc;
    border-radius:999px;
}

.bubble-row{
    display:flex;
    width:100%;
}

.bubble-row.ai{
    justify-content:flex-start;
}

.bubble-row.user{
    justify-content:flex-end;
}

.bubble{
    max-width:82%;
    padding:13px 15px;
    border-radius:18px;
    font-size:15px;
    line-height:1.55;
    white-space:pre-wrap;
}

.ai-bubble{
    background:#ffffff;
    border:1px solid #e2e7df;
    color:#27302c;
    border-bottom-left-radius:6px;
}

.user-bubble{
    background:var(--green);
    color:#fff;
    border-bottom-right-radius:6px;
}

.ai-bubble.success{
    background:#f0fdf4;
    border-color:#bbf7d0;
    color:#166534;
}

.chat-form-wrap{
    padding:18px;
    border-top:1px solid #edf0eb;
    background:#fff;
}

.chat-form{
    display:flex;
    align-items:center;
    gap:10px;
}

.chat-form input{
    flex:1;
    height:48px;
    border:1px solid var(--line);
    border-radius:14px;
    padding:0 15px;
    font-size:15px;
    outline:none;
    color:var(--text);
    background:#fff;
}

.chat-form input::placeholder{
    color:#9aa39e;
}

.chat-form input:focus{
    border-color:var(--green);
    box-shadow:0 0 0 3px rgba(23,63,56,.08);
}

.chat-form button{
    height:48px;
    padding:0 18px;
    border:0;
    border-radius:14px;
    background:var(--green);
    color:white;
    font-size:15px;
    font-weight:600;
    cursor:pointer;
}

.chat-form button:disabled{
    opacity:.7;
    cursor:not-allowed;
}

.assistant-footer{
    padding:15px 20px;
    border-top:1px solid #edf0eb;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:16px;
    color:#7d8882;
    font-size:13px;
}

.assistant-footer a{
    color:#173f38;
    text-decoration:none;
    font-weight:600;
}

.assistant-footer a:hover{
    text-decoration:underline;
}

.typing{
    display:flex;
    gap:5px;
    align-items:center;
    min-height:44px;
}

.typing span{
    width:7px;
    height:7px;
    border-radius:999px;
    background:#94a3b8;
    animation:typingBounce 1s infinite ease-in-out;
}

.typing span:nth-child(2){
    animation-delay:.15s;
}

.typing span:nth-child(3){
    animation-delay:.3s;
}

@keyframes typingBounce{
    0%, 80%, 100%{
        transform:translateY(0);
        opacity:.45;
    }
    40%{
        transform:translateY(-4px);
        opacity:1;
    }
}

.reset-box{
    width:100%;
    display:flex;
    justify-content:center;
}

.reset-btn{
    width:100%;
    height:48px;
    border-radius:14px;
    background:var(--green);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    font-weight:600;
}

@media(max-width:1050px){
    .assistant-page{
        grid-template-columns:1fr;
    }

    .assistant-main{
        border-left:0;
        border-top:1px solid var(--line);
    }

    .assistant-side{
        gap:56px;
    }

    .assistant-copy h2{
        font-size:46px;
    }

    .assistant-info-list{
        grid-template-columns:1fr;
    }

    .assistant-card{
        height:720px;
        max-width:680px;
    }
}

@media(max-width:640px){
    .assistant-side,
    .assistant-main{
        padding:22px;
    }

    .assistant-copy h2{
        font-size:38px;
    }

    .assistant-card{
        height:calc(100vh - 44px);
        border-radius:20px;
    }

    .assistant-card-header{
        padding:20px;
    }

    .chat-window{
        padding:18px;
    }

    .assistant-footer{
        flex-direction:column;
        align-items:flex-start;
    }
}