/* oneCTL tweaks on top of AdminLTE 4. */
.sidebar-brand .brand-link { font-size: 1.35rem; letter-spacing: .02em; }
.brand-mark { font-weight: 700; }
.login-logo { font-size: 2rem; text-align: center; margin-bottom: .75rem; }
.login-logo b { font-weight: 700; }
.kv th { width: 11rem; font-weight: 500; color: var(--bs-secondary-color); }
.kv th, .kv td { padding: .55rem 0; }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: 0; }
.progress-sm { height: .45rem; }
.info-box .progress { margin: .35rem 0 0; }

/* ---- file manager */
.fm-table .fm-check { width: 2rem; }
.fm-table .fm-name { word-break: break-all; }
.CodeMirror { height: 68vh; border: 1px solid var(--bs-border-color); border-radius: .375rem; font-size: 14px; }
.CodeMirror-focused { border-color: var(--bs-primary); }

/* Backups */
.backup-log { max-height: 24rem; overflow: auto; white-space: pre-wrap; }
.log-view { max-height: 36rem; overflow: auto; white-space: pre-wrap; word-break: break-all; }

/* two-factor setup: the QR code is drawn on white so every app can read it, also in dark mode */
.qr-box svg { width: 14rem; height: 14rem; max-width: 100%; border-radius: .25rem; }
.f2b-num { width: 5rem; display: inline-block; }
.f2b-activity { max-height: 24rem; overflow: auto; }

/* assistant */
.ai-chat { max-height: 34rem; overflow-y: auto; }
.ai-msg { padding: .5rem .75rem; border-radius: .5rem; margin-bottom: .6rem; max-width: 95%; }
.ai-user { background: var(--bs-primary-bg-subtle, #cfe2ff); margin-left: auto; width: fit-content; }
.ai-bot { background: var(--bs-tertiary-bg, #f1f3f5); }
.ai-bot p:last-child, .ai-bot ul:last-child, .ai-bot ol:last-child { margin-bottom: 0; }
.ai-note, .ai-tools { margin: .25rem 0 .6rem; color: var(--bs-secondary-color, #6c757d); }
.ai-code { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); padding: .5rem; border-radius: .25rem; overflow-x: auto; white-space: pre-wrap; word-break: break-all; font-size: .85em; }
.ai-bar { width: 100%; height: .6rem; appearance: none; -webkit-appearance: none; border: 0; border-radius: .3rem; overflow: hidden; background: var(--bs-secondary-bg, #e9ecef); display: block; }
.ai-bar::-webkit-progress-bar { background: var(--bs-secondary-bg, #e9ecef); }
.ai-bar-ok::-webkit-progress-value { background: #198754; } .ai-bar-ok::-moz-progress-bar { background: #198754; }
.ai-bar-warn::-webkit-progress-value { background: #ffc107; } .ai-bar-warn::-moz-progress-bar { background: #ffc107; }
.ai-bar-danger::-webkit-progress-value { background: #dc3545; } .ai-bar-danger::-moz-progress-bar { background: #dc3545; }

/* Logos */
.sidebar-brand .brand-link { padding: .4rem .75rem; }
.brand-logo { height: 62px; width: auto; max-width: 100%; display: block; }
.login-logo-img { max-width: 300px; max-height: 110px; width: auto; height: auto; }
.login-logo { margin-bottom: .5rem; }
.brand-preview { border-radius: .375rem; padding: .75rem; text-align: center; border: 1px solid var(--bs-border-color); }
.brand-preview-dark { background: #343a40; }
.brand-preview-light { background: #f8f9fa; }
.brand-preview-img { max-width: 100%; max-height: 80px; width: auto; height: auto; }
