html, body {
    max-width: 100%;
    overflow-x: hidden;
}

.caando-site-header {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px 0;
    background: #fff;
    border-bottom: 1px solid rgba(225, 29, 72, .16);
}

.caando-role-header {
    width: min(100%, 1420px);
    box-sizing: border-box;
    margin: 0 auto 10px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, .96);
    border: 1.5px solid rgba(225, 29, 72, .20);
    border-radius: 22px;
    box-shadow: 0 14px 38px rgba(190, 18, 60, .09);
    backdrop-filter: blur(12px);
    font-family: Tahoma, Arial, sans-serif;
}

.caando-role-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 138px;
    min-width: 138px;
    height: 68px;
    padding: 2px 6px;
    text-decoration: none;
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: hidden;
}

.caando-role-brand img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.caando-role-nav {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 5px 2px 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(225,29,72,.35) transparent;
}

.caando-role-nav a,
.caando-login-btn {
    flex: 0 0 auto;
    text-decoration: none;
    color: #111827;
    background: #fff;
    border: 1.5px solid rgba(225, 29, 72, .16);
    border-radius: 999px;
    padding: 9px 15px;
    font-weight: 850;
    font-size: 13px;
    line-height: 1.6;
    white-space: nowrap;
    transition: transform .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.caando-role-nav a:hover,
.caando-login-btn:hover {
    color: #be123c;
    border-color: rgba(225, 29, 72, .42);
    background: #fff7f9;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(225, 29, 72, .12);
}

.caando-role-user {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
    color: #374151;
    white-space: nowrap;
}

.caando-role-user span {
    color: #be123c;
    font-weight: 900;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 999px;
    padding: 7px 10px;
}

.caando-role-user strong {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 900;
}

.caando-role-user form { margin: 0; }
.caando-role-user button {
    border: 0;
    background: transparent;
    color: #991b1b;
    font-weight: 900;
    cursor: pointer;
    padding: 7px 4px;
}

/* Wider header is only for the authenticated agency workspace, not public pages. */
body.agency-ui-mode .caando-role-header {
    width: min(100%, 1680px);
    box-sizing: border-box;
}

@media (max-width: 991.98px) {
    .caando-role-header {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 10px;
    }
    .caando-role-user {
        grid-column: 1 / -1;
        justify-content: flex-start;
        flex-wrap: wrap;
        border-top: 1px solid #ffe4e8;
        padding-top: 9px;
    }
    .caando-role-brand {
        width: 120px;
        min-width: 120px;
        height: 62px;
    }
}

@media (max-width: 575.98px) {
    .caando-site-header { padding: 7px 8px 0; }
    .caando-role-header {
        grid-template-columns: 1fr;
        align-items: stretch;
        padding: 9px;
        border-radius: 17px;
    }
    .caando-role-brand {
        width: 122px;
        min-width: 0;
        height: 58px;
        margin: 0 auto;
    }
    .caando-role-nav {
        width: 100%;
        justify-content: flex-start;
    }
    .caando-role-user {
        grid-column: auto;
        width: 100%;
        justify-content: space-between;
    }
}

/* Caando blue / navy public header */
.caando-site-header{padding:10px 14px;background:rgba(2,8,23,.92);border-bottom:1px solid rgba(56,189,248,.15);position:sticky;top:0;z-index:1200;backdrop-filter:blur(18px)}.caando-role-header{margin-bottom:0;background:linear-gradient(135deg,rgba(11,29,51,.92),rgba(5,18,35,.95));border-color:rgba(56,189,248,.22);box-shadow:0 18px 50px rgba(0,0,0,.3)}.caando-role-nav a,.caando-login-btn{color:#dcecff;background:rgba(9,30,53,.8);border-color:rgba(125,211,252,.18)}.caando-role-nav a:hover,.caando-login-btn:hover{color:#fff;border-color:rgba(34,211,238,.48);background:rgba(37,99,235,.18);box-shadow:0 10px 28px rgba(37,99,235,.18)}.caando-role-user{color:#b9cee3}.caando-role-user span{color:#c8f7ff;background:rgba(34,211,238,.09);border-color:rgba(34,211,238,.25)}.caando-role-user button{color:#fda4af}.caando-role-nav{scrollbar-color:rgba(56,189,248,.38) transparent}


/* V20.5.2 - explicit login/logout actions with icons */
.caando-auth-action {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
}
.caando-auth-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.caando-role-user .caando-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 7px 12px;
    border: 1px solid #c5daea;
    border-radius: 999px;
    background: #eef6fc;
    color: #214d70 !important;
    transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.caando-role-user .caando-logout-btn:hover {
    transform: translateY(-2px);
    background: #e5f2fb;
    border-color: #91bddb;
    box-shadow: 0 9px 22px rgba(29,72,111,.12);
}

/* V20.5.3 - prevent public content flex item from growing wider than viewport. */
body.caando-public-theme:not(.agency-ui-mode) .caando-page-frame {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: clip !important;
    box-sizing: border-box !important;
}
