*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    scroll-behavior:smooth;
}

html,
body{
    width:100%;
    height:100%;
}

body{
    background:#0f172a;
    color:#e2e8f0;
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

.layout{
    display:flex;
    height:100vh;
}

.sidebar{
    width:260px;
    background:#111827;
    border-right:1px solid #1f2937;
    padding:24px;
    display:flex;
    flex-direction:column;
    overflow-y:auto;
}

.logo{
    font-size:24px;
    font-weight:700;
    margin-bottom:32px;
}

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

.agent{
    width:100%;
    border:none;
    background:#1f2937;
    color:#fff;
    padding:14px 16px;
    border-radius:10px;
    cursor:pointer;
    text-align:left;
    transition:.2s;
    font-size:15px;
}

.agent:hover{
    background:#334155;
}

.agent.active{
    background:#2563eb;
}

.content{
    flex:1;
    display:flex;
    flex-direction:column;
    overflow:hidden;
}

.header{
    height:72px;
    display:flex;
    align-items:center;
    padding:0 24px;
    border-bottom:1px solid #1f2937;
    background:#111827;
    font-size:20px;
    font-weight:600;
    box-shadow:
        0 1px 0
        rgba(255,255,255,.04);
}

.workspace-tabs{
    display:flex;
    align-items:center;
    gap:8px;
    padding:14px 20px;
    border-bottom:1px solid #1f2937;
    background:#0f172a;
}

.workspace-tab{
    border:none;
    background:#1e293b;
    color:#cbd5e1;
    padding:10px 18px;
    border-radius:10px;
    cursor:pointer;
    font-size:14px;
    transition:.2s;
}

.workspace-tab:hover{
    background:#334155;
}

.workspace-tab.active{
    background:#2563eb;
    color:#ffffff;
}

.workspace{
    flex:1;
    overflow:hidden;
    position:relative;
}

.workspace-page{
    display:none;
    width:100%;
    height:100%;
}

.workspace-page.active{
    display:flex;
    flex-direction:column;
}

.chat{
    flex:1;
    overflow:auto;
    padding:24px;
    scroll-behavior:smooth;
}

.placeholder{
    display:flex;
    flex-direction:column;
    justify-content:center;
    text-align:center;
    align-items:center;
    height:100%;
    color:#94a3b8;
    gap:12px;
}

.placeholder h2{
    color:#ffffff;
    font-size:26px;
}

.placeholder p{
    font-size:15px;
}

.message{
    margin-bottom:28px;
}

.message.user{
    text-align:right;
}

.bubble{
    display:inline-block;
    width:100%;
    max-width:900px;
    padding:14px 18px;
    border-radius:14px;
    white-space:pre-wrap;
    line-height:1.6;
    box-shadow:
        0 2px 8px
        rgba(0,0,0,.12);
}

.user .bubble{
    background:#2563eb;
}

.assistant .bubble{
    background:#1e293b;
}

.error .bubble{
    background:#7f1d1d;
}

.footer{
    padding:20px;
    border-top:1px solid #1f2937;
    background:#111827;
    box-shadow:
        0 -1px 0
        rgba(255,255,255,.04);
}

.row{
    display:flex;
    gap:12px;
}

#send{
    width:130px;
    border:none;
    border-radius:10px;
    background:#2563eb;
    color:#fff;
    cursor:pointer;
    font-size:15px;
}

#send:hover{
    background:#1d4ed8;
}

.notify-container {

    position: fixed;

    top: 20px;

    right: 20px;

    z-index: 9999;

    display: flex;

    flex-direction: column;

    gap: 12px;

}

.notify {

    min-width: 280px;

    max-width: 420px;

    padding: 14px 18px;

    border-radius: 10px;

    color: #fff;

    opacity: 0;

    transform: translateX(40px);

    transition: .25s;

    box-shadow: 0 8px 30px rgba(0,0,0,.2);

}

.notify.show {

    opacity: 1;

    transform: translateX(0);

}

.notify-success {

    background: #16a34a;

}

.notify-error {

    background: #dc2626;

}

.notify-info {

    background: #2563eb;

}

.message .bubble h1,
.message .bubble h2,
.message .bubble h3,
.message .bubble h4 {

    margin: 16px 0 10px;

}

.message .bubble p {

    margin: 10px 0;

    line-height: 1.6;

}

.message .bubble ul,
.message .bubble ol {

    margin: 10px 0 10px 24px;

}

.message .bubble li {

    margin: 6px 0;

}

.message .bubble pre {

    overflow-x: auto;

    padding: 14px;

    border-radius: 8px;

    background: #1f2937;

}

.message .bubble code {

    font-family: Consolas, monospace;

}

.message .bubble pre code {

    color: #fff;

}

.message .bubble :not(pre) > code {

    padding: 2px 6px;

    border-radius: 4px;

    background: rgba(0,0,0,.08);

}

.message .bubble blockquote {

    margin: 12px 0;

    padding-left: 14px;

    border-left: 4px solid #d1d5db;

    color: #6b7280;

}

.message .bubble table {

    width: 100%;

    border-collapse: collapse;

    margin: 12px 0;

}

.message .bubble th,
.message .bubble td {

    padding: 8px 12px;

    border: 1px solid #ddd;

}

.message .bubble a {

    color: #2563eb;

}

#message {
    
    flex:1;
    background:#1e293b;
    color:#fff;

    width: 100%;

    min-height: 48px;

    max-height: 220px;

    resize: none;

    overflow-y: auto;

    padding: 12px 14px;

    border: 1px solid #d6d6d6;

    border-radius: 10px;

    font: inherit;

    line-height: 1.5;

    outline: none;

    transition: .2s;

}

#message:focus {

    border-color: #2563eb;

}

#send:disabled {

    opacity: .6;

    cursor: not-allowed;

}

.code-block {
    margin: 16px 0;
    border-radius: 10px;
    overflow: hidden;
    border:1px solid #334155;
}

.code-toolbar {

    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background:#111827;
    border-bottom:1px solid #374151;
    border-bottom: 1px solid #ddd;

}

.code-language {

    font-size: 13px;
    color:#94a3b8;
    text-transform: uppercase;

}

.code-copy {

    border: none;

    background: transparent;

    cursor: pointer;

    font-size: 13px;

}

.code-copy:hover {

    color: #2563eb;

}

.code-block pre {

    margin: 0 !important;

    border-radius: 0 !important;

}

.message-header {

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:8px;

    padding:0 4px;

    width:900px;

    max-width:100%;

}

.message-author {

    font-size: 14px;

    font-weight: 600;

    color: #cbd5e1;

}

.message-time {

    font-size: 12px;

    color: #64748b;

}

.assistant{

    max-width:900px;

}

.user{

    display:flex;

    flex-direction:column;

    align-items:flex-end;

}

button{

    transition:
        background .2s,
        color .2s,
        transform .15s,
        box-shadow .2s;

}

button:hover{
    transform:translateY(-1px);
    box-shadow:0 6px 14px rgba(0,0,0,.18);
}

button:active{

    transform:translateY(1px);

}

button:disabled{

    transform:none;

}

::-webkit-scrollbar{

    width:10px;

    height:10px;

}

::-webkit-scrollbar-track{

    background:#111827;

}

::-webkit-scrollbar-thumb{

    background:#475569;

    border-radius:20px;

}

::-webkit-scrollbar-thumb:hover{

    background:#64748b;

}

.memory-section{

    margin:24px;

}

.memory-section h2{

    margin-bottom:16px;

    font-size:20px;

}

.memory-card{

    background:#1e293b;

    border-radius:12px;

    padding:16px;

    margin-bottom:12px;

    border:1px solid #334155;

}

.memory-key{

    color:#93c5fd;

    font-weight:600;

    margin-bottom:8px;

}

.memory-value{

    color:#e2e8f0;

    line-height:1.6;

}

.settings-group{

    margin:24px;

}

.settings-group h3{

    margin-bottom:18px;

    color:#93c5fd;

}

.setting-row{

    margin-bottom:20px;

}

.setting-label{

    display:block;

    margin-bottom:6px;

    font-weight:600;

}

.setting-description{

    color:#94a3b8;

    font-size:13px;

    margin-bottom:8px;

}

.settings-form input,
.settings-form textarea,
.settings-form select{

    width:100%;
    padding:12px;
    border-radius:10px;
    border:1px solid #334155;
    background:#1e293b;
    color:#fff;
    font-family:inherit;

}

.placeholder h2{

    margin-bottom:14px;

}

.placeholder p{

    max-width:420px;

    line-height:1.7;

}

.sidebar-title{

    color:#94a3b8;

    font-size:13px;

    text-transform:uppercase;

    letter-spacing:.08em;

    margin-bottom:12px;

}

.sidebar-section{

    margin-bottom:28px;

}

@media (max-width:900px){

    .sidebar{

        width:220px;

    }

    .bubble{

        max-width:100%;

    }

    .header{

        font-size:18px;

    }

}