/* Caando dashboard sidebar + compact logout | v1 */
.agency-workspace-nav,
.agency-area-sidebar,
.user-dashboard-sidebar { display:flex; flex-direction:column; }

.caando-sidebar-footer {
    display:grid;
    gap:9px;
    margin-top:auto;
    padding-top:16px;
    border-top:1px solid #dbe5f2;
}
.caando-sidebar-footer form { margin:0; padding:0; }
.caando-sidebar-footer .caando-sidebar-link {
    box-sizing:border-box;
    width:100%; min-height:41px;
    display:flex; align-items:center; justify-content:flex-start; gap:10px;
    padding:9px 12px; border-radius:12px;
    border:1px solid #c8d9ef;
    background:#f5f9ff; color:#215aab;
    font-family:inherit; line-height:1.7;
    font-size:12px; font-weight:800;
    text-decoration:none; cursor:pointer;
    transition:background .18s ease,border-color .18s ease,transform .18s ease,box-shadow .18s ease;
}
.caando-sidebar-footer .caando-sidebar-link svg {
    width:19px; height:19px; flex:0 0 19px;
    fill:none; stroke:currentColor; stroke-width:1.8;
    stroke-linecap:round; stroke-linejoin:round;
}
.caando-sidebar-footer .caando-sidebar-logout {
    border-color:#f2c8cc; background:#fff6f6; color:#b42338;
}
.caando-sidebar-footer .caando-sidebar-link:hover {
    background:#eaf2ff; border-color:#89afe6;
    transform:translateY(-1px);box-shadow:0 5px 15px rgba(37,99,235,.11);
}
.caando-sidebar-footer .caando-sidebar-logout:hover {
    background:#ffebed;border-color:#ea9ba6;
}
.caando-sidebar-footer .caando-sidebar-link:focus-visible {
    outline:3px solid #55a4ed; outline-offset:2px;
}

/* The public/shared header is present on Follow-ups and other user pages. */
.caando-role-user .caando-logout-btn {
    display:inline-flex !important; align-items:center !important; justify-content:center !important;
    width:auto !important; min-height:34px !important; height:34px;
    padding:0 10px !important; gap:6px !important;
    font-size:12px !important; line-height:1 !important;
    border-radius:10px !important; white-space:nowrap;
}
.caando-role-user .caando-logout-btn .caando-auth-icon {
    width:18px !important; height:18px !important;flex:0 0 18px;
}
.caando-role-user .caando-logout-btn .caando-logout-label {
    display:inline !important;
    margin:0 !important; padding:0 !important;
    background:transparent !important; border:0 !important;
    color:inherit !important; font-size:12px !important;
    font-weight:800; line-height:1 !important;
}

/* Personal dashboard gets its own sidebar (agency already has one). */
.user-dashboard-page { padding:22px 14px 60px; }
.user-dashboard-layout {
    display:grid; grid-template-columns:235px minmax(0,1fr);
    gap:18px; max-width:1420px; margin:0 auto; align-items:start;
}
.user-dashboard-page .dashboard-shell { width:100%; min-width:0; margin:0; }
.user-dashboard-sidebar {
    position:sticky; top:20px; align-self:start;
    min-height:calc(100vh - 40px); padding:16px 13px;
    border:1px solid #d7e3ed; border-radius:20px;
    background:#fff; box-shadow:0 12px 38px rgba(26,74,113,.08);
}
.user-sidebar-brand { display:flex; align-items:center; gap:10px; padding:3px 2px 17px; border-bottom:1px solid #e5edf4; }
.user-sidebar-brand > span:last-child {display:grid;gap:2px;}
.user-sidebar-brand strong {font-size:19px;color:#173d66;line-height:1.5;}
.user-sidebar-brand small {font-size:11px;color:#72849a;}
.user-sidebar-logo {
    width:42px;height:42px;display:grid;place-items:center;
    background:linear-gradient(140deg,#2c77ec,#0b8db2);
    color:#fff;font-size:24px;font-weight:900;border-radius:13px;
    box-shadow:0 5px 16px rgba(37,99,235,.2);
}
.user-sidebar-menu { display:grid; gap:6px; margin:16px 0; }
.user-sidebar-menu a {
    display:flex;align-items:center;min-height:41px;padding:9px 12px;
    border-radius:11px;color:#4f6278;text-decoration:none;
    font-size:13px;font-weight:800;transition:.18s ease;
}
.user-sidebar-menu a:hover {background:#eff6ff;color:#1763b7;transform:translateX(-2px);}
.user-sidebar-menu a.is-active {background:linear-gradient(135deg,#2f6ff4,#1764d7);color:#fff;box-shadow:0 6px 16px rgba(37,99,235,.18);}

@media(max-width:980px) {
    .user-dashboard-layout {grid-template-columns:1fr;}
    .user-dashboard-sidebar {position:static;min-height:0;}
    .user-sidebar-menu {grid-template-columns:repeat(4,minmax(0,1fr));}
    .user-sidebar-menu a {justify-content:center;text-align:center;}
    .agency-area-sidebar {min-height:0;}
}
@media(max-width:860px) {
    .agency-workspace-nav {min-height:0;}
    .agency-workspace-nav .caando-sidebar-footer,
    .agency-area-sidebar .caando-sidebar-footer,
    .user-dashboard-sidebar .caando-sidebar-footer {
        grid-template-columns:repeat(2,minmax(0,1fr));
        margin-top:13px;padding-top:12px;
    }
}
@media(max-width:560px) {
    .user-dashboard-page {padding:10px 8px 35px;}
    .user-dashboard-sidebar {padding:12px;}
    .user-sidebar-menu {grid-template-columns:repeat(2,minmax(0,1fr));margin:11px 0;}
    .user-sidebar-menu a {min-height:37px;padding:7px;font-size:11px;}
    .caando-sidebar-footer .caando-sidebar-link {font-size:11px;padding:8px;gap:6px;justify-content:center;}
    .caando-sidebar-footer .caando-sidebar-link svg {width:16px;height:16px;flex-basis:16px;}
    .caando-role-user .caando-logout-btn {width:35px !important;padding:0 !important;}
    .caando-role-user .caando-logout-btn .caando-logout-label {display:none !important;}
}
@media(prefers-reduced-motion:reduce) {
    .caando-sidebar-footer .caando-sidebar-link,
    .user-sidebar-menu a {transition:none;transform:none !important;}
}
html[data-caando-theme="dark"] body.agency-ui-mode .caando-sidebar-footer {border-color:#38506d;}
html[data-caando-theme="dark"] body.agency-ui-mode .caando-sidebar-site {background:#172b47;color:#c6d9ff;border-color:#3b5574;}
html[data-caando-theme="dark"] body.agency-ui-mode .caando-sidebar-logout {background:#42242f;color:#ffb7c2;border-color:#81505d;}
