/* User Portal: only what the system GUI's soc.css / components.css do not already have. Colours: --soc-* tokens only. */

body.portal-login { overflow: auto; }

/* ── shell ─────────────────────────────────────────── */
.portal-shell { --soc-sidebar-w: 220px; }                 /* the menu never shrinks to icons; on a phone it hides behind the burger */
.portal-shell .soc-nav a span { display: inline; }        /* soc.css hides labels below 900px */
.soc-topbar .brand { text-decoration: none; }
.portal-burger { display: none; }
.portal-signout { margin: 0; }
.portal-user-name { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.portal-nav-soon {
    display: flex; align-items: center; gap: 10px; padding: 7px 12px; margin: 1px 6px; border-radius: 6px;
    font-size: 13px; font-weight: 500; color: var(--soc-text-dim); cursor: not-allowed; white-space: nowrap; user-select: none;
}
.portal-nav-soon .nav-icon { width: 16px; height: 16px; flex-shrink: 0; opacity: .6; }
.portal-nav-soon em {
    margin-inline-start: auto; font-style: normal; font-size: 10px; text-transform: uppercase; letter-spacing: .5px;
    padding: 1px 6px; border: 1px solid var(--soc-border); border-radius: var(--soc-badge-radius, 4px);
}
.portal-scrim { display: none; }

/* ── pages ─────────────────────────────────────────── */
.portal-card { max-width: 720px; margin-top: 16px; padding: 22px 24px; }
.portal-hello { margin: 0 0 6px; color: var(--soc-text-muted); }
.portal-lead { margin: 0 0 16px; color: var(--soc-text-muted); font-size: 13px; line-height: 1.5; }
.portal-steps { margin: 0 0 18px; padding-inline-start: 22px; line-height: 1.65; }
.portal-meta { margin: 12px 0 0; color: var(--soc-text-muted); font-size: 12px; }
.portal-meta a { color: var(--soc-text-muted); }
.portal-dev-note { margin: 18px 0 10px; }
.portal-dev-form { margin: 0 0 6px; }
.portal-table { margin-top: 16px; }
.portal-form { margin-top: 16px; max-width: 640px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.portal-field { display: flex; flex-direction: column; gap: 4px; }
.portal-field label { font-size: .8rem; font-weight: 600; }
.portal-field input, .portal-field select, .portal-field textarea { padding: 8px 10px; border: 1px solid var(--soc-border); border-radius: 6px; background: var(--soc-surface-2); color: inherit; font: inherit; }
.portal-field small { color: var(--soc-text-muted); font-size: .72rem; }
.portal-footer { margin-top: 28px; color: var(--soc-text-dim); font-size: 12px; text-align: center; }

/* ── sign-in ───────────────────────────────────────── */
.login-card { width: 400px; max-width: calc(100vw - 32px); }
.portal-login-brand { display: flex; align-items: center; gap: 10px; }
.portal-login-brand .brand-icon {
    width: 36px; height: 36px; border-radius: 8px; background: var(--soc-accent); color: #fff; font-size: 18px;
    display: flex; align-items: center; justify-content: center;
}
.portal-login-name { font-size: 15px; font-weight: 700; color: var(--soc-text); }
.portal-rule { border: 0; border-top: 1px solid var(--soc-border); margin: 20px 0; opacity: 1; }
.portal-h { margin: 0 0 6px; font-size: 18px; font-weight: 600; color: var(--soc-text); }
.portal-wide { width: 100%; justify-content: center; padding: 10px; }
.portal-code { letter-spacing: 3px; font-size: 18px; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.portal-theme-float { position: fixed; top: 12px; inset-inline-end: 12px; z-index: 10; }

/* ── right to left (Hebrew) ────────────────────────── */
[dir="rtl"] .soc-sidebar { border-right: 0; border-left: 1px solid var(--soc-border); }
[dir="rtl"] .soc-topbar .brand { padding-left: 0; padding-right: 4px; }

/* ── phone: the menu hides behind the burger ───────── */
@media (max-width: 768px) {
    .portal-shell { grid-template-columns: 1fr; }
    .soc-main { grid-column: 1; }
    .portal-burger { display: flex; }
    .soc-topbar .brand { width: auto; }
    .soc-topbar .brand-name { display: inline; }
    .portal-user-name { display: none; }
    .soc-sidebar {
        position: fixed; top: var(--soc-topbar-h); bottom: 0; inset-inline-start: 0; width: 240px; z-index: 200;
        transform: translateX(-100%); transition: transform .18s;
    }
    [dir="rtl"] .soc-sidebar { transform: translateX(100%); }
    .soc-sidebar.open { transform: none; }
    .portal-scrim.open { display: block; position: fixed; inset: var(--soc-topbar-h) 0 0 0; z-index: 150; background: rgba(0, 0, 0, .45); }
    .soc-page { padding: 16px; }
    .portal-card { padding: 18px 16px; }
}
