:root{--ink:#10233f;--muted:#637083;--blue:#1457d9;--blue2:#0c3f9f;--bg:#eef3fa;--card:#fff;--line:#dce4ef;--green:#147d58;--red:#b42318;--shadow:0 20px 60px rgba(20,43,84,.12)}
*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;color:var(--ink);background:radial-gradient(circle at 10% 10%,#fff 0,#edf3fb 40%,#e8eef7 100%);min-height:100vh}button,input,textarea,select{font:inherit}button{cursor:pointer}.chat-shell,.admin-shell{width:min(1120px,calc(100% - 28px));margin:28px auto}.chat-shell{max-width:860px;background:rgba(255,255,255,.96);border:1px solid rgba(255,255,255,.8);border-radius:28px;box-shadow:var(--shadow);overflow:hidden}.hero,.admin-header{display:flex;align-items:center;gap:18px;padding:24px 28px;background:linear-gradient(120deg,#0c397e,#1665e8);color:#fff}.brand-mark{display:grid;place-items:center;width:58px;height:58px;border-radius:18px;background:#fff;color:var(--blue2);font-size:32px;font-weight:900;box-shadow:0 8px 25px rgba(0,0,0,.15)}.hero h1,.admin-header h1{margin:2px 0 5px;font-size:clamp(24px,4vw,36px)}.eyebrow{margin:0;text-transform:uppercase;letter-spacing:.13em;font-size:12px;font-weight:800;opacity:.8}.subtitle{margin:0;color:#e2edff}.status-badge{margin-left:auto;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.28);padding:9px 12px;border-radius:999px;font-size:12px;white-space:nowrap}.status-badge.offline{background:rgba(180,35,24,.5)}.notice{margin:18px 22px 0;padding:12px 15px;border-radius:14px;background:#fff8db;border:1px solid #f3dfa0;font-size:13px;color:#654d00}.messages{height:min(55vh,520px);overflow:auto;padding:24px 22px 8px}.message{display:flex;gap:10px;margin:0 0 18px;align-items:flex-start}.message.user{flex-direction:row-reverse}.avatar{flex:0 0 34px;height:34px;border-radius:12px;display:grid;place-items:center;background:#dce9ff;color:#0d49af;font-size:12px;font-weight:900}.message.user .avatar{background:#e5eaf1;color:#3a4655}.bubble{max-width:78%;padding:14px 16px;border-radius:18px 18px 18px 5px;background:#f1f5fa;border:1px solid var(--line);line-height:1.55}.message.user .bubble{background:linear-gradient(135deg,#155ad9,#0c46af);color:#fff;border:0;border-radius:18px 18px 5px 18px}.waiting .bubble{opacity:.65}.sources{margin-top:13px;padding-top:10px;border-top:1px solid #d7e0ec;display:grid;gap:5px;font-size:12px}.sources strong{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}.sources a,.sources span{color:#174c9d;text-decoration:none}.suggestions{display:flex;gap:8px;flex-wrap:wrap;padding:4px 22px 14px}.suggestions button,.secondary-button{border:1px solid #c9d7eb;background:#fff;color:#174c9d;border-radius:999px;padding:9px 12px;text-decoration:none}.composer{display:flex;gap:10px;padding:15px 22px 22px;border-top:1px solid var(--line)}.composer textarea{flex:1;border:1px solid #c9d5e5;border-radius:16px;padding:13px 14px;resize:none;outline:none}.composer textarea:focus{border-color:#3d75dc;box-shadow:0 0 0 4px rgba(20,87,217,.1)}.composer button,.stack-form button{border:0;border-radius:14px;padding:0 22px;color:#fff;background:linear-gradient(135deg,#1664e8,#0c43a6);font-weight:800}.composer button:disabled{opacity:.5}.chat-shell footer,.admin-shell footer{text-align:center;color:var(--muted);font-size:12px;padding:0 20px 22px}.chat-shell footer a{color:#174c9d}.admin-shell{max-width:1180px}.admin-header{border-radius:24px;justify-content:space-between;box-shadow:var(--shadow);margin-bottom:20px}.admin-header .secondary-button{background:#fff}.admin-grid{display:grid;grid-template-columns:1.3fr .7fr;gap:20px}.panel{background:var(--card);border:1px solid rgba(212,224,239,.9);border-radius:22px;padding:22px;box-shadow:0 12px 35px rgba(20,43,84,.07)}.panel h2{margin-top:0}.wide-panel{margin-top:20px}.stack-form{display:grid;gap:13px}.stack-form label{display:grid;gap:6px;font-weight:700;font-size:13px}.stack-form input,.stack-form select{width:100%;padding:11px 12px;border:1px solid #cbd7e7;border-radius:11px;background:#fff}.stack-form button{height:44px}.two-cols{display:grid;grid-template-columns:1fr 1fr;gap:12px}.checkbox{display:flex!important;grid-template-columns:auto 1fr!important;align-items:center}.checkbox input{width:auto}.disabled{opacity:.45}.callout{background:#edf4ff;border:1px solid #cadcff;padding:12px;border-radius:12px;font-size:13px}.muted{color:var(--muted);font-size:12px}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;font-size:13px}th,td{padding:12px 10px;border-bottom:1px solid #e3e9f1;text-align:left;vertical-align:top}th{font-size:11px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted)}.pill{display:inline-block;padding:5px 8px;border-radius:999px;font-size:11px;font-weight:800}.published{background:#e2f5ed;color:var(--green)}.draft{background:#eef0f3;color:#667085}.actions{display:flex;gap:6px}.small{padding:7px 9px!important;border-radius:9px!important;border:1px solid #ccd7e5}.danger{background:#fff1f0!important;color:var(--red)!important}.unanswered{background:#fff7f6}@media(max-width:760px){.chat-shell,.admin-shell{width:100%;margin:0}.chat-shell{border-radius:0;min-height:100vh}.hero{align-items:flex-start;padding:20px}.status-badge{display:none}.messages{height:55vh}.bubble{max-width:88%}.admin-grid{grid-template-columns:1fr}.admin-header{border-radius:0}.two-cols{grid-template-columns:1fr}.actions{flex-direction:column}}

/* v0.2.0 – identifikacija korisnika i administracija pitanja */
.identity-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 22px 0;padding:10px 13px;border:1px solid #d7e2f0;border-radius:13px;background:#f7faff;font-size:13px}.identity-bar button{border:0;background:transparent;color:var(--blue);font-weight:800}.name-gate{position:absolute;inset:0;z-index:30;display:none;place-items:center;padding:22px;background:rgba(13,31,58,.66);backdrop-filter:blur(7px)}.chat-shell{position:relative}.name-gate.visible{display:grid}.name-card{width:min(430px,100%);background:#fff;border-radius:24px;padding:28px;box-shadow:0 28px 80px rgba(0,0,0,.28);display:grid;gap:12px}.name-card h2{font-size:30px;margin:0}.name-card p{margin:0;color:var(--muted);line-height:1.5}.name-card label{font-weight:800;font-size:13px;margin-top:7px}.name-card input{width:100%;padding:14px 15px;border:1px solid #c8d5e6;border-radius:13px;outline:none}.name-card input:focus{border-color:#3d75dc;box-shadow:0 0 0 4px rgba(20,87,217,.1)}.name-card button{border:0;border-radius:13px;padding:14px;color:#fff;background:linear-gradient(135deg,#1664e8,#0c43a6);font-weight:900}.name-card small{color:var(--muted);line-height:1.4}.name-icon{font-size:34px}.blue-eyebrow{color:var(--blue)!important;opacity:1}.suggestions button:disabled{opacity:.45;cursor:not-allowed}
.flash{margin:0 0 18px;padding:13px 16px;border-radius:14px;font-weight:700}.success-flash{background:#e9f8f1;border:1px solid #b8e7d2;color:#116443}.warning-flash{background:#fff4e5;border:1px solid #f4d39f;color:#80520b}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:0 0 20px}.stat-card{display:grid;gap:2px;background:#fff;border:1px solid #d9e4f1;border-radius:18px;padding:17px 19px;box-shadow:0 8px 25px rgba(20,43,84,.06)}.stat-card strong{font-size:28px;color:var(--blue2)}.stat-card span{font-size:12px;color:var(--muted)}.priority-panel{border:2px solid #d4e3fb}.section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.section-heading h2{margin:3px 0}.count-badge{min-width:42px;height:42px;padding:0 10px;border-radius:14px;display:grid;place-items:center;background:#e7f0ff;color:var(--blue2);font-size:20px;font-weight:900}.unresolved-list{display:grid;gap:14px;margin-top:16px}.question-card{border:1px solid #d9e3ef;border-left:5px solid #e46a58;border-radius:16px;padding:17px;background:#fff}.question-card h3{margin:10px 0 12px;font-size:18px}.question-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:var(--muted);font-size:12px}.person-chip{padding:5px 9px;border-radius:999px;background:#edf4ff;color:#174c9d;font-weight:800}.unanswered-pill{background:#fff0ed;color:#a83b2e}.error-pill{background:#ffe7e7;color:#a01111}.ai-result{padding:10px 12px;border-radius:11px;background:#f5f7fa;color:#4d5b6d;font-size:13px;line-height:1.5}.error-details{margin-top:10px;font-size:12px}.error-details pre{white-space:pre-wrap;background:#2c3440;color:#fff;padding:10px;border-radius:9px;overflow:auto}.teacher-answer-form{display:grid;gap:9px;margin-top:14px}.teacher-answer-form>label{font-weight:900;font-size:13px}.teacher-answer-form textarea{width:100%;resize:vertical;border:1px solid #c8d5e6;border-radius:12px;padding:12px;outline:none}.teacher-answer-form textarea:focus{border-color:#3d75dc;box-shadow:0 0 0 4px rgba(20,87,217,.1)}.answer-actions{display:flex;align-items:center;justify-content:space-between;gap:14px}.publish-check{font-weight:600!important;color:#38485c}.answer-actions button{border:0;border-radius:11px;padding:11px 16px;background:linear-gradient(135deg,#1664e8,#0c43a6);color:#fff;font-weight:900;white-space:nowrap}.empty-state{padding:28px;text-align:center;border:1px dashed #bfcde0;border-radius:14px;color:var(--muted);background:#f9fbfe}.answer-cell{min-width:280px;white-space:pre-wrap;line-height:1.45}.log-table td{min-width:120px}.log-table td:nth-child(2){min-width:260px}.log-table td:nth-child(3){min-width:300px}.detail-text{margin-top:7px;padding:9px 10px;border-radius:9px;background:#f4f7fb;white-space:pre-wrap;line-height:1.45}.teacher-text{background:#eaf7f1;color:#145c43}.kb-mark{margin-top:6px;color:var(--green);font-size:11px;font-weight:800}
@media(max-width:900px){.stats-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:760px){.identity-bar{margin-left:14px;margin-right:14px}.name-gate{position:fixed}.name-card{padding:22px}.answer-actions{align-items:stretch;flex-direction:column}.answer-actions button{width:100%}.stats-grid{padding:0 12px}.section-heading{align-items:center}}@media(max-width:460px){.stats-grid{grid-template-columns:1fr 1fr;gap:9px}.stat-card{padding:13px}.stat-card strong{font-size:23px}}

/* v0.3.0 – višejezičnost, udaljeni servis i Telegram */
.hero-text{min-width:0;flex:1}.hero-tools{display:grid;gap:10px;justify-items:end}.language-switch{display:flex;gap:5px;padding:4px;border-radius:999px;background:rgba(255,255,255,.15)}.language-switch a{display:grid;place-items:center;min-width:34px;height:28px;border-radius:999px;color:#fff;text-decoration:none;font-size:11px;font-weight:900;letter-spacing:.04em}.language-switch a.active{background:#fff;color:#154c9f}.dark-switch{background:#eaf0f8}.dark-switch a{color:#35516f}.dark-switch a.active{background:#194fa0;color:#fff}.admin-header-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end}.service-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:20px}.service-card{display:flex;gap:14px;align-items:flex-start;background:#fff;border:1px solid #d9e4f1;border-radius:18px;padding:16px 18px;box-shadow:0 8px 25px rgba(20,43,84,.05)}.service-card h3{margin:0 0 4px;font-size:16px}.service-card p{margin:0;color:#53647a;font-size:13px;line-height:1.45}.service-card small{display:block;margin-top:7px;color:#9a3d31}.service-icon{display:grid;place-items:center;width:42px;height:42px;flex:0 0 42px;border-radius:13px;background:#edf4ff;font-size:20px}.service-ok{border-left:5px solid #1a9668}.service-warning{border-left:5px solid #df9b25}.delete-question-form{display:flex;justify-content:flex-end;margin-top:10px}.bulk-actions{display:flex;justify-content:flex-end;margin:12px 0}.row-delete-button{white-space:nowrap}.embedded .chat-shell{width:100%;max-width:none;margin:0;border-radius:0;min-height:100vh}.embedded .hero{border-radius:0}.embedded footer a{display:none}
@media(max-width:760px){.hero-tools{justify-items:start;width:100%}.hero{flex-wrap:wrap}.language-switch{order:1}.service-grid{grid-template-columns:1fr}.admin-header-actions{justify-content:flex-start}.admin-header{align-items:flex-start;flex-direction:column}}
/* v0.3.2: inline modification of official answers */
.actions{flex-wrap:wrap;align-items:flex-start}
.inline-edit-answer{position:relative}
.inline-edit-answer>summary{list-style:none;white-space:nowrap;cursor:pointer;display:inline-flex;align-items:center}
.inline-edit-answer>summary::-webkit-details-marker{display:none}
.inline-edit-answer[open]>summary{background:#eaf2ff;color:#103f8b}
.inline-answer-form{display:grid;gap:9px;width:min(390px,72vw);margin-top:8px;padding:12px;border:1px solid #cbd8e8;border-radius:12px;background:#fff;box-shadow:0 14px 35px rgba(20,43,84,.14)}
.inline-answer-form textarea{width:100%;resize:vertical;border:1px solid #c8d5e6;border-radius:10px;padding:10px;line-height:1.45;min-height:115px}
.inline-answer-form textarea:focus{outline:none;border-color:#3d75dc;box-shadow:0 0 0 4px rgba(20,87,217,.1)}
.inline-answer-form button{border:0;border-radius:10px;padding:10px 14px;background:linear-gradient(135deg,#1664e8,#0c43a6);color:#fff;font-weight:900}
.kb-row-actions,.log-row-actions{min-width:205px}
@media(max-width:760px){.inline-answer-form{width:min(82vw,390px)}.kb-row-actions,.log-row-actions{min-width:180px}}
