/* Оболочка автономного режима: форма входа, окно подтверждения и плашка вместо ядра. */
:root { --shef-sa-accent: #4b3cd0; --shef-sa-bg: #f5f5f8; --shef-sa-fg: #1d1d26; --shef-sa-card: #fff; --shef-sa-muted: #6b6b7b; }
@media (prefers-color-scheme: dark) { :root { --shef-sa-bg: #121118; --shef-sa-fg: #ececf2; --shef-sa-card: #1d1c25; --shef-sa-muted: #a3a3b3; } }
html, body { margin: 0; min-height: 100%; background: var(--shef-sa-bg); color: var(--shef-sa-fg); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
.shef-sa-login { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; box-sizing: border-box; }
.shef-sa-card { background: var(--shef-sa-card); border-radius: 16px; padding: 28px; width: 100%; max-width: 380px; box-shadow: 0 8px 32px rgba(0,0,0,.08); display: flex; flex-direction: column; gap: 12px; }
.shef-sa-card h1 { margin: 0; font-size: 22px; }
.shef-sa-card p { margin: 0; color: var(--shef-sa-muted); }
.shef-sa-card label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; }
.shef-sa-card input { font: inherit; padding: 10px 12px; border: 1px solid #c9c9d6; border-radius: 10px; background: transparent; color: inherit; }
.shef-sa-card button, .shef-sa-btn { font: inherit; padding: 10px 16px; border-radius: 10px; border: 1px solid #c9c9d6; background: transparent; color: inherit; cursor: pointer; min-height: 44px; }
.shef-sa-card button, .shef-sa-btn.--primary { background: var(--shef-sa-accent); border-color: var(--shef-sa-accent); color: #fff; }
.shef-sa-btn.--danger { background: #d0393e; border-color: #d0393e; }
.shef-sa-error { color: #d0393e !important; }
.shef-sa-dialog { border: 0; border-radius: 14px; padding: 20px; max-width: min(420px, calc(100vw - 32px)); background: var(--shef-sa-card); color: var(--shef-sa-fg); }
.shef-sa-dialog h3 { margin: 0 0 8px; }
.shef-sa-dialog-buttons { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.shef-sa-toast { position: fixed; right: 16px; bottom: 16px; z-index: 10000; background: #2b2a33; color: #fff; padding: 10px 14px; border-radius: 10px; max-width: calc(100vw - 32px); }
.shef-sa-logout { margin: 0; }
.shef-sa-logout button { width: 100%; border: 0; background: none; font-family: inherit; cursor: pointer; }
/* Порталы этого браузера (portals.js, #859): список на странице входа и переключатель в панели сеансов */
.shef-sa-portals { display: flex; flex-direction: column; gap: 4px; }
.shef-sa-portals-title { font-size: 13px; }
.shef-sa-portal { display: flex; align-items: center; gap: 4px; }
.shef-sa-portal-open { flex: 1; min-height: 44px; display: flex; align-items: center; padding: 0 12px; border: 1px solid rgba(127,127,127,.4); border-radius: 10px; color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.shef-sa-portal-open:hover { border-color: var(--shef-sa-accent); }
.shef-sa-card .shef-sa-portal-drop { background: transparent; border-color: transparent; color: var(--shef-sa-muted); min-width: 44px; min-height: 44px; padding: 0; font-size: 20px; }
.shef-sa-portal-now { position: relative; padding: 4px 6px; }
.shef-sa-portal-toggle { width: 100%; min-height: 44px; display: flex; flex-direction: column; align-items: flex-start; padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.shef-sa-portal-toggle:hover { background: rgba(127,127,127,.12); }
.shef-sa-portal-label { font-size: 12px; opacity: .7; }
.shef-sa-portal-host { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.shef-sa-portal-menu { display: flex; flex-direction: column; margin-top: 2px; padding: 4px; border-radius: 10px; background: var(--shef-sa-card); box-shadow: 0 4px 20px rgba(0,0,0,.12); }
.shef-sa-portal-menu[hidden] { display: none; }
.shef-sa-portal-all { margin: 0; }
.shef-sa-portal-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; font-size: 13px; text-decoration: none; cursor: pointer; text-align: left; overflow-wrap: anywhere; box-sizing: border-box; }
.shef-sa-portal-item:hover { background: rgba(127,127,127,.12); }
.shef-sa-portal-item small { opacity: .6; }
