/*
 * ==============================================================
 * Product      : mohtarif
 * Copyright    : (c) 2026 Moussaoui Mustapha
 * Website      : baramejpro.com
 * Email        : admin@baramejpro.com
 * Rights       : All rights reserved.
 * ==============================================================
 */
:root {
    --bg: #0b1020;
    --panel: rgba(16, 24, 46, 0.9);
    --panel-soft: rgba(255,255,255,0.06);
    --line: rgba(255,255,255,0.08);
    --text: #e8eefc;
    --muted: #9fb0d0;
    --primary: #5b8cff;
    --primary-2: #7b61ff;
    --success: #1bbf83;
    --warning: #ffb547;
    --shadow: 0 20px 50px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: Tahoma, Arial, sans-serif; background: radial-gradient(circle at top, #15244e 0%, #0b1020 45%, #070b16 100%); color: var(--text); }
a { color: #9bc0ff; text-decoration: none; }
a:hover { text-decoration: underline; }

.shell {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    padding: 20px;
    min-height: calc(100vh - 60px);
}

.sidebar, .main {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.sidebar { padding: 20px; }
.main { display: flex; flex-direction: column; overflow: hidden; }

.brand-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: linear-gradient(135deg, rgba(91,140,255,.18), rgba(123,97,255,.15));
    border: 1px solid var(--line);
    border-radius: 20px;
}

.logo {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    font-size: 28px;
    font-weight: bold;
}

.brand-card h1, .topbar h2, .panel h2 { margin: 0 0 6px; }
.brand-card p, .topbar p, .muted, .panel p { margin: 0; color: var(--muted); line-height: 1.8; }

.panel {
    margin-top: 18px;
    padding: 16px;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 18px;
}

.status {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: bold;
}
.status.ok { background: rgba(27,191,131,.15); color: #8ef0c8; }
.status.warn { background: rgba(255,181,71,.15); color: #ffd089; }

.command-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.quick-command {
    width: 100%;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
    color: var(--text);
    border-radius: 14px;
    padding: 12px;
    cursor: pointer;
    text-align: right;
}
.quick-command:hover { background: rgba(255,255,255,.08); }

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
}
.badge {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(91,140,255,.15);
    color: #b9cbff;
    border: 1px solid rgba(91,140,255,.22);
}

.chat-box {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.message { display: flex; }
.message.user { justify-content: flex-start; }
.message.assistant { justify-content: flex-end; }
.bubble {
    max-width: min(820px, 100%);
    padding: 16px 18px;
    border-radius: 18px;
    line-height: 1.9;
    white-space: pre-wrap;
}
.message.user .bubble {
    background: rgba(255,255,255,.06);
    border: 1px solid var(--line);
}
.message.assistant .bubble {
    background: linear-gradient(135deg, rgba(91,140,255,.18), rgba(123,97,255,.16));
    border: 1px solid rgba(110,130,255,.22);
}

.pdf-results {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}
.pdf-card {
    background: rgba(255,255,255,.05);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
}
.pdf-card h4 {
    margin: 0 0 8px;
    font-size: 16px;
}
.pdf-card p {
    margin: 0 0 10px;
    color: var(--muted);
    line-height: 1.8;
}
.pdf-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pdf-actions a {
    display: inline-flex;
    padding: 9px 12px;
    border-radius: 12px;
    background: rgba(91,140,255,.16);
    border: 1px solid rgba(91,140,255,.24);
}

.composer {
    border-top: 1px solid var(--line);
    padding: 18px 24px 24px;
    background: rgba(0,0,0,.12);
}
.composer textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.05);
    border-radius: 18px;
    color: var(--text);
    padding: 16px;
    resize: vertical;
    min-height: 90px;
    font-size: 15px;
}
.composer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    gap: 12px;
}
.composer button {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 12px 24px;
    cursor: pointer;
    font-weight: bold;
}
.hint { color: var(--muted); }
.footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 0 24px 18px;
    color: var(--muted);
}

code {
    background: rgba(0,0,0,.26);
    padding: 3px 7px;
    border-radius: 8px;
}

@media (max-width: 980px) {
    .shell { grid-template-columns: 1fr; }
    .footer, .topbar, .composer-actions { flex-direction: column; align-items: stretch; }
}
