:root {
    --sis-primary: #2563eb;
    --sis-primary-dark: #1d4ed8;
    --sis-primary-soft: #eff6ff;
    --sis-success: #059669;
    --sis-warning: #d97706;
    --sis-danger: #dc2626;
    --sis-info: #0284c7;
    --sis-ink: #0f172a;
    --sis-text: #334155;
    --sis-muted: #64748b;
    --sis-line: #e2e8f0;
    --sis-surface: #ffffff;
    --sis-background: #f4f7fb;
    --sis-sidebar: #0f172a;
    --sis-sidebar-soft: #1e293b;
    --sis-radius: 14px;
    --sis-shadow: 0 14px 36px rgba(15, 23, 42, .08);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
}

body.sis-app {
    background: var(--sis-background);
    color: var(--sis-text);
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    min-height: 100%;
}

body.sis-app a {
    transition: color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

body.sis-app > .header {
    background: var(--sis-surface);
    box-shadow: 0 2px 14px rgba(15, 23, 42, .09);
    max-height: none;
    min-height: 64px;
    position: relative;
    z-index: 1040;
}

body.sis-app > .header .logo {
    align-items: center;
    background: linear-gradient(145deg, #0f172a, #172554);
    color: #fff;
    display: flex;
    font-size: 20px;
    font-weight: 800;
    height: 64px;
    justify-content: center;
    letter-spacing: -.35px;
    line-height: normal;
    padding: 0;
    width: 220px;
}

body.sis-app > .header .logo:hover,
body.sis-app > .header .logo:focus {
    background: linear-gradient(145deg, #172554, #1e3a8a);
    color: #fff;
}

.sis-brand-mark {
    align-items: center;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 16px;
    display: inline-flex;
    height: 48px;
    justify-content: center;
    margin-right: 0;
    width: 48px;
    overflow: hidden;
    position: relative;
}

.sis-brand-mark img {
    height: 35px;
    max-width: none;
    position: static;
    width: 35px;
}

.sis-brand-name {
    height: 1px;
    margin: -1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

body.sis-app > .header .navbar {
    background: #fff;
    border: 0;
    margin-left: 220px;
    min-height: 64px;
}

body.sis-app > .header .navbar .sidebar-toggle {
    align-items: center;
    color: var(--sis-ink);
    display: flex;
    height: 64px;
    justify-content: center;
    margin: 0;
    padding: 0;
    width: 64px;
}

body.sis-app > .header .navbar .sidebar-toggle .fa {
    color: #2563eb;
    display: block;
    font-size: 21px;
    line-height: 1;
}

body.sis-app > .header .navbar .sidebar-toggle:hover,
body.sis-app > .header .navbar .sidebar-toggle:focus {
    background: var(--sis-primary-soft);
}

body.sis-app > .header .navbar .sidebar-toggle .icon-bar {
    display: none !important;
}

.sis-topbar-context {
    align-items: center;
    display: flex;
    gap: 10px;
    min-height: 64px;
    overflow: hidden;
    padding: 8px 16px 8px 4px;
}

.sis-context-item {
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--sis-line);
    border-radius: 10px;
    display: flex;
    gap: 9px;
    min-width: 0;
    padding: 7px 11px;
}

.sis-context-item > i {
    color: var(--sis-primary);
    flex: 0 0 auto;
    font-size: 15px;
}

.sis-context-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

.sis-context-copy small {
    color: var(--sis-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .35px;
    text-transform: uppercase;
}

.sis-context-copy strong {
    color: var(--sis-ink);
    display: block;
    font-size: 12px;
    font-weight: 700;
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sis-license-notice {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    color: #9a3412 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    margin-left: auto;
    max-width: 360px;
    overflow: hidden;
    padding: 7px 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sis-plan-link {
    align-items: center;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    color: #075eb2 !important;
    display: flex;
    font-size: 11px;
    font-weight: 800;
    gap: 6px;
    padding: 7px 11px;
    text-decoration: none !important;
    white-space: nowrap;
}

.sis-plan-link:hover,
.sis-plan-link:focus {
    background: #dbeafe;
    color: #004f9f !important;
}

.sis-topbar-exit {
    align-items: center;
    color: var(--sis-muted);
    display: flex;
    font-size: 13px;
    font-weight: 700;
    gap: 7px;
    margin-left: auto;
    padding: 10px 12px;
    white-space: nowrap;
}

.sis-topbar-exit:hover,
.sis-topbar-exit:focus {
    color: var(--sis-danger);
}

body.sis-app .wrapper {
    background: var(--sis-background);
}

body.sis-app .left-side {
    background: var(--sis-sidebar);
    box-shadow: 8px 0 26px rgba(15, 23, 42, .08);
    width: 220px;
}

body.sis-app .right-side {
    background: var(--sis-background);
    margin-left: 220px;
    min-height: calc(100vh - 64px);
}

body.sis-app .right-side > .content {
    padding: 22px;
}

body.sis-app .sidebar {
    padding-bottom: 24px;
}

body.sis-app .user-panel {
    align-items: center;
    background: rgba(255, 255, 255, .04);
    border-bottom: 1px solid rgba(148, 163, 184, .12);
    display: flex;
    min-height: 76px;
    padding: 14px 16px;
}

body.sis-app .user-panel .image {
    float: none !important;
}

.sis-sidebar-brand-mark {
    background: rgba(255, 255, 255, .95);
    border: 2px solid rgba(96, 165, 250, .6);
    border-radius: 12px;
    display: block;
    height: 44px;
    overflow: hidden;
    position: relative;
    width: 44px;
}

.sis-sidebar-brand-mark img {
    height: 76px;
    left: -17px;
    max-width: none;
    position: absolute;
    top: -12px;
    width: 76px;
}

body.sis-app .user-panel .info {
    float: none !important;
    left: auto;
    padding: 0 0 0 11px;
    position: static;
}

body.sis-app .user-panel .info p {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 3px;
}

.sis-user-subtitle {
    color: #94a3b8;
    display: block;
    font-size: 11px;
}

.sis-menu-search {
    padding: 12px 12px 8px;
    position: relative;
}

.sis-menu-search i {
    color: #94a3b8;
    left: 25px;
    position: absolute;
    top: 25px;
}

.sis-menu-search input {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 10px;
    color: #fff;
    font-size: 12px;
    height: 40px;
    outline: none;
    padding: 8px 10px 8px 34px;
    width: 100%;
}

.sis-menu-search input::placeholder {
    color: #94a3b8;
}

body.sis-app .sidebar .sidebar-menu {
    margin: 0;
    padding: 4px 10px;
}

body.sis-app .sidebar .sidebar-menu > li {
    margin: 3px 0;
}

body.sis-app .sidebar .sidebar-menu > li > a {
    border-left: 0;
    border-radius: 9px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 600;
    min-height: 42px;
    padding: 11px 12px;
}

body.sis-app .sidebar .sidebar-menu > li > a > i:first-child {
    color: #60a5fa;
    margin-right: 8px;
    text-align: center;
    width: 17px;
}

body.sis-app .sidebar .sidebar-menu > li:hover > a,
body.sis-app .sidebar .sidebar-menu > li.active > a,
body.sis-app .sidebar .sidebar-menu > li.menu-open > a {
    background: rgba(37, 99, 235, .2);
    color: #fff;
}

body.sis-app .sidebar .treeview-menu {
    background: transparent;
    margin: 4px 0 7px;
    padding: 3px 0 3px 11px;
}

body.sis-app .sidebar .treeview-menu > li > a {
    border-radius: 8px;
    color: #94a3b8;
    display: block;
    font-size: 12px;
    margin: 2px 0;
    padding: 8px 8px 8px 18px;
}

body.sis-app .sidebar .treeview-menu > li > a:hover,
body.sis-app .sidebar .treeview-menu > li > a.sis-active-link {
    background: rgba(255, 255, 255, .07);
    color: #fff;
}

body.sis-app .sidebar .treeview-menu > li > a i {
    color: #60a5fa;
    margin-right: 5px;
}

.sis-plan-locked {
    --sis-plan-color: #2563eb;
}

.sis-plan-basico {
    --sis-plan-color: #2563eb;
}

.sis-plan-emprendedor {
    --sis-plan-color: #0891b2;
}

.sis-plan-comercial {
    --sis-plan-color: #059669;
}

.sis-plan-empresarial {
    --sis-plan-color: #7c3aed;
}

.sis-plan-corporativo {
    --sis-plan-color: #d97706;
}

body.sis-app .sidebar .sidebar-menu > li.sis-plan-locked > a {
    border-left: 4px solid var(--sis-plan-color);
    background: rgba(248, 250, 252, .98);
    color: #0f2a4f;
    cursor: pointer;
    padding-left: 9px;
    position: relative;
}

body.sis-app .sidebar .sidebar-menu > li.sis-plan-locked > a > i:first-child {
    color: var(--sis-plan-color);
}

body.sis-app .sidebar .sidebar-menu > li.sis-plan-locked > a::after {
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--sis-plan-color);
    border-radius: 999px;
    color: var(--sis-plan-color);
    content: attr(data-sis-required-plan);
    display: inline-block;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    margin-left: 6px;
    max-width: 88px;
    overflow: hidden;
    padding: 4px 6px;
    text-overflow: ellipsis;
    text-transform: uppercase;
    vertical-align: middle;
    white-space: nowrap;
}

body.sis-app .sidebar .sidebar-menu > li.sis-plan-locked .treeview-menu > li > a {
    color: #0f2a4f;
}

body.sis-app .sidebar .treeview-menu > li.sis-plan-locked > a {
    align-items: center;
    border-left: 3px solid var(--sis-plan-color);
    color: #0f2a4f;
    cursor: pointer;
    display: flex;
    gap: 5px;
    justify-content: space-between;
    padding-right: 8px;
}

body.sis-app .sidebar .treeview-menu > li.sis-plan-locked > a::after {
    background: rgba(255, 255, 255, .96);
    border: 1px solid var(--sis-plan-color);
    border-radius: 999px;
    color: var(--sis-plan-color);
    content: attr(data-sis-required-plan);
    display: inline-block;
    flex: 0 0 auto;
    font-size: 8px;
    font-weight: 800;
    line-height: 1;
    max-width: 72px;
    overflow: hidden;
    padding: 3px 5px;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

body.sis-app .sidebar .sidebar-menu > li.sis-plan-locked .treeview-menu > li > a i {
    color: var(--sis-plan-color);
}

.sis-menu-hidden {
    display: none !important;
}

body.sis-app .content-header {
    background: transparent;
    padding: 0 0 16px;
}

body.sis-app .content-header h1,
body.sis-app .content-header h2 {
    color: var(--sis-ink);
    font-weight: 700;
    letter-spacing: -.35px;
}

body.sis-app .box,
body.sis-app .panel,
body.sis-app .well {
    background: var(--sis-surface);
    border: 1px solid var(--sis-line);
    border-radius: var(--sis-radius);
    box-shadow: var(--sis-shadow);
}

body.sis-app .box {
    border-top: 0;
}

body.sis-app .box-header {
    border-bottom: 1px solid var(--sis-line);
    padding: 15px 18px;
}

body.sis-app .box-body {
    padding: 18px;
}

body.sis-app .form-control,
body.sis-app input[type="text"],
body.sis-app input[type="password"],
body.sis-app input[type="email"],
body.sis-app input[type="number"],
body.sis-app input[type="date"],
body.sis-app select,
body.sis-app textarea {
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    box-shadow: none;
    color: var(--sis-ink);
    max-width: 100%;
    transition: border-color .18s ease, box-shadow .18s ease;
}

body.sis-app .form-control:focus,
body.sis-app input:focus,
body.sis-app select:focus,
body.sis-app textarea:focus {
    border-color: var(--sis-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
    outline: none;
}

body.sis-app .btn,
body.sis-app input[type="submit"],
body.sis-app input[type="button"] {
    border-radius: 9px;
    font-weight: 700;
    transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}

body.sis-app .btn:hover,
body.sis-app input[type="submit"]:hover,
body.sis-app input[type="button"]:hover {
    transform: translateY(-1px);
}

body.sis-app .btn-primary {
    background: linear-gradient(135deg, var(--sis-primary), #0ea5e9);
    border-color: transparent;
    box-shadow: 0 7px 17px rgba(37, 99, 235, .2);
}

body.sis-app .btn-success {
    background: linear-gradient(135deg, #059669, #10b981);
    border-color: transparent;
}

body.sis-app .btn-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    border-color: transparent;
}

body.sis-app .table,
body.sis-app table[id*="GridView"],
body.sis-app table[id*="GridResultado"] {
    background: #fff;
    border-collapse: separate;
    border-spacing: 0;
    max-width: 100%;
}

body.sis-app .table th,
body.sis-app table[id*="GridView"] th,
body.sis-app table[id*="GridResultado"] th {
    background: #0f172a !important;
    border-color: #1e293b !important;
    color: #fff !important;
    font-weight: 700;
}

body.sis-app .table td,
body.sis-app table[id*="GridView"] td,
body.sis-app table[id*="GridResultado"] td {
    border-color: var(--sis-line) !important;
}

body.sis-app .alert {
    border: 0;
    border-radius: 10px;
}

.sis-table-responsive {
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    overflow-x: auto;
}

.sis-app-footer {
    color: #94a3b8;
    font-size: 12px;
    padding: 20px;
    text-align: center;
}

.sis-mobile-backdrop {
    background: rgba(15, 23, 42, .55);
    display: none;
    inset: 64px 0 0;
    position: fixed;
    z-index: 1005;
}

.sis-mobile-backdrop.is-visible {
    display: block;
}

.sis-toast-region {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 390px;
    pointer-events: none;
    position: fixed;
    right: 18px;
    top: 82px;
    width: calc(100% - 36px);
    z-index: 12000;
}

.sis-toast {
    align-items: flex-start;
    animation: sisToastIn .25s ease both;
    background: #fff;
    border: 1px solid var(--sis-line);
    border-left: 5px solid var(--sis-info);
    border-radius: 12px;
    box-shadow: 0 18px 46px rgba(15, 23, 42, .18);
    color: var(--sis-text);
    display: flex;
    gap: 11px;
    padding: 13px 14px;
    pointer-events: auto;
}

.sis-toast.is-success { border-left-color: var(--sis-success); }
.sis-toast.is-warning { border-left-color: var(--sis-warning); }
.sis-toast.is-error { border-left-color: var(--sis-danger); }
.sis-toast.is-info { border-left-color: var(--sis-info); }

.sis-toast-icon {
    align-items: center;
    background: var(--sis-primary-soft);
    border-radius: 50%;
    color: var(--sis-info);
    display: flex;
    flex: 0 0 30px;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.sis-toast.is-success .sis-toast-icon { background: #ecfdf5; color: var(--sis-success); }
.sis-toast.is-warning .sis-toast-icon { background: #fffbeb; color: var(--sis-warning); }
.sis-toast.is-error .sis-toast-icon { background: #fef2f2; color: var(--sis-danger); }

.sis-toast-content {
    flex: 1;
    min-width: 0;
}

.sis-toast-title {
    color: var(--sis-ink);
    display: block;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 2px;
}

.sis-toast-message {
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.sis-toast-close {
    background: transparent;
    border: 0;
    color: #94a3b8;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 1px;
}

.sis-toast.is-leaving {
    animation: sisToastOut .2s ease both;
}

.sis-modal-backdrop,
.sis-loader {
    align-items: center;
    background: rgba(15, 23, 42, .62);
    display: none;
    inset: 0;
    justify-content: center;
    padding: 20px;
    position: fixed;
    z-index: 12500;
}

.sis-loader {
    z-index: 13000;
}

.sis-modal-backdrop.is-visible,
.sis-loader.is-visible {
    display: flex;
}

.sis-modal {
    background: #fff;
    border-radius: 17px;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .3);
    max-width: 460px;
    padding: 24px;
    width: 100%;
}

.sis-modal h3 {
    color: var(--sis-ink);
    font-size: 20px;
    margin: 0 0 9px;
}

.sis-modal p {
    color: var(--sis-muted);
    line-height: 1.55;
    margin: 0;
}

.sis-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 22px;
}

.sis-modal-button {
    border: 0;
    border-radius: 9px;
    cursor: pointer;
    font-weight: 700;
    min-width: 100px;
    padding: 10px 15px;
}

.sis-modal-cancel {
    background: #e2e8f0;
    color: var(--sis-text);
}

.sis-modal-confirm {
    background: var(--sis-primary);
    color: #fff;
}

.sis-loader-card {
    background: #fff;
    border-radius: 17px;
    box-shadow: 0 26px 70px rgba(15, 23, 42, .27);
    max-width: 420px;
    padding: 28px;
    text-align: center;
    width: 100%;
}

.sis-loader-spinner {
    animation: sisSpin .8s linear infinite;
    border: 5px solid #dbeafe;
    border-radius: 50%;
    border-top-color: var(--sis-primary);
    height: 52px;
    margin: 0 auto 16px;
    width: 52px;
}

.sis-loader-title {
    color: var(--sis-ink);
    display: block;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 5px;
}

.sis-loader-message {
    color: var(--sis-muted);
    font-size: 13px;
}

@keyframes sisSpin {
    to { transform: rotate(360deg); }
}

@keyframes sisToastIn {
    from { opacity: 0; transform: translateY(-10px) translateX(14px); }
    to { opacity: 1; transform: translateY(0) translateX(0); }
}

@keyframes sisToastOut {
    to { opacity: 0; transform: translateX(25px); }
}

@media (max-width: 1100px) {
    .sis-context-item:nth-of-type(1) .sis-context-copy strong {
        max-width: 150px;
    }

    .sis-context-item:nth-of-type(2) .sis-context-copy strong {
        max-width: 150px;
    }

    .sis-license-notice {
        display: none;
    }

    .sis-plan-link {
        display: none;
    }
}

@media (max-width: 992px) {
    body.sis-app > .header .logo {
        width: 170px;
    }

    body.sis-app > .header .navbar {
        margin-left: 170px;
    }

    body.sis-app .left-side {
        box-shadow: 12px 0 35px rgba(15, 23, 42, .25);
        position: absolute;
        z-index: 1010;
    }

    body.sis-app .right-side {
        margin-left: 0;
    }

    .sis-context-item:nth-of-type(1),
    .sis-context-item:nth-of-type(2) {
        display: none;
    }
}

@media (max-width: 720px) {
    body.sis-app > .header {
        min-height: 58px;
    }

    body.sis-app > .header .logo {
        height: 58px;
        justify-content: center;
        padding-left: 0;
        width: 150px;
    }

    body.sis-app > .header .navbar {
        margin-left: 150px;
        min-height: 58px;
    }

    body.sis-app > .header .navbar .sidebar-toggle {
        height: 58px;
        width: 52px;
    }

    .sis-topbar-context {
        min-height: 58px;
        padding: 6px 8px 6px 0;
    }

    .sis-context-item {
        display: none;
    }

    .sis-topbar-exit span {
        display: none;
    }

    .sis-topbar-exit {
        font-size: 17px;
        margin-left: auto;
        padding: 10px;
    }

    body.sis-app .right-side > .content {
        padding: 14px 10px 22px;
    }

    body.sis-app .content-header h1 {
        font-size: 24px;
    }

    .sis-toast-region {
        left: 10px;
        max-width: none;
        right: 10px;
        top: 68px;
        width: auto;
    }

    .sis-modal-actions {
        flex-direction: column-reverse;
    }

    .sis-modal-button {
        width: 100%;
    }

    .sis-mobile-backdrop {
        inset: 58px 0 0;
    }
}

/* Ajuste visual claro y profesional */
body.sis-app {
    --sis-background: #f7fbff;
    --sis-sidebar: #ffffff;
    --sis-sidebar-soft: #eff6ff;
}

body.sis-app > .header .logo {
    background: #ffffff;
    border-right: 1px solid #dbeafe;
    box-shadow: 0 8px 24px rgba(37, 99, 235, .08);
    color: #0759b2;
}

body.sis-app > .header .logo:hover,
body.sis-app > .header .logo:focus {
    background: #f8fbff;
    color: #0759b2;
}

.sis-brand-mark,
.sis-sidebar-brand-mark {
    background: linear-gradient(145deg, #ffffff, #eff6ff);
    border-color: #bfdbfe;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .14);
}

.sis-brand-mark img {
    height: 36px;
    width: 36px;
}

.sis-sidebar-brand-mark img {
    height: 70px;
    left: -14px;
    top: -10px;
    width: 70px;
}

body.sis-app .left-side {
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    box-shadow: 10px 0 30px rgba(15, 23, 42, .05);
}

body.sis-app .user-panel {
    background: linear-gradient(135deg, #f8fbff, #eff6ff);
    border-bottom: 1px solid #dbeafe;
}

body.sis-app .user-panel .image {
    display: none !important;
}

body.sis-app .user-panel .info {
    padding-left: 0 !important;
}

body.sis-app .user-panel .info p {
    color: #0f172a;
}

.sis-user-subtitle {
    color: #64748b;
}

.sis-menu-search input {
    background: #f8fafc;
    border-color: #dbeafe;
    color: #0f172a;
}

.sis-menu-search input::placeholder,
.sis-menu-search i {
    color: #64748b;
}

body.sis-app .sidebar .sidebar-menu > li > a {
    border: 1px solid transparent;
    color: #334155;
}

body.sis-app .sidebar .sidebar-menu > li > a > i:first-child,
body.sis-app .sidebar .treeview-menu > li > a i {
    color: #2563eb;
}

body.sis-app .sidebar .sidebar-menu > li:hover > a,
body.sis-app .sidebar .sidebar-menu > li.active > a,
body.sis-app .sidebar .sidebar-menu > li.menu-open > a {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #0f172a;
}

body.sis-app .sidebar .treeview-menu {
    border-left: 1px solid #dbeafe;
    margin-left: 15px;
    padding-left: 9px;
}

body.sis-app .sidebar .treeview-menu > li > a {
    color: #475569;
}

body.sis-app .sidebar .treeview-menu > li > a:hover,
body.sis-app .sidebar .treeview-menu > li > a.sis-active-link {
    background: #f1f5f9;
    color: #0f172a;
}

body.sis-app .table th,
body.sis-app table[id*="GridView"] th,
body.sis-app table[id*="GridResultado"] th,
body.sis-app .sis-data-grid th {
    background: linear-gradient(180deg, #f8fbff, #eff6ff) !important;
    border-color: #dbeafe !important;
    color: #0f3b68 !important;
}

body.sis-app .table td,
body.sis-app table[id*="GridView"] td,
body.sis-app table[id*="GridResultado"] td,
body.sis-app .sis-data-grid td {
    color: #334155 !important;
}

body.sis-app .sis-module-page {
    align-items: stretch;
    display: flex;
    flex-direction: column;
}

body.sis-app .sis-page-heading {
    clear: both;
    float: none !important;
    flex: 0 0 auto;
    order: 0;
    position: static !important;
    transform: none !important;
    width: 100%;
}

body.sis-app .sis-page-heading + .sis-module-card {
    clear: both;
}

/* Mapas: usar el área completa de trabajo */
.sis-map-page {
    max-width: none;
    width: 100%;
}

body.sis-app .sis-map-page .sis-page-heading {
    margin-bottom: 14px;
}

body.sis-app .sis-map-shell {
    padding-bottom: 0;
    width: 100%;
}

body.sis-app .sis-map-shell .geo-layout {
    align-items: stretch;
    display: flex;
    gap: 16px;
    width: 100%;
}

body.sis-app .sis-map-shell .geo-map {
    flex: 1 1 auto;
    min-width: 0 !important;
}

body.sis-app .sis-map-shell .geo-list {
    background: rgba(255, 255, 255, .98);
    border: 1px solid #dbeafe;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .07);
    flex: 0 0 clamp(220px, 15vw, 300px);
    max-width: 300px !important;
    min-width: 0 !important;
    width: auto !important;
}

body.sis-app .sis-map-shell .geo-list .hdr {
    background: linear-gradient(180deg, #f8fbff, #eff6ff);
    border-bottom-color: #dbeafe;
    color: #0f3b68;
}

body.sis-app .sis-map-shell .map-card {
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    box-shadow: 0 20px 48px rgba(15, 23, 42, .1);
    height: clamp(680px, calc(100vh - 188px), 1120px) !important;
    min-height: calc(100vh - 230px);
}

body.sis-app .map-wrap {
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    box-shadow: 0 20px 48px rgba(15, 23, 42, .1);
    height: clamp(680px, calc(100vh - 154px), 1120px) !important;
    min-height: calc(100vh - 190px);
}

body.sis-app .sis-map-shell .map-toolbar {
    background: rgba(255, 255, 255, .96);
    border: 1px solid #dbeafe;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .12);
    flex-wrap: wrap;
    max-width: calc(100% - 24px);
}

body.sis-app .sis-map-shell .chip {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #0f3b68;
}

body.sis-app .sis-map-shell .chip .dot {
    background: #2563eb;
}

@media (max-width: 992px) {
    body.sis-app .sis-map-shell .geo-layout {
        flex-direction: column;
    }

    body.sis-app .sis-map-shell .geo-list {
        flex-basis: auto;
        max-height: 260px;
        max-width: none !important;
        width: 100% !important;
    }

    body.sis-app .sis-map-shell .map-card {
        height: calc(100vh - 188px) !important;
        min-height: 520px;
    }

    body.sis-app .map-wrap {
        height: calc(100vh - 156px) !important;
        min-height: 520px;
    }
}

@media (max-width: 720px) {
    body.sis-app > .header .logo {
        justify-content: center;
        padding-left: 0;
        width: 168px;
    }

    body.sis-app > .header .navbar {
        margin-left: 168px;
    }

    body.sis-app .sis-map-shell .map-card {
        border-radius: 15px;
        height: calc(100vh - 170px) !important;
        min-height: 460px;
    }

    body.sis-app .map-wrap {
        border-radius: 15px;
        height: calc(100vh - 142px) !important;
        min-height: 460px;
    }
}
