:root {
    --spl-primary: #56355b;
    --spl-primary-dark: #38223b;
    --spl-cyan: #00AFCB;
    --spl-mint: #9dcab9;
    --spl-mint-bg: #ebf5f1;
    --spl-purple-bg: #faf8fb;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: 'Open Sans', 'Inter', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #faf8fb 55%, #ebf5f1 100%);
    color: #212529;
}

.spl-header-flag {
    background-color: var(--spl-primary);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 4px;
    display: inline-block;
    line-height: 1.4;
}

.spl-card {
    background: #ffffff;
    border: 1px solid rgba(86, 53, 91, 0.14);
    box-shadow: 0 8px 24px rgba(86, 53, 91, 0.06);
    border-radius: 16px;
}

.nel-login-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(135deg, #f8f9fa 0%, #faf8fb 55%, #ebf5f1 100%);
}

.nel-chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 88px);
    max-width: 980px;
    margin: 0 auto;
    width: 100%;
}

.nel-messages-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 16px 8px;
}

.nel-bubble-user {
    background: linear-gradient(135deg, #56355b 0%, #38223b 100%);
    color: #ffffff;
    border-radius: 16px 16px 4px 16px;
    padding: 12px 16px;
    max-width: 82%;
    margin-left: auto;
    box-shadow: 0 4px 14px rgba(86, 53, 91, 0.18);
    white-space: pre-wrap;
    line-height: 1.55;
}

.nel-bubble-assistant {
    background: #ffffff;
    color: #212529;
    border: 1px solid rgba(86, 53, 91, 0.14);
    border-radius: 16px 16px 16px 4px;
    padding: 14px 18px;
    max-width: 88%;
    box-shadow: 0 4px 14px rgba(86, 53, 91, 0.06);
    line-height: 1.6;
}

.nel-markdown p {
    margin: 0 0 0.65rem 0;
}

.nel-markdown p:last-child {
    margin-bottom: 0;
}

.nel-markdown ul, .nel-markdown ol {
    margin: 0.4rem 0 0.75rem 1.25rem;
    padding: 0;
}

.nel-markdown li {
    margin-bottom: 0.25rem;
}

.nel-markdown h1, .nel-markdown h2, .nel-markdown h3 {
    color: #38223b;
    font-weight: 700;
    margin: 0.8rem 0 0.4rem 0;
}

.nel-markdown h1 { font-size: 1.2rem; }
.nel-markdown h2 { font-size: 1.08rem; }
.nel-markdown h3 { font-size: 1rem; }

.nel-markdown code {
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-variant-ligatures: none;
    background: #faf8fb;
    border: 1px solid rgba(86, 53, 91, 0.15);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.88em;
    color: #38223b;
}

.nel-markdown pre {
    background: #1e1b24;
    color: #f8f9fa;
    padding: 12px 14px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 0.6rem 0;
}

.nel-markdown pre code {
    background: transparent;
    border: none;
    color: inherit;
    padding: 0;
}

.nel-markdown table {
    border-collapse: collapse;
    width: 100%;
    margin: 0.6rem 0;
    font-size: 0.92em;
}

.nel-markdown th, .nel-markdown td {
    border: 1px solid rgba(86, 53, 91, 0.16);
    padding: 6px 10px;
    text-align: left;
}

.nel-markdown th {
    background: #faf8fb;
    color: #38223b;
    font-weight: 700;
}

.nel-composer {
    background: #ffffff;
    border: 1px solid rgba(86, 53, 91, 0.18);
    border-radius: 16px;
    padding: 10px 14px;
    box-shadow: 0 6px 20px rgba(86, 53, 91, 0.08);
}

.nel-sidebar-section-title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #56355b;
    padding: 12px 16px 6px 16px;
}

.nel-input-native {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.nel-input-native:focus {
    border-color: #56355b;
    box-shadow: 0 0 0 3px rgba(86, 53, 91, 0.15);
}

.nel-btn-primary {
    width: 100%;
    padding: 11px 16px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #56355b 0%, #38223b 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: opacity 0.15s;
}

.nel-btn-primary:hover {
    opacity: 0.94;
}
