:root{color-scheme:light;font-family:Segoe UI,system-ui,sans-serif;line-height:1.5;font-weight:400;color:#0f172a;background:#f1f5f9;--primary: #2563eb;--primary-hover: #1d4ed8;--border: #e2e8f0;--surface: #ffffff;--muted: #64748b;--error-bg: #fef2f2;--error-text: #b91c1c}*{box-sizing:border-box}body{margin:0;min-height:100vh}a{color:var(--primary);text-decoration:none}a:hover{text-decoration:underline}.muted{color:var(--muted)}.page-center{display:grid;place-items:center;min-height:60vh}.app-shell{min-height:100vh;display:flex;flex-direction:column}.app-header{display:flex;align-items:center;gap:1.5rem;padding:.75rem 1.5rem;background:var(--surface);border-bottom:1px solid var(--border)}.brand{font-weight:700;font-size:1.125rem;color:inherit;text-decoration:none}.app-nav{display:flex;gap:1rem}.header-actions{margin-left:auto;display:flex;align-items:center;gap:.75rem}.org-badge{font-size:.8125rem;color:var(--muted);background:#f8fafc;padding:.25rem .5rem;border-radius:999px}.app-main{flex:1;padding:1rem 1.5rem 1.5rem}.auth-page{min-height:100vh;display:grid;place-items:center;padding:1rem}.auth-card{width:100%;max-width:420px;background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:2rem;display:flex;flex-direction:column;gap:1rem}.auth-card h1{margin:0;font-size:1.5rem}.auth-card-wide{max-width:460px}.auth-footer{margin:0;text-align:center;font-size:.9375rem}.auth-divider{display:flex;align-items:center;gap:.75rem;color:var(--muted);font-size:.8125rem}.auth-divider:before,.auth-divider:after{content:"";flex:1;height:1px;background:var(--border)}.google-signin{display:flex;justify-content:center}.google-signin.is-disabled{opacity:.6;pointer-events:none}.alert-info{background:#eff6ff;color:#1d4ed8}.alert-success{background:#f0fdf4;color:#166534}.admin-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}.badge-success{background:#dcfce7;color:#166534}.badge-warning{background:#fef9c3;color:#854d0e}.badge-error{background:#fee2e2;color:#991b1b}.text-sm{font-size:.8125rem}.pairing-result{padding:1rem;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px;display:flex;flex-direction:column;gap:.5rem;align-items:flex-start}.pairing-code{margin:0;font-size:1.75rem;font-weight:700;letter-spacing:.15em;font-family:ui-monospace,monospace}.filter-select{flex-direction:row!important;align-items:center;gap:.5rem;font-size:.875rem}.filter-select select{min-width:180px}.toolbar-group{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}label{display:flex;flex-direction:column;gap:.375rem;font-size:.875rem;font-weight:500}input,textarea,select{font:inherit;padding:.625rem .75rem;border:1px solid var(--border);border-radius:8px;background:#fff}input:focus,textarea:focus,select:focus{outline:2px solid #93c5fd;border-color:var(--primary)}.btn-primary,.btn-secondary{font:inherit;cursor:pointer;border-radius:8px;padding:.625rem 1rem;border:none}.btn-primary{background:var(--primary);color:#fff}.btn-primary:hover:not(:disabled){background:var(--primary-hover)}.btn-primary:disabled{opacity:.6;cursor:not-allowed}.btn-secondary{background:#f8fafc;border:1px solid var(--border);color:inherit}.btn-sm{padding:.375rem .75rem;font-size:.875rem}.btn-link{font-size:.875rem}.alert{padding:.75rem 1rem;border-radius:8px;font-size:.875rem}.alert-error{background:var(--error-bg);color:var(--error-text)}.org-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.5rem}.org-item{width:100%;text-align:left;padding:.875rem 1rem;border:1px solid var(--border);border-radius:8px;background:#fff;cursor:pointer}.org-item:hover:not(:disabled){border-color:var(--primary)}.org-name{display:block;font-weight:600}.org-meta{display:block;font-size:.8125rem;color:var(--muted)}.chat-layout{display:grid;grid-template-columns:280px 1fr;gap:1rem;height:calc(100vh - 5rem);min-height:480px}.chat-sidebar,.chat-panel{background:var(--surface);border:1px solid var(--border);border-radius:12px;overflow:hidden;display:flex;flex-direction:column}.sidebar-header{display:flex;align-items:center;justify-content:space-between;padding:1rem;border-bottom:1px solid var(--border)}.sidebar-header h2{margin:0;font-size:1rem}.conversation-list{list-style:none;margin:0;padding:.5rem;overflow-y:auto;flex:1}.conversation-item{width:100%;text-align:left;padding:.625rem .75rem;border:none;background:transparent;border-radius:8px;cursor:pointer;font:inherit}.conversation-item:hover,.conversation-item.active{background:#eff6ff}.chat-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.25rem;border-bottom:1px solid var(--border)}.chat-header h2{margin:0;font-size:1.125rem}.model-select{flex-direction:row;align-items:center;gap:.5rem;font-size:.875rem}.messages{flex:1;overflow-y:auto;padding:1rem 1.25rem;display:flex;flex-direction:column;gap:1rem}.chat-empty{margin:auto;text-align:center;max-width:420px}.message{max-width:85%}.message-user{align-self:flex-end}.message-assistant{align-self:flex-start}.message-role{font-size:.75rem;font-weight:600;color:var(--muted);margin-bottom:.25rem}.message-body{padding:.75rem 1rem;border-radius:12px;background:#f8fafc;border:1px solid var(--border)}.message-user .message-body{background:#dbeafe;border-color:#bfdbfe}.message-body p{margin:0 0 .5rem}.message-body p:last-child{margin-bottom:0}.chat-composer{display:flex;gap:.75rem;padding:1rem 1.25rem;border-top:1px solid var(--border)}.chat-composer textarea{flex:1;resize:vertical;min-height:52px}@media(max-width:768px){.chat-layout{grid-template-columns:1fr;height:auto}.chat-sidebar{max-height:200px}}.admin-page{max-width:960px;margin:0 auto;display:flex;flex-direction:column;gap:1rem}.admin-header h1{margin:0 0 .25rem;font-size:1.5rem}.admin-tabs{display:flex;gap:.5rem;flex-wrap:wrap}.admin-tab{font:inherit;cursor:pointer;padding:.5rem 1rem;border:1px solid var(--border);border-radius:8px;background:var(--surface)}.admin-tab.active{background:#eff6ff;border-color:#93c5fd;color:var(--primary);font-weight:600}.admin-section{display:flex;flex-direction:column;gap:1rem}.agent-download-panel .agent-download-actions{display:flex;flex-wrap:wrap;gap:.75rem;margin:.75rem 0 1rem}.agent-download-btn{text-decoration:none;display:inline-flex;align-items:center;justify-content:center}.agent-download-steps{margin-top:.5rem;font-size:.9375rem}.agent-download-steps summary{cursor:pointer;color:var(--primary);font-weight:500}.agent-download-steps ol{margin:.75rem 0 0;padding-left:1.25rem}.agent-download-steps li{margin-bottom:.35rem}.card{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:1.25rem}.card h2{margin:0 0 1rem;font-size:1.125rem}.card h3{margin:0 0 .75rem;font-size:1rem}.admin-form{display:flex;flex-direction:column;gap:.75rem}.admin-form.nested{margin-bottom:1rem;padding:1rem;background:#f8fafc;border-radius:8px}.form-row{display:flex;flex-wrap:wrap;gap:.75rem;align-items:flex-end}.form-row label{flex:1;min-width:200px}.form-actions{display:flex;gap:.5rem;margin-top:.5rem}.section-toolbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem}.section-toolbar h2{margin:0}.admin-table{width:100%;border-collapse:collapse;font-size:.9375rem}.admin-table th,.admin-table td{text-align:left;padding:.625rem .5rem;border-bottom:1px solid var(--border);vertical-align:middle}.admin-table th{font-size:.8125rem;color:var(--muted);font-weight:600}.actions-cell{display:flex;gap:.375rem;flex-wrap:wrap}.checkbox-grid{display:flex;flex-direction:column;gap:.5rem}.checkbox-item{flex-direction:row!important;align-items:center;gap:.5rem;font-weight:400}.checkbox-item.inline{flex:0 0 auto;min-width:auto}.checkbox-item input{width:auto}.badge{display:inline-block;margin-left:.375rem;font-size:.75rem;padding:.125rem .375rem;border-radius:999px}.badge-muted{background:#f1f5f9;color:var(--muted)}fieldset{border:1px solid var(--border);border-radius:8px;padding:.75rem 1rem;margin:0}legend{font-size:.875rem;font-weight:600;padding:0 .25rem}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f172a73;display:grid;place-items:center;padding:1rem;z-index:100}.modal{width:100%;max-width:480px;max-height:90vh;overflow-y:auto}.modal h2{margin:0 0 .25rem;font-size:1.125rem}
