/* ================================================
   DocuBot — spletna različica
   Temna tema, moderna tipografija
   ================================================ */

:root {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-tertiary: #2b2b2b;
    --bg-input: #181818;

    --accent: #10b981;
    --accent-hover: #059669;
    --accent-dim: rgba(16, 185, 129, 0.15);

    --text-primary: #e5e5e5;
    --text-muted: #a3a3a3;
    --text-accent: #10b981;

    --border: #4a4a4a;
    --border-subtle: #2d2d2d;

    --toast-bg: rgba(30, 41, 59, 0.9);
    --toast-color: #f8fafc;

    --msg-user-bg: #0e4c3a;
    --msg-user-border: #10b981;
    --msg-ai-bg: #1e293b;
    --msg-ai-border: #38bdf8;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;

    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --font: 'Inter', system-ui, sans-serif;
}

/* ── Reset ──────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100dvh;
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
}

/* ── Glava ──────────────────────────────────── */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 80px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 24px;
    color: var(--accent);
    line-height: 1;
}

.header-logo {
    height: 54px;
    width: auto;
    object-fit: contain;
    filter: brightness(1.1);
    border-radius: 6px;
}

.app-title {
    font-size: 30px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.header-badge {
    font-size: 11px;
    font-weight: 500;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 3px 10px;
    border-radius: 99px;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

/* ── Nadzorna plošča (Dashboard) 1.5.0 ───────── */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.dash-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.dash-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-dim);
}

.dash-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.dash-icon {
    font-size: 24px;
    background: var(--bg-tertiary);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.dash-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.dash-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-item small {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-item span {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Statusni poudarki */
.stat-item.success span {
    color: #10b981;
}

.stat-item.warning span {
    color: #f59e0b;
}

.stat-item.info span {
    color: var(--accent);
}

.header-right {
    display: flex;
    gap: 8px;
}

/* ── Layout ─────────────────────────────────── */
.app-layout {
    display: flex;
    justify-content: center;
    /* Centriranje vsebine če je to potrebno */
    height: calc(100vh - 80px);
    background: var(--bg-primary);
    /* Zagotovimo osnovno barvo */
}

/* ── Glavno področje ────────────────────────── */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ── Področje sporočil ──────────────────────── */
.chat-area {
    flex: 1;
    overflow-y: auto;
    padding: 24px 0;
    scroll-behavior: smooth;
}

.chat-messages {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 💡💡 Empty state 💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡 */
.empty-state {
    text-align: center;
    padding: 22vh 20px 60px 20px;
    color: var(--text-muted);
}

.empty-logo {
    width: 320px !important;
    height: auto !important;
    max-width: 60vw;
    object-fit: contain;
    opacity: 0.12;
    filter: grayscale(30%);
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 24px;
    border-radius: 30px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
}

/* ── Sporočilni oblački ─────────────────────── */
.message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    animation: fadeSlide 0.2s ease;
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    align-self: flex-end;
    align-items: flex-end;
}

.message.assistant {
    align-self: flex-start;
    align-items: flex-start;
}

.message-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    font-size: 11px;
    color: var(--text-muted);
}

.message-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.message.user .message-dot {
    background: var(--msg-user-border);
}

.message.assistant .message-dot {
    background: var(--msg-ai-border);
}

.message-role {
    font-weight: 600;
    font-size: 11px;
}

.message.user .message-role {
    color: #10b981;
}

.message.assistant .message-role {
    color: var(--accent);
}

.message-bubble {
    padding: 14px 18px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    line-height: 1.65;
    word-break: break-word;
    white-space: pre-wrap;
}

.message.user .message-bubble {
    background: var(--msg-user-bg);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-bottom-right-radius: 4px;
}

.message.assistant .message-bubble {
    background: var(--msg-ai-bg);
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-bottom-left-radius: 4px;
}

/* Markdown elementi v oblačkih */
.message-bubble p,
.message-bubble ul,
.message-bubble ol {
    margin-bottom: 6px;
}

.message-bubble ul,
.message-bubble ol {
    padding-left: 1.2rem;
    list-style-position: inside;
}

.message-bubble strong {
    color: #fff;
}

.message-bubble code {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
}

.message-bubble pre {
    background: #1a1a1a;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin: 8px 0;
    overflow-x: auto;
}

.message-bubble pre code {
    background: none;
    padding: 0;
}

/* Kurzor med generiranjem */
.cursor-blink {
    display: inline-block;
    width: 2px;
    height: 14px;
    background: var(--accent);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* ── Vnosno področje ────────────────────────── */
.input-area {
    padding: 14px 0 20px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.input-container {
    display: flex;
    gap: 28px;
    max-width: 100%;
    margin: 0;
    padding: 0 24px;
    width: 100%;
    align-items: flex-end;
    justify-content: center;
}

.input-container:has(.input-sidebar-spacer:not(.hidden)) {
    justify-content: space-between;
}

.input-main-content {
    flex: 1;
    max-width: 900px;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.input-sidebar-spacer {
    width: 280px;
    flex-shrink: 0;
    pointer-events: none;
}

.input-main-content .token-counter-container {
    max-width: 100%;
    margin: 0 0 10px 0;
}

.input-main-content .file-upload-area {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.input-main-content .input-wrapper {
    max-width: 100%;
    margin: 0;
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.textarea-wrapper {
    position: relative;
    flex: 1;
    display: flex;
}

.btn-upload-embedded {
    position: absolute;
    left: 12px;
    bottom: 12px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s, transform 0.1s;
    z-index: 5;
    padding: 0;
}

.btn-upload-embedded:hover {
    background: var(--bg-tertiary);
    color: var(--accent);
}

.btn-upload-embedded:active {
    transform: scale(0.92);
}

.btn-upload-embedded:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

textarea#message-input {
    flex: 1;
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
    max-height: 160px;
    overflow-y: auto;
}

textarea#message-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-dim);
}

textarea#message-input::placeholder {
    color: var(--text-muted);
}

.input-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-hint {
    max-width: 900px;
    margin: 6px auto 0;
    font-size: 11px;
    color: var(--text-muted);
}

/* ── Gumbi ──────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--accent);
    color: #0f172a;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: #383838;
}

.btn-light {
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #cbd5e1;
}

.btn-light:hover {
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid transparent;
}

.btn-ghost:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ── Modal ──────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 480px;
    max-width: 95vw;
    box-shadow: var(--shadow);
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.modal-header h2 {
    font-size: 17px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 4px;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-footer {
    display: flex;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-subtle);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    font-family: var(--font);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    resize: vertical;
}

.modal.modal-lg {
    width: 900px;
}

/* Zavihki */
.modal-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 6px;
    padding: 12px 24px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.tab-btn.active {
    color: var(--accent);
    background: var(--accent-dim);
}

/* Razdeljen pogled v nastavitvah */
.settings-split {
    display: flex;
    gap: 24px;
    height: 520px;
}

.settings-list-container {
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
}

.list-search-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--bg-secondary);
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
}

.list-search-wrapper input,
.list-search-wrapper select {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1.5px solid var(--border);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.list-search-wrapper input:focus,
.list-search-wrapper select:focus {
    outline: none;
    border-color: var(--accent);
}

.settings-list {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow-y: auto;
    padding: 4px;
}

.settings-form {
    flex: 1;
    overflow-y: auto;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.settings-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.settings-item.active {
    background: var(--accent-dim);
    color: var(--accent);
    font-weight: 600;
    border: 1px solid var(--accent-dim);
}

.item-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #334155;
    /* Temna barva za neaktivne */
    transition: all 0.2s;
    flex-shrink: 0;
    cursor: pointer;
}

.item-indicator.active {
    background: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    display: none;
    z-index: 101;
}

.settings-fab-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.status-active {
    background: #10b981;
}

.status-pending {
    background: #f59e0b;
}

.settings-item .btn-delete {
    opacity: 0;
    color: #ef4444;
    font-size: 14px;
    padding: 4px;
    cursor: pointer;
}

.settings-item:hover .btn-delete {
    opacity: 1;
}

.form-actions {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: none;
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
}

/* Navodila okno */
.help-content {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 1rem;
    line-height: 1.6;
}

.help-content h1,
.help-content h2 {
    margin-top: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.help-content h3 {
    margin-top: 1.2rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.help-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    list-style-type: disc;
}

.help-content li {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.help-content code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    color: var(--accent);
}

.help-content hr {
    border: none;
    border-top: 1px solid var(--border-subtle);
    margin: 2rem 0;
}

.help-content strong {
    color: var(--text-primary);
}

/* ── Scrollbar ──────────────────────────────── */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3d5470;
}

/* ── Markdown tabele ────────────────────────────── */
table.md-table {
    border-collapse: collapse;
    width: 100%;
    margin: 10px 0 4px;
    font-size: 13px;
}

table.md-table th {
    background: var(--bg-tertiary);
    color: var(--accent);
    font-weight: 600;
    text-align: left;
    padding: 8px 12px;
    border: 1px solid var(--border);
    white-space: nowrap;
}

table.md-table td {
    padding: 7px 12px;
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    vertical-align: top;
}

table.md-table tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.03);
}

table.md-table tr:hover td {
    background: rgba(56, 189, 248, 0.05);
}

.table-actions {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.btn-table-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    font-size: 12px;
    font-family: var(--font);
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.btn-table-action:hover {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: rgba(56, 189, 248, 0.3);
}

/* ── Pomožni razredi ────────────────────────── */
.hidden {
    display: none !important;
}

/* ── Lebdeča gumba v spodnjem desnem kotu ───────── */
#btn-about,
.settings-fab-button-placeholder {
    /* Le za skupne stile */
    position: fixed;
    bottom: 20px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.4;
    transition: all 0.2s ease;
    z-index: 50;
    line-height: 1;
}

#btn-about {
    right: 66px;
    font-family: serif;
    font-size: 19px;
    font-weight: 700;
}

#btn-settings {
    position: relative;
    /* Spremenjeno iz fixed */
    bottom: 0;
    right: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.4;
    transition: all 0.2s ease;
    z-index: 50;
    line-height: 1;
    font-size: 18px;
}

#btn-about:hover,
#btn-settings:hover {
    opacity: 1;
    color: var(--accent);
    background: var(--bg-tertiary);
    transform: translateY(-2px);
}

#btn-settings:hover {
    transform: translateY(-2px) rotate(60deg);
}

/* Tokni / Context bar */
.token-counter-container {
    max-width: 900px;
    margin: 0 auto 10px auto;
}

.token-info {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 5px;
    padding: 0 2px;
}

.progress-container {
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--success);
    transition: width 0.3s ease, background-color 0.3s ease;
}

/* Pametno opozorilo - utripanje gumba za shranjevanje */
@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
        border-color: var(--danger);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
        border-color: rgba(239, 68, 68, 0.5);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
        border-color: var(--danger);
    }
}

.btn-pulse {
    animation: pulse-border 2s infinite;
    background: #fef2f2 !important;
    color: #991b1b !important;
    border: 1px solid #ef4444 !important;
}

/* Izboljšan prikaz SSL preverjanja */
.checkbox-group {
    flex-direction: row !important;
    align-items: center;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin: 8px 0;
    cursor: pointer;
    transition: all 0.2s;
    display: flex !important;
    gap: 12px;
}

.checkbox-group:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-dim);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    cursor: pointer;
    font-size: 14px !important;
    color: var(--text-primary) !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-weight: 500 !important;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent);
}

/* Statusna informacija v spodnjem levem kotu */
.user-info-bottom {
    position: fixed;
    bottom: 8px;
    left: 10px;
    font-size: 11px;
    color: lightgray;
    opacity: 0.5;
    z-index: 9999;
    pointer-events: none;
    letter-spacing: 0.2px;
}

/* ── Toast obvestila ────────────────────────── */
.toast-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
    max-width: 400px;
    width: calc(100vw - 48px);
}

.toast {
    background: var(--toast-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    box-shadow: var(--shadow);
    color: var(--toast-color);
    font-size: 13px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1), toastOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0s, 4.7s;
}

.toast.toast-success {
    border-left: 4px solid #10b981;
}

.toast.toast-error {
    border-left: 4px solid #ef4444;
}

.toast.toast-info {
    border-left: 4px solid var(--accent);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
}

/* ── File upload area ────────────────────────── */
.file-upload-area {
    margin-top: 12px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

#btn-upload {
    padding: 6px 12px;
    font-size: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

#btn-upload:hover {
    background: #334155;
    border-color: var(--accent);
}

.uploaded-docs {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.doc-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    color: var(--text-primary);
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.doc-tag:hover {
    border-color: var(--accent-dim);
    background: var(--bg-tertiary);
}

.doc-tag-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 11px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.doc-tag-delete:hover {
    color: #ef4444 !important;
}

#rag-status-label {
    font-size: 12px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

/* ── Stranska vrstica za dokumente ─────────── */
.chat-container {
    display: flex;
    gap: 28px;
    max-width: 100%;
    margin: 0;
    padding: 0 24px;
    width: 100%;
    align-items: flex-start;
    justify-content: center;
}

.chat-container:has(.doc-sidebar:not(.hidden)) {
    justify-content: space-between;
}

.chat-container .chat-messages {
    flex: 1;
    max-width: 900px;
    margin: 0;
    padding: 0;
}

.doc-sidebar-spacer {
    width: 280px;
    flex-shrink: 0;
    pointer-events: none;
}

.doc-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 10px;
    z-index: 10;
}

.doc-sidebar-bubble {
    background: #1e1b4b; /* deep violet/indigo */
    border: 1px solid rgba(129, 140, 248, 0.3); /* indigo border */
    border-radius: var(--radius-lg);
    border-bottom-left-radius: 4px; /* matching assistant bubble style */
    padding: 16px 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.doc-sidebar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(129, 140, 248, 0.20);
    padding-bottom: 10px;
}

.doc-sidebar-icon {
    font-size: 16px;
}

.doc-sidebar-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    margin: 0;
}

.doc-sidebar-bubble .uploaded-docs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.doc-sidebar-bubble .doc-tag {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.doc-sidebar-bubble .doc-tag span:nth-child(2) {
    flex: 1;
    min-width: 0;
    text-align: left;
    margin-left: 4px;
}

.doc-sidebar-bubble #rag-status-label {
    border-top: 1px solid rgba(129, 140, 248, 0.20);
    padding-top: 12px;
    margin-top: 4px;
    width: 100%;
    display: flex;
    align-items: center;
    font-size: 11px;
    line-height: 1.4;
    color: var(--text-muted);
}

/* Responsive prilagoditve */
@media (max-width: 1200px) {
    .chat-container {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    .doc-sidebar {
        width: 100%;
        position: static;
    }
    .doc-sidebar-bubble {
        border-bottom-left-radius: var(--radius-lg);
    }
    .doc-sidebar-spacer {
        display: none !important;
    }
    .chat-container .chat-messages {
        max-width: 100%;
    }
    .input-container {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 0 24px;
    }
    .input-sidebar-spacer {
        display: none !important;
    }
    .input-main-content {
        max-width: 100%;
    }
}

/* ── Loading Overlay ────────────────────────── */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.loading-container {
    text-align: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 32px 48px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: modalIn 0.3s ease;
}

.loading-hourglass {
    font-size: 54px;
    display: inline-block;
    animation: spin-hourglass 2s ease-in-out infinite;
}

@keyframes spin-hourglass {
    0% { transform: rotate(0deg); }
    40% { transform: rotate(180deg); }
    50% { transform: rotate(180deg); }
    90% { transform: rotate(360deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.loading-subtext {
    font-size: 12px;
    color: var(--text-muted);
}
/* Mobile Specific Tweaks for Input */
@media (max-width: 768px) {
    .input-main-content .input-wrapper {
        flex-wrap: nowrap;
        gap: 6px;
    }
    .input-actions {
        width: auto;
        flex: 0 0 auto;
    }
    .input-actions .btn {
        flex: none;
        padding: 9px 12px;
    }
    .textarea-wrapper {
        flex: 1;
        min-width: 0;
    }
    .input-container {
        padding: 0 8px 45px 8px; /* Povečan spodnji odmik, da gumb ne bo več odrezan */
    }
    #btn-about, .settings-fab-container {
        bottom: 130px !important;
    }
}

/* ================================================
   DocuBot Corporate Redesign Overrides
   ================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
    --bg-primary: #f3f4f6;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f9fafb;
    --bg-input: #ffffff;

    --accent: #1e3a8a;
    --accent-hover: #1e40af;
    --accent-dim: rgba(30, 58, 138, 0.1);

    --text-primary: #111827;
    --text-muted: #4b5563;
    --text-accent: #1e3a8a;

    --border: #b2bac2;
    --border-subtle: #d1d5db;

    --toast-bg: rgba(255, 255, 255, 0.95);
    --toast-color: #0f172a;

    --msg-user-bg: #eff6ff;
    --msg-user-border: #bfdbfe;
    --msg-ai-bg: #ffffff;
    --msg-ai-border: #e5e7eb;

    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;

    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --font: 'Inter', system-ui, sans-serif;
}

html, body {
    height: 100vh !important;
    height: 100dvh !important;
    overflow: hidden !important;
}

body {
    background: var(--bg-primary) !important;
    background-image: none !important;
}

.header, .doc-sidebar, .input-container, .modal, .dash-card, .btn, .chat-message, .settings-fab-container, .fab-btn, .modal-header, .modal-footer {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow) !important;
    border-radius: var(--radius-sm) !important;
}

.header {
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
}

.doc-sidebar {
    border-right: 1px solid var(--border) !important;
    border-top: none !important;
    border-bottom: none !important;
    border-radius: 0 !important;
}

.chat-message.user {
    background: var(--msg-user-bg) !important;
    border: 1px solid var(--msg-user-border) !important;
}

.chat-message.ai {
    background: var(--msg-ai-bg) !important;
    border: 1px solid var(--msg-ai-border) !important;
}

textarea#message-input {
    background: var(--bg-input) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
}

.btn-primary {
    background: var(--accent) !important;
    border: 1px solid var(--accent) !important;
    color: white !important;
    box-shadow: none !important;
}

.btn-primary:hover {
    background: var(--accent-hover) !important;
    border-color: var(--accent-hover) !important;
    transform: none !important;
}

.btn-secondary {
    background: white !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
}

.btn-secondary:hover {
    background: var(--bg-tertiary) !important;
}

.doc-sidebar-icon {
    background: none !important;
    color: var(--accent) !important;
    -webkit-text-fill-color: var(--accent) !important;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1 !important;
    border-radius: 4px !important;
}

/* Floating Input Area Overrides */
.input-area {
    background: transparent !important;
    border-top: none !important;
    padding-bottom: 0 !important;
}

.input-container {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border) !important;
    border-radius: 24px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08) !important;
    padding: 16px 24px !important;
    max-width: 800px !important;
    margin: 0 auto 48px auto !important;
}

#input-container #input-sidebar-spacer.hidden+#left-input-spacer,
#input-container #input-sidebar-spacer:not(.hidden)+#left-input-spacer,
.input-sidebar-spacer {
    display: none !important;
}

#btn-about, .settings-fab-container {
    bottom: 48px !important;
}

@media (max-width: 768px) {
    .input-area {
        padding-bottom: 36px !important;
    }
    .input-container {
        margin: 0 16px !important;
        border-radius: 16px !important;
    }
    #btn-about, .settings-fab-container {
        bottom: 130px !important;
    }
}

/* Floating Header Overrides */
.header {
    width: calc(100% - 32px) !important;
    max-width: 1200px !important;
    margin: 16px auto !important;
    border-radius: 16px !important;
    border: 1px solid var(--border) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
}

@media (max-width: 768px) {
    .header {
        width: calc(100% - 16px) !important;
        margin: 8px auto !important;
        border-radius: 12px !important;
    }
}

/* Empty State centering */
.empty-state {
    padding-top: 35vh !important;
}

/* Fix bold text color in messages for light theme */
.message-bubble strong, .chat-message strong {
    color: var(--text-primary) !important;
}

/* RAG docs moved to settings */
#uploaded-docs .doc-tag {
    display: inline-flex;
    width: fit-content;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    gap: 8px;
}

#uploaded-docs .doc-tag span:nth-child(2) {
    flex: 1;
    min-width: 0;
    text-align: left;
    margin-left: 4px;
}
