/* =========================================================
   RENDERSET LAYOUT + NAVIGATION + DESIGNER SHELL
   ========================================================= */

/* ---------- MainLayout.razor.css ---------- */
.renderset-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    width: 100%;
    height: 100dvh;
    overflow: clip;
    background: #f6f8f9;
    color: #1f2d33;
}

.renderset-sidebar {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #ffffff;
    border-right: 1px solid #e2e8eb;
}

.renderset-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 72px;
    padding: 0 18px;
    border-bottom: 1px solid #eef2f4;
}

.renderset-brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    flex-shrink: 0;
    background: #173d4f;
    color: #ffffff;
    font-size: 17px;
    font-weight: 800;
}

.renderset-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

    .renderset-brand-text strong {
        font-size: 14px;
        font-weight: 700;
    }

    .renderset-brand-text span {
        margin-top: 2px;
        color: #8a989f;
        font-size: 10px;
    }

.renderset-nav {
    flex: 1;
    padding: 18px 10px;
    overflow-y: auto;
}

.renderset-nav-section + .renderset-nav-section {
    margin-top: 24px;
}

.renderset-nav-title {
    margin-bottom: 7px;
    padding: 0 9px;
    color: #99a5ab;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.renderset-nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    padding: 7px 9px;
    border-radius: 7px;
    color: #586970;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: background-color .15s ease, color .15s ease;
}

    .renderset-nav-item:hover {
        background: #f3f6f7;
        color: #294b5a;
    }

    .renderset-nav-item.active {
        background: #eaf0f3;
        color: #173d4f;
    }

.renderset-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    flex-shrink: 0;
    color: #78909b;
    font-size: 14px;
    font-weight: 400;
}

.renderset-nav-item.active .renderset-nav-icon {
    color: #173d4f;
}

.renderset-sidebar-footer {
    padding: 14px;
    border-top: 1px solid #eef2f4;
}

.renderset-tenant-label {
    margin-bottom: 7px;
    color: #a0abb0;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.renderset-tenant {
    display: flex;
    align-items: center;
    gap: 9px;
}

.renderset-tenant-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 7px;
    background: #eef3f5;
    color: #345565;
    font-size: 11px;
    font-weight: 700;
}

.renderset-tenant > div:last-child {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.renderset-tenant strong {
    font-size: 11px;
}

.renderset-tenant span {
    margin-top: 1px;
    color: #8c999f;
    font-size: 9px;
}

.renderset-main {
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.renderset-content {
    min-width: 0;
    min-height: 0;
}

@media (max-width: 800px) {

    .renderset-layout {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .renderset-brand {
        justify-content: center;
        padding: 0;
    }

    .renderset-brand-text,
    .renderset-nav-title,
    .renderset-nav-item span:not(.renderset-nav-icon),
    .renderset-sidebar-footer {
        display: none;
    }

    .renderset-nav {
        padding-inline: 8px;
    }

    .renderset-nav-item {
        justify-content: center;
        padding-inline: 0;
    }
}

/* ---------- NavMenu.razor.css ---------- */
.renderset-nav {
    flex: 1;
    padding: 18px 12px;
    overflow-y: auto;
}

.renderset-nav-section {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

    .renderset-nav-section + .renderset-nav-section {
        margin-top: 28px;
    }

.renderset-nav-title {
    margin-bottom: 7px;
    padding: 0 10px;
    color: #98a6ad;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
}


/* IMPORTANTE:
   NavLink genera internamente un <a>,
   por eso necesitamos con CSS isolation.
*/

a.renderset-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    box-sizing: border-box;
    border-radius: 8px;
    color: #586970;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    transition: background-color .15s ease, color .15s ease;
}

    a.renderset-nav-item:visited {
        color: #586970;
        text-decoration: none;
    }

    a.renderset-nav-item:hover {
        background: #f1f5f6;
        color: #244b5d;
        text-decoration: none;
    }

    a.renderset-nav-item.active {
        background: #e7eff2;
        color: #173d4f;
        text-decoration: none;
    }

.renderset-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 21px;
    height: 21px;
    flex: 0 0 21px;
    color: #7d919a;
    font-size: 13px;
}

a.renderset-nav-item:hover .renderset-nav-icon,
a.renderset-nav-item.active .renderset-nav-icon {
    color: #173d4f;
}

/* ---------- ReportDesigner.razor.css ---------- */
.designer-shell {
    display: grid;
    grid-template-rows: 44px minmax(0, 1fr);
    width: 100%;
    height: 100dvh;
    overflow: hidden;
    background: #eef3f5;
}

.designer-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 14px;
    border-bottom: 1px solid #d8e2e6;
    background: #ffffff;
    color: #223842;
}

.designer-back-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 30px;
    padding: 0 10px;
    border: 1px solid #d8e2e6;
    border-radius: 7px;
    background: #ffffff;
    color: #415762;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.designer-back-button:hover {
    background: #f4f8f9;
    color: #173d4f;
}

.designer-title {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.designer-title strong {
    font-size: 12px;
}

.designer-title span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #77888f;
    font-size: 10px;
}

.designer-title code {
    color: #526a75;
    font-size: 10px;
}

.report-designer-page {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}


.designer-state {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    min-height: 100dvh;
    color: #61737b;
    font-size: 13px;
}

.designer-state-error strong {
    color: #8c3a3a;
}

.designer-saving {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #75868e;
    font-size: 11px;
    font-weight: 700;
}

    .designer-saving.is-dirty {
        color: #b07a14;
    }

        .designer-saving.is-dirty i {
            font-size: 7px;
        }
