[hidden] { display:none !important; }
.login-panel { min-height:100dvh; display:grid; place-items:center; padding:24px; }
.account-card { width:min(440px,100%); border:1px solid var(--line); border-radius:20px; padding:28px; background:rgba(255,255,255,.94); box-shadow:0 12px 45px rgba(37,99,235,.12); }
.account-card h1 { font-size:28px; margin:0 0 8px; color:var(--blue); }
.account-card p, .account-dialog p { color:var(--muted); line-height:1.5; }
.account-form { display:grid; gap:14px; }
.account-form label { display:grid; gap:6px; font-size:13px; }
.account-form input { width:100%; padding:11px; border:1px solid var(--line); border-radius:9px; background:white; color:var(--text); font:inherit; }
.account-form input:focus { outline:2px solid rgba(37,99,235,.4); outline-offset:2px; }
.account-form button, .account-dialog button, #documentTabsBar button, .pdf-window-actions button, .account-controls button, #moreHistory, #retryButton, .al-explorer .folder-toolbar button, .al-explorer .explorer-heading button {
  padding:9px 12px; border:1px solid var(--line); border-radius:9px; background:#fff; color:#1d4ed8; cursor:pointer; font:inherit;
}
.account-form button[type=submit] { background:var(--blue); color:white; }
.account-form button:disabled, .account-dialog button:disabled, .al-explorer .folder-toolbar button:disabled, .al-explorer .explorer-heading button:disabled { opacity:.5; cursor:wait; }
.form-message { min-height:20px; font-size:13px; overflow-wrap:anywhere; }
.account-controls { display:flex; flex-wrap:wrap; gap:6px; padding:10px 0; border-top:1px solid var(--line); }
.account-controls strong { flex:0 0 100%; font-size:12px; overflow-wrap:anywhere; }
.account-controls button { font-size:11px; padding:6px 8px; }
.account-dialog { width:min(560px,calc(100% - 24px)); max-height:85dvh; overflow:auto; padding:24px; border:1px solid var(--line); border-radius:18px; color:var(--text); }
.account-dialog::backdrop { background:rgba(15,23,42,.38); backdrop-filter:blur(3px); }
.dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.dialog-heading h2 { margin:0; font-size:21px; }
.account-row { display:flex; flex-wrap:wrap; gap:8px; padding:12px 0; border-bottom:1px solid var(--line); font-size:12px; }
.account-row span { flex:0 0 100%; overflow-wrap:anywhere; }
#adminUsers { margin:16px 0; }
#resetForm { border:1px solid var(--line); padding:12px; border-radius:10px; margin:14px 0; }
#appNotice { margin:6px 0; min-height:18px; color:#1d4ed8; font-size:12px; }
#retryButton { margin-bottom:8px; font-size:12px; }
@media (max-width:700px) {
  .account-card { padding:22px; }
  .account-dialog { padding:18px; }
  .account-controls button { min-height:32px; }
}

#googleSection { margin:20px 0; }
#googleButton, #googleLinkButton { min-height:44px; }
#googleRefresh { border:0; background:transparent; color:var(--blue); cursor:pointer; font:inherit; font-size:12px; }
.login-separator { border-top:1px solid var(--line); padding-top:16px; font-size:12px; text-align:center; }
#googleLinked { font-size:11px; color:var(--green); }

.form-message:empty { display:none; }
#memoryFields { border:0; padding:0; margin:0; min-width:0; display:grid; gap:12px; }
#personalization { width:100%; box-sizing:border-box; resize:vertical; min-height:110px; font:inherit; padding:12px; border:1px solid #bcccdc; border-radius:8px; }
.memory-toggle { display:flex; gap:10px; align-items:center; }
.memory-toggle input { width:auto; }
.memory-actions { display:flex; flex-wrap:wrap; gap:8px; }
#memoryList { padding:0; list-style:none; }
#memoryList li { display:flex; align-items:start; justify-content:space-between; gap:12px; padding:12px 0; border-bottom:1px solid #dbe5ed; }
#memoryList span { overflow-wrap:anywhere; min-width:0; white-space:pre-wrap; }
#memoryList button { flex-shrink:0; }

.al-explorer .folder-toolbar button:hover:not(:disabled),.al-explorer .explorer-heading button:hover:not(:disabled){background:#edf3ff;border-color:#cbd7eb}
.al-explorer .folder-toolbar button:focus-visible,.al-explorer .explorer-heading button:focus-visible{outline:2px solid rgba(37,99,235,.4);outline-offset:2px}

/* Kompaktna traka AL AI eksplorera; zadržava zajednički izgled dugmadi. */
#alExplorer .folder-toolbar{display:grid;grid-template-columns:1.15fr .8fr 1.2fr;gap:6px;flex-wrap:nowrap}
#alExplorer .folder-toolbar button{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-width:0;white-space:nowrap;padding:7px 6px;font-size:clamp(10px,3.1vw,12px)}
#alExplorer .folder-toolbar svg{width:14px;height:14px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#explorerProject{appearance:none;padding-right:36px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23566580' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center}

.al-explorer{container-type:inline-size}#alExplorer .folder-toolbar button{font-size:clamp(10px,3.6cqw,12px)}

.browser-history-item{position:relative;border-bottom:1px solid var(--border,#d4dce8);padding-top:30px}
.browser-history-actions{position:absolute;top:3px;right:3px;display:flex;gap:4px}
.browser-history-actions button{padding:2px 8px;min-width:28px}
.browser-history-item .browser-history-entry{width:100%;border:0}
#browserPage.browser-page-original{padding:0;overflow:hidden;display:flex;min-height:300px}
.browser-original-frame{border:0;width:100%;height:100%;min-height:55vh;flex:1;background:white}
.browser-footer{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
#browserViewNote{flex:1;min-width:180px}

.browser-zoom-controls{display:flex;align-items:center;gap:4px;flex-shrink:0}
.browser-zoom-controls #browserZoomReset{min-width:58px;font-variant-numeric:tabular-nums}
.browser-zoom-controls [aria-pressed=true]{background:#eff6ff;border-color:#93b5ec}
.browser-tabbar{align-items:center;min-width:0}
#browserPage.browser-page-original{position:relative;min-height:0}
.browser-original-frame{position:absolute;top:0;left:0;min-height:0;max-width:none;transform-origin:top left;flex:none}
.browser-zoom-content{min-width:0;overflow-wrap:anywhere}
@media(max-width:600px){.browser-tabbar{flex-wrap:wrap}.browser-tabbar #browserTabs{flex-basis:100%}.browser-zoom-controls{margin-left:auto}}

.browser-heading>button{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
.browser-heading>button svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.browser-heading>button[aria-pressed=true]{background:#eff6ff;border-color:#93b5ec}
.web-browser-dialog.browser-maximized{width:90vw;height:90dvh;max-width:90vw;max-height:90dvh;margin:auto;inset:0;border-radius:18px;box-sizing:border-box}

/* Browser chrome: title, tabs and window actions share the top row. */
.browser-heading{min-width:0;gap:6px;flex-shrink:0}
.browser-heading h2{flex:0 0 auto;font-size:17px;white-space:nowrap}
.browser-heading .browser-tabbar{flex:1;min-width:0;overflow:hidden;flex-wrap:nowrap}
.browser-heading #browserTabs{flex-basis:auto;justify-content:flex-start}
.browser-heading .browser-tab [role=tab]{max-width:160px}
.browser-address{min-width:0;align-items:center;flex-shrink:0}
.browser-address>button{flex-shrink:0;white-space:nowrap}
#browserStatus:empty{display:none}
@media(min-width:701px){
 .browser-address{flex-wrap:nowrap;gap:5px}
 .browser-address input{min-width:70px;width:0;flex:1 1 180px}
 .browser-address button{padding:7px 8px}
 .browser-zoom-controls{gap:3px}
 .browser-zoom-controls #browserZoomReset{min-width:50px}
}
@media(max-width:600px){
 .browser-heading{flex-wrap:wrap}
 .browser-heading h2{flex:1;font-size:15px}
 .browser-heading .browser-tabbar{order:1;flex-basis:100%}
}

#browserStatus.browser-loading{display:flex;align-items:center;gap:8px}
#browserStatus.browser-loading::before{content:"";display:inline-block;width:14px;height:14px;flex:0 0 14px;border:2px solid #cbdcf9;border-top-color:var(--blue,#2563eb);border-radius:50%;animation:browser-loading-spin .8s linear infinite}
@keyframes browser-loading-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){#browserStatus.browser-loading::before{animation:none;border-right-color:var(--blue,#2563eb)}}
