/* ═══ תפריט הצד: התחתית (עיצוב 1a) ═══════════════════════════════════════
   מה כאן: כרטיס הארגון הפעיל, כרטיס המשתמש עם הגדרות ויציאה, והקרדיט.
   מה לא כאן: הכותרת והפריטים (sidebar.css), והמצב המקופל (sidebar-collapsed.css). */

/* ── תחתית: ארגון ומשתמש ───────────────────────────────────────────────── */
.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    margin: 0;
    border-top: 0;
}

.sidebar-entity-chip {
    width: 100%;
    box-sizing: border-box;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin: 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: inherit;
    font: inherit;
    text-align: start;
    cursor: pointer;
}
.sidebar-entity-chip:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}
.sidebar-entity-chip .sec-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--brand-primary, #2f4f7f) 16%, #ffffff);
    color: color-mix(in srgb, var(--brand-primary, #2f4f7f) 82%, #000000);
    font-size: 14px;
    font-weight: 700;
}
.sidebar-entity-chip .sec-body {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}
.sidebar-entity-chip .sec-label {
    font-size: 11px;
    font-weight: 400;
    color: #64748b;
    text-transform: none;
    letter-spacing: normal;
    margin: 0;
}
.sidebar-entity-chip .sec-name {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}
.sidebar-entity-chip .sec-switch-icon,
.sidebar-entity-chip:hover .sec-switch-icon { color: #94a3b8; }

.sidebar-user-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}
.sidebar-user-row .account-card__meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}
.sidebar-user-row .user-name,
.sidebar-user-row .user-role {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-row .user-name {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}
.sidebar-user-row .user-role {
    font-size: 12px;
    color: #64748b;
}
.sidebar-user-row .sidebar-icon-btn {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    box-sizing: border-box;
    padding: 0;
    gap: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.sidebar-user-row .sidebar-profile-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.sidebar-user-row .sidebar-signout:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}
/* האות הראשונה מוצגת רק בתפריט המקופל, במקום האייקון. */
.sidebar-profile-btn .user-avatar { display: none; }

/* ── קרדיט ─────────────────────────────────────────────────────────────── */
.sidebar .sidebar-credit {
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    border: 0;
}
.sidebar-credit .shc-footer-btn {
    gap: 6px;
    padding: 2px 8px;
    font-size: 11px;
    color: #94a3b8;
}
.sidebar-credit .shc-footer-logo {
    width: auto;
    height: 18px;
    opacity: 1;
    filter: none;
}

/* מצב ניהול כללי: אין ארגון, ולכן אין אות. בלי סימן הריבוע ריק, ובתפריט
   המקופל הוא הסימן היחיד לארגון. mask ולא תמונה, כדי לרשת את צבע הארגון. */
.sidebar-entity-chip .sec-icon:empty::before {
    content: "";
    width: 18px;
    height: 18px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* מטרת מגע של 44 בסלולר (DESIGN.md), כמו שורות התפריט. */
@media (max-width: 768px) {
    .sidebar-user-row .sidebar-icon-btn {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
    }
    #mainSidebar .shc-as-btn {
        width: 44px;
        height: 44px;
    }
}
