/* ════════════════════════════════════════════════════════════════════════════
   INSIGHT Renata — AI meeting agent setup (built from the INSIGHT Template; components from Cron Jobs).

   Design system  : OpenGTD (dark header, drawer sidebar, sub-toolbar, hero,
                    stat tiles, light/dark theme, session-timer box, language flags).
   Login          : OPQ (standard Google id_token → app-issued session).
   Menu-collapse  : OPQ (hamburger collapses the sidebar on desktop).

   Clone this app, rename the APP constants in app.js, swap the menu list and the
   dashboard copy, and you have a new INSIGHT app on the house style.
════════════════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html.theme-switching, html.theme-switching *, html.theme-switching *::before, html.theme-switching *::after { transition: none !important; }

:root {
  color-scheme: light;
  --bg:#f0f2fa; --bg-card:#ffffff; --bg-hover:#e8eaf6; --bg-stripe:#f7f8fd;
  --header-bg:#13152a; --toolbar-bg:#f8f9fe;
  --text:#1e2340; --text-muted:#5a6280; --text-dim:#9aa0c0;
  --border:#dde0f0; --border-strong:#c0c6e0;
  --accent:#c0392b; --success:#27ae60; --warning:#e67e22; --info:#2980b9;
  --header-h:56px; --toolbar-h:40px;
}
html.dark {
  color-scheme: dark;
  --bg:#1e2030; --bg-card:#252840; --bg-hover:#2d3156; --bg-stripe:#222438; --toolbar-bg:#1a1c30;
  --text:#dde1f0; --text-muted:#8891b4; --text-dim:#555e80; --border:#2e3459; --border-strong:#3a4070;
}
html.dark body { color-scheme: dark; }
html, body { height:100%; background:var(--bg); color:var(--text); font-family:'Segoe UI', system-ui, -apple-system, sans-serif; font-size:13px; }

/* ─── Scrollbars — shared INSIGHT design (thin, theme-aware via color-scheme) ──
   color-scheme (above) makes the browser paint a matching native scrollbar in
   dark mode; the rules below just make it thin. Applies everywhere (global).   */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background-color: var(--border-strong); border: 2px solid transparent; background-clip: content-box; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background-color: var(--text-dim); background-clip: content-box; }
::-webkit-scrollbar-corner { background: transparent; }

/* ─── Header ───────────────────────────────────────────────────────────────── */
.app-header { height:var(--header-h); background:var(--header-bg); border-bottom:1px solid rgba(255,255,255,0.07); display:flex; align-items:center; justify-content:space-between; padding:0 16px; flex-shrink:0; gap:12px; }
.header-left { display:flex; align-items:center; flex-shrink:0; }
.header-right { display:flex; align-items:center; gap:10px; flex-shrink:0; }
.header-icon-box { width:42px; height:42px; background:#c0392b; border-radius:6px; display:flex; align-items:center; justify-content:center; flex-shrink:0; margin-right:11px; box-shadow:0 2px 8px rgba(192,57,43,0.45); }
.header-icon { width:26px; height:26px; object-fit:contain; }
.header-titles { display:flex; flex-direction:column; gap:2px; }
.header-brand-line { display:flex; align-items:baseline; gap:5px; }
.brand-main { font-size:21px; font-weight:700; color:#fff; letter-spacing:1px; }
.brand-version { font-size:11px; color:#8891b4; font-weight:500; letter-spacing:0.5px; }
.brand-tagline { font-size:11px; color:#a0a8c8; letter-spacing:0.2px; }
.header-user-info { display:flex; align-items:center; gap:8px; }
.header-avatar { width:28px; height:28px; border-radius:50%; font-size:10px; font-weight:700; color:#fff; background:#c0392b; display:flex; align-items:center; justify-content:center; flex-shrink:0; overflow:hidden; }
.header-avatar img { width:100%; height:100%; object-fit:cover; }
.header-user-name { font-size:12px; color:#c8ccde; white-space:nowrap; max-width:160px; overflow:hidden; text-overflow:ellipsis; }
.header-sep { width:1px; height:22px; background:rgba(255,255,255,0.12); margin:0 2px; }
.theme-toggle { width:30px; height:30px; border-radius:50%; border:1px solid #3a4070; background:#252840; color:#8891b4; cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:13px; flex-shrink:0; transition:color 0.2s, background 0.2s, border-color 0.2s; }
.theme-toggle:hover { color:#fff; border-color:#5a6290; background:#2d3156; }
.btn-logout { display:flex; align-items:center; gap:6px; padding:5px 11px; background:rgba(192,57,43,0.15); color:#e8a09a; border:1px solid rgba(192,57,43,0.35); border-radius:5px; font-size:12px; cursor:pointer; white-space:nowrap; }
.btn-logout:hover { background:rgba(192,57,43,0.3); color:#fff; }
.btn-logout-icon { width:30px; height:30px; border-radius:50%; border:1px solid rgba(192,57,43,0.35); background:rgba(192,57,43,0.15); color:#e8a09a; cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:13px; flex-shrink:0; }
.btn-logout-icon:hover { background:rgba(192,57,43,0.3); color:#fff; }
/* Menu-collapse button (OPQ): always visible — collapses the sidebar on desktop, opens the drawer on mobile */
.hamburger-btn { display:flex; width:34px; height:34px; border-radius:6px; border:1px solid #3a4070; background:transparent; color:#a0a8c8; cursor:pointer; font-size:15px; align-items:center; justify-content:center; flex-shrink:0; margin-right:8px; }
.hamburger-btn:hover { background:rgba(255,255,255,0.1); color:#fff; }

/* ─── Sub-toolbar (carries the back arrow + language flags) ─────────────────── */
.sub-toolbar { min-height:var(--toolbar-h); background:var(--toolbar-bg); border-bottom:1px solid var(--border); display:flex; align-items:center; padding:0 14px; gap:8px; flex-shrink:0; overflow-x:auto; -webkit-overflow-scrolling:touch; }
.sub-toolbar:empty { display:none; }
.tb-sep { width:1px; height:26px; background:var(--border-strong); flex-shrink:0; margin:0 2px; }
.tb-label { font-size:10px; font-weight:700; color:var(--text-dim); text-transform:uppercase; letter-spacing:0.5px; white-space:nowrap; flex-shrink:0; }
.tb-back-btn { display:flex; align-items:center; justify-content:center; width:28px; height:28px; flex-shrink:0; border-radius:6px; border:1px solid var(--border); background:var(--bg-card); color:var(--text-dim); text-decoration:none; font-size:12px; cursor:pointer; font-family:inherit; }
.tb-back-btn:hover { color:var(--accent); border-color:var(--accent); }

/* ─── Language flags (translator) — pixel-identical to OpenGTD ──────────────── */
.lang-btn-row { display:flex; align-items:center; gap:4px; flex-shrink:0; }
.lang-btn { display:flex; align-items:center; gap:5px; padding:5px 9px; border-radius:6px; cursor:pointer; border:1px solid var(--border); background:var(--bg-card); color:var(--text-muted); font-size:12px; font-weight:500; font-family:inherit; }
.lang-btn:hover { background:var(--bg-hover); color:var(--text); border-color:var(--border-strong); }
.lang-btn.active { background:rgba(192,57,43,0.10); border-color:rgba(192,57,43,0.45); color:#c0392b; }
html.dark .lang-btn.active { color:#e8a09a; }
.lang-flag { width:16px; height:12px; object-fit:cover; border-radius:1px; }

/* ─── Layout ───────────────────────────────────────────────────────────────── */
.app-body { height:calc(100vh - var(--header-h) - var(--toolbar-h)); display:flex; overflow:hidden; }
.sidebar { width:214px; background:var(--bg-card); border-right:1px solid var(--border); display:flex; flex-direction:column; flex-shrink:0; box-shadow:2px 0 8px rgba(0,0,0,0.04); overflow-x:hidden; overflow-y:auto; transition:width 0.24s ease, border-color 0.24s ease; }
/* Collapsed state (menu-collapse): animate the width to 0 instead of snapping away.
   overflow-x:hidden (above) keeps the content clipped cleanly during the slide, and
   prevents a horizontal scrollbar when a vertical one is present. */
body.sidebar-collapsed .sidebar { width:0; border-right-color:transparent; box-shadow:none; }
.nav-section-label { font-size:10px; font-weight:700; color:var(--text-dim); text-transform:uppercase; letter-spacing:0.8px; padding:16px 16px 6px; }
.nav-item { display:flex; align-items:center; gap:10px; padding:9px 16px; font-size:13px; color:var(--text-muted); cursor:pointer; border-left:3px solid transparent; transition:background 0.15s, color 0.15s; text-decoration:none; }
.nav-item:hover { background:var(--bg-hover); color:var(--text); }
.nav-item.active { background:var(--bg-hover); color:var(--text); border-left-color:var(--accent); font-weight:600; }
.nav-item i { width:16px; text-align:center; font-size:13px; flex-shrink:0; }
.nav-item span { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.nav-item.disabled { opacity:.5; cursor:default; pointer-events:none; }
.nav-item .lock-badge { font-size:10px; color:var(--text-dim); flex:0 0 auto; }

/* ─── Session timer — pixel-identical to OpenGTD ───────────────────────────── */
.session-timer-box { margin-top:auto; padding:14px 16px 16px; border-top:1px solid var(--border); cursor:pointer; }
.session-timer-box:hover .session-timer-label { color:var(--accent); }
.session-timer-label { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:0.7px; color:var(--text-dim); display:flex; align-items:center; gap:6px; margin-bottom:7px; }
.session-timer-value { font-size:10px; font-weight:700; color:var(--text-dim); letter-spacing:0.04em; font-variant-numeric:tabular-nums; margin-left:auto; }
.session-timer-bar-wrap { height:4px; border-radius:2px; background:var(--border); overflow:hidden; }
.session-timer-bar { height:100%; border-radius:2px; background:#27ae60; transition:width 1s linear, background 0.5s; }

/* ─── Main content ─────────────────────────────────────────────────────────── */
.main-content { flex:1; overflow-y:auto; padding:20px 24px; background:var(--bg); }
.page-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; gap:10px; flex-wrap:wrap; }
.page-title { font-size:18px; font-weight:700; color:var(--text); }
.page-subtitle { font-size:12px; color:var(--text-muted); margin-top:2px; }
.section-title { font-size:12px; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.5px; margin:22px 0 10px; display:flex; align-items:center; gap:8px; }
.section-title .st-count { font-weight:500; color:var(--text-dim); background:var(--bg-hover); border-radius:10px; padding:1px 8px; font-size:10px; }

/* ─── Dashboard hero (text left, image right) — from OpenGTD ────────────────── */
.hero { display:flex; gap:16px; align-items:stretch; margin-bottom:20px; }
.hero-info { flex:1; min-width:0; background:var(--bg-card); border:1px solid var(--border); border-radius:14px; padding:26px 30px; box-shadow:0 1px 4px rgba(0,0,0,0.05); display:flex; flex-direction:column; justify-content:flex-start; align-items:flex-start; }
.hero-media { flex:0 0 480px; border:1px solid var(--border); border-radius:14px; box-shadow:0 1px 4px rgba(0,0,0,0.05); overflow:hidden; min-height:300px; background:linear-gradient(135deg,#c0392b 0%,#13152a 100%); display:flex; align-items:center; justify-content:center; }
.hero-img { width:100%; height:100%; object-fit:cover; display:block; }
.hero-media .hero-fallback { color:rgba(255,255,255,0.85); font-size:80px; }
.hero-title { font-size:25px; font-weight:800; color:var(--text); letter-spacing:0.3px; margin-bottom:12px; line-height:1.2; }
.hero-title .accent { color:var(--accent); }
.hero-text { font-size:14px; color:var(--text-muted); line-height:1.65; max-width:620px; }
.hero-list { margin:14px 0 0; padding-left:0; list-style:none; display:flex; flex-direction:column; gap:7px; }
.hero-list li { font-size:13px; color:var(--text-muted); line-height:1.5; display:flex; align-items:flex-start; gap:8px; }
.hero-list li i { color:var(--accent); font-size:11px; margin-top:3px; flex-shrink:0; }

/* ─── Stat tiles — from OpenGTD ────────────────────────────────────────────── */
.stat-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:14px; margin-bottom:8px; }
.stat-card { background:var(--bg-card); border:1px solid var(--border); border-radius:10px; padding:16px 18px; box-shadow:0 1px 4px rgba(0,0,0,0.05); border-left:4px solid var(--tile-color, var(--text-dim)); }
.stat-count { font-size:28px; font-weight:800; color:var(--text); line-height:1; margin-bottom:6px; }
.stat-label { font-size:11px; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.4px; display:flex; align-items:center; gap:6px; }

/* ─── Generic content card (used by the 9 stub pages) ──────────────────────── */
.card { background:var(--bg-card); border:1px solid var(--border); border-radius:10px; padding:18px 20px; box-shadow:0 1px 4px rgba(0,0,0,0.05); margin-bottom:14px; }
.card-title { font-size:13px; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.4px; margin-bottom:12px; display:flex; align-items:center; gap:8px; }
.card-title i { color:var(--accent); }
.lorem { font-size:13.5px; color:var(--text-muted); line-height:1.7; }
.lorem + .lorem { margin-top:12px; }
.empty-wrap { text-align:center; color:var(--text-muted); padding:44px 20px; }
.empty-wrap i { font-size:42px; color:var(--text-dim); display:block; margin-bottom:16px; }

/* ─── Buttons ──────────────────────────────────────────────────────────────── */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:9px 15px; border-radius:6px; font-size:13px; font-weight:600; cursor:pointer; border:1px solid transparent; font-family:inherit; }
.btn-sm { padding:5px 10px; font-size:12px; }
.btn-primary { background:#c0392b; color:#fff; border-color:#c0392b; } .btn-primary:hover { background:#a93226; }
.btn-secondary { background:transparent; color:var(--text-muted); border-color:var(--border-strong); } .btn-secondary:hover { background:var(--bg-hover); color:var(--text); }

/* ─── Login (OPQ pattern) ──────────────────────────────────────────────────── */
.login-screen { position:fixed; inset:0; background:var(--header-bg); display:flex; align-items:center; justify-content:center; z-index:100; }
.login-card { width:380px; max-width:90vw; padding:40px 44px; background:var(--bg-card); border:1px solid var(--border); border-radius:12px; box-shadow:0 8px 40px rgba(0,0,0,0.35); text-align:center; }
.login-logo { display:flex; align-items:center; gap:14px; text-align:left; margin-bottom:22px; }
.login-icon-box { width:48px; height:48px; background:var(--accent); border-radius:8px; display:flex; align-items:center; justify-content:center; flex-shrink:0; box-shadow:0 3px 10px rgba(192,57,43,0.4); }
.login-icon-box img { width:30px; height:30px; object-fit:contain; }
.login-brand { display:flex; align-items:baseline; gap:5px; }
.login-brand .brand-main { color:#1e2340; } html.dark .login-brand .brand-main { color:#dde1f0; }
.login-brand .brand-version { color:var(--text-dim); }
.login-tagline { font-size:12px; color:var(--text-muted); margin-top:2px; }
.login-desc { font-size:13px; color:var(--text-muted); line-height:1.55; margin-bottom:20px; }
#googleSignInBtn { display:flex; justify-content:center; }
.login-error { font-size:12px; color:#e74c3c; text-align:center; min-height:16px; margin-top:12px; }

/* ─── Toast / loading ──────────────────────────────────────────────────────── */
.toast { position:fixed; bottom:24px; left:50%; transform:translateX(-50%) translateY(80px); background:#2c3060; color:#fff; padding:10px 20px; border-radius:8px; font-size:13px; box-shadow:0 4px 20px rgba(0,0,0,0.25); z-index:360; opacity:0; transition:transform 0.25s ease, opacity 0.25s ease; white-space:nowrap; pointer-events:none; }
.toast.toast-success { background:#1a4a2a; border-left:4px solid #27ae60; }
.toast.toast-error { background:#7b1e1e; border-left:4px solid #e74c3c; }
.toast.toast-show { opacity:1; transform:translateX(-50%) translateY(0); }
.loading-overlay { position:fixed; inset:0; background:var(--bg); display:flex; align-items:center; justify-content:center; z-index:200; }
.loading-spinner { width:40px; height:40px; border:3px solid var(--border); border-top-color:#c0392b; border-radius:50%; animation:spin 0.8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.content-loading { color:var(--text-muted); padding:48px 0; text-align:center; } .content-loading i { font-size:24px; display:block; margin-bottom:10px; color:var(--accent); }

.sidebar-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.5); z-index:50; } .overlay-show { display:block; }
.show-mobile { display:none !important; }

/* ─── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width:768px) {
  .hide-mobile { display:none !important; }
  .show-mobile { display:flex !important; }
  /* On mobile the sidebar is a drawer (transform-animated); the desktop width-collapse does not apply */
  body.sidebar-collapsed .sidebar { width:250px; border-right-color:var(--border); overflow-y:auto; }
  .sidebar { position:fixed; top:calc(var(--header-h) + var(--toolbar-h)); left:0; height:calc(100vh - var(--header-h) - var(--toolbar-h)); z-index:60; transform:translateX(-100%); transition:transform 0.25s ease; box-shadow:4px 0 20px rgba(0,0,0,0.25); width:250px; }
  .sidebar.sidebar-open { transform:translateX(0); }
  .sidebar-overlay.overlay-show { display:block; z-index:55; }
  .main-content { padding:14px 12px; }
  .page-title { font-size:16px; }
  .hero { flex-direction:column; }
  .hero-media { flex:1 1 auto; order:-1; min-height:180px; }
  .hero-img { height:200px; }
}
@media (max-width:480px) { .app-header { padding:0 10px; gap:6px; } }

/* ═══ Renata agent setup — app-specific ═══════════════════════════════════════════════ */
/* no bold anywhere (house preference); :not(i) keeps the Font Awesome glyph weights */
*:not(i) { font-weight:400 !important; }

.page-actions { display:flex; gap:8px; align-items:center; }
.muted { color:var(--text-muted); } .small { font-size:11px; } .mono { font-family:Consolas, 'Cascadia Mono', monospace; font-size:12px; }
.err-txt { color:#e74c3c; } .err-line { color:#e74c3c; font-size:11px; margin-top:2px; max-width:260px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ta-r { text-align:right; } .nowrap { white-space:nowrap; }
.lnk { color:var(--text); cursor:pointer; text-decoration:none; border-bottom:1px dotted var(--border-strong); } .lnk:hover { color:var(--accent); border-bottom-color:var(--accent); }
.btn-xs { padding:4px 8px; font-size:11px; }
.btn-danger { color:#e74c3c; } .btn-danger:hover { background:rgba(231,76,60,0.12); color:#e74c3c; border-color:rgba(231,76,60,0.5); }
.empty-sub { font-size:12px; color:var(--text-dim); margin-top:6px; }
.empty-inline { color:var(--text-dim); padding:18px 4px; font-size:12.5px; }

/* tables */
.card-flush { padding:0; overflow:auto; }
.tbl { width:100%; border-collapse:collapse; font-size:12.5px; }
.tbl th { text-align:left; font-size:10px; text-transform:uppercase; letter-spacing:0.5px; color:var(--text-dim); padding:10px 12px; border-bottom:1px solid var(--border); white-space:nowrap; }
.tbl td { padding:9px 12px; border-bottom:1px solid var(--border); vertical-align:top; }
.tbl tbody tr:last-child td { border-bottom:none; }
.tbl tbody tr:nth-child(even) td { background:var(--bg-stripe); }
.tbl tr.row-click { cursor:pointer; } .tbl tr.row-click:hover td { background:var(--bg-hover); }
.tbl tr.row-off td { opacity:.55; }
.card .tbl th:first-child, .card .tbl td:first-child { padding-left:14px; }

/* badges + status dots */
.badge { display:inline-flex; align-items:center; gap:5px; padding:2px 8px; border-radius:10px; font-size:10.5px; letter-spacing:0.3px; white-space:nowrap; }
.badge-http { background:rgba(41,128,185,0.12); color:#2980b9; } .badge-sql { background:rgba(142,68,173,0.12); color:#8e44ad; }
.badge-run { background:rgba(230,126,34,0.14); color:#e67e22; }
.dot { display:inline-block; width:9px; height:9px; border-radius:50%; vertical-align:middle; }
.dot-ok { background:#27ae60; } .dot-err { background:#e74c3c; } .dot-none { background:var(--border-strong); }
.pill { display:inline-block; padding:1px 7px; border-radius:8px; background:var(--bg-hover); color:var(--text-muted); font-size:11px; margin:2px 2px 0 0; }

/* toggle switch */
.switch { position:relative; display:inline-block; width:32px; height:18px; flex-shrink:0; cursor:pointer; }
.switch input { opacity:0; width:0; height:0; }
.switch .slider { position:absolute; inset:0; background:var(--border-strong); border-radius:18px; transition:background .2s; }
.switch .slider::before { content:''; position:absolute; width:14px; height:14px; left:2px; top:2px; background:#fff; border-radius:50%; transition:transform .2s; }
.switch input:checked + .slider { background:#27ae60; } .switch input:checked + .slider::before { transform:translateX(14px); }
.switch.big { width:40px; height:22px; margin-top:6px; } .switch.big .slider::before { width:18px; height:18px; } .switch.big input:checked + .slider::before { transform:translateX(18px); }

/* heartbeat card */
.hb-card { display:flex; align-items:center; gap:16px; background:var(--bg-card); border:1px solid var(--border); border-left:4px solid #27ae60; border-radius:10px; padding:14px 18px; margin-bottom:16px; box-shadow:0 1px 4px rgba(0,0,0,0.05); flex-wrap:wrap; }
.hb-card.hb-bad { border-left-color:#e74c3c; }
.hb-icon { font-size:26px; color:#27ae60; } .hb-bad .hb-icon { color:#e74c3c; }
.hb-main { flex:1; min-width:240px; } .hb-title { font-size:15px; color:var(--text); } .hb-sub { font-size:12px; color:var(--text-muted); margin-top:3px; }
.hb-strip { display:flex; gap:2px; align-items:flex-end; height:22px; }
.hb-bar { width:5px; height:100%; border-radius:2px; background:var(--border); }
.hb-bar.hb-idle { background:#27ae60; opacity:.35; } .hb-bar.hb-ran { background:#2980b9; } .hb-bar.hb-err { background:#e74c3c; }
.two-col { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:14px; }
@media (max-width:1100px) { .two-col { grid-template-columns:1fr; } }

/* filter bar */
.filter-bar { display:flex; gap:8px; align-items:center; margin-bottom:12px; flex-wrap:wrap; }
.filter-bar select { padding:6px 10px; border-radius:6px; border:1px solid var(--border-strong); background:var(--bg-card); color:var(--text); font-size:12px; font-family:inherit; }

/* forms */
.f { display:flex; flex-direction:column; gap:4px; margin-bottom:12px; min-width:0; } .f-grow { flex:1; }
.frow { display:flex; gap:12px; align-items:flex-start; flex-wrap:wrap; }
.f label { font-size:10.5px; text-transform:uppercase; letter-spacing:0.5px; color:var(--text-dim); }
.f input:not([type=checkbox]), .f select, .f textarea { padding:7px 10px; border-radius:6px; border:1px solid var(--border-strong); background:var(--bg); color:var(--text); font-size:13px; font-family:inherit; width:100%; }
.f textarea { resize:vertical; line-height:1.45; } .f input.mono, .f textarea.mono { font-family:Consolas, 'Cascadia Mono', monospace; font-size:12px; }
.f input:focus, .f select:focus, .f textarea:focus { outline:none; border-color:var(--accent); }
.f input[type=number] { width:110px; }
.hm { display:flex; align-items:center; gap:4px; } .hm select { width:auto; }
.seg { display:inline-flex; align-self:flex-start; border:1px solid var(--border-strong); border-radius:6px; overflow:hidden; }
.seg-btn { padding:7px 14px; background:var(--bg-card); color:var(--text-muted); border:none; cursor:pointer; font-family:inherit; font-size:12.5px; display:flex; align-items:center; gap:6px; }
.seg-btn + .seg-btn { border-left:1px solid var(--border-strong); }
.seg-btn.active { background:rgba(192,57,43,0.10); color:var(--accent); }
.daybtns { display:flex; gap:10px; flex-wrap:wrap; } .chk { display:flex; align-items:center; gap:5px; font-size:12.5px; color:var(--text); text-transform:none; letter-spacing:0; }
.sched-preview { background:var(--bg); border:1px dashed var(--border-strong); border-radius:6px; padding:8px 10px; margin-top:2px; }
.form-error { color:#e74c3c; font-size:12px; min-height:16px; }
.copyrow { display:flex; gap:6px; align-items:center; margin-top:6px; } .copyrow input { flex:1; padding:7px 10px; border-radius:6px; border:1px solid var(--border-strong); background:var(--bg); color:var(--text); font-size:12px; min-width:0; }

/* modal */
.modal-wrap { position:fixed; inset:0; z-index:300; background:rgba(0,0,0,0.55); display:flex; align-items:center; justify-content:center; padding:20px; }
.modal { background:var(--bg-card); color:var(--text); border:1px solid var(--border); border-radius:12px; width:720px; max-width:100%; max-height:92vh; display:flex; flex-direction:column; box-shadow:0 12px 50px rgba(0,0,0,0.4); }
.modal-wide { width:900px; }
.modal-head { display:flex; align-items:center; justify-content:space-between; padding:14px 18px; border-bottom:1px solid var(--border); }
.modal-title { font-size:15px; display:flex; align-items:center; gap:8px; } .modal-title i { color:var(--accent); }
.modal-x { border:none; background:transparent; color:var(--text-dim); font-size:16px; cursor:pointer; width:28px; height:28px; border-radius:6px; } .modal-x:hover { background:var(--bg-hover); color:var(--text); }
.modal-body { padding:16px 18px; overflow-y:auto; }
.modal-foot { display:flex; justify-content:flex-end; gap:8px; padding:12px 18px; border-top:1px solid var(--border); }
.kv { display:grid; grid-template-columns:auto 1fr; gap:4px 14px; font-size:12.5px; margin-bottom:12px; }
.kv-k { color:var(--text-dim); text-transform:uppercase; font-size:10.5px; letter-spacing:0.5px; padding-top:2px; }
.out { background:var(--bg); border:1px solid var(--border); border-radius:6px; padding:10px 12px; font-family:Consolas, 'Cascadia Mono', monospace; font-size:11.5px; line-height:1.45; max-height:45vh; overflow:auto; white-space:pre-wrap; word-break:break-word; color:var(--text); }
.out-err { color:#e74c3c; border-color:rgba(231,76,60,0.4); }
@media (max-width:768px) { .modal { width:100%; } .frow { flex-direction:column; } .hb-strip { width:100%; } }

/* ═══ Renata — extra components ═══════════════════════════════════════════════ */
.st { display:inline-flex; align-items:center; gap:6px; padding:2px 9px; border-radius:10px; font-size:11px; white-space:nowrap; }
.st-joining, .st-created { background:rgba(41,128,185,0.12); color:#2980b9; }
.st-waiting { background:rgba(230,126,34,0.14); color:#e67e22; }
.st-in_call { background:rgba(39,174,96,0.14); color:#27ae60; }
.st-done { background:var(--bg-hover); color:var(--text-muted); }
.st-revoked, .st-error { background:rgba(231,76,60,0.12); color:#e74c3c; }
.st-in_call::before { content:''; width:7px; height:7px; border-radius:50%; background:#27ae60; animation:rpulse 1.6s ease-in-out infinite; }
@keyframes rpulse { 0%,100% { opacity:.35; } 50% { opacity:1; } }
.task-ta { min-height:260px; font-size:13.5px !important; line-height:1.55 !important; }
.hint { font-size:11.5px; color:var(--text-dim); line-height:1.5; }
.scope-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:8px; margin-top:6px; }
.scope-card { display:flex; gap:9px; align-items:flex-start; border:1px solid var(--border); border-radius:8px; padding:9px 11px; background:var(--bg); cursor:pointer; }
.scope-card input { margin-top:3px; }
.scope-card .sc-t { font-size:12.5px; color:var(--text); } .scope-card .sc-d { font-size:11px; color:var(--text-dim); margin-top:2px; line-height:1.4; }
.scope-disabled .scope-card { opacity:.45; pointer-events:none; }
.sec-note { display:flex; gap:10px; align-items:flex-start; border:1px solid var(--border); border-left:3px solid var(--info); border-radius:8px; padding:10px 12px; font-size:12px; color:var(--text-muted); line-height:1.5; background:var(--bg-card); margin-bottom:14px; }
.sec-note i { color:var(--info); margin-top:2px; }
.chat { display:flex; flex-direction:column; gap:8px; }
.msg { max-width:85%; padding:8px 11px; border-radius:10px; font-size:12.5px; line-height:1.45; white-space:pre-wrap; }
.msg-user { align-self:flex-start; background:var(--bg-hover); color:var(--text); }
.msg-renata { align-self:flex-end; background:rgba(63,183,166,0.14); color:var(--text); }
.msg-error { align-self:center; background:rgba(231,76,60,0.10); color:#e74c3c; font-size:11.5px; }
.msg-meta { font-size:10px; color:var(--text-dim); margin-bottom:2px; }
.kb-body { max-width:560px; color:var(--text-muted); font-size:12px; line-height:1.45; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
