/* ControlServer — padrão visual global (CS-UI) */

.cs-page-header {
    margin-bottom: 1rem;
}

.cs-page-header-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    min-height: 2rem;
}

.cs-page-header-title {
    color: var(--mw-text-strong, #f8fbff);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.2;
    margin: 0;
}

.cs-page-header-subtitle {
    color: var(--mw-muted, #8fa3bd);
    font-size: .92rem;
    margin-top: .35rem;
}

.cs-page-header-aside {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    flex-shrink: 0;
    justify-content: flex-end;
    margin-left: auto;
}

.cs-page-shell {
    padding: .85rem 1.25rem 1.25rem;
}

/* Plataforma — favicon + nome + versão */
.cs-platform-badge {
    display: inline-flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: .18rem;
    line-height: 1.15;
    max-width: 100%;
    min-width: 0;
}

.cs-platform-badge--compact {
    min-width: 0;
}

.cs-platform-name-line {
    align-items: center;
    display: inline-flex;
    flex-wrap: nowrap;
    gap: .35rem;
    max-width: 100%;
}

.cs-platform-favicon {
    display: block;
    flex: 0 0 auto;
    height: 18px;
    object-fit: contain;
    object-position: center;
    width: 18px;
}

.cs-platform-tipo-icon {
    color: var(--mw-muted, #8fa3bd);
    flex: 0 0 auto;
    font-size: .72rem;
    line-height: 1;
    opacity: .85;
}

.cs-platform-name {
    color: var(--mw-text, #d7e2f1);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .01em;
    line-height: 1.2;
    white-space: nowrap;
}

.cs-platform-badge--woocommerce .cs-platform-name {
    color: #c4b5fd;
}

.cs-platform-badge--wordpress .cs-platform-name {
    color: #7dd3fc;
}

.cs-platform-version {
    color: var(--mw-text, #d7e2f1);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .01em;
    padding-left: calc(18px + .35rem);
    white-space: nowrap;
}

.cs-platform-version--muted {
    color: var(--mw-muted, #8fa3bd);
    font-weight: 500;
}

.cs-platform-badge--empty {
    font-size: .85rem;
}

/* Legado — wordmarks não usados na grid */
.cs-platform-wordmark,
.cs-platform-logo {
    display: none;
}

.cs-platform-version-line,
.cs-platform-type-icon {
    display: none;
}

.cs-sites-table .cs-platform-badge--compact .cs-platform-tipo-icon {
    display: none;
}

/* SSL — indicador Cloudflare (nuvem proxy / DNS only) */
.cs-ssl-dual .cs-ssl-cf {
    align-items: center;
    display: inline-flex;
    flex-shrink: 0;
    gap: .28rem;
    line-height: 1.15;
    margin-top: .05rem;
    overflow: visible;
}

.cs-ssl-dual .cs-cf-cloud {
    display: block;
    flex: 0 0 auto;
    height: 9px;
    overflow: visible;
    width: 13px;
}

.cs-ssl-dual .cs-cf-label {
    color: var(--mw-text, #c8d4e3);
    font-size: .62rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

.cs-ssl-dual .cs-ssl-cf--proxy .cs-cf-label {
    color: #e8a04a;
}

.cs-ssl-dual .cs-ssl-cf--dns .cs-cf-label {
    color: var(--mw-muted, #8fa3bd);
}

/* Ordenação de grids */
.cs-sort-link {
    align-items: center;
    color: inherit;
    display: inline-flex;
    font-weight: inherit;
    text-decoration: none;
}

.cs-sort-link:hover {
    color: var(--mw-cyan, #38bdf8);
}

.cs-sort-icon {
    font-size: .72rem;
    margin-left: .25rem;
}

.cs-sort-icon--idle {
    opacity: .45;
}

.cs-sort-icon--active {
    color: var(--mw-cyan, #38bdf8);
    opacity: 1;
}

.cs-sortable-grid thead th {
    white-space: nowrap;
}

.cs-sortable-grid thead th[data-sortable="true"] {
    cursor: pointer;
    user-select: none;
}

.cs-sortable-grid thead th[data-sortable="true"]:hover {
    color: var(--mw-cyan, #38bdf8);
}

/* Sidebar — logo/rodapé fixos; apenas a região central do menu rola */
#appSidebar.sidebar {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

#appSidebar .brand,
#appSidebar .sidebar-footer {
    flex-shrink: 0;
}

#appSidebar .sidebar-nav-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-color: rgba(148, 163, 184, .35) transparent;
    scrollbar-width: thin;
}

#appSidebar .sidebar-nav-scroll::-webkit-scrollbar {
    width: 6px;
}

#appSidebar .sidebar-nav-scroll::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, .35);
    border-radius: 999px;
}

#appSidebar .sidebar-nav-scroll::-webkit-scrollbar-track {
    background: transparent;
}

/* Rodapé global — assinatura institucional Tecleweb */
.app-content {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-content > main {
    flex: 1 1 auto;
    min-width: 0;
}

.cs-platform-footer {
    color: var(--mw-muted, #8fa3bd);
    flex-shrink: 0;
    font-size: .72rem;
    letter-spacing: .01em;
    line-height: 1.45;
    margin-top: auto;
    padding: .85rem 1.25rem 1rem;
    text-align: center;
    width: 100%;
}

.cs-platform-footer-rule {
    border-top: 1px solid rgba(148, 163, 184, .14);
    margin: 0 auto .75rem;
    max-width: 100%;
    width: min(100%, 960px);
}

.cs-platform-footer-inner {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: .45rem;
    margin: 0 auto;
    max-width: 960px;
}

.cs-platform-footer-product {
    color: rgba(143, 163, 189, .92);
    font-size: .74rem;
    font-weight: 600;
}

.cs-platform-footer-credit {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.cs-platform-footer-credit-text {
    color: rgba(127, 148, 174, .88);
    font-size: .68rem;
    font-weight: 500;
}

.cs-platform-footer-logo {
    display: block;
    height: auto;
    max-height: 1.65rem;
    max-width: min(100%, 9.5rem);
    opacity: .78;
    width: auto;
}

.cs-platform-footer--login {
    background: transparent;
    padding: 1rem 1rem 1.25rem;
}

.cs-platform-footer--login .cs-platform-footer-rule {
    margin-bottom: .65rem;
    width: min(100%, 420px);
}

.cs-login-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.cs-login-main {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    justify-content: center;
    padding: 1rem;
}

@media (max-width: 575.98px) {
    .cs-platform-footer {
        padding-left: .85rem;
        padding-right: .85rem;
    }

    .cs-platform-footer-logo {
        max-height: 1.45rem;
        max-width: 8.5rem;
    }
}
