:root{
  --bg:#f7f7f5;
  --panel:#ffffff;
  --panel-alt:#f4f6fb;
  --sidebar:#fbfbfa;
  --border:#e6e6e3;
  --text:#111827;
  --muted:#556071;
  --accent:#2563eb;
  --danger:#b91c1c;
  --hover:rgba(15,23,42,.06);
  --hover-strong:rgba(15,23,42,.09);
  --accent-soft:rgba(37,99,235,.12);
  --accent-border:rgba(37,99,235,.28);
  --danger-soft:rgba(185,28,28,.10);
  --danger-border:rgba(185,28,28,.28);
  --focus-ring:rgba(37,99,235,.16);
  --upload-drag:rgba(37,99,235,.10);
  --code-bg:rgba(15,23,42,.06);
  --modal-backdrop:rgba(15,23,42,.45);
  --shadow:0 1px 2px rgba(15,23,42,.06),0 1px 1px rgba(15,23,42,.04);
  --radius:14px;
}



/* Theme
   - Default: light variables in :root
   - System dark: prefers-color-scheme
   - Forced: html[data-theme="light"|"dark"]
*/
@media (prefers-color-scheme: dark){
  :root{
    --bg:#0b1020;
    --panel:#111827;
    --panel-alt:#0f172a;
    --sidebar:#0d1326;
    --border:#2c3a4f;
    --text:#f3f7ff;
    --muted:#c5d2e3;
    --accent:#60a5fa;
    --danger:#fca5a5;
    --hover:rgba(148,163,184,.14);
    --hover-strong:rgba(148,163,184,.20);
    --accent-soft:rgba(96,165,250,.18);
    --accent-border:rgba(96,165,250,.38);
    --danger-soft:rgba(252,165,165,.16);
    --danger-border:rgba(252,165,165,.34);
    --focus-ring:rgba(96,165,250,.22);
    --upload-drag:rgba(96,165,250,.18);
    --code-bg:rgba(148,163,184,.12);
    --modal-backdrop:rgba(2,6,23,.68);
    --shadow:0 1px 2px rgba(0,0,0,.42),0 1px 1px rgba(0,0,0,.32);
  }
}
html[data-theme="light"]{
  --bg:#f7f7f5;
  --panel:#ffffff;
  --panel-alt:#f4f6fb;
  --sidebar:#fbfbfa;
  --border:#e6e6e3;
  --text:#111827;
  --muted:#556071;
  --accent:#2563eb;
  --danger:#b91c1c;
  --hover:rgba(15,23,42,.06);
  --hover-strong:rgba(15,23,42,.09);
  --accent-soft:rgba(37,99,235,.12);
  --accent-border:rgba(37,99,235,.28);
  --danger-soft:rgba(185,28,28,.10);
  --danger-border:rgba(185,28,28,.28);
  --focus-ring:rgba(37,99,235,.16);
  --upload-drag:rgba(37,99,235,.10);
  --code-bg:rgba(15,23,42,.06);
  --modal-backdrop:rgba(15,23,42,.45);
  --shadow:0 1px 2px rgba(15,23,42,.06),0 1px 1px rgba(15,23,42,.04);
}
html[data-theme="dark"]{
  --bg:#0b1020;
  --panel:#111827;
  --panel-alt:#0f172a;
  --sidebar:#0d1326;
  --border:#2c3a4f;
  --text:#f3f7ff;
  --muted:#c5d2e3;
  --accent:#60a5fa;
  --danger:#fca5a5;
  --hover:rgba(148,163,184,.14);
  --hover-strong:rgba(148,163,184,.20);
  --accent-soft:rgba(96,165,250,.18);
  --accent-border:rgba(96,165,250,.38);
  --danger-soft:rgba(252,165,165,.16);
  --danger-border:rgba(252,165,165,.34);
  --focus-ring:rgba(96,165,250,.22);
  --upload-drag:rgba(96,165,250,.18);
  --code-bg:rgba(148,163,184,.12);
  --modal-backdrop:rgba(2,6,23,.68);
  --shadow:0 1px 2px rgba(0,0,0,.42),0 1px 1px rgba(0,0,0,.32);
}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;font:14px/1.45 system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;color:var(--text);background:var(--bg)}
html[data-theme="dark"],html[data-theme="dark"] body{color-scheme:dark}
html[data-theme="light"],html[data-theme="light"] body{color-scheme:light}
@media (prefers-color-scheme: dark){html:not([data-theme="light"]),html:not([data-theme="light"]) body{color-scheme:dark}}

.sm-app{display:flex;height:100vh;overflow:hidden}

/* Sidebar */
.sm-sidebar{width:260px;min-width:240px;max-width:320px;background:var(--sidebar);border-right:1px solid var(--border);display:flex;flex-direction:column}
.sm-brand{display:flex;align-items:center;gap:12px;padding:16px 14px;border-bottom:1px solid var(--border)}
.sm-brand__mark{width:34px;height:34px;border-radius:10px;background:#111827;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;letter-spacing:.4px}
.sm-brand__title{font-weight:800}
.sm-brand__sub{color:var(--muted);font-size:12px;margin-top:2px;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.sm-nav{padding:10px}
.sm-nav__item{display:block;color:var(--text);text-decoration:none;padding:10px 10px;border-radius:10px;margin-bottom:4px}
.sm-nav__item:hover{background:var(--hover)}
.sm-nav__item.is-active{background:var(--accent-soft);color:var(--accent);font-weight:700;box-shadow:inset 0 0 0 1px var(--accent-border)}

.sm-sidebar__footer{margin-top:auto;padding:12px;border-top:1px solid var(--border);display:flex;flex-wrap:wrap;gap:8px}

/* Main */
.sm-main{flex:1;display:flex;flex-direction:column;min-width:0}
.sm-topbar{display:flex;align-items:center;gap:12px;padding:14px;background:var(--panel);border-bottom:1px solid var(--border)}
.sm-topbar__left{flex:1;min-width:0}
.sm-topbar__right{display:flex;gap:8px}

.sm-body{flex:1;display:flex;gap:12px;padding:12px;min-height:0}

.sm-listPane{width:420px;max-width:480px;min-width:320px;background:var(--panel);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);display:flex;flex-direction:column;min-height:0}
.sm-previewPane{flex:1;background:var(--panel);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);display:flex;flex-direction:column;min-width:0;min-height:0}

.sm-listHeader{padding:14px 14px 10px 14px;border-bottom:1px solid var(--border)}
.sm-listHeader__title{font-weight:800}
.sm-listHeader__meta{color:var(--muted);font-size:12px;margin-top:3px}

.sm-listTabs{padding:0 14px 10px 14px;border-bottom:1px solid var(--border);display:flex;gap:6px}
.sm-tabBtn{border:1px solid var(--border);background:var(--panel);border-radius:999px;padding:6px 10px;cursor:pointer;font-weight:750;font-size:12px;color:var(--muted)}
.sm-tabBtn:hover{background:var(--hover)}
.sm-tabBtn.is-active{background:var(--accent-soft);border-color:var(--accent-border);color:var(--accent)}

.sm-list{padding:8px;overflow:auto;min-height:0}

.sm-item{display:flex;flex-direction:column;gap:6px;padding:10px 10px;border-radius:12px;border:1px solid transparent;cursor:pointer}
.sm-item:hover{background:var(--hover)}
.sm-item.is-selected{border-color:var(--accent-border);background:var(--accent-soft)}

.sm-item__top{display:flex;align-items:center;gap:8px;min-width:0}
.sm-item__title{font-weight:700;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sm-pill{font-size:11px;padding:2px 8px;border-radius:999px;border:1px solid var(--border);color:var(--muted);white-space:nowrap}
.sm-pill--accent{border-color:var(--accent-border);color:var(--accent);background:var(--accent-soft)}
.sm-pill--danger{border-color:var(--danger-border);color:var(--danger);background:var(--danger-soft)}

.sm-item__mid{color:var(--muted);font-size:12px;display:flex;gap:10px;flex-wrap:wrap}
.sm-item__mid span{white-space:nowrap}
.sm-item__bot{color:var(--muted);font-size:12px}

.sm-previewHeader{padding:14px;border-bottom:1px solid var(--border)}
.sm-previewHeader__title{font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sm-previewHeader__sub{color:var(--muted);font-size:12px;margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.sm-previewEmpty{padding:18px;overflow:auto}
.sm-previewFrame{flex:1;width:100%;border:0;border-bottom-left-radius:var(--radius);border-bottom-right-radius:var(--radius)}

/* Form controls */
.sm-input{width:100%;border:1px solid var(--border);border-radius:12px;padding:10px 12px;background:var(--panel);outline:none;color:var(--text)}
.sm-input::placeholder{color:var(--muted);opacity:.95}
textarea.sm-input,select.sm-input,input.sm-input{color:var(--text)}
.sm-input:focus{border-color:var(--accent-border);box-shadow:0 0 0 3px var(--focus-ring)}

.sm-btn{border:1px solid var(--border);background:var(--panel);border-radius:12px;padding:9px 12px;cursor:pointer;font-weight:650;color:var(--text)}
.sm-btn:hover{background:var(--hover)}
.sm-btn:disabled{opacity:.45;cursor:not-allowed}
.sm-btn--ghost{background:transparent}

.sm-empty{padding:18px;color:var(--muted)}
.sm-empty__title{font-weight:800;color:var(--text)}
.sm-empty__sub{margin-top:4px}

.sm-footnote{padding:10px 14px;color:var(--muted);font-size:12px;border-top:1px solid var(--border)}

/* Modal */
.sm-modal{position:fixed;inset:0;display:none;align-items:center;justify-content:center;z-index:50}
.sm-modal.is-open{display:flex}
.sm-modal__backdrop{position:absolute;inset:0;background:var(--modal-backdrop)}
.sm-modal__panel{position:relative;background:var(--panel);border:1px solid var(--border);border-radius:16px;box-shadow:0 10px 30px rgba(0,0,0,.2);padding:16px;max-width:620px;width:min(620px,92vw)}
.sm-modal__title{font-weight:900;font-size:16px;margin-bottom:10px}
.sm-modal__actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}
.sm-modal__note{margin-top:10px;color:var(--muted);font-size:12px}

.sm-formRow{margin-top:12px}
.sm-label{display:block;font-weight:700;margin-bottom:6px}
.sm-help{color:var(--muted);font-size:12px;margin-top:6px}
.sm-help code{background:var(--code-bg);padding:1px 6px;border-radius:8px;color:var(--text);border:1px solid var(--border)}

.sm-check{display:flex;gap:10px;align-items:flex-start;color:var(--text);user-select:none}
.sm-check input{margin-top:3px}



/* Intake */
.sm-body.is-intake .sm-listPane{width:100%;max-width:none}
.sm-body.is-intake .sm-previewPane{display:none}

.sm-intake{padding:4px 2px}
.sm-intake__header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:8px 6px 2px 6px}
.sm-intake__title{font-weight:900;font-size:16px}
.sm-intake__sub{color:var(--muted);font-size:12px;line-height:1.35;max-width:560px}
.sm-intake__crumb{color:var(--text);font-weight:800}
.sm-intake__meta{margin-top:2px}
.sm-intake__actions{display:flex;gap:8px;flex-wrap:wrap}

.sm-intake__form{padding:8px 6px}
.sm-intake__fields{display:flex;flex-direction:column;gap:14px}
.sm-field{padding:12px;border:1px solid var(--border);border-radius:14px;background:var(--panel)}
.sm-field__label{font-weight:800}
.sm-field__req{color:var(--danger);font-weight:900}
.sm-field__help{color:var(--muted);font-size:12px;margin-top:4px}
.sm-field__control{margin-top:8px}
.sm-textarea{min-height:88px;resize:vertical}
.sm-select{padding-right:34px}

.sm-boxList{display:flex;flex-direction:column;gap:8px}
.sm-boxRow{display:flex;gap:10px;align-items:flex-start;color:var(--text);font-size:13px}
.sm-boxRow input{margin-top:3px}

.sm-field__uploadNote{font-size:12px;color:var(--muted);margin-bottom:8px}
.sm-field__uploadNote b{color:var(--text)}

/* File attach modal */
.sm-modalTabs{display:flex;gap:6px;margin:10px 0 8px 0}
.sm-modalTab{border:1px solid var(--border);background:var(--panel);border-radius:999px;padding:6px 10px;cursor:pointer;font-weight:800;font-size:12px;color:var(--muted)}
.sm-modalTab:hover{background:var(--hover)}
.sm-modalTab.is-active{background:var(--accent-soft);border-color:var(--accent-border);color:var(--accent)}

.sm-uploadZone{border:1px dashed var(--border);border-radius:14px;padding:14px;text-align:center;background:var(--panel);cursor:pointer;user-select:none;transition:border-color .18s ease, background .18s ease, box-shadow .18s ease}
.sm-uploadZone.is-drag{border-color:var(--accent);background:var(--upload-drag);box-shadow:0 0 0 3px var(--focus-ring)}
.sm-uploadZone__title{font-weight:900}
.sm-uploadZone__sub{margin-top:4px;color:var(--muted);font-size:12px}

.sm-chipList{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.sm-chip{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--border);border-radius:999px;padding:6px 10px;background:var(--panel)}
.sm-chip__name{font-weight:800;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sm-chip__meta{color:var(--muted);font-size:12px}
.sm-chip__x{border:1px solid var(--border);background:transparent;border-radius:999px;width:22px;height:22px;cursor:pointer;line-height:18px;font-weight:900;color:var(--muted)}
.sm-chip__x:hover{background:var(--hover)}

.sm-driveList{max-height:240px;overflow:auto;border:1px solid var(--border);border-radius:12px;padding:10px;background:var(--panel)}
.sm-driveRow{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 8px;border:1px solid var(--border);border-radius:12px;margin-bottom:8px}
.sm-driveRow:last-child{margin-bottom:0}
.sm-driveRow__name{font-weight:800;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sm-driveRow__meta{color:var(--muted);font-size:12px;margin-top:2px}
.sm-driveRow__left{min-width:0}

.sm-intake__nav{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:10px}
.sm-intake__status{padding:8px 6px 16px 6px}
.sm-intake__statusLine{color:var(--muted);font-size:12px}
.sm-intake__statusLine.is-ok{color:var(--accent);font-weight:700}
.sm-intake__statusLine.is-error{color:var(--danger);font-weight:700}
.sm-intake__statusActions{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}

.sm-intake__overlay{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:var(--modal-backdrop);z-index:60}
.sm-intake__overlay .sm-empty{background:var(--panel);border:1px solid var(--border);border-radius:16px;box-shadow:0 10px 30px rgba(0,0,0,.2)}

.sm-attachEmbed{display:flex;flex-direction:column;gap:10px}
.sm-attachEmbed__pane{border:1px solid var(--border);border-radius:14px;background:var(--panel-alt);padding:12px}
.sm-attachEmbed__summary{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.sm-attachBadge{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--accent-border);background:var(--accent-soft);border-radius:999px;padding:6px 10px;font-size:12px;font-weight:800;color:var(--text)}
.sm-attachMeta{font-size:12px;color:var(--muted)}
.sm-settingsPanel{max-width:820px;width:min(820px,96vw);max-height:calc(100vh - 28px);padding:0;display:flex;flex-direction:column;overflow:hidden}
.sm-settingsPanel .sm-modal__title{padding:18px 18px 0 18px;margin:0 0 8px 0}
.sm-settingsBody{padding:0 18px 18px 18px;overflow:auto;min-height:0}
.sm-settingsFooter{padding:12px 18px 18px 18px;border-top:1px solid var(--border);background:var(--panel);box-shadow:0 -8px 20px rgba(15,23,42,.06)}
.sm-settingsFooter .sm-modal__note{margin-top:0}
.sm-settingsFooter .sm-modal__actions{margin-top:10px;padding-top:0;border-top:0}
.sm-settingsSplit{display:flex;gap:8px;align-items:flex-start}
.sm-settingsToolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.sm-settingsToolbar .sm-input{flex:1;min-width:220px}

/* Responsive */
@media (max-width: 980px){
  .sm-listPane{width:380px;min-width:280px}
}
@media (max-width: 860px){
  .sm-body{flex-direction:column}
  .sm-listPane{width:100%;max-width:none;min-width:0}
  .sm-previewPane{width:100%}
}
@media (max-width: 720px){
  .sm-sidebar{display:none}
  .sm-topbar__right{display:none}
  .sm-settingsSplit{flex-direction:column}
  .sm-settingsNarrow{width:100%!important}
  .sm-settingsToolbar{align-items:stretch}
  .sm-settingsToolbar .sm-input{min-width:0}
  .sm-settingsPanel{width:min(100vw - 12px, 820px);max-height:calc(100vh - 12px)}
}


/* Server settings editor */
.sm-kvRow{display:flex;gap:10px;align-items:flex-start;margin-bottom:10px}
.sm-kvKey{width:220px;min-width:180px;font-weight:700;word-break:break-word}
.sm-kvVal{flex:1;min-width:0}
.sm-kvVal input{width:100%}
.sm-toast{position:fixed;left:50%;bottom:14px;z-index:80;background:var(--text);color:var(--bg);border:1px solid var(--border);border-radius:14px;padding:10px 12px;box-shadow:0 10px 30px rgba(0,0,0,.2);opacity:0;transform:translate(-50%,10px);transition:all .25s ease}
.sm-toast.is-on{opacity:1;transform:translate(-50%,0)}
.sm-confetti{position:fixed;inset:0;pointer-events:none;z-index:79}
.sm-confetti span{position:absolute;width:10px;height:10px;border-radius:2px;opacity:.9;animation:sm-confetti-fall 900ms ease-out forwards}
@keyframes sm-confetti-fall{0%{transform:translateY(0) rotate(0deg)}100%{transform:translateY(140px) rotate(220deg);opacity:0}}

/* =========================================================================
 * Agentic Auth Theme
 * Glassmorphic dark-mode authentication panel
 * ========================================================================= */

/* Backdrop — covers entire viewport */
.auth-backdrop{
  position:fixed;inset:0;z-index:100;
  display:none;align-items:center;justify-content:center;
  background:#09090b;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  color:#fafafa;
  overflow-y:auto;
}
.auth-backdrop.is-open{display:flex}

/* Dot-grid mesh background */
.auth-backdrop::before{
  content:'';position:absolute;inset:0;
  background-image:radial-gradient(rgba(255,255,255,0.05) 1px,transparent 1px);
  background-size:24px 24px;
  opacity:.4;pointer-events:none;
}

/* Ambient lighting blobs */
.auth-glow{position:absolute;border-radius:50%;pointer-events:none;filter:blur(100px)}
.auth-glow--indigo{top:10%;left:20%;width:40%;height:40%;background:rgba(79,70,229,0.10)}
.auth-glow--purple{bottom:10%;right:20%;width:40%;height:40%;background:rgba(147,51,234,0.10)}

/* Central glass card */
.auth-card{
  position:relative;z-index:1;
  width:100%;max-width:420px;
  max-height:calc(100vh - 48px);
  overflow-y:auto;
  background:rgba(24,24,27,0.4);
  backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);
  border:1px solid rgba(255,255,255,0.08);
  box-shadow:0 25px 50px -12px rgba(0,0,0,0.5);
  border-radius:24px;
  padding:32px;
  margin:24px 0;
  display:flex;flex-direction:column;
}

/* Brand header */
.auth-brand{display:flex;flex-direction:column;align-items:center;margin-bottom:32px;text-align:center}
.auth-brand__icon{
  width:48px;height:48px;border-radius:16px;
  background:linear-gradient(to bottom right,#6366f1,#9333ea);
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 10px 15px -3px rgba(99,102,241,0.25);
  margin-bottom:20px;position:relative;
}
.auth-brand__icon::after{
  content:'';position:absolute;inset:0;border-radius:16px;
  background:rgba(255,255,255,0.2);opacity:0;transition:opacity .2s;
}
.auth-brand__icon:hover::after{opacity:1}
.auth-brand__icon svg{width:24px;height:24px;color:#fff}

.auth-brand__title{
  font-size:24px;font-weight:700;letter-spacing:-0.025em;
  background:linear-gradient(to right,#fff,#a1a1aa);
  -webkit-background-clip:text;-webkit-text-fill-color:transparent;
  background-clip:text;
  margin-bottom:8px;
}
.auth-brand__sub{font-size:14px;color:#a1a1aa;line-height:1.5}

/* Form area */
.auth-form{display:flex;flex-direction:column;gap:20px}

/* Slide-in animation */
@keyframes authFadeSlideIn{
  from{opacity:0;transform:translateY(16px)}
  to{opacity:1;transform:translateY(0)}
}
.auth-animate{animation:authFadeSlideIn 500ms ease both}

/* Input groups */
.auth-fields{display:flex;flex-direction:column;gap:16px}
.auth-field{display:flex;flex-direction:column;gap:6px}
.auth-field__label{font-size:12px;font-weight:500;color:#a1a1aa;padding-left:4px}
.auth-field__row{display:flex;justify-content:space-between;align-items:center;padding:0 4px}
.auth-field__forgot{
  font-size:12px;color:#818cf8;background:none;border:none;cursor:pointer;
  padding:0;font-family:inherit;transition:color .2s;
}
.auth-field__forgot:hover{color:#a5b4fc}

.auth-field__wrap{position:relative}
.auth-field__wrap svg.auth-field__icon{
  position:absolute;top:50%;left:16px;transform:translateY(-50%);
  width:16px;height:16px;color:#71717a;pointer-events:none;
}
.auth-field__input{
  width:100%;
  background:rgba(255,255,255,0.03);
  border:1px solid rgba(255,255,255,0.1);
  color:#fff;
  padding:14px 16px 14px 44px;
  border-radius:12px;
  font-size:14px;
  font-family:inherit;
  transition:all .2s ease;
  box-sizing:border-box;
}
.auth-field__input::placeholder{color:#52525b}
.auth-field__input:focus{
  outline:none;
  border-color:rgba(129,140,248,0.5);
  background:rgba(255,255,255,0.05);
  box-shadow:0 0 0 2px rgba(129,140,248,0.2);
}
.auth-field__input--has-toggle{padding-right:44px}

/* Password toggle button */
.auth-toggle-pw{
  position:absolute;top:50%;right:16px;transform:translateY(-50%);
  background:none;border:none;cursor:pointer;padding:0;
  color:#71717a;display:flex;align-items:center;justify-content:center;
  transition:color .2s;
}
.auth-toggle-pw:hover{color:#d4d4d8}
.auth-toggle-pw svg{width:16px;height:16px}

/* Error message */
.auth-error{
  font-size:13px;color:#f87171;font-weight:500;
  min-height:0;overflow:hidden;
  transition:min-height .2s,padding .2s,opacity .2s;
  opacity:0;padding:0 4px;
}
.auth-error.is-visible{min-height:20px;opacity:1}

/* Primary action button */
.auth-btn-primary{
  width:100%;background:#fff;color:#000;
  padding:14px;border-radius:12px;border:none;
  font-weight:600;font-size:14px;cursor:pointer;
  font-family:inherit;
  transition:background .15s,opacity .15s;
  display:flex;align-items:center;justify-content:center;gap:8px;
  margin-top:4px;
}
.auth-btn-primary:hover{background:#e4e4e7}
.auth-btn-primary:disabled{opacity:.5;cursor:not-allowed}
.auth-btn-primary svg{width:16px;height:16px;opacity:.5}

/* Toggle login/signup link */
.auth-toggle-mode{
  padding-top:8px;text-align:center;
}
.auth-toggle-mode button{
  font-size:14px;color:#71717a;background:none;border:none;
  cursor:pointer;font-family:inherit;transition:color .2s;
}
.auth-toggle-mode button:hover{color:#d4d4d8}
.auth-toggle-mode button span{
  color:#fff;font-weight:500;
  border-bottom:1px solid rgba(255,255,255,0.3);
  padding-bottom:1px;
}

/* Divider */
.auth-divider{display:flex;align-items:center;gap:12px;padding:8px 0}
.auth-divider__line{flex:1;height:1px;background:rgba(255,255,255,0.1)}
.auth-divider__text{
  font-size:11px;font-weight:500;color:#71717a;
  text-transform:uppercase;letter-spacing:0.1em;
}

/* OAuth buttons row */
.auth-oauth{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.auth-oauth__btn{
  width:100%;
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.05);
  color:#fafafa;
  padding:12px;border-radius:12px;
  font-size:14px;font-weight:500;cursor:pointer;
  font-family:inherit;
  transition:background .15s;
  display:flex;align-items:center;justify-content:center;gap:8px;
}
.auth-oauth__btn:hover{background:rgba(255,255,255,0.1)}
.auth-oauth__btn svg{width:16px;height:16px}

/* Magic link button */
.auth-btn-magic{
  width:100%;
  background:rgba(99,102,241,0.1);
  color:#818cf8;
  border:1px solid rgba(99,102,241,0.2);
  padding:12px;border-radius:12px;
  font-size:14px;font-weight:500;cursor:pointer;
  font-family:inherit;
  transition:background .15s;
  display:flex;align-items:center;justify-content:center;gap:8px;
}
.auth-btn-magic:hover{background:rgba(99,102,241,0.2)}
.auth-btn-magic svg{width:16px;height:16px}

/* Magic link sent view */
.auth-magic-sent{
  display:none;flex-direction:column;align-items:center;
  text-align:center;padding:24px 0;
}
.auth-magic-sent.is-visible{display:flex}
.auth-magic-sent__icon{
  width:64px;height:64px;border-radius:50%;
  background:rgba(99,102,241,0.2);
  display:flex;align-items:center;justify-content:center;
  margin-bottom:24px;
}
.auth-magic-sent__icon svg{width:32px;height:32px;color:#818cf8}
.auth-magic-sent__title{font-size:20px;font-weight:600;margin-bottom:8px}
.auth-magic-sent__desc{font-size:14px;color:#a1a1aa;margin-bottom:32px;line-height:1.5}
.auth-magic-sent__back{
  font-size:14px;font-weight:500;color:#818cf8;
  background:none;border:none;cursor:pointer;font-family:inherit;
  transition:color .2s;
}
.auth-magic-sent__back:hover{color:#a5b4fc}

/* Signup-only fields — hidden by default */
.auth-signup-only{display:none}
.auth-backdrop.is-signup .auth-signup-only{display:flex;flex-direction:column;gap:6px}

/* Login-only elements */
.auth-login-only{display:block}
.auth-backdrop.is-signup .auth-login-only{display:none}

/* Responsive */
@media (max-width:480px){
  .auth-card{margin:16px;padding:24px}
}

/* =========================================================================
 * Dual-Theme Support: Theme Switcher Toolbar
 * ========================================================================= */

.auth-theme-toolbar{
  position:absolute;top:16px;left:50%;transform:translateX(-50%);
  z-index:20;
  display:flex;align-items:center;gap:16px;
  padding:8px 12px;
  background:rgba(24,24,27,0.75);
  backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
  border:1px solid rgba(255,255,255,0.08);
  border-radius:12px;
  box-shadow:0 10px 25px -8px rgba(0,0,0,0.4);
  max-width:calc(100vw - 32px);
}
.auth-theme-toolbar__label{
  display:flex;flex-direction:column;line-height:1.1;
  padding-right:12px;border-right:1px solid rgba(255,255,255,0.1);
}
.auth-theme-toolbar__eyebrow{
  font-size:9px;font-weight:800;text-transform:uppercase;
  letter-spacing:0.12em;color:#71717a;
}
.auth-theme-toolbar__title{
  font-size:12px;font-weight:700;color:#fafafa;margin-top:2px;
}
.auth-theme-toolbar__buttons{
  display:flex;gap:4px;
  background:rgba(255,255,255,0.04);
  border-radius:8px;padding:3px;
}
.auth-theme-btn{
  border:none;cursor:pointer;font-family:inherit;
  padding:6px 12px;border-radius:6px;
  font-size:11px;font-weight:700;text-transform:uppercase;
  letter-spacing:0.04em;
  background:transparent;color:#a1a1aa;
  transition:background .15s,color .15s,box-shadow .15s;
}
.auth-theme-btn:hover{color:#fafafa}
.auth-theme-btn.is-active{
  background:#4f46e5;color:#fff;
  box-shadow:0 2px 6px -1px rgba(79,70,229,0.5);
}
#authThemeBrutal.is-active{
  background:#000;color:#fff;box-shadow:none;
}

/* Brutal theme override for toolbar */
.brutal-theme .auth-theme-toolbar{
  background:#fff;
  border:3px solid #000;border-radius:0;
  box-shadow:4px 4px 0 0 #000;
  backdrop-filter:none;-webkit-backdrop-filter:none;
}
.brutal-theme .auth-theme-toolbar__label{border-right-color:#000}
.brutal-theme .auth-theme-toolbar__eyebrow{color:#737373}
.brutal-theme .auth-theme-toolbar__title{color:#000}
.brutal-theme .auth-theme-toolbar__buttons{
  background:#f4f4f0;border-radius:0;padding:2px;
  border:2px solid #000;
}
.brutal-theme .auth-theme-btn{
  border-radius:0;color:#525252;font-weight:900;
}
.brutal-theme .auth-theme-btn:hover{color:#000}
.brutal-theme #authThemeBrutal.is-active{
  background:#000;color:#fff;
}
.brutal-theme #authThemeAgentic.is-active{
  background:#4f46e5;color:#fff;box-shadow:none;
}

/* =========================================================================
 * Dual-Theme Visibility Helpers
 * ========================================================================= */

.auth-agentic-only{display:flex}
.brutal-theme .auth-agentic-only{display:none}

.auth-brutal-only{display:none}
.brutal-theme .auth-brutal-only{display:flex}

/* Hide brutal brand panel by default (agentic theme) */
.auth-brutal-brand{display:none}
.brutal-theme .auth-brutal-brand{display:flex}

/* Hide ambient glow under brutal theme */
.brutal-theme .auth-glow{display:none}

/* =========================================================================
 * Neo-Brutalist Theme — Backdrop + Layout
 * ========================================================================= */

.auth-backdrop.brutal-theme{
  background:#F4F4F0;
  color:#000;
  font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  padding:0;
}

/* Override the dot-mesh ::before with a grid pattern */
.auth-backdrop.brutal-theme::before{
  background-image:
    linear-gradient(to right,rgba(0,0,0,0.05) 1px,transparent 1px),
    linear-gradient(to bottom,rgba(0,0,0,0.05) 1px,transparent 1px);
  background-size:40px 40px;
  opacity:1;
}

/* Split layout: brand panel on left, card on right */
.brutal-theme{align-items:stretch;justify-content:stretch}

/* =========================================================================
 * Neo-Brutalist Theme — Brand Panel (Left)
 * ========================================================================= */

.auth-brutal-brand{
  position:relative;z-index:1;
  flex:1 1 50%;
  max-width:50%;
  background:#FFC900;
  border-right:8px solid #000;
  padding:48px;
  flex-direction:column;
  justify-content:space-between;
  overflow:hidden;
  background-image:
    linear-gradient(to right,rgba(0,0,0,0.05) 1px,transparent 1px),
    linear-gradient(to bottom,rgba(0,0,0,0.05) 1px,transparent 1px);
  background-size:40px 40px;
}

.auth-brutal-brand__header{position:relative;z-index:2}
.auth-brutal-brand__logo{
  display:inline-flex;align-items:center;gap:10px;
  background:#fff;padding:10px 16px;
  border:4px solid #000;
  box-shadow:4px 4px 0 0 #000;
  margin-bottom:48px;
}
.auth-brutal-brand__logo span{
  font-size:22px;font-weight:900;text-transform:uppercase;
  letter-spacing:-0.03em;color:#000;
}
.auth-brutal-brand__logo svg{flex-shrink:0}

.auth-brutal-brand__body{position:relative;z-index:2;flex:1;display:flex;align-items:center}
.auth-brutal-brand__headline{
  font-size:72px;font-weight:900;line-height:0.85;
  text-transform:uppercase;letter-spacing:-0.04em;
  margin:0;color:#000;
}
.auth-brutal-brand__headline-line{display:block}
.auth-brutal-brand__headline-accent{
  display:inline-block;margin-top:8px;
  background:#FF90E8;
  padding:2px 12px;
  border:4px solid #000;
  box-shadow:4px 4px 0 0 #000;
  transform:rotate(-2deg);
}
.auth-brutal-brand__headline-accent.brutal-outline{
  background:transparent;
  -webkit-text-stroke:2px #000;
  color:transparent;
  border:none;box-shadow:none;transform:none;
  padding:0;
}

.auth-brutal-brand__footer{position:relative;z-index:2;max-width:420px}
.auth-brutal-brand__info{
  background:#fff;
  border:4px solid #000;
  box-shadow:8px 8px 0 0 #000;
  padding:24px;
  transform:rotate(1deg);
}
.auth-brutal-brand__info-head{
  display:flex;align-items:center;gap:12px;margin-bottom:12px;
}
.auth-brutal-brand__info-head h3{
  font-size:20px;font-weight:900;text-transform:uppercase;
  margin:0;color:#000;letter-spacing:-0.01em;
}
.auth-brutal-brand__info p{
  font-size:14px;font-weight:700;line-height:1.4;
  color:#525252;margin:0;
}

/* =========================================================================
 * Neo-Brutalist Theme — Auth Card (Right)
 * ========================================================================= */

.brutal-theme .auth-card{
  position:relative;z-index:1;
  flex:1 1 50%;
  max-width:560px;
  margin:auto;
  background:transparent;
  backdrop-filter:none;-webkit-backdrop-filter:none;
  border:none;
  box-shadow:none;
  border-radius:0;
  padding:48px;
  color:#000;
}

/* =========================================================================
 * Neo-Brutalist Theme — Card Header
 * ========================================================================= */

.auth-brutal-header{
  justify-content:space-between;align-items:flex-end;
  margin-bottom:32px;gap:16px;flex-wrap:wrap;
}
.auth-brutal-header__title{
  font-size:40px;font-weight:900;text-transform:uppercase;
  letter-spacing:-0.03em;margin:0;color:#000;line-height:1;
}
.auth-brutal-header__toggle{
  background:none;border:none;cursor:pointer;font-family:inherit;
  font-size:12px;font-weight:700;text-transform:uppercase;
  color:#FF5722;padding:4px 0;
  border-bottom:4px solid #000;
  transition:background .15s,color .15s;
}
.auth-brutal-header__toggle:hover{background:#000;color:#fff}

/* =========================================================================
 * Neo-Brutalist Theme — Form Fields
 * ========================================================================= */

.brutal-theme .auth-form{gap:24px}
.brutal-theme .auth-fields{gap:16px}

.brutal-theme .auth-field__label{
  font-size:12px;font-weight:900;text-transform:uppercase;
  color:#000;padding-left:0;letter-spacing:0.02em;
}
.brutal-theme .auth-field__row{padding:0}
.brutal-theme .auth-field__forgot{
  font-size:11px;font-weight:700;color:#737373;
  text-decoration:underline;
}
.brutal-theme .auth-field__forgot:hover{color:#000}

.brutal-theme .auth-field__wrap svg.auth-field__icon{
  color:#9ca3af;left:16px;width:20px;height:20px;
}
.brutal-theme .auth-field__input{
  background:#fff;
  border:4px solid #000;
  border-radius:0;
  color:#000;
  font-weight:700;
  padding:16px 16px 16px 48px;
  box-shadow:inset 4px 4px 0 0 rgba(0,0,0,0.1);
  transition:border-color .15s,background .15s;
}
.brutal-theme .auth-field__input::placeholder{color:#9ca3af;font-weight:700}
.brutal-theme .auth-field__input:focus{
  outline:none;border-color:#23A094;
  background:#f0fdfa;box-shadow:inset 4px 4px 0 0 rgba(0,0,0,0.1);
}
.brutal-theme .auth-field__input--has-toggle{padding-right:48px}

.brutal-theme .auth-toggle-pw{color:#9ca3af;right:16px}
.brutal-theme .auth-toggle-pw svg{width:20px;height:20px}
.brutal-theme .auth-toggle-pw:hover{color:#000}

/* Error */
.brutal-theme .auth-error{
  color:#DC2626;font-weight:900;text-transform:uppercase;
  font-size:12px;
}

/* =========================================================================
 * Neo-Brutalist Theme — Buttons
 * ========================================================================= */

.brutal-theme .auth-btn-primary{
  background:#23A094;color:#fff;
  border:4px solid #000;border-radius:0;
  padding:16px;
  font-size:20px;font-weight:900;text-transform:uppercase;
  letter-spacing:-0.01em;
  box-shadow:8px 8px 0 0 #000;
  transition:transform .1s,box-shadow .1s;
}
.brutal-theme .auth-btn-primary:hover:not(:disabled){
  transform:translate(4px,4px);
  box-shadow:4px 4px 0 0 #000;
}
.brutal-theme .auth-btn-primary:active:not(:disabled){
  transform:translate(8px,8px);
  box-shadow:0 0 0 0 #000;
}
.brutal-theme .auth-btn-primary svg{width:22px;height:22px;opacity:1;color:#fff}

/* Toggle mode link */
.brutal-theme .auth-toggle-mode{padding-top:8px}
.brutal-theme .auth-toggle-mode button{
  font-size:13px;font-weight:700;color:#737373;
}
.brutal-theme .auth-toggle-mode button:hover{color:#000}
.brutal-theme .auth-toggle-mode button span{
  color:#000;font-weight:900;border-bottom-color:#000;
}

/* Divider */
.brutal-theme .auth-divider{padding:16px 0}
.brutal-theme .auth-divider__line{
  background:#000;height:4px;
}
.brutal-theme .auth-divider__text{
  font-size:12px;font-weight:900;color:#000;
  letter-spacing:0.02em;
}

/* OAuth buttons */
.brutal-theme .auth-oauth{gap:12px}
.brutal-theme .auth-oauth__btn{
  background:#fff;color:#000;
  border:4px solid #000;border-radius:0;
  padding:12px;
  font-size:13px;font-weight:900;text-transform:uppercase;
  box-shadow:4px 4px 0 0 #000;
  transition:transform .1s,box-shadow .1s;
}
.brutal-theme .auth-oauth__btn:hover{
  background:#fff;
  transform:translate(2px,2px);
  box-shadow:2px 2px 0 0 #000;
}
.brutal-theme .auth-oauth__btn:nth-child(2){
  background:#000;color:#fff;
}
.brutal-theme .auth-oauth__btn svg{width:20px;height:20px}

/* Magic link button */
.brutal-theme .auth-btn-magic{
  background:#FF90E8;color:#000;
  border:4px solid #000;border-radius:0;
  padding:14px;
  font-size:13px;font-weight:900;text-transform:uppercase;
  box-shadow:4px 4px 0 0 #000;
  transition:transform .1s,box-shadow .1s;
}
.brutal-theme .auth-btn-magic:hover{
  background:#FF90E8;
  transform:translate(2px,2px);
  box-shadow:2px 2px 0 0 #000;
}
.brutal-theme .auth-btn-magic svg{width:20px;height:20px}

/* Magic sent view (brutal) */
.brutal-theme .auth-magic-sent{
  background:#23A094;color:#fff;
  border:4px solid #000;
  box-shadow:8px 8px 0 0 #000;
  padding:32px 24px;
}
.brutal-theme .auth-magic-sent__icon{
  background:rgba(255,255,255,0.25);
}
.brutal-theme .auth-magic-sent__icon svg{color:#fff}
.brutal-theme .auth-magic-sent__title{
  font-size:24px;font-weight:900;text-transform:uppercase;
  color:#fff;
}
.brutal-theme .auth-magic-sent__desc{color:#fff;font-weight:700}
.brutal-theme .auth-magic-sent__back{
  background:#000;color:#fff;
  padding:10px 20px;margin-top:24px;
  font-size:13px;font-weight:900;text-transform:uppercase;
  border:2px solid transparent;
  transition:border-color .15s;
}
.brutal-theme .auth-magic-sent__back:hover{
  color:#fff;border-color:#fff;
}

/* Push card content down so toolbar doesn't overlap */
.brutal-theme .auth-card,
.agentic-theme .auth-card{
  margin-top:80px;
}

/* =========================================================================
 * Neo-Brutalist Theme — Responsive
 * ========================================================================= */

@media (max-width:900px){
  .brutal-theme{flex-direction:column}
  .auth-brutal-brand{
    max-width:100%;flex:0 0 auto;
    border-right:none;border-bottom:8px solid #000;
    padding:80px 24px 32px;
  }
  .auth-brutal-brand__logo{margin-bottom:24px}
  .auth-brutal-brand__headline{font-size:48px}
  .auth-brutal-brand__info{transform:none}
  .brutal-theme .auth-card{
    max-width:100%;padding:32px 24px;margin-top:24px;
  }
  .brutal-theme .auth-brutal-header__title{font-size:32px}
}

@media (max-width:640px){
  .auth-theme-toolbar{
    flex-direction:column;gap:8px;padding:10px;
    top:12px;
  }
  .auth-theme-toolbar__label{
    border-right:none;padding-right:0;
    border-bottom:1px solid rgba(255,255,255,0.1);
    padding-bottom:6px;text-align:center;align-items:center;
  }
  .brutal-theme .auth-theme-toolbar__label{
    border-bottom-color:#000;
  }
  .auth-brutal-brand{padding-top:140px}
  .auth-brutal-brand__headline{font-size:36px}
  .brutal-theme .auth-btn-primary{font-size:16px;padding:14px}
}

/* =========================================================================
 * POST-AUTH APP SHELL — Neo-Brutalist Theme
 * ========================================================================= */

body.brutal-theme{
  background:#F4F4F0;
  background-image:
    linear-gradient(to right,rgba(0,0,0,0.05) 1px,transparent 1px),
    linear-gradient(to bottom,rgba(0,0,0,0.05) 1px,transparent 1px);
  background-size:40px 40px;
  color:#000;
}

body.brutal-theme .sm-sidebar{
  background:#fff;
  border-right:4px solid #000;
}
body.brutal-theme .sm-brand{
  border-bottom:4px solid #000;
  padding:18px 14px;
}
body.brutal-theme .sm-brand__mark{
  background:#FF5722;
  border:3px solid #000;
  border-radius:0;
  color:#fff;
  font-weight:900;
}
body.brutal-theme .sm-brand__title{
  text-transform:uppercase;
  font-weight:900;
  letter-spacing:0.05em;
  color:#000;
}
body.brutal-theme .sm-brand__sub{
  color:#525252;
  font-weight:700;
  text-transform:uppercase;
  font-size:11px;
  letter-spacing:0.03em;
}
body.brutal-theme .sm-nav{
  padding:12px 10px;
}
body.brutal-theme .sm-nav__item{
  border-radius:0;
  font-weight:900;
  text-transform:uppercase;
  font-size:13px;
  letter-spacing:0.04em;
  color:#000;
  border:2px solid transparent;
  padding:10px 12px;
  margin-bottom:2px;
  transition:all 0.15s ease;
}
body.brutal-theme .sm-nav__item:hover{
  background:#f4f4f0;
  border-left:4px solid #000;
}
/* Per-view accent colors on active nav items */
body.brutal-theme .sm-nav__item.is-active{
  color:#fff;
  border:2px solid #000;
  box-shadow:4px 4px 0 0 #000;
}
body.brutal-theme .sm-nav__item[data-view="library"].is-active{
  background:#FF5722;
}
body.brutal-theme .sm-nav__item[data-view="intake"].is-active{
  background:#23A094;
}
body.brutal-theme .sm-nav__item[data-view="work"].is-active{
  background:#FFC900;
  color:#000;
}
body.brutal-theme .sm-nav__item[data-view="plan"].is-active{
  background:#FF90E8;
  color:#000;
}
body.brutal-theme .sm-nav__item[data-view="about"].is-active{
  background:#3b82f6;
}

body.brutal-theme .sm-sidebar__footer{
  border-top:4px solid #000;
  padding:14px;
}
body.brutal-theme .sm-sidebar__footer .sm-btn{
  border:3px solid #000;
  border-radius:0;
  font-weight:900;
  text-transform:uppercase;
  font-size:12px;
  letter-spacing:0.03em;
  background:#fff;
  color:#000;
  box-shadow:3px 3px 0 0 #000;
  transition:all 0.1s ease;
}
body.brutal-theme .sm-sidebar__footer .sm-btn:hover{
  background:#FF5722;
  color:#fff;
  transform:translate(1px,1px);
  box-shadow:2px 2px 0 0 #000;
}

body.brutal-theme .sm-topbar{
  background:#fff;
  border-bottom:4px solid #000;
}
body.brutal-theme .sm-input{
  border:3px solid #000;
  border-radius:0;
  font-weight:700;
  background:#fff;
  color:#000;
}
body.brutal-theme .sm-input:focus{
  outline:none;
  box-shadow:4px 4px 0 0 #FF5722;
}
body.brutal-theme .sm-input::placeholder{
  color:#9ca3af;
  font-weight:700;
}

body.brutal-theme .sm-topbar .sm-btn{
  border:3px solid #000;
  border-radius:0;
  font-weight:900;
  text-transform:uppercase;
  font-size:12px;
  background:#fff;
  color:#000;
  box-shadow:3px 3px 0 0 #000;
  transition:all 0.1s ease;
}
body.brutal-theme .sm-topbar .sm-btn:hover:not(:disabled){
  background:#FFC900;
  transform:translate(1px,1px);
  box-shadow:2px 2px 0 0 #000;
}
body.brutal-theme .sm-topbar .sm-btn:disabled{
  opacity:0.4;
  box-shadow:2px 2px 0 0 rgba(0,0,0,0.3);
}

body.brutal-theme .sm-body{
  padding:14px;
  gap:14px;
}
body.brutal-theme .sm-listPane{
  border:4px solid #000;
  border-radius:0;
  box-shadow:8px 8px 0 0 #000;
  background:#fff;
}
body.brutal-theme .sm-previewPane{
  border:4px solid #000;
  border-radius:0;
  box-shadow:8px 8px 0 0 #000;
  background:#fff;
}

body.brutal-theme .sm-listHeader{
  border-bottom:4px solid #000;
  padding:16px;
}
body.brutal-theme .sm-listHeader__title{
  text-transform:uppercase;
  font-weight:900;
  font-size:16px;
  letter-spacing:0.04em;
}
body.brutal-theme .sm-listHeader__meta{
  color:#525252;
  font-weight:700;
  text-transform:uppercase;
  font-size:11px;
}

body.brutal-theme .sm-listTabs{
  border-bottom:4px solid #000;
  padding:10px 14px;
}
body.brutal-theme .sm-tabBtn{
  border:3px solid #000;
  border-radius:0;
  font-weight:900;
  text-transform:uppercase;
  font-size:12px;
  letter-spacing:0.03em;
  background:#fff;
  color:#000;
  transition:all 0.1s ease;
}
body.brutal-theme .sm-tabBtn:hover{
  background:#f4f4f0;
}
body.brutal-theme .sm-tabBtn.is-active{
  background:#000;
  color:#fff;
  box-shadow:3px 3px 0 0 #FF5722;
}

body.brutal-theme .sm-previewHeader{
  border-bottom:4px solid #000;
}
body.brutal-theme .sm-previewHeader__title{
  text-transform:uppercase;
  font-weight:900;
  letter-spacing:0.03em;
}

body.brutal-theme .sm-empty__title{
  text-transform:uppercase;
  font-weight:900;
  letter-spacing:0.04em;
  color:#000;
}
body.brutal-theme .sm-empty__sub{
  color:#525252;
  font-weight:700;
}

body.brutal-theme .sm-footnote{
  border-top:3px solid #000;
  font-weight:700;
  text-transform:uppercase;
  font-size:11px;
}

/* List items — see Phase 2 .sm-item rules below */

/* =========================================================================
 * POST-AUTH APP SHELL — Agentic Flow Theme
 * ========================================================================= */

body.agentic-theme{
  background:#0b1020;
  color:#f3f7ff;
}

body.agentic-theme .sm-sidebar{
  background:rgba(17,17,27,0.72);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  border-right:1px solid rgba(255,255,255,0.08);
}
body.agentic-theme .sm-brand{
  border-bottom:1px solid rgba(255,255,255,0.08);
}
body.agentic-theme .sm-brand__mark{
  background:linear-gradient(135deg,#6366f1,#8b5cf6);
  border-radius:10px;
  border:none;
  color:#fff;
}
body.agentic-theme .sm-brand__title{
  color:#f3f7ff;
  font-weight:800;
}
body.agentic-theme .sm-brand__sub{
  color:#94a3b8;
}

body.agentic-theme .sm-nav__item{
  color:#94a3b8;
  border-radius:10px;
  transition:all 0.2s ease;
}
body.agentic-theme .sm-nav__item:hover{
  background:rgba(148,163,184,0.1);
  color:#f3f7ff;
}
body.agentic-theme .sm-nav__item.is-active{
  background:rgba(99,102,241,0.18);
  color:#a5b4fc;
  font-weight:700;
  box-shadow:inset 0 0 0 1px rgba(99,102,241,0.38);
}

body.agentic-theme .sm-sidebar__footer{
  border-top:1px solid rgba(255,255,255,0.08);
}
body.agentic-theme .sm-sidebar__footer .sm-btn{
  border:1px solid rgba(255,255,255,0.1);
  border-radius:8px;
  color:#94a3b8;
  background:transparent;
  font-weight:600;
  transition:all 0.2s ease;
}
body.agentic-theme .sm-sidebar__footer .sm-btn:hover{
  background:rgba(99,102,241,0.15);
  color:#a5b4fc;
  border-color:rgba(99,102,241,0.3);
}

body.agentic-theme .sm-topbar{
  background:rgba(17,17,27,0.6);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border-bottom:1px solid rgba(255,255,255,0.06);
}
body.agentic-theme .sm-input{
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.1);
  color:#f3f7ff;
  border-radius:10px;
}
body.agentic-theme .sm-input:focus{
  border-color:rgba(99,102,241,0.5);
  box-shadow:0 0 0 3px rgba(99,102,241,0.15);
  outline:none;
}
body.agentic-theme .sm-input::placeholder{
  color:#64748b;
}

body.agentic-theme .sm-topbar .sm-btn{
  background:rgba(99,102,241,0.15);
  border:1px solid rgba(99,102,241,0.3);
  color:#a5b4fc;
  border-radius:8px;
  font-weight:600;
  transition:all 0.2s ease;
}
body.agentic-theme .sm-topbar .sm-btn:hover:not(:disabled){
  background:rgba(99,102,241,0.25);
  border-color:rgba(99,102,241,0.5);
}
body.agentic-theme .sm-topbar .sm-btn:disabled{
  opacity:0.35;
}

body.agentic-theme .sm-body{
  padding:14px;
  gap:14px;
}
body.agentic-theme .sm-listPane{
  background:rgba(17,17,27,0.6);
  border:1px solid rgba(255,255,255,0.08);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border-radius:14px;
  box-shadow:0 4px 24px rgba(0,0,0,0.3);
}
body.agentic-theme .sm-previewPane{
  background:rgba(17,17,27,0.6);
  border:1px solid rgba(255,255,255,0.08);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border-radius:14px;
  box-shadow:0 4px 24px rgba(0,0,0,0.3);
}

body.agentic-theme .sm-listHeader{
  border-bottom:1px solid rgba(255,255,255,0.08);
}
body.agentic-theme .sm-listHeader__title{
  color:#f3f7ff;
  font-weight:800;
}
body.agentic-theme .sm-listHeader__meta{
  color:#64748b;
}

body.agentic-theme .sm-listTabs{
  border-bottom:1px solid rgba(255,255,255,0.08);
}
body.agentic-theme .sm-tabBtn{
  border:1px solid rgba(255,255,255,0.1);
  border-radius:999px;
  color:#94a3b8;
  background:transparent;
  font-weight:700;
  transition:all 0.2s ease;
}
body.agentic-theme .sm-tabBtn:hover{
  background:rgba(148,163,184,0.1);
  color:#f3f7ff;
}
body.agentic-theme .sm-tabBtn.is-active{
  background:rgba(99,102,241,0.2);
  color:#a5b4fc;
  border-color:rgba(99,102,241,0.4);
  box-shadow:0 0 12px rgba(99,102,241,0.15);
}

body.agentic-theme .sm-previewHeader{
  border-bottom:1px solid rgba(255,255,255,0.08);
}
body.agentic-theme .sm-previewHeader__title{
  color:#f3f7ff;
  font-weight:700;
}
body.agentic-theme .sm-previewHeader__sub{
  color:#64748b;
}

body.agentic-theme .sm-empty__title{
  color:#f3f7ff;
  font-weight:700;
}
body.agentic-theme .sm-empty__sub{
  color:#64748b;
}

body.agentic-theme .sm-footnote{
  border-top:1px solid rgba(255,255,255,0.08);
  color:#64748b;
}

/* List items — see Phase 2 .sm-item rules below */

/* =========================================================================
 * Settings Theme Switcher Component
 * ========================================================================= */

.sm-theme-switcher{
  display:flex;
  gap:0;
  border:2px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
  background:var(--panel-alt);
}
.sm-theme-btn{
  flex:1;
  padding:10px 16px;
  font-weight:800;
  font-size:13px;
  letter-spacing:0.02em;
  cursor:pointer;
  border:none;
  background:transparent;
  color:var(--muted);
  transition:all 0.15s ease;
  text-align:center;
}
.sm-theme-btn:hover{
  color:var(--text);
  background:var(--hover);
}
.sm-theme-btn.is-active{
  background:var(--accent);
  color:#fff;
  box-shadow:0 2px 8px rgba(0,0,0,0.15);
}

/* Brutal-scoped settings switcher */
body.brutal-theme .sm-theme-switcher{
  border:3px solid #000;
  border-radius:0;
  background:#f4f4f0;
}
body.brutal-theme .sm-theme-btn{
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:0.04em;
  color:#525252;
  border-radius:0;
}
body.brutal-theme .sm-theme-btn:hover{
  color:#000;
  background:#fff;
}
body.brutal-theme .sm-theme-btn.is-active{
  background:#000;
  color:#fff;
  box-shadow:none;
}

/* Agentic-scoped settings switcher */
body.agentic-theme .sm-theme-switcher{
  border:1px solid rgba(255,255,255,0.12);
  border-radius:10px;
  background:rgba(255,255,255,0.04);
}
body.agentic-theme .sm-theme-btn{
  color:#64748b;
  font-weight:700;
}
body.agentic-theme .sm-theme-btn:hover{
  color:#f3f7ff;
  background:rgba(99,102,241,0.08);
}
body.agentic-theme .sm-theme-btn.is-active{
  background:rgba(99,102,241,0.25);
  color:#a5b4fc;
  box-shadow:0 0 12px rgba(99,102,241,0.15);
}

/* =========================================================================
 * Settings Modal — Theme Overrides
 * ========================================================================= */

body.brutal-theme .sm-modal__backdrop{
  background:rgba(0,0,0,0.6);
}
body.brutal-theme .sm-modal__panel{
  border:4px solid #000;
  border-radius:0;
  box-shadow:12px 12px 0 0 #000;
  background:#fff;
}
body.brutal-theme .sm-modal__title{
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:0.04em;
  border-bottom:4px solid #000;
  color:#000;
}
body.brutal-theme .sm-label{
  font-weight:900;
  text-transform:uppercase;
  font-size:12px;
  letter-spacing:0.03em;
  color:#000;
}
body.brutal-theme .sm-select{
  border:3px solid #000;
  border-radius:0;
  font-weight:700;
}
body.brutal-theme .sm-modal__actions .sm-btn{
  border:3px solid #000;
  border-radius:0;
  font-weight:900;
  text-transform:uppercase;
  box-shadow:3px 3px 0 0 #000;
}
body.brutal-theme .sm-modal__actions .sm-btn:hover{
  transform:translate(1px,1px);
  box-shadow:2px 2px 0 0 #000;
}
body.brutal-theme .sm-help{
  color:#525252;
  font-weight:600;
}

body.agentic-theme .sm-modal__backdrop{
  background:rgba(2,6,23,0.7);
  backdrop-filter:blur(4px);
}
body.agentic-theme .sm-modal__panel{
  border:1px solid rgba(255,255,255,0.1);
  border-radius:16px;
  box-shadow:0 8px 40px rgba(0,0,0,0.5);
  background:rgba(17,17,27,0.92);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  color:#f3f7ff;
}
body.agentic-theme .sm-modal__title{
  color:#f3f7ff;
  border-bottom-color:rgba(255,255,255,0.08);
}
body.agentic-theme .sm-label{
  color:#94a3b8;
}
body.agentic-theme .sm-select{
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.1);
  color:#f3f7ff;
  border-radius:8px;
}
body.agentic-theme .sm-modal__actions .sm-btn{
  border:1px solid rgba(99,102,241,0.3);
  border-radius:8px;
  background:rgba(99,102,241,0.15);
  color:#a5b4fc;
}
body.agentic-theme .sm-modal__actions .sm-btn:hover{
  background:rgba(99,102,241,0.25);
  border-color:rgba(99,102,241,0.5);
}
body.agentic-theme .sm-help{
  color:#64748b;
}

/* =========================================================================
 * PHASE 2 — Neo-Brutalist Theme: Modals, List Items, Intake, Views
 * ========================================================================= */

/* --- General button overrides (brutal) --- */
body.brutal-theme .sm-btn{
  border:3px solid #000;
  border-radius:0;
  font-weight:900;
  text-transform:uppercase;
  font-size:12px;
  letter-spacing:0.03em;
  background:#fff;
  color:#000;
  box-shadow:3px 3px 0 0 #000;
  transition:all 0.1s ease;
}
body.brutal-theme .sm-btn:hover:not(:disabled){
  background:#FFC900;
  transform:translate(1px,1px);
  box-shadow:2px 2px 0 0 #000;
}
body.brutal-theme .sm-btn:disabled{
  opacity:0.4;
  box-shadow:2px 2px 0 0 rgba(0,0,0,0.3);
}
body.brutal-theme .sm-btn--ghost{
  background:transparent;
  box-shadow:none;
  border:2px solid #000;
}
body.brutal-theme .sm-btn--ghost:hover:not(:disabled){
  background:#f4f4f0;
  box-shadow:none;
  transform:none;
}

/* --- General button overrides (agentic) --- */
body.agentic-theme .sm-btn{
  background:rgba(99,102,241,0.15);
  border:1px solid rgba(99,102,241,0.3);
  color:#a5b4fc;
  border-radius:8px;
  font-weight:600;
  transition:all 0.2s ease;
}
body.agentic-theme .sm-btn:hover:not(:disabled){
  background:rgba(99,102,241,0.25);
  border-color:rgba(99,102,241,0.5);
}
body.agentic-theme .sm-btn:disabled{
  opacity:0.35;
}
body.agentic-theme .sm-btn--ghost{
  background:transparent;
  border-color:rgba(255,255,255,0.1);
  color:#94a3b8;
}
body.agentic-theme .sm-btn--ghost:hover:not(:disabled){
  background:rgba(148,163,184,0.1);
  color:#f3f7ff;
  border-color:rgba(255,255,255,0.18);
}

/* --- Timer modal (brutal) --- */
body.brutal-theme #timerDisplay{
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  -webkit-text-stroke:1px #000;
}
body.brutal-theme #timerPhase{
  text-transform:uppercase;
  font-weight:900;
  letter-spacing:0.05em;
}
body.brutal-theme #timerModal .sm-formRow [style*="border:1px solid"]{
  border:3px solid #000 !important;
  border-radius:0 !important;
  background:#f4f4f0 !important;
}
body.brutal-theme #timerBar{
  background:#FF5722 !important;
}

/* --- Timer modal (agentic) --- */
body.agentic-theme #timerDisplay{
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  color:#a5b4fc;
}
body.agentic-theme #timerPhase{
  color:#f3f7ff;
}
body.agentic-theme #timerModal .sm-formRow [style*="border:1px solid"]{
  border:1px solid rgba(99,102,241,0.3) !important;
  border-radius:10px !important;
  background:rgba(99,102,241,0.08) !important;
}
body.agentic-theme #timerBar{
  background:linear-gradient(90deg,#6366f1,#8b5cf6) !important;
}
body.agentic-theme #timerMeta{
  color:#64748b;
}

/* --- Work log modal (brutal) --- */
body.brutal-theme .sm-textarea{
  border:3px solid #000;
  border-radius:0;
  font-weight:600;
  background:#fff;
  color:#000;
}
body.brutal-theme .sm-textarea:focus{
  outline:none;
  box-shadow:4px 4px 0 0 #FF5722;
}
body.brutal-theme code{
  background:#f4f4f0 !important;
  border:2px solid #000;
  border-radius:0 !important;
  font-weight:700;
  padding:1px 6px;
}

/* --- Work log modal (agentic) --- */
body.agentic-theme .sm-textarea{
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.1);
  color:#f3f7ff;
  border-radius:10px;
}
body.agentic-theme .sm-textarea:focus{
  border-color:rgba(99,102,241,0.5);
  box-shadow:0 0 0 3px rgba(99,102,241,0.15);
  outline:none;
}
body.agentic-theme code{
  background:rgba(148,163,184,0.12) !important;
  border-radius:6px !important;
  color:#a5b4fc;
  padding:1px 6px;
}

/* --- File upload modal — tabs (brutal) --- */
body.brutal-theme .sm-modalTab{
  border:3px solid #000;
  border-radius:0;
  font-weight:900;
  text-transform:uppercase;
  font-size:12px;
  letter-spacing:0.03em;
  background:#fff;
  color:#000;
}
body.brutal-theme .sm-modalTab:hover{
  background:#f4f4f0;
}
body.brutal-theme .sm-modalTab.is-active{
  background:#000;
  color:#fff;
  border-color:#000;
}

/* --- File upload modal — tabs (agentic) --- */
body.agentic-theme .sm-modalTab{
  border:1px solid rgba(255,255,255,0.1);
  border-radius:999px;
  color:#94a3b8;
  background:transparent;
  font-weight:700;
}
body.agentic-theme .sm-modalTab:hover{
  background:rgba(148,163,184,0.1);
  color:#f3f7ff;
}
body.agentic-theme .sm-modalTab.is-active{
  background:rgba(99,102,241,0.2);
  color:#a5b4fc;
  border-color:rgba(99,102,241,0.4);
}

/* --- Upload zone (brutal) --- */
body.brutal-theme .sm-uploadZone{
  border:4px dashed #000;
  border-radius:0;
  background:#f4f4f0;
  padding:20px;
}
body.brutal-theme .sm-uploadZone:hover{
  background:#fff;
}
body.brutal-theme .sm-uploadZone.is-drag{
  border-color:#FF5722;
  background:#fff;
  box-shadow:6px 6px 0 0 #FF5722;
}
body.brutal-theme .sm-uploadZone__title{
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:0.03em;
}
body.brutal-theme .sm-uploadZone__sub{
  color:#525252;
  font-weight:700;
}

/* --- Upload zone (agentic) --- */
body.agentic-theme .sm-uploadZone{
  border:2px dashed rgba(99,102,241,0.3);
  border-radius:14px;
  background:rgba(99,102,241,0.04);
}
body.agentic-theme .sm-uploadZone:hover{
  border-color:rgba(99,102,241,0.5);
  background:rgba(99,102,241,0.08);
}
body.agentic-theme .sm-uploadZone.is-drag{
  border-color:#6366f1;
  background:rgba(99,102,241,0.12);
  box-shadow:0 0 20px rgba(99,102,241,0.2);
}
body.agentic-theme .sm-uploadZone__title{
  color:#f3f7ff;
}
body.agentic-theme .sm-uploadZone__sub{
  color:#64748b;
}

/* --- Chips (brutal) --- */
body.brutal-theme .sm-chip{
  border:3px solid #000;
  border-radius:0;
  background:#fff;
  font-weight:900;
}
body.brutal-theme .sm-chip__name{
  font-weight:900;
  text-transform:uppercase;
  font-size:12px;
}
body.brutal-theme .sm-chip__meta{
  color:#525252;
  font-weight:700;
}
body.brutal-theme .sm-chip__x{
  border:2px solid #000;
  border-radius:0;
  font-weight:900;
  color:#000;
}
body.brutal-theme .sm-chip__x:hover{
  background:#FF5722;
  color:#fff;
}

/* --- Chips (agentic) --- */
body.agentic-theme .sm-chip{
  border:1px solid rgba(255,255,255,0.1);
  border-radius:999px;
  background:rgba(255,255,255,0.04);
}
body.agentic-theme .sm-chip__name{
  color:#f3f7ff;
}
body.agentic-theme .sm-chip__meta{
  color:#64748b;
}
body.agentic-theme .sm-chip__x{
  border:1px solid rgba(255,255,255,0.15);
  border-radius:999px;
  color:#94a3b8;
}
body.agentic-theme .sm-chip__x:hover{
  background:rgba(255,100,100,0.2);
  color:#fca5a5;
}

/* --- Drive list (brutal) --- */
body.brutal-theme .sm-driveList{
  border:3px solid #000;
  border-radius:0;
  background:#fff;
}

/* --- Drive list (agentic) --- */
body.agentic-theme .sm-driveList{
  border:1px solid rgba(255,255,255,0.08);
  border-radius:12px;
  background:rgba(255,255,255,0.04);
}

/* --- List items (brutal) --- */
body.brutal-theme .sm-item{
  border:2px solid transparent;
  border-radius:0;
  border-bottom:2px solid #e5e5e0;
  transition:all 0.1s ease;
}
body.brutal-theme .sm-item:hover{
  background:#f4f4f0;
  border-left:4px solid #FF5722;
}
body.brutal-theme .sm-item.is-selected{
  background:#FF5722;
  color:#fff;
  border-color:#000;
  box-shadow:4px 4px 0 0 #000;
}
body.brutal-theme .sm-item.is-selected .sm-item__title{color:#fff}
body.brutal-theme .sm-item.is-selected .sm-item__mid{color:rgba(255,255,255,0.8)}
body.brutal-theme .sm-item.is-selected .sm-item__bot{color:rgba(255,255,255,0.7)}
body.brutal-theme .sm-item.is-selected .sm-pill{
  border-color:rgba(255,255,255,0.4);
  color:#fff;
  background:rgba(255,255,255,0.15);
}
body.brutal-theme .sm-item__title{
  font-weight:900;
  text-transform:uppercase;
  font-size:13px;
  letter-spacing:0.02em;
}
body.brutal-theme .sm-item__mid{
  color:#525252;
  font-weight:700;
}
body.brutal-theme .sm-item__bot{
  color:#737373;
  font-weight:600;
}

/* --- Pills (brutal) --- */
body.brutal-theme .sm-pill{
  border:2px solid #000;
  border-radius:0;
  font-weight:900;
  text-transform:uppercase;
  font-size:10px;
  letter-spacing:0.03em;
  background:#f4f4f0;
  color:#000;
}
body.brutal-theme .sm-pill--accent{
  background:#FFC900;
  color:#000;
  border-color:#000;
}
body.brutal-theme .sm-pill--danger{
  background:#FF5722;
  color:#fff;
  border-color:#000;
}

/* --- List items (agentic) --- */
body.agentic-theme .sm-item{
  border:1px solid transparent;
  border-radius:10px;
  border-bottom:1px solid rgba(255,255,255,0.04);
  transition:all 0.2s ease;
}
body.agentic-theme .sm-item:hover{
  background:rgba(99,102,241,0.06);
  border-color:rgba(99,102,241,0.1);
}
body.agentic-theme .sm-item.is-selected{
  background:rgba(99,102,241,0.15);
  border-color:rgba(99,102,241,0.35);
  box-shadow:0 0 16px rgba(99,102,241,0.1);
}
body.agentic-theme .sm-item__title{
  color:#f3f7ff;
  font-weight:700;
}
body.agentic-theme .sm-item__mid{
  color:#64748b;
}
body.agentic-theme .sm-item__bot{
  color:#475569;
}
body.agentic-theme .sm-item.is-selected .sm-item__title{color:#e0e7ff}
body.agentic-theme .sm-item.is-selected .sm-item__mid{color:#94a3b8}
body.agentic-theme .sm-item.is-selected .sm-item__bot{color:#94a3b8}

/* --- Pills (agentic) --- */
body.agentic-theme .sm-pill{
  border:1px solid rgba(255,255,255,0.1);
  border-radius:999px;
  color:#94a3b8;
  background:transparent;
}
body.agentic-theme .sm-pill--accent{
  border-color:rgba(99,102,241,0.35);
  color:#a5b4fc;
  background:rgba(99,102,241,0.12);
}
body.agentic-theme .sm-pill--danger{
  border-color:rgba(252,165,165,0.35);
  color:#fca5a5;
  background:rgba(252,165,165,0.1);
}

/* --- Intake form (brutal) --- */
body.brutal-theme .sm-intake__title{
  text-transform:uppercase;
  font-weight:900;
  letter-spacing:0.04em;
}
body.brutal-theme .sm-intake__sub{
  color:#525252;
  font-weight:700;
}
body.brutal-theme .sm-intake__crumb{
  font-weight:900;
  text-transform:uppercase;
}
body.brutal-theme .sm-field{
  border:3px solid #000;
  border-radius:0;
  background:#fff;
  box-shadow:4px 4px 0 0 rgba(0,0,0,0.08);
}
body.brutal-theme .sm-field__label{
  font-weight:900;
  text-transform:uppercase;
  font-size:13px;
  letter-spacing:0.03em;
}
body.brutal-theme .sm-field__help{
  color:#525252;
  font-weight:600;
}
body.brutal-theme .sm-field__req{
  color:#FF5722;
  font-weight:900;
}

body.brutal-theme .sm-select{
  border:3px solid #000;
  border-radius:0;
  font-weight:700;
  background:#fff;
}

body.brutal-theme .sm-boxRow{
  border-bottom:2px solid #e5e5e0;
  padding-bottom:6px;
}

body.brutal-theme .sm-intake__nav .sm-btn{
  min-width:100px;
}

body.brutal-theme .sm-intake__statusLine.is-ok{
  color:#23A094;
  font-weight:900;
}
body.brutal-theme .sm-intake__statusLine.is-error{
  color:#FF5722;
  font-weight:900;
}

body.brutal-theme .sm-intake__overlay .sm-empty{
  border:4px solid #000;
  border-radius:0;
  box-shadow:8px 8px 0 0 #000;
  background:#fff;
}

/* --- Intake form (agentic) --- */
body.agentic-theme .sm-intake__title{
  color:#f3f7ff;
}
body.agentic-theme .sm-intake__sub{
  color:#64748b;
}
body.agentic-theme .sm-field{
  border:1px solid rgba(255,255,255,0.08);
  border-radius:12px;
  background:rgba(255,255,255,0.03);
}
body.agentic-theme .sm-field__label{
  color:#f3f7ff;
}
body.agentic-theme .sm-field__help{
  color:#64748b;
}
body.agentic-theme .sm-field__req{
  color:#fca5a5;
}

body.agentic-theme .sm-select{
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.1);
  color:#f3f7ff;
  border-radius:8px;
}
body.agentic-theme .sm-select option{
  background:#111827;
  color:#f3f7ff;
}

body.agentic-theme .sm-boxRow{
  border-bottom:1px solid rgba(255,255,255,0.06);
  padding-bottom:6px;
  color:#c5d2e3;
}

body.agentic-theme .sm-intake__statusLine.is-ok{
  color:#a5b4fc;
}
body.agentic-theme .sm-intake__statusLine.is-error{
  color:#fca5a5;
}

body.agentic-theme .sm-intake__overlay .sm-empty{
  border:1px solid rgba(255,255,255,0.1);
  border-radius:16px;
  box-shadow:0 10px 40px rgba(0,0,0,0.5);
  background:rgba(17,17,27,0.92);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
}

/* --- Work view cards (brutal) --- */
body.brutal-theme .sm-card{
  border:3px solid #000;
  border-radius:0;
  background:#fff;
  box-shadow:4px 4px 0 0 #000;
  transition:all 0.1s ease;
}
body.brutal-theme .sm-card:hover{
  transform:translate(1px,1px);
  box-shadow:3px 3px 0 0 #000;
}

/* --- Work view cards (agentic) --- */
body.agentic-theme .sm-card{
  border:1px solid rgba(255,255,255,0.08);
  border-radius:12px;
  background:rgba(255,255,255,0.03);
  transition:all 0.2s ease;
}
body.agentic-theme .sm-card:hover{
  border-color:rgba(99,102,241,0.2);
  background:rgba(99,102,241,0.04);
}

/* --- About view inline code (brutal) --- */
body.brutal-theme .sm-empty div[style*="margin-top:10px"] b{
  text-transform:uppercase;
  font-weight:900;
  letter-spacing:0.02em;
}

/* --- Server settings list in settings modal --- */
body.brutal-theme #serverSettingsList{
  border:3px solid #000 !important;
  border-radius:0 !important;
  background:#fff !important;
}
body.agentic-theme #serverSettingsList{
  border:1px solid rgba(255,255,255,0.08) !important;
  border-radius:12px !important;
  background:rgba(255,255,255,0.03) !important;
}

/* --- Settings formRow section headers (both themes inherit from .sm-label / modal overrides) --- */
body.brutal-theme .sm-settingsBody [style*="font-weight:900"]{
  text-transform:uppercase;
  letter-spacing:0.04em;
}

/* --- Range input (sound volume) --- */
body.brutal-theme input[type="range"]{
  accent-color:#FF5722;
}
body.agentic-theme input[type="range"]{
  accent-color:#6366f1;
}

/* --- Settings toolbar (brutal) --- */
body.brutal-theme .sm-settingsToolbar .sm-btn{
  font-size:11px;
}

/* --- Settings footer (both themes inherit from modal actions above) --- */
body.brutal-theme .sm-settingsFooter{
  border-top:4px solid #000;
  padding:14px 18px;
}
body.agentic-theme .sm-settingsFooter{
  border-top:1px solid rgba(255,255,255,0.08);
  padding:14px 18px;
}

/* =========================================================================
 * Google Form Action Modal — Glassmorphism + iframe
 * ========================================================================= */

/* Glassmorphism backdrop */
.sm-modal--glass .sm-modal__backdrop{
  background:rgba(0,0,0,0.5);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}

/* iframe panel — 80vw/80vh, overrides base max-width */
.sm-actionFormPanel{
  max-width:none !important;
  width:80vw;
  height:80vh;
  display:flex;
  flex-direction:column;
  padding:0;
  overflow:hidden;
}
.sm-actionFormPanel .sm-modal__title{
  padding:16px;
  margin:0;
  flex-shrink:0;
  border-bottom:1px solid var(--border);
}
.sm-actionFormBody{
  flex:1;
  min-height:0;
  overflow:hidden;
}
.sm-actionFormIframe{
  width:100%;
  height:100%;
  border:none;
  display:block;
}
.sm-actionFormPanel .sm-modal__actions{
  flex-shrink:0;
  padding:12px 16px;
  border-top:1px solid var(--border);
  margin:0;
}

/* Sidebar actions section */
.sm-sidebar__actions{
  padding:10px 12px;
  border-top:1px solid var(--border);
  display:flex;
  flex-direction:column;
  gap:6px;
}
.sm-sidebar__actions-title{
  font-weight:800;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:0.04em;
  color:var(--muted);
  margin-bottom:2px;
}
.sm-btn--action{
  text-align:left;
  font-weight:650;
}

/* Mobile: nearly full-screen modal, hide sidebar actions (sidebar itself hidden at 720px) */
@media (max-width:720px){
  .sm-actionFormPanel{
    width:calc(100vw - 16px);
    height:calc(100vh - 16px);
    border-radius:8px;
  }
  .sm-sidebar__actions{
    display:none;
  }
}

/* Theme overrides: brutal */
body.brutal-theme .sm-actionFormPanel{
  border:4px solid #000;
  border-radius:0;
  box-shadow:12px 12px 0 0 #000;
  background:#fff;
}
body.brutal-theme .sm-actionFormPanel .sm-modal__title{
  font-weight:900;
  text-transform:uppercase;
  border-bottom:4px solid #000;
  color:#000;
}
body.brutal-theme .sm-sidebar__actions{
  border-top:4px solid #000;
  padding:14px;
}
body.brutal-theme .sm-btn--action{
  border:3px solid #000;
  border-radius:0;
  font-weight:900;
  text-transform:uppercase;
  font-size:12px;
  background:#fff;
  color:#000;
  box-shadow:3px 3px 0 0 #000;
  transition:all 0.1s ease;
}
body.brutal-theme .sm-btn--action:hover{
  transform:translate(1px,1px);
  box-shadow:2px 2px 0 0 #000;
}

/* Theme overrides: agentic */
body.agentic-theme .sm-actionFormPanel{
  border:1px solid rgba(255,255,255,0.1);
  border-radius:16px;
  box-shadow:0 8px 40px rgba(0,0,0,0.5);
  background:rgba(17,17,27,0.92);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  color:#f3f7ff;
}
body.agentic-theme .sm-actionFormPanel .sm-modal__title{
  color:#f3f7ff;
  border-bottom-color:rgba(255,255,255,0.08);
}
body.agentic-theme .sm-sidebar__actions{
  border-top:1px solid rgba(255,255,255,0.06);
}
body.agentic-theme .sm-btn--action{
  border:1px solid rgba(99,102,241,0.3);
  border-radius:8px;
  background:rgba(99,102,241,0.15);
  color:#a5b4fc;
}
body.agentic-theme .sm-btn--action:hover{
  background:rgba(99,102,241,0.25);
}
