body {
    font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2364748b' stroke-width='1.5'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.1rem;
    padding-right: 2.5rem;
}

:root {
    --dsai-blue: #1368ff;
    --dsai-navy: #0b1737;
    --dsai-muted: #60739d;
    --dsai-border: rgba(174, 197, 232, .46);
    --dsai-panel: rgba(255, 255, 255, .72);
    --dsai-shadow: 0 12px 38px rgba(55, 98, 160, .08);
}

.dsai-admin-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at 66% 8%, rgba(151, 203, 255, .28), transparent 28rem),
        radial-gradient(circle at 14% 30%, rgba(197, 224, 255, .28), transparent 24rem),
        linear-gradient(135deg, #f7fbff 0%, #eef6ff 48%, #f8fbff 100%);
}

.dsai-glass {
    border: 1px solid var(--dsai-border);
    background: linear-gradient(135deg, rgba(255,255,255,.88), rgba(248,252,255,.68));
    box-shadow: var(--dsai-shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.dsai-soft-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(178, 200, 234, .5);
    background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(247,251,255,.75));
    box-shadow: 0 10px 28px rgba(52, 94, 155, .07);
}

.dsai-soft-card::after {
    content: "";
    position: absolute;
    right: -18%;
    bottom: -58%;
    width: 52%;
    aspect-ratio: 1;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(174,213,255,.42) 0%, rgba(174,213,255,0) 68%);
    pointer-events: none;
}

.dsai-kpi-purple::after {
    background: radial-gradient(circle, rgba(198,174,255,.38) 0%, rgba(198,174,255,0) 68%);
}

.dsai-kpi-green::after {
    background: radial-gradient(circle, rgba(151,235,212,.42) 0%, rgba(151,235,212,0) 68%);
}

.dsai-icon-tile {
    box-shadow: inset 0 1px 0 rgba(255,255,255,.75), 0 7px 20px rgba(39,109,255,.08);
}

.dsai-app-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 86% 28%, rgba(181,214,255,.52), transparent 31%),
        linear-gradient(135deg, rgba(255,255,255,.92), rgba(245,250,255,.78));
}

.dsai-app-hero::after {
    content: "";
    position: absolute;
    right: 3%;
    bottom: 4%;
    width: 29%;
    height: 62%;
    opacity: .20;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%235c8fd8' stroke-width='3'%3E%3Cpath d='M20 82h18l16-34c7-15 20-23 38-25h90c19 1 33 8 45 21l26 29h18c9 0 15 7 15 15v9H20z'/%3E%3Cpath d='M79 48h96c17 0 29 5 40 17l12 13H58l8-18c3-7 7-12 13-12z'/%3E%3Ccircle cx='78' cy='94' r='17'/%3E%3Ccircle cx='233' cy='94' r='17'/%3E%3Cpath d='M102 52v27m77-27 18 27'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.dsai-platform-row + .dsai-platform-row {
    border-top: 1px solid rgba(215, 226, 242, .78);
}

.dsai-chart-grid {
    background-image:
        linear-gradient(to right, rgba(185,202,226,.20) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(185,202,226,.22) 1px, transparent 1px);
    background-size: 16.666% 100%, 100% 25%;
}

.dsai-scrollbar::-webkit-scrollbar {
    width: 5px;
}

.dsai-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, .32);
    border-radius: 999px;
}

@media (min-width: 1024px) {
    .dsai-console-main {
        min-height: calc(100vh - 64px);
    }
}

html.dsai-login-root,
html.dsai-login-root body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: #0b1a2e;
}

.dsai-login-page {
    position: fixed;
    inset: 0;
    overflow: hidden;
    background: #0b1a2e;
}

.dsai-login-desktop-shell {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #0b1a2e;
}

.dsai-login-stage {
    position: relative;
    width: 1671px;
    height: 941px;
    flex: 0 0 auto;
    overflow: hidden;
    transform: scale(var(--login-scale, 1));
    transform-origin: center center;
    background: transparent;
}

.dsai-login-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 56%;
    display: block;
    user-select: none;
    pointer-events: none;
}

.dsai-login-glass {
    position: absolute;
    left: 994px;
    top: 71px;
    width: 492px;
    height: 790px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    padding: 46px 42px 0;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 34px;
    background: linear-gradient(158deg, rgba(255,255,255,.40) 0%, rgba(233,243,255,.20) 50%, rgba(255,255,255,.32) 100%);
    box-shadow: 0 40px 90px rgba(8, 26, 54, .22), inset 0 1px 0 rgba(255, 255, 255, .68), inset 0 0 0 1px rgba(255, 255, 255, .10);
    backdrop-filter: blur(46px) saturate(175%);
    -webkit-backdrop-filter: blur(46px) saturate(175%);
    color: #0f1f3d;
    overflow: hidden;
}

.dsai-login-glass > * { position: relative; z-index: 1; }

.dsai-login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
}

.dsai-login-logo {
    position: relative;
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(150deg, #7cc4ff 0%, #2f7bff 42%, #5a3bff 100%);
    box-shadow: inset 0 2px 3px rgba(255,255,255,.5), 0 12px 26px rgba(24, 96, 255, .30);
}

.dsai-login-logo-core {
    position: relative;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: linear-gradient(150deg, #ffffff, #eaf3ff);
    box-shadow: inset 0 2px 5px rgba(60, 110, 200, .22);
}

.dsai-login-logo-core::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translate(-50%, -50%);
    border-radius: 5px;
    background: linear-gradient(150deg, #1e88ff, #2b5bff 55%, #6a3bff);
}

.dsai-login-brand-text strong,
.dsai-login-brand-text span { display: block; }

.dsai-login-brand-text strong {
    font-size: 27px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -.03em;
    color: #0d1b34;
}

.dsai-login-brand-text span {
    margin-top: 5px;
    font-size: 14px;
    font-weight: 600;
    color: #2f7bff;
}

.dsai-login-heading { margin-top: 26px; text-align: center; }

.dsai-login-heading h1 {
    margin: 0;
    font-size: 27px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #0d1b34;
}

.dsai-login-heading p {
    margin: 10px auto 0;
    max-width: 330px;
    font-size: 13.5px;
    line-height: 1.5;
    color: #52637c;
}

.dsai-login-form { margin-top: 24px; }

.dsai-login-field {
    height: 54px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 13px;
    background: rgba(255, 255, 255, .62);
    box-shadow: 0 6px 16px rgba(31, 65, 120, .07), inset 0 1px 0 rgba(255, 255, 255, .7);
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.dsai-login-field + .dsai-login-field { margin-top: 13px; }

.dsai-login-field:focus-within {
    border-color: rgba(47, 123, 255, .65);
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 0 0 4px rgba(47, 123, 255, .12);
}

.dsai-login-field-icon,
.dsai-login-eye { display: flex; align-items: center; justify-content: center; color: #64748b; }

.dsai-login-field-icon svg,
.dsai-login-eye svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dsai-login-eye { flex: 0 0 auto; padding: 0; border: 0; background: transparent; cursor: pointer; }

.dsai-login-field input {
    min-width: 0;
    flex: 1;
    height: 52px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #0d1b34;
    font-size: 14px;
}

.dsai-login-field input::placeholder { color: #8b98ad; opacity: 1; }

.dsai-login-tools {
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dsai-login-remember {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    color: #33415c;
    font-size: 13px;
    font-weight: 600;
}

.dsai-login-remember input { position: absolute; opacity: 0; width: 0; height: 0; }

.dsai-login-checkbox {
    width: 19px;
    height: 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1.5px solid #b9c6dc;
    background: #fff;
    transition: all .15s ease;
}

.dsai-login-checkbox svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: #fff;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
    transition: opacity .15s ease;
}

.dsai-login-remember input:checked + .dsai-login-checkbox {
    border-color: #2f7bff;
    background: linear-gradient(150deg, #3f8bff, #1368ff);
}

.dsai-login-remember input:checked + .dsai-login-checkbox svg { opacity: 1; }

.dsai-login-forgot { color: #2f7bff; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.dsai-login-forgot:hover { text-decoration: underline; }

.dsai-login-primary {
    width: 100%;
    height: 56px;
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #fff;
    background: linear-gradient(120deg, #2f8bff 0%, #1368ff 55%, #0f5ef0 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 14px 28px rgba(15, 88, 220, .32);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s ease, filter .15s ease;
}

.dsai-login-primary:hover { filter: brightness(1.05); transform: translateY(-1px); }

.dsai-login-primary svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dsai-login-divider { margin: 22px 0 18px; display: flex; align-items: center; gap: 12px; }
.dsai-login-divider span { flex: 1; height: 1px; background: rgba(148, 163, 184, .45); }
.dsai-login-divider em { font-style: normal; font-size: 12px; white-space: nowrap; color: #5a6b82; font-weight: 600; }

.dsai-login-corporate {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 13px;
    background: rgba(255, 255, 255, .55);
    box-shadow: 0 6px 16px rgba(31, 65, 120, .06);
    text-align: left;
    cursor: pointer;
    transition: background .15s ease, box-shadow .15s ease;
}

.dsai-login-corporate:hover { background: rgba(255, 255, 255, .75); }

.dsai-login-corporate-icon { display: flex; align-items: center; justify-content: center; color: #33415c; }

.dsai-login-corporate-icon svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dsai-login-corporate-text { display: block; }
.dsai-login-corporate-text b { display: block; font-size: 14px; font-weight: 700; color: #0d1b34; }
.dsai-login-corporate-text small { display: block; margin-top: 3px; font-size: 12px; color: #5a6b82; }

.dsai-login-help { margin-top: 22px; display: flex; align-items: center; justify-content: center; gap: 12px; }

.dsai-login-help-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(47, 123, 255, .12);
    color: #2f7bff;
}

.dsai-login-help-icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dsai-login-help b, .dsai-login-help span { display: block; }
.dsai-login-help b { color: #0d1b34; font-size: 13px; font-weight: 700; }
.dsai-login-help span { margin-top: 3px; color: #2f7bff; font-size: 12px; font-weight: 600; }

.dsai-login-error {
    margin-top: 16px;
    padding: 10px 13px;
    border: 1px solid rgba(220, 80, 80, .35);
    border-radius: 12px;
    background: rgba(255, 235, 235, .8);
    color: #b42318;
    font-size: 12px;
    text-align: center;
}

.dsai-login-mobile-shell { display: none; }

@media (max-width: 900px) {
    .dsai-login-desktop-shell { display: none; }

    .dsai-login-mobile-shell {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 18px;
        background: linear-gradient(rgba(6, 18, 36, .5), rgba(6, 18, 36, .62)), url('/assets/images/login-background.webp') center center / cover no-repeat;
    }

    .dsai-login-mobile-overlay {
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at 70% 30%, rgba(47, 123, 255, .16), transparent 40%);
    }

    .dsai-login-mobile-card {
        position: relative;
        z-index: 1;
        width: min(100%, 430px);
        max-height: calc(100dvh - 36px);
        padding: 34px 26px 30px;
        border: 1px solid rgba(255, 255, 255, .5);
        border-radius: 28px;
        background: linear-gradient(158deg, rgba(255,255,255,.72), rgba(238,246,255,.55));
        box-shadow: 0 30px 70px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255,255,255,.8);
        backdrop-filter: blur(30px) saturate(160%);
        -webkit-backdrop-filter: blur(30px) saturate(160%);
        overflow: auto;
    }

    .dsai-login-mobile-card .dsai-login-brand { justify-content: center; }
    .dsai-login-mobile-card .dsai-login-heading { margin-top: 22px; }
    .dsai-login-mobile-card .dsai-login-heading h1 { font-size: 24px; }
    .dsai-login-mobile-card .dsai-login-form { margin-top: 22px; }
}

/* ===== Dashboard: full-bleed hero + single-screen grid ===== */
html.dsai-console-root,
html.dsai-console-root body {
    height: 100%;
    overflow: hidden;
}

.dsai-admin-shell {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.dsai-main-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.dsai-console-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.dsai-dash {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* BODY: KPIs + filas, llena el resto */
.dsai-dash-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 20px 16px;
}

.dsai-dash-kpis { flex: 0 0 auto; }

.dsai-dash-row {
    flex: 1 1 0;
    min-height: 0;
    display: grid;
    grid-template-columns: 1.62fr 1fr;
    gap: 12px;
}

.dsai-dash-row--top { flex: 0.8 1 0; }
.dsai-dash-row--bottom { flex: 1 1 0; }

.dsai-dash-row > .dsai-panel {
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dsai-panel-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (max-width: 1279px) {
    .dsai-console-scroll { overflow-y: auto; }
    .dsai-dash { height: auto; }
    .dsai-dash-body { flex: 0 0 auto; }
    .dsai-dash-row { flex: 0 0 auto; grid-template-columns: 1fr; }
    .dsai-dash-row > .dsai-panel { height: auto; }
    .dsai-panel-body { overflow: visible; }
    .dsai-apps-carousel { min-height: 210px; }
    .dsai-carousel-track { overflow-x: auto; }
}

.dsai-apps-carousel {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: stretch;
    padding: 0 22px;
}

.dsai-carousel-track {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: stretch;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 2px;
    scrollbar-width: none;
}
.dsai-carousel-track::-webkit-scrollbar { display: none; }

.dsai-app-slide {
    text-decoration: none;
    color: inherit;
    scroll-snap-align: start;
    flex: 0 0 auto;
    width: 300px;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(191, 219, 254, .8);
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .05);
    display: flex;
    flex-direction: column;
}

.dsai-app-top { flex: 1 1 auto; min-height: 0; display: flex; align-items: stretch; overflow: hidden; }

.dsai-app-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; padding: 12px 12px 8px; }
.dsai-app-photo-wrap { position: relative; flex: 0 0 46%; overflow: hidden; }
.dsai-app-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.dsai-app-photo-wrap::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.95) 0%, rgba(255,255,255,.4) 40%, rgba(255,255,255,0) 100%); }

.dsai-app-tile { display: flex; height: 40px; width: 40px; align-items: center; justify-content: center; border-radius: 13px; color: #fff; box-shadow: 0 6px 14px rgba(15, 23, 42, .18); }
.dsai-app-name { margin-top: 9px; font-size: 14.5px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; color: #0b1737; }
.dsai-app-pill { margin-top: 6px; display: inline-flex; align-items: center; gap: 5px; border-radius: 9999px; padding: 2px 8px; font-size: 9.5px; font-weight: 700; }
.dsai-app-pill.is-green { background: #ecfdf5; color: #059669; }
.dsai-app-pill.is-amber { background: #fff7ed; color: #ea580c; }
.dsai-app-pill.is-slate { background: #f1f5f9; color: #64748b; }
.dsai-app-pill-dot { height: 5px; width: 5px; border-radius: 9999px; background: currentColor; }
.dsai-app-sub { margin-top: 6px; font-size: 10.5px; line-height: 1.35; color: #6b80a4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.dsai-app-metrics { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-around; gap: 4px; padding: 8px 10px; border-top: 1px solid rgba(191, 219, 254, .8); }
.dsai-app-metric { display: flex; align-items: center; gap: 5px; min-width: 0; }
.dsai-app-metric-icon { color: #93a7c4; flex: 0 0 auto; }
.dsai-app-metric-v { font-size: 11.5px; font-weight: 800; line-height: 1; color: #0b1737; }
.dsai-app-metric-l { font-size: 9px; color: #93a7c4; white-space: nowrap; }

/* Arrows */
.dsai-carousel-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 6;
    display: flex; height: 34px; width: 34px; align-items: center; justify-content: center;
    border-radius: 9999px; border: 1px solid rgba(191, 219, 254, .95);
    background: rgba(255, 255, 255, .97); color: #45628e;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .14);
}
.dsai-carousel-arrow--prev { left: 0; }
.dsai-carousel-arrow--prev svg { transform: rotate(180deg); }
.dsai-carousel-arrow--next { right: 0; }
.dsai-carousel-arrow:disabled { opacity: .3; }

/* Dots */
.dsai-carousel-dots { flex: 0 0 auto; display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 8px; }
.dsai-carousel-dot { height: 6px; width: 6px; border-radius: 9999px; background: #c7d7ef; transition: width .2s ease, background .2s ease; }
.dsai-carousel-dot.is-active { width: 18px; background: #2563eb; }

@media (max-width: 639px) {
    .dsai-app-slide { width: 268px; }
    .dsai-apps-carousel { min-height: 200px; }
}

/* Plataforma: nunca recortar; scroll solo si hace falta */
.dsai-platform-list { overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.dsai-platform-list::-webkit-scrollbar { display: none; }

/* Sidebar: collapsed default, hover-expand, icons centered */
.dsai-sidebar {
    width: 252px;
    overflow: hidden;
    transition: width .26s cubic-bezier(.4,0,.2,1), transform .2s ease;
}

.dsai-sidebar-head,
.dsai-nav-item { justify-content: flex-start; }

.dsai-sidebar-reveal {
    opacity: 1;
    max-width: 250px;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity .15s ease, max-width .26s cubic-bezier(.4,0,.2,1);
}

.dsai-sidebar.dsai-collapsed { width: 72px; }
.dsai-sidebar.dsai-collapsed .dsai-sidebar-head,
.dsai-sidebar.dsai-collapsed .dsai-nav-item { justify-content: center; gap: 0; padding-left: 0; padding-right: 0; }
.dsai-sidebar.dsai-collapsed .dsai-sidebar-head > .ml-auto,
.dsai-sidebar.dsai-collapsed .dsai-nav-item > .ml-auto { margin-left: 0; padding-left: 0; padding-right: 0; }
.dsai-sidebar.dsai-collapsed .dsai-sidebar-reveal { opacity: 0; max-width: 0; }
.dsai-sidebar.dsai-collapsed .dsai-sidebar-help,
.dsai-sidebar.dsai-collapsed .dsai-sidebar-profile { justify-content: center; gap: 0; border-color: transparent; background: transparent; box-shadow: none; padding-left: 0; padding-right: 0; }
.dsai-sidebar.dsai-collapsed .dsai-sidebar-help > .dsai-sidebar-reveal,
.dsai-sidebar.dsai-collapsed .dsai-sidebar-profile > .dsai-sidebar-reveal { max-width: 0; }

@media (min-width: 1024px) {
    .dsai-sidebar.dsai-collapsed:hover { width: 252px; }
    .dsai-sidebar.dsai-collapsed:hover .dsai-sidebar-head,
    .dsai-sidebar.dsai-collapsed:hover .dsai-nav-item { justify-content: flex-start; gap: .75rem; padding-left: .75rem; padding-right: .75rem; }
    .dsai-sidebar.dsai-collapsed:hover .dsai-sidebar-head > .ml-auto,
    .dsai-sidebar.dsai-collapsed:hover .dsai-nav-item > .ml-auto { margin-left: auto; padding-left: .5rem; padding-right: .5rem; }
    .dsai-sidebar.dsai-collapsed:hover .dsai-sidebar-help,
    .dsai-sidebar.dsai-collapsed:hover .dsai-sidebar-profile { justify-content: flex-start; gap: .75rem; border-color: rgba(219,234,254,.8); background: rgba(255,255,255,.7); box-shadow: 0 1px 2px rgba(0,0,0,.04); padding-left: .75rem; padding-right: .75rem; }
    .dsai-sidebar.dsai-collapsed:hover .dsai-sidebar-reveal { opacity: 1; max-width: 250px; }
}

@media (max-width: 1023px) {
    .dsai-sidebar, .dsai-sidebar.dsai-collapsed { width: 252px; }
    .dsai-sidebar.dsai-collapsed .dsai-sidebar-reveal { opacity: 1; max-width: 250px; }
}

/* ===== Apps section (matches approved reference) ===== */
.dsai-apps-title {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.1;
    color: #0b1737;
}

.dsai-apps-sub {
    margin-top: 7px;
    font-size: 15px;
    line-height: 1.4;
    color: #64748b;
}

.dsai-viewswitch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 13px;
    border: 1px solid #e8effb;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(55, 98, 160, .06);
}

.dsai-viewswitch-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.dsai-viewswitch-btn:hover { color: #64748b; }

.dsai-viewswitch-btn.is-active {
    background: #f4f7fc;
    border-color: #e2e8f0;
    color: #0b1737;
}

.dsai-viewswitch-btn.is-active svg { color: #1368ff; }

.dsai-apps-add {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 22px;
    border: 0;
    border-radius: 12px;
    background: #1368ff;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(19, 104, 255, .26);
    transition: background .15s ease;
}

.dsai-apps-add:hover { background: #0f57d6; }

.dsai-apps-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.dsai-appc {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 22px 24px 20px;
    border-radius: 20px;
    border: 1px solid #e8effb;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(55, 98, 160, .07);
}

.dsai-appc-artwrap {
    position: absolute;
    top: 0;
    right: 0;
    width: 44%;
    height: 63%;
    overflow: hidden;
    border-radius: 0 20px 0 26px;
    pointer-events: none;
}

.dsai-appc-art {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.dsai-appc-artwrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, .92) 14%, rgba(255, 255, 255, .40) 44%, rgba(255, 255, 255, 0) 80%),
        linear-gradient(180deg, rgba(255, 255, 255, 0) 62%, rgba(255, 255, 255, .86) 92%, #ffffff 100%);
}

.dsai-appc-head {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.dsai-appc-tile {
    display: flex;
    height: 62px;
    width: 62px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    color: #fff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, .18);
}

.dsai-tone-violet { background: linear-gradient(145deg, #8b5cf6 0%, #5b21e6 100%); }
.dsai-tone-emerald { background: linear-gradient(145deg, #34d399 0%, #0e9f6e 100%); }
.dsai-tone-blue { background: linear-gradient(145deg, #4f8dff 0%, #1d4ed8 100%); }
.dsai-tone-amber { background: linear-gradient(145deg, #fbbf24 0%, #f97316 100%); }
.dsai-tone-indigo { background: linear-gradient(145deg, #6366f1 0%, #4338ca 100%); }
.dsai-tone-teal { background: linear-gradient(145deg, #2dd4bf 0%, #0d9488 100%); }

.dsai-appc-headtext {
    min-width: 0;
    max-width: 50%;
    padding-top: 1px;
}

.dsai-appc-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.022em;
    line-height: 1.15;
    color: #0b1737;
}

.dsai-appc-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 7px;
}

.dsai-appc-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 9999px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.dsai-appc-status i {
    height: 6px;
    width: 6px;
    border-radius: 9999px;
    background: currentColor;
}

.dsai-appc-status.is-green { background: #ecfdf5; color: #059669; }
.dsai-appc-status.is-amber { background: #fff7ed; color: #ea580c; }
.dsai-appc-status.is-slate { background: #f1f5f9; color: #64748b; }

.dsai-appc-cat {
    border-radius: 8px;
    background: #f1f5f9;
    padding: 3px 9px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #64748b;
}

.dsai-appc-tagline {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.4;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dsai-appc-open {
    position: absolute;
    top: 18px;
    right: 20px;
    z-index: 3;
    display: flex;
    height: 34px;
    width: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    border: 1px solid #e8effb;
    background: rgba(255, 255, 255, .96);
    color: #64748b;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
    transition: color .15s ease, border-color .15s ease;
}

.dsai-appc-open:hover { color: #1368ff; border-color: #c7dbfb; }

.dsai-appc-meta {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 22px;
}

.dsai-appc-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13.5px;
    color: #64748b;
}

.dsai-appc-meta-item b {
    font-size: 15px;
    font-weight: 800;
    color: #0b1737;
}

.dsai-appc-meta-icon { color: #94a3b8; flex: 0 0 auto; display: inline-flex; }

.dsai-appc-div {
    width: 1px;
    height: 20px;
    background: #e2e8f0;
}

.dsai-appc-foot {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: 16px;
    border-radius: 12px;
    background: #f8fafc;
    padding: 12px 16px;
    font-size: 13.5px;
    line-height: 1.4;
    color: #475569;
}

.dsai-appc-foot-icon { color: #2563eb; flex: 0 0 auto; display: inline-flex; }

/* Lista */
.dsai-apps-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dsai-apps-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-radius: 16px;
    border: 1px solid #e8effb;
    background: #fff;
    box-shadow: 0 6px 18px rgba(55, 98, 160, .05);
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.dsai-apps-row:hover { border-color: #c7dbfb; box-shadow: 0 10px 24px rgba(55, 98, 160, .1); }

.dsai-apps-row-tile {
    display: flex;
    height: 44px;
    width: 44px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    color: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .16);
}

.dsai-apps-row-main { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.dsai-apps-row-name { font-size: 15px; font-weight: 700; color: #0b1737; }
.dsai-apps-row-sub { font-size: 12.5px; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dsai-apps-row-slug { font-size: 12.5px; color: #94a3b8; }
.dsai-apps-row-chevron { color: #cbd5e1; display: inline-flex; flex: 0 0 auto; }

@media (max-width: 1200px) {
    .dsai-apps-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 767px) {
    .dsai-apps-title { font-size: 27px; }
    .dsai-apps-sub { font-size: 14px; }

    .dsai-appc { padding: 20px 18px 18px; }

    .dsai-appc-artwrap {
        position: static;
        width: 100%;
        height: 150px;
        margin-top: 16px;
        border-radius: 14px;
    }

    .dsai-appc-artwrap::after { display: none; }

    .dsai-appc-headtext { max-width: 100%; }
    .dsai-appc-meta { margin-top: 16px; gap: 12px; }
    .dsai-appc-foot { margin-top: 14px; }

    .dsai-viewswitch { width: 100%; justify-content: center; }
    .dsai-viewswitch-btn { flex: 1 1 auto; justify-content: center; }
    .dsai-apps-add { width: 100%; justify-content: center; }

    .dsai-apps-row-slug { display: none; }
}

/* ===== Agregar App modal ===== */
.dsai-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    overflow-y: auto;
}

.dsai-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .48);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.dsai-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    margin: auto;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 30px 70px rgba(15, 23, 42, .28);
}

.dsai-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 26px 28px 0;
}

.dsai-modal-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.15;
    color: #0b1737;
}

.dsai-modal-x {
    display: flex;
    height: 34px;
    width: 34px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.dsai-modal-x:hover { background: #f1f5f9; color: #0b1737; }

.dsai-modal-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 18px 28px 0;
}

.dsai-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.dsai-input {
    display: block;
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background-color: #fff;
    padding: 11px 14px;
    font-size: 15px;
    line-height: 1.4;
    color: #0b1737;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.dsai-input::placeholder { color: #94a3b8; }

.dsai-input:focus {
    border-color: #1368ff;
    box-shadow: 0 0 0 3px rgba(19, 104, 255, .12);
}

.dsai-textarea {
    min-height: 96px;
    resize: vertical;
}

.dsai-hint {
    margin-top: 7px;
    font-size: 12.5px;
    color: #94a3b8;
}

.dsai-counter {
    margin-top: 6px;
    text-align: right;
    font-size: 12.5px;
    color: #94a3b8;
}

.dsai-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 22px;
    padding: 20px 28px;
    border-top: 1px solid #eef2f7;
}

.dsai-btn-ghost {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    padding: 12px 26px;
    font-size: 15px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: background .15s ease;
}

.dsai-btn-ghost:hover { background: #f8fafc; }

.dsai-btn-primary {
    border: 0;
    border-radius: 10px;
    background: #1368ff;
    padding: 12px 26px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(19, 104, 255, .24);
    transition: background .15s ease;
}

.dsai-btn-primary:hover { background: #0f57d6; }

@media (max-width: 640px) {
    .dsai-modal { align-items: flex-start; padding: 16px 12px 24px; }
    .dsai-modal-head { padding: 22px 20px 0; }
    .dsai-modal-title { font-size: 22px; }
    .dsai-modal-body { padding: 16px 20px 0; gap: 16px; }
    .dsai-modal-foot { padding: 16px 20px; }
    .dsai-btn-ghost, .dsai-btn-primary { flex: 1 1 auto; padding: 12px 16px; }
}

/* ===== App detail: header, toolbar, tenants ===== */
.dsai-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    transition: color .15s ease;
}

.dsai-back:hover { color: #0b1737; }
.dsai-back-arrow { transform: rotate(180deg); }

.dsai-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.dsai-crumbs-sep {
    font-size: 14px;
    color: #cbd5e1;
}

.dsai-crumbs-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.025em;
    line-height: 1.2;
    color: #0b1737;
}

.dsai-crumbs-dot {
    height: 4px;
    width: 4px;
    border-radius: 9999px;
    background: #cbd5e1;
}

.dsai-crumbs-tag {
    font-size: 14px;
    color: #94a3b8;
}

.dsai-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid #e8effb;
    background: #fff;
    box-shadow: 0 10px 28px rgba(55, 98, 160, .07);
}

.dsai-toolbar-search {
    display: flex;
    flex: 1 1 240px;
    min-width: 180px;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}

.dsai-toolbar-search svg { color: #94a3b8; flex: 0 0 auto; }

.dsai-toolbar-search input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: transparent;
    font-size: 14.5px;
    color: #0b1737;
    outline: none;
}

.dsai-toolbar-search input::placeholder { color: #94a3b8; }

.dsai-toolbar-field {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}

.dsai-toolbar-field svg { color: #94a3b8; flex: 0 0 auto; }

.dsai-toolbar-field select {
    border: 0;
    background-color: transparent;
    padding: 0 1.5rem 0 0;
    background-position: right 0 center;
    background-size: 1rem;
    font-size: 14.5px;
    font-weight: 500;
    color: #334155;
    outline: none;
    cursor: pointer;
}

.dsai-toolbar-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 9999px;
    background: #eef4ff;
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 700;
    color: #1e3a8a;
    white-space: nowrap;
}

.dsai-panel-lg {
    margin-top: 20px;
    padding: 22px 24px;
    border-radius: 18px;
    border: 1px solid #e8effb;
    background: #fff;
    box-shadow: 0 12px 32px rgba(55, 98, 160, .08);
}

.dsai-panel-lg-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.dsai-panel-lg-tile {
    display: flex;
    height: 56px;
    width: 56px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: #eef4ff;
    color: #2563eb;
}

.dsai-panel-lg-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #0b1737;
}

.dsai-panel-lg-sub {
    margin-top: 3px;
    font-size: 14px;
    color: #64748b;
}

.dsai-tenant-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dsai-tenant-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 16px;
    border: 1px solid #e8effb;
    background: #fff;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.dsai-tenant-row:hover {
    border-color: #c7dbfb;
    box-shadow: 0 10px 24px rgba(55, 98, 160, .1);
}

.dsai-tenant-tile {
    display: flex;
    height: 48px;
    width: 48px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #eef4ff;
    color: #2563eb;
}

.dsai-tenant-main {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.dsai-tenant-name {
    font-size: 17px;
    font-weight: 700;
    color: #0b1737;
}

.dsai-tenant-slug {
    font-size: 14px;
    color: #94a3b8;
}

.dsai-tenant-status {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    border-radius: 9999px;
    padding: 6px 14px;
    font-size: 13.5px;
    font-weight: 700;
    white-space: nowrap;
}

.dsai-tenant-status i {
    height: 7px;
    width: 7px;
    border-radius: 9999px;
    background: currentColor;
}

.dsai-tenant-status.is-green { background: #ecfdf5; color: #059669; }
.dsai-tenant-status.is-amber { background: #fff7ed; color: #ea580c; }
.dsai-tenant-status.is-slate { background: #f1f5f9; color: #64748b; }

.dsai-tenant-chevron {
    display: inline-flex;
    flex: 0 0 auto;
    color: #cbd5e1;
}

.dsai-input--muted {
    background-color: #f8fafc;
    color: #94a3b8;
    cursor: not-allowed;
}

@media (max-width: 767px) {
    .dsai-crumbs-title { font-size: 18px; }
    .dsai-crumbs-tag { display: none; }
    .dsai-crumbs-dot { display: none; }

    .dsai-toolbar { padding: 12px; gap: 10px; }
    .dsai-toolbar-search { flex: 1 1 100%; }
    .dsai-toolbar-field { flex: 1 1 calc(50% - 5px); }
    .dsai-toolbar-count { flex: 1 1 auto; justify-content: center; }
    .dsai-toolbar .dsai-apps-add { flex: 1 1 100%; }

    .dsai-panel-lg { padding: 18px 16px; }
    .dsai-tenant-row { gap: 12px; padding: 14px 14px; }
    .dsai-tenant-tile { height: 42px; width: 42px; border-radius: 12px; }
    .dsai-tenant-name { font-size: 15.5px; }
    .dsai-tenant-slug { font-size: 13px; }
    .dsai-tenant-status { padding: 5px 11px; font-size: 12.5px; }
}

/* Discreet icon button (App settings) */
.dsai-icon-btn {
    display: inline-flex;
    height: 36px;
    width: 36px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.dsai-icon-btn:hover {
    border-color: #e8effb;
    background: #fff;
    color: #1368ff;
    box-shadow: 0 4px 12px rgba(55, 98, 160, .1);
}

/* Modal subtitle */
.dsai-modal-sub {
    margin-top: 7px;
    font-size: 14.5px;
    line-height: 1.4;
    color: #64748b;
}

/* Input with a leading icon */
.dsai-input-wrap {
    position: relative;
    display: block;
}

.dsai-input-wrap .dsai-input { padding-left: 43px; }

.dsai-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    display: inline-flex;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

/* Phone: fixed + prefix, the user types the area code and number */
.dsai-input-plus {
    position: absolute;
    left: 43px;
    top: 50%;
    display: inline-flex;
    transform: translateY(-50%);
    font-size: 15px;
    font-weight: 600;
    color: #0b1737;
    pointer-events: none;
}

.dsai-input-wrap .dsai-input--phone { padding-left: 58px; }
}

/* App capabilities (Tools) */
.dsai-tool-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dsai-tool-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid #e8effb;
    background: #fff;
}

.dsai-tool-risk {
    flex: 0 0 auto;
    min-width: 74px;
    text-align: center;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .06em;
}

.dsai-tool-risk.is-read { background: #eef4ff; color: #1d4ed8; }
.dsai-tool-risk.is-write { background: #fff7ed; color: #c2410c; }
.dsai-tool-risk.is-critical { background: #fef2f2; color: #b91c1c; }

.dsai-tool-main {
    display: flex;
    flex: 1 1 240px;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.dsai-tool-name { font-size: 14.5px; font-weight: 700; color: #0b1737; }
.dsai-tool-desc { font-size: 12.5px; color: #94a3b8; }

.dsai-tool-path {
    flex: 0 0 auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11.5px;
    color: #94a3b8;
    white-space: nowrap;
}

.dsai-tool-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 0;
    border-radius: 9999px;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: filter .15s ease;
}

.dsai-tool-toggle:hover { filter: brightness(.96); }
.dsai-tool-toggle.is-on { background: #ecfdf5; color: #059669; }
.dsai-tool-toggle.is-off { background: #f1f5f9; color: #64748b; }

.dsai-tool-toggle-dot {
    height: 7px;
    width: 7px;
    border-radius: 9999px;
    background: currentColor;
}

@media (max-width: 767px) {
    .dsai-tool-row { gap: 10px; padding: 14px; }
    .dsai-tool-risk { min-width: 64px; }
    .dsai-tool-main { flex: 1 1 100%; }
    .dsai-tool-path { flex: 1 1 auto; }
}

/* Per-tenant capability status */
.dsai-cap-status {
    flex: 0 0 auto;
    border-radius: 9999px;
    padding: 6px 13px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.dsai-cap-status.is-ok { background: #ecfdf5; color: #059669; }
.dsai-cap-status.is-error { background: #fef2f2; color: #b91c1c; }
.dsai-cap-status.is-declared { background: #eef4ff; color: #1d4ed8; }
.dsai-cap-status.is-unknown { background: #f1f5f9; color: #64748b; }

@media (max-width: 767px) {
    .dsai-cap-status { flex: 1 1 auto; text-align: center; }
}

.dsai-btn-sm { padding: 8px 14px; font-size: 12.5px; }

/* ===== Tenant dashboard (rediseño) ===== */
.dsai-td {
    display: flex;
    min-height: 100vh;
    background: linear-gradient(135deg, #f7fbff 0%, #eef6ff 55%, #f8fbff 100%);
}

.dsai-td-side {
    display: flex;
    width: 240px;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 18px;
    padding: 20px 16px;
    border-right: 1px solid #eef2f7;
    background: #ffffff;
}

.dsai-td-brand { display: flex; align-items: center; gap: 11px; }
.dsai-td-logo {
    display: flex; height: 42px; width: 42px; flex: 0 0 auto; align-items: center; justify-content: center;
    border-radius: 13px; background: linear-gradient(145deg, #2f8bff, #1368ff); color: #fff;
    box-shadow: 0 10px 20px rgba(19, 104, 255, .24);
}
.dsai-td-brand-text { display: flex; min-width: 0; flex-direction: column; }
.dsai-td-brand-name { font-size: 20px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; color: #0b1737; }
.dsai-td-brand-tag { font-size: 10.5px; color: #94a3b8; }

.dsai-td-tenant {
    display: flex; align-items: center; gap: 10px; padding: 11px 12px;
    border: 1px solid #e8effb; border-radius: 14px; background: #fff;
    box-shadow: 0 6px 16px rgba(55, 98, 160, .06);
}
.dsai-td-tenant-icon {
    display: flex; height: 38px; width: 38px; flex: 0 0 auto; align-items: center; justify-content: center;
    border-radius: 11px; background: #0b1737; font-size: 16px; font-weight: 800; color: #fff;
}
.dsai-td-tenant-text { display: flex; min-width: 0; flex-direction: column; }
.dsai-td-tenant-app { font-size: 13px; font-weight: 700; color: #0b1737; }
.dsai-td-tenant-name { font-size: 11px; color: #94a3b8; }

.dsai-td-nav { display: flex; flex-direction: column; gap: 3px; }
.dsai-td-navitem {
    display: flex; align-items: center; gap: 11px; padding: 10px 12px;
    border-radius: 11px; font-size: 13.5px; font-weight: 600; color: #64748b; text-decoration: none;
}
.dsai-td-navitem svg { color: #94a3b8; flex: 0 0 auto; }
.dsai-td-navitem.is-active { background: #eef4ff; color: #1368ff; }
.dsai-td-navitem.is-active svg { color: #1368ff; }
.dsai-td-navitem.is-soon { cursor: default; }
.dsai-td-soon {
    margin-left: auto; border-radius: 9999px; background: #f1f5f9; padding: 3px 8px;
    font-size: 9.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #94a3b8;
}

.dsai-td-help {
    margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 18px 14px; border: 1px solid #e8effb; border-radius: 16px; background: #f8fbff; text-align: center;
}
.dsai-td-help-icon { display: flex; height: 38px; width: 38px; align-items: center; justify-content: center; border-radius: 9999px; background: #eef4ff; color: #1368ff; }
.dsai-td-help-title { margin-top: 4px; font-size: 13px; font-weight: 700; color: #0b1737; }
.dsai-td-help-sub { font-size: 11.5px; color: #94a3b8; }
.dsai-td-help-btn {
    margin-top: 10px; width: 100%; border: 1px solid #dbeafe; border-radius: 11px; background: #fff;
    padding: 9px; font-size: 12.5px; font-weight: 600; color: #1368ff; cursor: pointer;
}

.dsai-td-main { display: flex; min-width: 0; flex: 1 1 auto; flex-direction: column; }

.dsai-td-top {
    display: flex; align-items: center; gap: 16px; height: 72px; flex: 0 0 auto;
    padding: 0 24px; border-bottom: 1px solid #eef2f7; background: #fff;
}
.dsai-td-search {
    display: flex; flex: 1 1 auto; max-width: 620px; align-items: center; gap: 10px;
    height: 44px; padding: 0 14px; border: 1px solid #e8effb; border-radius: 13px; background: #f8fbff;
}
.dsai-td-search svg { color: #94a3b8; flex: 0 0 auto; }
.dsai-td-search input { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; font-size: 14px; color: #0b1737; outline: none; }
.dsai-td-search input::placeholder { color: #94a3b8; }
.dsai-td-kbd { flex: 0 0 auto; border: 1px solid #e8effb; border-radius: 7px; background: #fff; padding: 3px 7px; font-size: 10.5px; color: #94a3b8; }

.dsai-td-top-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.dsai-td-bell {
    position: relative; display: flex; height: 40px; width: 40px; align-items: center; justify-content: center;
    border: 1px solid #e8effb; border-radius: 12px; background: #fff; color: #64748b; cursor: pointer;
}
.dsai-td-bell-dot { position: absolute; top: 9px; right: 10px; height: 7px; width: 7px; border-radius: 9999px; background: #ef4444; }

.dsai-td-user { position: relative; }
.dsai-td-user > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.dsai-td-user > summary::-webkit-details-marker { display: none; }
.dsai-td-avatar { display: flex; height: 40px; width: 40px; align-items: center; justify-content: center; border-radius: 9999px; background: #0b1737; font-size: 13px; font-weight: 700; color: #fff; }
.dsai-td-user-text { display: flex; flex-direction: column; line-height: 1.2; }
.dsai-td-user-name { font-size: 13.5px; font-weight: 700; color: #0b1737; }
.dsai-td-user-role { font-size: 11.5px; color: #94a3b8; }
.dsai-td-user-chevron { color: #94a3b8; }
.dsai-td-user-menu {
    position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; min-width: 180px; padding: 6px;
    border: 1px solid #e8effb; border-radius: 13px; background: #fff; box-shadow: 0 18px 40px rgba(15, 23, 42, .14);
}
.dsai-td-user-item { display: block; width: 100%; padding: 9px 11px; border: 0; border-radius: 9px; background: transparent; font-size: 12.5px; font-weight: 600; color: #324c78; text-align: left; text-decoration: none; cursor: pointer; }
.dsai-td-user-item:hover { background: #f1f6ff; }

.dsai-td-content { padding: 22px 24px 32px; }

.dsai-td-hello-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.dsai-td-hello { font-size: 27px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; color: #0b1737; }
.dsai-td-hello-sub { margin-top: 4px; font-size: 14px; color: #64748b; }
.dsai-td-date {
    display: flex; align-items: center; gap: 12px; padding: 12px 18px;
    border: 1px solid #e8effb; border-radius: 16px; background: #fff; box-shadow: 0 8px 22px rgba(55, 98, 160, .06);
}
.dsai-td-date-icon { display: flex; height: 38px; width: 38px; align-items: center; justify-content: center; border-radius: 11px; background: #eef4ff; color: #1368ff; }
.dsai-td-date-text { display: flex; flex-direction: column; }
.dsai-td-date-day { font-size: 13px; font-weight: 700; color: #0b1737; }
.dsai-td-date-sub { font-size: 11.5px; color: #94a3b8; }
.dsai-td-date-sun { font-size: 18px; color: #f59e0b; }

.dsai-td-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.dsai-td-kpi { display: flex; align-items: flex-start; gap: 14px; padding: 18px; border: 1px solid #e8effb; border-radius: 16px; background: #fff; box-shadow: 0 8px 22px rgba(55, 98, 160, .06); }
.dsai-td-tile { display: flex; height: 52px; width: 52px; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 15px; }
.dsai-td-tile--sm { height: 44px; width: 44px; border-radius: 13px; }
.dsai-td-tile--xs { height: 32px; width: 32px; border-radius: 10px; }
.dsai-td-tile--emerald { background: #ecfdf5; color: #059669; }
.dsai-td-tile--blue { background: #eef4ff; color: #1d4ed8; }
.dsai-td-tile--violet { background: #f5f3ff; color: #7c3aed; }
.dsai-td-tile--amber { background: #fff7ed; color: #ea580c; }
.dsai-td-tile--slate { background: #f1f5f9; color: #94a3b8; }
.dsai-td-kpi-text { display: flex; min-width: 0; flex-direction: column; }
.dsai-td-kpi-label { font-size: 12.5px; color: #64748b; }
.dsai-td-kpi-value { margin-top: 2px; font-size: 27px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; color: #0b1737; }
.dsai-td-kpi-sub { margin-top: 2px; font-size: 11.5px; color: #94a3b8; }

.dsai-td-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; margin-top: 16px; }
.dsai-td-left { display: flex; min-width: 0; flex-direction: column; gap: 16px; }
.dsai-td-left-bottom { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; }
.dsai-td-right { display: flex; min-width: 0; flex-direction: column; gap: 16px; }

.dsai-td-panel { padding: 18px; border: 1px solid #e8effb; border-radius: 16px; background: #fff; box-shadow: 0 8px 22px rgba(55, 98, 160, .06); }
.dsai-td-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dsai-td-panel-title { font-size: 17px; font-weight: 800; letter-spacing: -.02em; color: #0b1737; }
.dsai-td-panel-sub { margin-top: 3px; font-size: 12.5px; color: #94a3b8; }
.dsai-td-empty { padding: 28px 0; text-align: center; font-size: 13px; color: #94a3b8; }

.dsai-td-toolkits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dsai-td-toolkit { display: flex; flex-direction: column; padding: 14px; border: 1px solid #eef2f7; border-radius: 14px; background: #fff; }
.dsai-td-toolkit-top { display: flex; align-items: center; justify-content: space-between; }
.dsai-td-toolkit-risk { border-radius: 7px; background: #f8fafc; padding: 3px 7px; font-size: 9px; font-weight: 800; letter-spacing: .05em; color: #94a3b8; }
.dsai-td-toolkit-name { margin-top: 12px; font-size: 14px; font-weight: 700; color: #0b1737; }
.dsai-td-toolkit-desc { margin-top: 5px; font-size: 12px; line-height: 1.45; color: #94a3b8; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dsai-td-toolkit-foot { margin-top: auto; padding-top: 12px; }

.dsai-td-status { display: inline-flex; align-items: center; gap: 6px; border-radius: 9999px; padding: 4px 10px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.dsai-td-status.is-ok { background: #ecfdf5; color: #059669; }
.dsai-td-status.is-error { background: #fef2f2; color: #b91c1c; }
.dsai-td-status.is-slate { background: #f1f5f9; color: #94a3b8; }
.dsai-td-status-dot { height: 6px; width: 6px; border-radius: 9999px; background: currentColor; }

.dsai-td-select { border: 1px solid #e8effb; border-radius: 10px; background: #fff; padding: 7px 12px; font-size: 12px; font-weight: 600; color: #475569; white-space: nowrap; }
.dsai-td-chart { display: flex; gap: 10px; height: 190px; }
.dsai-td-chart-scale { display: flex; flex-direction: column; justify-content: space-between; padding-bottom: 2px; font-size: 10.5px; color: #94a3b8; text-align: right; }
.dsai-td-chart-area { position: relative; flex: 1 1 auto; min-width: 0; }
.dsai-td-chart-grid { position: absolute; inset: 0; background-image: linear-gradient(to bottom, #eef2f7 1px, transparent 1px); background-size: 100% 25%; }
.dsai-td-bars { position: relative; display: flex; height: 100%; align-items: flex-end; gap: 8px; }
.dsai-td-bar-col { display: flex; flex: 1 1 0; min-width: 0; height: 100%; align-items: flex-end; justify-content: center; }
.dsai-td-bar { width: 100%; max-width: 42px; border-radius: 6px 6px 3px 3px; background: #d3e4ff; }
.dsai-td-bar.is-current { background: #1368ff; }
.dsai-td-chart-labels { display: flex; gap: 8px; margin-top: 8px; padding-left: 26px; }
.dsai-td-chart-labels span { flex: 1 1 0; text-align: center; font-size: 10.5px; color: #94a3b8; }

.dsai-td-activity { display: flex; flex-direction: column; gap: 4px; }
.dsai-td-activity li { display: flex; align-items: center; gap: 11px; padding: 9px 4px; }
.dsai-td-activity-text { display: flex; min-width: 0; flex-direction: column; }
.dsai-td-activity-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; color: #0b1737; }
.dsai-td-activity-when { font-size: 11px; color: #94a3b8; }

.dsai-td-services { display: flex; flex-direction: column; }
.dsai-td-services li { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.dsai-td-services li:last-child { border-bottom: 0; }
.dsai-td-service-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; color: #0b1737; }

.dsai-td-cta { position: relative; overflow: hidden; padding: 22px; border: 1px solid #e8effb; border-radius: 16px; background: linear-gradient(140deg, #eef5ff, #ffffff); box-shadow: 0 8px 22px rgba(55, 98, 160, .06); }
.dsai-td-cta-icon { display: flex; height: 46px; width: 46px; align-items: center; justify-content: center; border-radius: 9999px; background: #dbeafe; color: #1368ff; }
.dsai-td-cta-title { margin-top: 14px; font-size: 16px; font-weight: 800; color: #0b1737; }
.dsai-td-cta-text { margin-top: 6px; font-size: 12.5px; line-height: 1.5; color: #64748b; }
.dsai-td-cta-btn { margin-top: 16px; display: inline-flex; width: 100%; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; background: #1368ff; padding: 11px; font-size: 13px; font-weight: 700; color: #fff; text-decoration: none; box-shadow: 0 10px 22px rgba(19, 104, 255, .24); }

@media (max-width: 1279px) {
    .dsai-td-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dsai-td-cols { grid-template-columns: minmax(0, 1fr); }
    .dsai-td-toolkits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1023px) {
    .dsai-td-side { display: none; }
    .dsai-td-top { height: 64px; padding: 0 16px; }
    .dsai-td-content { padding: 18px 16px 28px; }
    .dsai-td-left-bottom { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 639px) {
    .dsai-td-kpis { grid-template-columns: minmax(0, 1fr); }
    .dsai-td-toolkits { grid-template-columns: minmax(0, 1fr); }
    .dsai-td-hello { font-size: 23px; }
    .dsai-td-search { display: none; }
    .dsai-td-date { width: 100%; }
    .dsai-td-user-text { display: none; }
}

/* Tenant dashboard: everything must fit the first view, no page scroll */
.dsai-td { height: 100vh; overflow: hidden; }
.dsai-td-side { height: 100%; overflow: hidden; }
.dsai-td-main { min-height: 0; }
.dsai-td-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; }

/* Identidad y Atención */
.ia-page { background: #f5f7fb; }
.ia-header { display:flex; justify-content:space-between; gap:24px; align-items:center; margin:0 auto 20px; max-width:1380px; }
.ia-header h1 { margin:2px 0 6px; font-size:30px; line-height:1.15; font-weight:800; color:#10213d; }
.ia-header p { margin:0; color:#64748b; font-size:14px; }
.ia-eyebrow { color:#2563eb!important; font-size:11px!important; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.ia-logo-card { display:flex; align-items:center; gap:10px; min-width:220px; padding:12px 14px; border:1px solid #dce4ef; border-radius:16px; background:#fff; box-shadow:0 8px 24px rgba(15,35,70,.05); }
.ia-logo-card img,.ia-logo-card>span { width:42px; height:42px; border-radius:12px; object-fit:cover; display:grid; place-items:center; background:#eaf1ff; color:#2563eb; font-weight:800; }
.ia-logo-card small { color:#64748b; font-size:11px; }
.ia-alert { max-width:1380px; margin:0 auto 16px; padding:12px 16px; border-radius:12px; font-size:13px; font-weight:600; }
.ia-alert.is-success { background:#ecfdf5; color:#047857; border:1px solid #a7f3d0; }.ia-alert.is-error { background:#fff1f2; color:#be123c; border:1px solid #fecdd3; }
.ia-sync-bar { display:flex; justify-content:space-between; align-items:center; gap:16px; max-width:1380px; margin:0 auto 16px; padding:14px 16px; border:1px solid #d9e6f2; border-radius:14px; background:#f4f9ff; }
.ia-sync-bar strong { color:#13243f; font-size:13px; font-weight:800; }.ia-sync-bar p { margin:3px 0 0; color:#64748b; font-size:12px; }.ia-sync-bar small { display:block; margin-top:5px; color:#8491a3; font-size:11px; }
.ia-sync-bar form { flex-shrink:0; }.ia-sync-bar button { border:1px solid #2563eb; border-radius:10px; background:#2563eb; padding:9px 14px; color:#fff; font-size:12px; font-weight:800; cursor:pointer; white-space:nowrap; }.ia-sync-bar button:hover { background:#1d4ed8; }
.ia-layout { display:grid; grid-template-columns:minmax(0,1fr) 360px; align-items:start; gap:22px; max-width:1380px; margin:0 auto; }
.ia-form { display:grid; gap:16px; min-width:0; }
.ia-form [hidden] { display:none !important; }
.ia-section { padding:22px; border:1px solid #dfe6f0; border-radius:18px; background:#fff; box-shadow:0 6px 22px rgba(17,37,72,.04); }
.ia-section-head { display:flex; gap:12px; align-items:flex-start; margin-bottom:18px; }.ia-section-head>span { display:grid; place-items:center; width:32px; height:32px; border-radius:10px; background:#edf4ff; color:#2563eb; font-size:11px; font-weight:800; }.ia-section-head h2 { margin:0; font-size:16px; color:#13243f; font-weight:800; }.ia-section-head p { margin:3px 0 0; font-size:12px; color:#7a889d; }
.ia-section label { display:block; color:#334155; font-size:12px; font-weight:700; }.ia-section label>span { display:block; margin-bottom:6px; }
.ia-section input[type=text],.ia-section input:not([type]),.ia-section input[type=number],.ia-section input[type=time],.ia-section textarea,.ia-section select { width:100%; border:1px solid #d7e0eb; border-radius:10px; background:#fbfcfe; padding:10px 11px; color:#17243a; font:inherit; font-weight:500; outline:none; }
.ia-section input:focus,.ia-section textarea:focus,.ia-section select:focus { border-color:#4d86f7; box-shadow:0 0 0 3px rgba(37,99,235,.11); }.ia-section textarea { resize:vertical; }.ia-section label small { display:block; margin-top:5px; color:#8491a3; font-weight:500; }
.ia-grid { display:grid; gap:14px; margin-bottom:14px; }.ia-grid.two { grid-template-columns:repeat(2,minmax(0,1fr)); }.ia-grid.four { grid-template-columns:repeat(4,minmax(0,1fr)); }
.ia-toggles { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:14px; }.ia-toggles label { display:flex; gap:8px; align-items:center; padding:9px 11px; border:1px solid #dfe6f0; border-radius:10px; background:#f8fafc; }.ia-toggles label span { margin:0; }.ia-toggles input,.ia-day-toggle input { accent-color:#2563eb; }
.ia-suffix { display:flex; align-items:center; }.ia-suffix input { border-radius:10px 0 0 10px!important; }.ia-suffix b { align-self:stretch; display:grid; place-items:center; padding:0 12px; border:1px solid #d7e0eb; border-left:0; border-radius:0 10px 10px 0; background:#eef2f7; color:#64748b; font-size:11px; }
.ia-hours { display:grid; gap:8px; }.ia-day { display:grid; grid-template-columns:minmax(110px,1fr) 120px 18px 120px; align-items:center; gap:9px; padding:8px 10px; border-radius:11px; background:#f8fafc; }.ia-day-toggle { display:flex!important; align-items:center; gap:8px; }.ia-day-toggle span { margin:0!important; }.ia-day>span { text-align:center; color:#94a3b8; }
.ia-actions { position:sticky; bottom:0; display:flex; justify-content:space-between; align-items:center; gap:16px; padding:14px 18px; border:1px solid #dfe6f0; border-radius:16px; background:rgba(255,255,255,.96); box-shadow:0 -8px 24px rgba(17,37,72,.06); backdrop-filter:blur(8px); z-index:3; }.ia-actions p { margin:0; color:#64748b; font-size:12px; }.ia-actions button { border:0; border-radius:11px; background:#2563eb; padding:11px 18px; color:#fff; font-size:13px; font-weight:800; cursor:pointer; }
.ia-preview { position:sticky; top:20px; }.ia-phone { overflow:hidden; border:7px solid #17243a; border-radius:30px; background:#efeae2; box-shadow:0 24px 55px rgba(15,35,70,.18); }.ia-phone-head { display:flex; align-items:center; gap:10px; padding:15px; background:#075e54; color:#fff; }.ia-phone-head>span { display:grid; place-items:center; width:38px; height:38px; border-radius:50%; background:#d7f4eb; color:#075e54; font-weight:800; }.ia-phone-head strong,.ia-phone-head small { display:block; }.ia-phone-head strong { font-size:13px; }.ia-phone-head small { color:#d2ede8; font-size:10px; }.ia-chat { min-height:420px; padding:18px 12px; background-color:#efeae2; background-image:radial-gradient(rgba(100,91,75,.06) 1px,transparent 1px); background-size:12px 12px; }.ia-time { width:max-content; margin:0 auto 14px; padding:4px 9px; border-radius:7px; background:#d9edf2; color:#64748b; font-size:10px; }.ia-bubble { position:relative; width:88%; margin:0 0 8px auto; padding:9px 10px 17px; border-radius:9px 2px 9px 9px; background:#d9fdd3; color:#1f2937; font-size:12px; line-height:1.5; box-shadow:0 1px 1px rgba(0,0,0,.08); }.ia-bubble time { position:absolute; right:7px; bottom:3px; color:#718079; font-size:9px; }.ia-preview-note { margin:14px 10px 0; text-align:center; color:#738197; font-size:11px; line-height:1.45; }
@media (max-width:1100px) { .ia-layout { grid-template-columns:minmax(0,1fr) 310px; }.ia-grid.four { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:820px) { .ia-header { align-items:flex-start; }.ia-logo-card { min-width:0; }.ia-layout { grid-template-columns:1fr; }.ia-preview { position:static; max-width:390px; width:100%; margin:0 auto; }.ia-preview { order:-1; }.ia-chat { min-height:280px; } }
@media (max-width:560px) { .ia-header { display:block; }.ia-logo-card { margin-top:14px; }.ia-header h1 { font-size:25px; }.ia-section { padding:17px; }.ia-grid.two,.ia-grid.four { grid-template-columns:1fr; }.ia-day { grid-template-columns:1fr 1fr 14px 1fr; }.ia-day-toggle { grid-column:1/-1; }.ia-actions { align-items:stretch; flex-direction:column; }.ia-actions button { width:100%; } .ia-sync-bar { flex-direction:column; align-items:stretch; }.ia-sync-bar button { width:100%; } }

.dsai-td-hello { font-size: 24px; }
.dsai-td-hello-sub { font-size: 13.5px; }
.dsai-td-date { padding: 10px 16px; }
.dsai-td-date-icon { height: 34px; width: 34px; }

.dsai-td-kpis { gap: 14px; margin-top: 14px; }
.dsai-td-kpi { gap: 12px; padding: 15px; }
.dsai-td-tile { height: 46px; width: 46px; border-radius: 13px; }
.dsai-td-tile--sm { height: 40px; width: 40px; border-radius: 12px; }
.dsai-td-kpi-value { font-size: 24px; }

.dsai-td-cols { gap: 14px; margin-top: 14px; }
.dsai-td-left { gap: 14px; }
.dsai-td-left-bottom { gap: 14px; }
.dsai-td-right { gap: 14px; }

.dsai-td-panel { padding: 16px; }
.dsai-td-panel-head { margin-bottom: 13px; }
.dsai-td-panel-title { font-size: 16px; }
.dsai-td-toolkits { gap: 11px; }
.dsai-td-toolkit { padding: 13px; }
.dsai-td-toolkit-name { margin-top: 10px; font-size: 13.5px; }
.dsai-td-toolkit-desc { font-size: 11.5px; -webkit-line-clamp: 2; }
.dsai-td-toolkit-foot { padding-top: 10px; }

.dsai-td-chart { height: 148px; }
.dsai-td-chart-labels { margin-top: 7px; }
.dsai-td-activity li { padding: 7px 4px; }

.dsai-td-cta { padding: 18px; }
.dsai-td-cta-icon { height: 40px; width: 40px; }
.dsai-td-cta-title { margin-top: 11px; font-size: 15px; }
.dsai-td-cta-btn { margin-top: 13px; padding: 10px; }

.dsai-td-content { padding: 18px 22px 22px; }
.dsai-td-top { height: 66px; }

/* Short viewports: keep the sidebar intact and scroll only the content */
@media (max-height: 860px) {
    .dsai-td-chart { height: 120px; }
    .dsai-td-cta-text { display: none; }
}

@media (max-height: 760px) {
    .dsai-td-toolkits { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .dsai-td-toolkit-desc { display: none; }
    .dsai-td-activity li:nth-child(n+4) { display: none; }
}

/* Extra trim so 900px-tall viewports also fit without scrolling */
.dsai-td-chart { height: 124px; }
.dsai-td-content { padding: 16px 20px 18px; }
.dsai-td-kpi { padding: 13px; }
.dsai-td-panel { padding: 15px; }
.dsai-td-panel-head { margin-bottom: 11px; }
.dsai-td-activity li { padding: 6px 4px; }
.dsai-td-cta { padding: 16px; }
.dsai-td-toolkit { padding: 12px; }

.dsai-td-chart { height: 108px; }
.dsai-td-activity li { padding: 5px 4px; }
.dsai-td-cta { padding: 14px; }
.dsai-td-panel-head { margin-bottom: 9px; }

.dsai-td-chart { height: 96px; }
.dsai-td-kpi { padding: 12px; }
.dsai-td-hello { font-size: 23px; }

/* The chart fills its panel so it never looks small next to the activity feed */
.dsai-td-left-bottom .dsai-td-panel { display: flex; flex-direction: column; }
.dsai-td-left-bottom .dsai-td-panel-head { flex: 0 0 auto; }
.dsai-td-left-bottom .dsai-td-chart { flex: 1 1 auto; height: auto; min-height: 96px; }
.dsai-td-left-bottom .dsai-td-chart-labels { flex: 0 0 auto; }

.dsai-td-brand-icon { height: 28px; width: 28px; flex: 0 0 auto; border-radius: 9999px; display: block; }

/* ===== Tenant channels screen ===== */
.dsai-ch-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }

.dsai-ch-add {
    display: inline-flex; align-items: center; gap: 9px; border: 0; border-radius: 12px;
    background: #1368ff; padding: 12px 20px; font-size: 14px; font-weight: 700; color: #fff;
    box-shadow: 0 12px 26px rgba(19, 104, 255, .24); cursor: pointer;
}
.dsai-ch-add:disabled { opacity: .65; cursor: not-allowed; }

.dsai-ch-estado { margin-top: 4px; font-size: 14px; padding: 5px 12px; }

.dsai-ch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.dsai-ch-card { display: flex; flex-direction: column; padding: 16px; border: 1px solid #eef2f7; border-radius: 15px; background: #fff; }
.dsai-ch-card-top { display: flex; align-items: center; gap: 12px; }
.dsai-ch-card-icon { display: block; height: 52px; width: 52px; flex: 0 0 auto; border-radius: 15px; }
.dsai-ch-card-icon--tile { display: flex; align-items: center; justify-content: center; }
.dsai-ch-card-menu {
    display: flex; height: 30px; width: 30px; align-items: center; justify-content: center;
    margin-left: auto; border: 0; border-radius: 9px; background: transparent; color: #94a3b8;
}
.dsai-ch-card-menu:disabled { cursor: default; }

.dsai-ch-card-name { margin-top: 14px; font-size: 17px; font-weight: 800; letter-spacing: -.02em; color: #0b1737; }
.dsai-ch-card-meta { margin-top: 5px; font-size: 13px; font-weight: 600; color: #475569; }
.dsai-ch-card-desc { margin-top: 4px; font-size: 12.5px; line-height: 1.45; color: #94a3b8; }
.dsai-ch-card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 16px; }

.dsai-ch-btn {
    display: inline-flex; flex: 1 1 0; min-width: 120px; align-items: center; justify-content: center;
    border-radius: 11px; padding: 11px 16px; font-size: 13px; font-weight: 700;
    text-decoration: none; cursor: pointer; border: 1px solid transparent;
}
.dsai-ch-btn.is-green { background: #10b981; color: #fff; box-shadow: 0 10px 22px rgba(16, 185, 129, .22); }
.dsai-ch-btn.is-blue { background: #1368ff; color: #fff; box-shadow: 0 10px 22px rgba(19, 104, 255, .22); }
.dsai-ch-btn.is-ghost { border-color: #dbeafe; background: #fff; color: #1368ff; }
.dsai-ch-btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

.dsai-td-service-chevron { display: inline-flex; flex: 0 0 auto; color: #cbd5e1; }

@media (max-width: 1279px) {
    .dsai-ch-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 639px) {
    .dsai-ch-add { width: 100%; justify-content: center; }
    .dsai-ch-btn { flex: 1 1 100%; }
}

/* Channels screen: compact so the whole page fits the first view */
.dsai-td-services li { padding: 6px 0; }
.dsai-td-activity li { padding: 3px 4px; }
.dsai-td-panel { padding: 13px; }
.dsai-td-panel-head { margin-bottom: 7px; }
.dsai-td-kpi { padding: 10px 12px; }
.dsai-td-tile { height: 42px; width: 42px; border-radius: 12px; }
.dsai-td-kpi-value { font-size: 22px; }
.dsai-ch-grid { gap: 12px; }
.dsai-ch-card { padding: 13px; }
.dsai-ch-card-icon { height: 46px; width: 46px; border-radius: 13px; }
.dsai-ch-card-name { margin-top: 10px; font-size: 16px; }
.dsai-ch-card-actions { padding-top: 12px; }
.dsai-ch-btn { padding: 10px 14px; }
.dsai-td-cta { padding: 12px; }
.dsai-td-cta-text { display: none; }
.dsai-td-cta-icon { height: 34px; width: 34px; }
.dsai-td-cta-title { margin-top: 8px; font-size: 14.5px; }
.dsai-td-cta-btn { margin-top: 10px; padding: 9px; }

/* Channels screen: final fit */
.dsai-td-services li { padding: 5px 0; }
.dsai-td-activity li { padding: 2px 4px; }
.dsai-ch-card { padding: 12px; }
.dsai-ch-card-name { margin-top: 8px; }
.dsai-ch-card-desc { margin-top: 3px; }
.dsai-ch-card-actions { padding-top: 10px; }
.dsai-td-hello { font-size: 21px; }
.dsai-td-hello-sub { margin-top: 2px; }
.dsai-td-kpi-sub { margin-top: 1px; }

/* Channels screen: last 50px */
.dsai-ch-card { padding: 10px; }
.dsai-ch-card-name { margin-top: 6px; }
.dsai-ch-card-actions { padding-top: 8px; }
.dsai-td-services li { padding: 4px 0; }
.dsai-td-activity li { padding: 1px 4px; }
.dsai-td-cta { padding: 10px; }
.dsai-td-cta-btn { padding: 8px; }
.dsai-td-panel { padding: 12px; }
.dsai-td-kpi { padding: 9px 11px; }
.dsai-ch-grid { gap: 10px; }
.dsai-td-panel-head { margin-bottom: 6px; }

/* Channels screen: final 9px */
.dsai-td-services li { padding: 3px 0; }
.dsai-td-activity li { padding: 0 4px; }
.dsai-td-cta-title { margin-top: 6px; }
.dsai-td-kpi { padding: 8px 11px; }

/* WhatsApp management screen */
.dsai-wa-banner { margin-top: 14px; border-radius: 12px; padding: 12px 16px; font-size: 13px; font-weight: 600; }
.dsai-wa-banner.is-ok { border: 1px solid #a7f3d0; background: #ecfdf5; color: #047857; }
.dsai-wa-banner.is-error { border: 1px solid #fecaca; background: #fef2f2; color: #b91c1c; }

.dsai-wa-list { display: flex; flex-direction: column; gap: 10px; }

.dsai-wa-row {
    display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
    padding: 14px 16px; border: 1px solid #eef2f7; border-radius: 14px; background: #fff;
}
.dsai-wa-row-icon { height: 40px; width: 40px; flex: 0 0 auto; border-radius: 9999px; display: block; }
.dsai-wa-row-main { display: flex; flex: 1 1 260px; min-width: 0; flex-direction: column; gap: 2px; }
.dsai-wa-row-number { font-size: 15px; font-weight: 700; color: #0b1737; }
.dsai-wa-row-meta { font-size: 12px; color: #94a3b8; }
.dsai-wa-row-error { font-size: 12px; color: #b91c1c; }
.dsai-wa-row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }

.dsai-wa-notes { display: flex; flex-direction: column; gap: 8px; padding-left: 18px; list-style: disc; }
.dsai-wa-notes li { font-size: 12.5px; line-height: 1.5; color: #64748b; }

@media (max-width: 767px) {
    .dsai-wa-row-actions { margin-left: 0; width: 100%; }
    .dsai-wa-row-actions .dsai-ch-btn { flex: 1 1 0; }
}

/* ===== Canales v2 ===== */
.dsai-ch-appcard {
    display: flex; align-items: center; gap: 12px; padding: 12px 18px;
    border: 1px solid #e8effb; border-radius: 14px; background: #fff;
    box-shadow: 0 8px 22px rgba(55, 98, 160, .06);
}
.dsai-ch-appcard-icon { display: flex; height: 34px; width: 34px; align-items: center; justify-content: center; border-radius: 10px; background: #eef4ff; color: #1368ff; }
.dsai-ch-appcard-text { display: flex; flex-direction: column; }
.dsai-ch-appcard-name { font-size: 13.5px; font-weight: 700; color: #0b1737; }
.dsai-ch-appcard-sub { font-size: 11.5px; color: #94a3b8; }

.dsai-ch-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.dsai-ch-tile { display: flex; flex-direction: column; padding: 14px; border: 1px solid #e8effb; border-radius: 15px; background: #fff; box-shadow: 0 8px 22px rgba(55, 98, 160, .05); }
.dsai-ch-tile-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dsai-ch-tile-icon { display: block; height: 46px; width: 46px; flex: 0 0 auto; border-radius: 13px; }
.dsai-ch-tile-icon--tile { display: flex; align-items: center; justify-content: center; }
.dsai-ch-tile-name { margin-top: 12px; font-size: 15px; font-weight: 800; letter-spacing: -.02em; color: #0b1737; }
.dsai-ch-tile-desc { margin-top: 4px; font-size: 12px; line-height: 1.45; color: #94a3b8; }
.dsai-ch-tile-btn {
    margin-top: auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    border: 1px solid #dbeafe; border-radius: 11px; background: #fff; padding: 10px;
    font-size: 12.5px; font-weight: 700; color: #1368ff; text-decoration: none; cursor: pointer;
    margin-top: 14px;
}
.dsai-ch-tile-btn:disabled { opacity: .55; cursor: not-allowed; }

.dsai-ch-wa-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px; }
.dsai-ch-wa-icon { height: 44px; width: 44px; flex: 0 0 auto; border-radius: 9999px; display: block; }
.dsai-ch-wa-title { flex: 1 1 320px; min-width: 0; }
.dsai-ch-wa-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.dsai-ch-wa-name { font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: #0b1737; }
.dsai-ch-wa-sub { margin-top: 4px; font-size: 12.5px; line-height: 1.5; color: #94a3b8; }

.dsai-ch-tabs { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 14px; border-bottom: 1px solid #eef2f7; }
.dsai-ch-tab { padding-bottom: 9px; font-size: 13px; font-weight: 600; color: #94a3b8; border-bottom: 2px solid transparent; }
.dsai-ch-tab.is-active { color: #1368ff; border-bottom-color: #1368ff; }
.dsai-ch-tab.is-soon { cursor: default; }

.dsai-ch-table-wrap { margin-top: 12px; overflow-x: auto; }
.dsai-ch-table { width: 100%; border-collapse: collapse; }
.dsai-ch-table th {
    padding: 9px 10px; text-align: left; font-size: 11.5px; font-weight: 600; color: #94a3b8;
    border-bottom: 1px solid #eef2f7; white-space: nowrap;
}
.dsai-ch-table td { padding: 12px 10px; border-bottom: 1px solid #f6f9fd; vertical-align: middle; }
.dsai-ch-table tr:last-child td { border-bottom: 0; }
.dsai-ch-cell-main { display: flex; align-items: center; gap: 10px; }
.dsai-ch-cell-icon { height: 30px; width: 30px; flex: 0 0 auto; border-radius: 9999px; }
.dsai-ch-cell-title { display: block; font-size: 13px; font-weight: 700; color: #0b1737; }
.dsai-ch-cell-sub { display: block; font-size: 11.5px; color: #94a3b8; }
.dsai-ch-cell-muted { font-size: 12.5px; color: #64748b; white-space: nowrap; }
.dsai-ch-cell-actions { display: flex; align-items: center; gap: 8px; }

.dsai-ch-menu { position: relative; }
.dsai-ch-menu > summary {
    display: flex; height: 30px; width: 30px; align-items: center; justify-content: center;
    border-radius: 9px; color: #94a3b8; cursor: pointer; list-style: none;
}
.dsai-ch-menu > summary::-webkit-details-marker { display: none; }
.dsai-ch-menu[open] > summary { background: #f1f5f9; }
.dsai-ch-menu-pop {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 165px; padding: 5px;
    border: 1px solid #e8effb; border-radius: 12px; background: #fff; box-shadow: 0 18px 40px rgba(15, 23, 42, .14);
}

.dsai-ch-addrow {
    display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 14px;
    padding: 14px 16px; border: 1px dashed #cfe0f7; border-radius: 14px; background: #fbfdff;
}
.dsai-ch-addrow-icon { display: flex; height: 40px; width: 40px; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 9999px; background: #eef4ff; color: #1368ff; }
.dsai-ch-addrow-text { display: flex; flex: 1 1 240px; min-width: 0; flex-direction: column; }
.dsai-ch-addrow-title { font-size: 13.5px; font-weight: 700; color: #0b1737; }
.dsai-ch-addrow-sub { font-size: 12px; color: #94a3b8; }

.dsai-ch-info { padding: 16px; border: 1px solid #dbeafe; border-radius: 15px; background: #f4f8ff; }
.dsai-ch-info-icon { display: flex; height: 34px; width: 34px; align-items: center; justify-content: center; border-radius: 9999px; background: #dbeafe; color: #1368ff; }
.dsai-ch-info-title { margin-top: 10px; font-size: 14px; font-weight: 800; color: #0b1737; }
.dsai-ch-info-text { margin-top: 5px; font-size: 12.5px; line-height: 1.5; color: #64748b; }
.dsai-ch-info-link { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: #1368ff; }
.dsai-ch-info-link.is-soon { opacity: .6; cursor: default; }

.dsai-ch-tip { display: flex; gap: 11px; padding: 14px; border: 1px solid #bbf7d0; border-radius: 15px; background: #f0fdf4; }
.dsai-ch-tip-icon { display: flex; height: 28px; width: 28px; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 9999px; background: #d1fae5; color: #059669; }
.dsai-ch-tip-title { font-size: 13px; font-weight: 800; color: #065f46; }
.dsai-ch-tip-text { margin-top: 3px; font-size: 12.5px; line-height: 1.45; color: #047857; }

@media (max-width: 1279px) {
    .dsai-ch-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .dsai-ch-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dsai-ch-appcard { width: 100%; }
}
@media (max-width: 479px) {
    .dsai-ch-row { grid-template-columns: minmax(0, 1fr); }
}

/* ===== Number administration screen ===== */
.dsai-num-head {
    display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 12px; padding: 16px 18px;
    border: 1px solid #e8effb; border-radius: 16px; background: #fff; box-shadow: 0 8px 22px rgba(55, 98, 160, .06);
}
.dsai-num-head-icon { height: 52px; width: 52px; flex: 0 0 auto; border-radius: 15px; display: block; }
.dsai-num-head-text { flex: 1 1 320px; min-width: 0; }
.dsai-num-head-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.dsai-num-head-name { font-size: 22px; font-weight: 800; letter-spacing: -.025em; color: #0b1737; }
.dsai-num-head-sub { margin-top: 3px; font-size: 13px; color: #94a3b8; }
.dsai-num-head-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.dsai-num-head-actions .dsai-ch-btn { flex: 0 0 auto; min-width: 0; }

.dsai-num-section { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.dsai-num-section:first-of-type { margin-top: 4px; }
.dsai-num-section-icon { display: flex; height: 24px; width: 24px; align-items: center; justify-content: center; border-radius: 9999px; background: #eef4ff; color: #1368ff; }
.dsai-num-section-title { font-size: 14.5px; font-weight: 800; color: #0b1737; }

.dsai-num-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 12px; padding: 14px; border: 1px solid #eef2f7; border-radius: 13px; }
.dsai-num-grid dt { font-size: 11.5px; color: #94a3b8; }
.dsai-num-grid dd { margin-top: 4px; font-size: 13.5px; font-weight: 700; color: #0b1737; }

.dsai-num-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.dsai-num-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid #e8effb; border-radius: 11px; background: #f8fbff; font-size: 12.5px; font-weight: 600; color: #475569; }

.dsai-num-toggles { display: flex; flex-direction: column; }
.dsai-num-toggles li { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f6f9fd; }
.dsai-num-toggles li:last-child { border-bottom: 0; }
.dsai-num-toggle-text { display: flex; flex: 1 1 260px; min-width: 0; flex-direction: column; }
.dsai-num-toggle-title { font-size: 13.5px; font-weight: 700; color: #0b1737; }
.dsai-num-toggle-sub { font-size: 12px; color: #94a3b8; }

.dsai-switch { position: relative; display: inline-block; height: 22px; width: 40px; flex: 0 0 auto; border-radius: 9999px; background: #e2e8f0; }
.dsai-switch.is-on { background: #1368ff; }
.dsai-switch span { position: absolute; top: 3px; left: 3px; height: 16px; width: 16px; border-radius: 9999px; background: #fff; }
.dsai-switch.is-on span { left: 21px; }

.dsai-num-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.dsai-num-actions .dsai-ch-btn { width: 100%; }

.dsai-num-people { display: flex; flex-direction: column; }
.dsai-num-people li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f6f9fd; }
.dsai-num-people li:last-child { border-bottom: 0; }
.dsai-num-avatar { display: flex; height: 30px; width: 30px; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 9999px; background: #eef4ff; font-size: 12px; font-weight: 800; color: #1368ff; }
.dsai-num-person { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; color: #0b1737; }
.dsai-num-manage { margin-top: 12px; width: 100%; border: 1px solid #dbeafe; border-radius: 11px; background: #fff; padding: 10px; font-size: 12.5px; font-weight: 700; color: #1368ff; cursor: pointer; }
.dsai-num-manage:disabled { opacity: .55; cursor: not-allowed; }

.dsai-num-danger { padding: 16px; border: 1px solid #fecaca; border-radius: 15px; background: #fef6f6; }
.dsai-num-danger-head { display: flex; align-items: center; gap: 8px; color: #b91c1c; }
.dsai-num-danger-title { font-size: 14px; font-weight: 800; color: #b91c1c; }
.dsai-num-danger-text { margin-top: 6px; font-size: 12.5px; color: #b91c1c; }
.dsai-num-danger-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.dsai-num-danger-actions form, .dsai-num-danger-actions .dsai-ch-btn { width: 100%; }

.dsai-ch-btn.is-danger { border-color: #fecaca; background: #fff; color: #b91c1c; }
.dsai-ch-btn.is-danger-outline { border-color: #fecaca; background: #fff; color: #b91c1c; }

@media (max-width: 1279px) {
    .dsai-num-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dsai-num-actions { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
    .dsai-num-head-actions { width: 100%; }
    .dsai-num-head-actions form, .dsai-num-head-actions .dsai-ch-btn { flex: 1 1 0; }
    .dsai-num-grid { grid-template-columns: minmax(0, 1fr); }
    .dsai-num-danger-actions { grid-template-columns: minmax(0, 1fr); }
}

/* ===== WhatsApp Web inbox modal ===== */
.dsai-modal--app { padding: 24px; }
.dsai-modal--app .dsai-modal-dialog { width: min(100%, 1100px); }
.dsai-wa-app { display: flex; flex-direction: column; height: min(78vh, 760px); border-radius: 18px; overflow: hidden; background: #f0f2f5; }

.dsai-wa-app-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #ffffff; border-bottom: 1px solid #e9edef; }
.dsai-wa-app-logo { height: 38px; width: 38px; flex: 0 0 auto; border-radius: 9999px; }
.dsai-wa-app-title { display: flex; flex: 1 1 auto; min-width: 0; flex-direction: column; }
.dsai-wa-app-name { font-size: 15px; font-weight: 700; color: #0b141a; }
.dsai-wa-app-sub { font-size: 11.5px; color: #667781; }
.dsai-wa-app-close { display: flex; height: 34px; width: 34px; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: transparent; color: #667781; cursor: pointer; }
.dsai-wa-app-close:hover { background: #f0f2f5; }

.dsai-wa-app-body { display: flex; flex: 1 1 auto; min-height: 0; }

.dsai-wa-chats { display: flex; width: 320px; flex: 0 0 auto; flex-direction: column; background: #ffffff; border-right: 1px solid #e9edef; }
.dsai-wa-chats-search { display: flex; align-items: center; gap: 8px; margin: 10px 12px 6px; padding: 0 12px; height: 36px; border-radius: 9px; background: #f0f2f5; color: #667781; }
.dsai-wa-chats-search input { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; font-size: 13px; color: #0b141a; outline: none; }
.dsai-wa-chats-list { flex: 1 1 auto; overflow-y: auto; }
.dsai-wa-chat { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; border-bottom: 1px solid #f7f9fa; }
.dsai-wa-chat:hover { background: #f5f6f6; }
.dsai-wa-chat.is-active { background: #f0f2f5; }
.dsai-wa-chat-avatar, .dsai-wa-thread-avatar { display: flex; height: 40px; width: 40px; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 9999px; background: #dfe5e7; font-size: 15px; font-weight: 700; color: #3b4a54; }
.dsai-wa-chat-main { display: flex; flex: 1 1 auto; min-width: 0; flex-direction: column; }
.dsai-wa-chat-name { font-size: 14px; font-weight: 600; color: #0b141a; }
.dsai-wa-chat-last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: #667781; }
.dsai-wa-chat-time { flex: 0 0 auto; font-size: 10.5px; color: #667781; }

.dsai-wa-thread { display: flex; flex: 1 1 auto; min-width: 0; flex-direction: column; }
.dsai-wa-thread-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: #ffffff; border-bottom: 1px solid #e9edef; }
.dsai-wa-thread-head .dsai-wa-thread-avatar { height: 34px; width: 34px; font-size: 13px; }
.dsai-wa-thread-name { font-size: 14px; font-weight: 600; color: #0b141a; }

.dsai-wa-messages { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 18px 40px; display: flex; flex-direction: column; gap: 4px;
    background-color: #efe7dd; background-image: radial-gradient(rgba(0,0,0,.035) 1px, transparent 1px); background-size: 20px 20px; }
.dsai-wa-empty { text-align: center; color: #667781; font-size: 12.5px; margin: auto; }
.dsai-wa-bubble { position: relative; max-width: 70%; align-self: flex-start; padding: 7px 10px 6px; border-radius: 8px; background: #ffffff; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.dsai-wa-bubble.is-out { align-self: flex-end; background: #d9fdd3; }
.dsai-wa-bubble-text { font-size: 13.5px; line-height: 1.4; color: #111b21; white-space: pre-wrap; word-break: break-word; }
.dsai-wa-bubble-time { display: block; margin-top: 2px; font-size: 9.5px; text-align: right; color: #667781; }

.dsai-wa-composer { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #f0f2f5; }
.dsai-wa-composer input { flex: 1 1 auto; min-width: 0; border: 0; border-radius: 10px; padding: 11px 14px; background: #ffffff; font-size: 13.5px; color: #0b141a; outline: none; }
.dsai-wa-composer button { display: flex; height: 40px; width: 40px; flex: 0 0 auto; align-items: center; justify-content: center; border: 0; border-radius: 9999px; background: #00a884; color: #fff; cursor: pointer; }
.dsai-wa-composer button:disabled { opacity: .6; cursor: default; }

@media (max-width: 767px) {
    .dsai-wa-chats { width: 100%; }
    .dsai-wa-app-body { flex-direction: column; }
    .dsai-modal--app { padding: 10px; }
    .dsai-wa-app { height: 90vh; }
}

.dsai-wa-app { position: relative; z-index: 1; }

/* ===== WhatsApp Web full screen ===== */
.dsai-modal--full { padding: 2.5vh 3vw; }
.dsai-modal--full .dsai-wa-app { position: relative; z-index: 1; width: 100%; height: 100%; border-radius: 14px; background: #f0f2f5; }

.dsai-wa-top { display: flex; align-items: center; gap: 13px; padding: 12px 20px; background: #ffffff; border-bottom: 1px solid #e9edef; }
.dsai-wa-top-logo { height: 46px; width: 46px; flex: 0 0 auto; border-radius: 9999px; }
.dsai-wa-top-text { display: flex; flex: 1 1 auto; min-width: 0; flex-direction: column; }
.dsai-wa-top-name { font-size: 17px; font-weight: 700; color: #111b21; }
.dsai-wa-top-sub { font-size: 13px; color: #667781; }
.dsai-wa-top-icons { display: flex; gap: 4px; margin-left: auto; }
.dsai-wa-top-icons button, .dsai-wa-thread-icons button {
    display: flex; height: 38px; width: 38px; align-items: center; justify-content: center;
    border: 0; border-radius: 9999px; background: transparent; color: #54656f;
}
.dsai-wa-top-icons button:disabled, .dsai-wa-thread-icons button:disabled { opacity: .55; }

.dsai-wa-chats { width: 400px; }
.dsai-wa-chats-search { margin: 12px 14px 8px; height: 42px; border-radius: 10px; background: #f0f2f5; padding: 0 15px; gap: 12px; }
.dsai-wa-chats-search input { font-size: 14px; }
.dsai-wa-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 12px; }
.dsai-wa-chip { border-radius: 9999px; background: #f0f2f5; padding: 6px 13px; font-size: 12.5px; font-weight: 600; color: #54656f; }
.dsai-wa-chip.is-active { background: #d9fdd3; color: #027d61; }
.dsai-wa-chip.is-soon { opacity: .6; }

.dsai-wa-chat { gap: 13px; padding: 12px 14px; }
.dsai-wa-chat.is-active { background: #e7f8ef; }
.dsai-wa-chat-avatar { height: 47px; width: 47px; font-size: 17px; }
.dsai-wa-chat-name { font-size: 15px; }
.dsai-wa-chat-last { font-size: 13px; }
.dsai-wa-chat-time { font-size: 11.5px; }

.dsai-wa-thread-head { padding: 10px 20px; gap: 13px; }
.dsai-wa-thread-avatar { height: 42px; width: 42px; font-size: 16px; }
.dsai-wa-thread-text { display: flex; flex: 1 1 auto; min-width: 0; flex-direction: column; }
.dsai-wa-thread-name { font-size: 16px; font-weight: 700; }
.dsai-wa-thread-status { font-size: 12.5px; color: #667781; }
.dsai-wa-thread-icons { display: flex; gap: 4px; margin-left: auto; }

.dsai-wa-messages { padding: 22px 60px; gap: 3px; }
.dsai-wa-bubble { max-width: 62%; padding: 8px 11px 6px; border-radius: 9px; }
.dsai-wa-bubble.is-out { border-top-right-radius: 3px; }
.dsai-wa-bubble.is-in { border-top-left-radius: 3px; }
.dsai-wa-bubble-text { font-size: 14px; }
.dsai-wa-bubble-time { font-size: 10px; }
.dsai-wa-ticks { display: inline-flex; margin-left: 4px; vertical-align: -2px; color: #53bdeb; }

.dsai-wa-day { align-self: center; margin: 10px 0; border-radius: 8px; background: #ffffff; padding: 6px 13px; font-size: 12px; font-weight: 600; color: #54656f; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); }

.dsai-wa-composer { padding: 10px 20px; gap: 10px; }
.dsai-wa-ico { display: flex; height: 42px; width: 42px; flex: 0 0 auto; align-items: center; justify-content: center; border: 0; background: transparent; color: #54656f; }
.dsai-wa-ico:disabled { opacity: .55; }
.dsai-wa-composer input { border-radius: 9999px; padding: 13px 18px; font-size: 14px; }
.dsai-wa-send { height: 46px; width: 46px; }

@media (max-width: 1023px) {
    .dsai-modal--full { padding: 0; }
    .dsai-modal--full .dsai-wa-app { border-radius: 0; }
    .dsai-wa-chats { width: 100%; }
    .dsai-wa-messages { padding: 16px; }
}
.dsai-wa-back { display: none; height: 38px; width: 38px; flex: 0 0 auto; align-items: center; justify-content: center; border: 0; background: transparent; color: #54656f; }
@media (max-width: 1023px) {
    .dsai-wa-app-body.has-thread .dsai-wa-chats { display: none; }
    .dsai-wa-app-body:not(.has-thread) .dsai-wa-thread { display: none; }
    .dsai-wa-back { display: flex; }
}

/* ===== WhatsApp media, voice notes and 24h window ===== */
.dsai-wa-bubble.is-media { padding: 5px 5px 6px; }
.dsai-wa-bubble.is-media .dsai-wa-cap { display: block; padding: 6px 6px 0; font-size: 14px; }
.dsai-wa-img { display: block; width: 100%; max-width: 320px; max-height: 320px; border-radius: 7px; object-fit: cover; background: #e9edef; }
.dsai-wa-video { display: block; width: 320px; max-width: 100%; border-radius: 7px; background: #000; }
.dsai-wa-audio { display: block; width: 300px; max-width: 100%; height: 44px; }
.dsai-wa-doc { display: flex; align-items: center; gap: 10px; min-width: 240px; padding: 9px 10px; border-radius: 7px; background: rgba(0, 0, 0, .045); color: #111b21; text-decoration: none; }
.dsai-wa-doc:hover { background: rgba(0, 0, 0, .075); }
.dsai-wa-doc-ico { display: flex; height: 34px; width: 34px; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 6px; background: #ffffff; color: #54656f; }
.dsai-wa-doc-text { display: flex; min-width: 0; flex-direction: column; }
.dsai-wa-doc-text b { overflow: hidden; font-size: 13.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.dsai-wa-doc-text small { font-size: 11.5px; color: #667781; }

.dsai-wa-pending { display: flex; min-width: 0; flex: 1 1 auto; align-items: center; gap: 10px; border-radius: 8px; background: #ffffff; padding: 7px 10px; }
.dsai-wa-pending-ico { display: flex; height: 32px; width: 32px; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 6px; background: #d9fdd3; color: #027d61; }
.dsai-wa-pending-text { display: flex; min-width: 0; flex-direction: column; }
.dsai-wa-pending-text b { overflow: hidden; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.dsai-wa-pending-text small { font-size: 11px; color: #667781; }
.dsai-wa-pending-x { display: flex; height: 26px; width: 26px; flex: 0 0 auto; align-items: center; justify-content: center; border: 0; border-radius: 9999px; background: transparent; color: #54656f; }
.dsai-wa-pending-x:hover { background: #f0f2f5; }

.dsai-wa-ico.is-rec { color: #e53935; animation: dsai-wa-pulse 1.1s ease-in-out infinite; }
@keyframes dsai-wa-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.dsai-wa-window { display: flex; align-items: flex-start; gap: 9px; margin: 0 20px 8px; border-radius: 9px; border-left: 3px solid #f0b429; background: #fff8e6; padding: 10px 13px; font-size: 12.5px; line-height: 1.5; color: #7a5b00; }
.dsai-wa-window b { font-weight: 700; }
.dsai-wa-ticks.is-sent { color: #8696a0; }
.dsai-wa-ticks.is-ack { color: #53bdeb; }

/* Unread badges + chat list side column */
.dsai-wa-chat-side { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: 5px; }
.dsai-wa-unread { display: inline-flex; min-width: 21px; height: 21px; align-items: center; justify-content: center; border-radius: 9999px; background: #25d366; padding: 0 6px; font-size: 11.5px; font-weight: 700; color: #ffffff; }
.dsai-wa-chip b { display: inline-flex; min-width: 18px; height: 18px; align-items: center; justify-content: center; margin-left: 5px; border-radius: 9999px; background: #25d366; padding: 0 5px; font-size: 11px; color: #ffffff; }
.dsai-wa-chats-empty { padding: 26px 18px; text-align: center; font-size: 13px; color: #667781; }

/* ===== Attach menu, emoji picker, sheets, avatars ===== */
.dsai-wa-composer { position: relative; }
.dsai-wa-menu { position: absolute; bottom: calc(100% + 8px); left: 14px; z-index: 5; width: 232px; border-radius: 12px; background: #ffffff; padding: 7px; box-shadow: 0 6px 26px rgba(11, 20, 26, .22); }
.dsai-wa-menu button { display: flex; width: 100%; align-items: center; gap: 12px; border: 0; border-radius: 8px; background: transparent; padding: 9px 11px; font-size: 14px; font-weight: 500; color: #111b21; text-align: left; }
.dsai-wa-menu button:hover { background: #f0f2f5; }
.dsai-wa-menu-ico { display: flex; height: 34px; width: 34px; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 9999px; color: #ffffff; }
.dsai-wa-menu-ico.is-media { background: #7f66ff; }
.dsai-wa-menu-ico.is-camera { background: #ff5c8a; }
.dsai-wa-menu-ico.is-doc { background: #5b6ad0; }
.dsai-wa-menu-ico.is-contact { background: #00a5f4; }
.dsai-wa-menu-ico.is-loc { background: #20c05c; }
.dsai-wa-menu-ico.is-sticker { background: #f0b429; }

.dsai-wa-emoji { position: absolute; bottom: calc(100% + 8px); left: 56px; z-index: 5; width: 306px; max-height: 244px; overflow-y: auto; border-radius: 12px; background: #ffffff; padding: 8px; box-shadow: 0 6px 26px rgba(11, 20, 26, .22); display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.dsai-wa-emoji button { border: 0; border-radius: 7px; background: transparent; padding: 5px; font-size: 21px; line-height: 1; cursor: pointer; }
.dsai-wa-emoji button:hover { background: #f0f2f5; }

.dsai-wa-sheet { position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; border-radius: 14px; background: #ffffff; }
.dsai-wa-sheet-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e9edef; padding: 14px 18px; font-size: 16px; color: #111b21; }
.dsai-wa-sheet-head button { display: flex; height: 32px; width: 32px; align-items: center; justify-content: center; border: 0; border-radius: 9999px; background: transparent; color: #54656f; }
.dsai-wa-sheet-head button:hover { background: #f0f2f5; }
.dsai-wa-sheet-search { display: flex; align-items: center; gap: 10px; margin: 12px 16px; height: 40px; border-radius: 10px; background: #f0f2f5; padding: 0 14px; color: #54656f; }
.dsai-wa-sheet-search input { flex: 1 1 auto; border: 0; background: transparent; font-size: 14px; outline: none; }
.dsai-wa-sheet-list { flex: 1 1 auto; overflow-y: auto; margin: 0; padding: 0 8px; list-style: none; }
.dsai-wa-sheet-list li { display: flex; align-items: center; gap: 12px; border-radius: 9px; padding: 10px 12px; cursor: pointer; }
.dsai-wa-sheet-list li:hover { background: #f0f2f5; }
.dsai-wa-sheet-list .dsai-wa-contact-name { font-size: 14.5px; font-weight: 600; color: #111b21; }
.dsai-wa-sheet-list .dsai-wa-contact-phone { font-size: 12.5px; color: #667781; }
.dsai-wa-sheet-foot { display: grid; gap: 8px; border-top: 1px solid #e9edef; padding: 14px 18px; font-size: 12.5px; color: #667781; }
.dsai-wa-sheet-foot input, .dsai-wa-sheet-body input { border: 1px solid #d1d7db; border-radius: 9px; padding: 10px 12px; font-size: 14px; color: #111b21; outline: none; }
.dsai-wa-sheet-foot input:focus, .dsai-wa-sheet-body input:focus { border-color: #00a884; }
.dsai-wa-sheet-body { display: grid; gap: 10px; overflow-y: auto; padding: 16px 18px; }
.dsai-wa-sheet-body label { display: grid; gap: 5px; font-size: 12.5px; font-weight: 600; color: #54656f; }
.dsai-wa-sheet-hint { margin: 0; font-size: 12.5px; color: #667781; }
.dsai-wa-sheet-cta { border: 0; border-radius: 9px; background: #f0f2f5; padding: 11px 14px; font-size: 14px; font-weight: 600; color: #111b21; cursor: pointer; }
.dsai-wa-sheet-cta.is-primary { background: #00a884; color: #ffffff; }
.dsai-wa-sheet-cta:hover { filter: brightness(.96); }

.dsai-wa-avatar-img { height: 100%; width: 100%; border-radius: 9999px; object-fit: cover; }
.dsai-wa-chat-avatar, .dsai-wa-thread-avatar { overflow: hidden; color: #ffffff; font-weight: 600; }
.dsai-wa-bubble.is-loc .dsai-wa-loc { display: flex; align-items: center; gap: 10px; }
.dsai-wa-bubble.is-loc .dsai-wa-loc-ico { display: flex; height: 38px; width: 38px; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 8px; background: #d9fdd3; color: #027d61; }
.dsai-wa-bubble.is-contact .dsai-wa-doc { background: rgba(0, 0, 0, .045); }
.dsai-wa-react { position: absolute; bottom: -9px; border-radius: 9999px; background: #ffffff; padding: 1px 6px; font-size: 13px; box-shadow: 0 1px 4px rgba(11, 20, 26, .2); }
.dsai-wa-bubble.is-out .dsai-wa-react { left: 10px; }
.dsai-wa-bubble.is-in .dsai-wa-react { right: 10px; }
.dsai-wa-bubble { position: relative; }

/* Toggles de IA: global (barra superior) y por conversación */
.dsai-wa-ai-global { display: inline-flex; align-items: center; gap: 8px; margin-right: 6px; border-radius: 9999px; background: #f0f2f5; padding: 5px 12px; font-size: 12px; font-weight: 600; color: #54656f; cursor: pointer; }
.dsai-wa-ai-global-track { position: relative; display: inline-block; width: 34px; height: 19px; flex: 0 0 auto; border-radius: 9999px; background: #cbd5e1; transition: background .15s; }
.dsai-wa-ai-global-track span { position: absolute; top: 2px; left: 2px; height: 15px; width: 15px; border-radius: 9999px; background: #fff; transition: transform .15s; }
.dsai-wa-ai-global input { position: absolute; opacity: 0; width: 0; height: 0; }
.dsai-wa-ai-global input:checked + .dsai-wa-ai-global-track { background: #00a884; }
.dsai-wa-ai-global input:checked + .dsai-wa-ai-global-track span { transform: translateX(15px); }
.dsai-wa-ai-global input:checked ~ .dsai-wa-ai-global-label { color: #027d61; }
.dsai-wa-mode { border: 0; border-radius: 9999px; background: #d9fdd3; padding: 6px 13px; font-size: 12px; font-weight: 700; color: #027d61; cursor: pointer; }
.dsai-wa-mode.is-human { background: #fef3c7; color: #92400e; }

/* Pantalla IA del negocio: acabados (modales, feedback, densidad) */
.dsai-modal-pop {
    opacity: 1;
    transform: none;
    transition: opacity 200ms cubic-bezier(0.23, 1, 0.32, 1), transform 200ms cubic-bezier(0.23, 1, 0.32, 1);
}
@starting-style {
    .dsai-modal-pop {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
}
.dsai-press {
    transition: transform 140ms cubic-bezier(0.23, 1, 0.32, 1), box-shadow 140ms ease-out, border-color 140ms ease-out;
}
.dsai-press:active {
    transform: scale(0.97);
}
@media (prefers-reduced-motion: reduce) {
    .dsai-modal-pop,
    .dsai-press {
        transition: none;
    }
}

