/* LOKALIZATE.COM - P6-DMC-A5.1 */

#dmc-menu-button[hidden],
#dmc-view [hidden] {
    display: none !important;
}

#dmc-menu-button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: inherit;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

#dmc-menu-button svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

#dmc-menu-button:hover,
#dmc-menu-button.dmc-active {
    background: #1976b5;
    color: #fff;
}

body.dmc-open #app .map-area > :not(#dmc-view) {
    display: none !important;
}

body.dmc-open #app .map-area {
    overflow: auto !important;
}

body.dmc-open .sidebar nav a {
    background: transparent !important;
    box-shadow: none !important;
}

#dmc-view {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 100%;
    padding: 26px;
    background: #f1f5f9;
    color: #17324b;
    font-family: inherit;
}

#dmc-view * {
    box-sizing: border-box;
}

#dmc-view .dmc-header,
#dmc-view .dmc-detail-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 22px;
}

#dmc-view h1 {
    font-size: clamp(22px, 2.4vw, 32px);
    margin: 8px 0;
    color: #10283e;
}

#dmc-view h2 {
    font-size: 20px;
    margin: 0 0 14px;
}

#dmc-view h3 {
    margin: 8px 0;
}

#dmc-view p {
    margin: 6px 0;
}

#dmc-view small {
    color: #64748b;
    font-size: 12px;
}

#dmc-view .dmc-header small {
    color: #1976b5;
    font-weight: 700;
    letter-spacing: .07em;
}

#dmc-view .dmc-actions,
#dmc-view .dmc-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

#dmc-view button {
    border: 1px solid #d5e0eb;
    border-radius: 8px;
    background: #fff;
    color: #17324b;
    padding: 9px 13px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

#dmc-view button:hover {
    border-color: #329bd5;
    color: #1976b5;
}

#dmc-view button:disabled {
    opacity: .45;
    cursor: default;
}

#dmc-view [data-refresh],
#dmc-view .dmc-filters button,
#dmc-view button.dmc-selected {
    background: #1976b5;
    border-color: #1976b5;
    color: #fff;
}

#dmc-view .dmc-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(145px,1fr));
    gap: 14px;
    margin-bottom: 24px;
}

#dmc-view .dmc-kpis article,
#dmc-view .dmc-card,
#dmc-view .dmc-model-card {
    border: 1px solid #dce5ee;
    border-radius: 12px;
    background: #fff;
    padding: 18px;
}

#dmc-view .dmc-kpis span {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
}

#dmc-view .dmc-kpis strong {
    color: #1976b5;
    font-size: 30px;
}

#dmc-view .dmc-tabs {
    margin-bottom: 16px;
}

#dmc-view .dmc-card {
    margin-bottom: 18px;
}

#dmc-view .dmc-filters {
    display: grid;
    grid-template-columns: minmax(200px,2fr) 1fr 1fr auto;
    align-items: end;
    gap: 12px;
    margin-bottom: 20px;
}

#dmc-view .dmc-filters label {
    display: grid;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
}

#dmc-view input,
#dmc-view select {
    width: 100%;
    min-width: 0;
    height: 40px;
    border: 1px solid #d5e0eb;
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff;
    color: #17324b;
    font: inherit;
    font-size: 13px;
}

#dmc-view .dmc-table-wrap {
    overflow-x: auto;
}

#dmc-view .dmc-table {
    width: 100%;
    min-width: 950px;
    border-collapse: collapse;
    font-size: 13px;
}

#dmc-view .dmc-table th {
    background: #edf4fa;
    color: #45627c;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .025em;
}

#dmc-view .dmc-table th,
#dmc-view .dmc-table td {
    padding: 13px 10px;
    border-bottom: 1px solid #e6edf3;
    text-align: left;
    vertical-align: middle;
}

#dmc-view .dmc-table small {
    display: block;
    margin-top: 5px;
}

#dmc-view .dmc-table tbody tr:hover {
    background: #f6faff;
}

#dmc-view .dmc-status {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

#dmc-view .dmc-status.recent {
    background: #dcfce7;
    color: #166534;
}

#dmc-view .dmc-status.delayed,
#dmc-view .dmc-pending {
    color: #a16207;
}

#dmc-view .dmc-status.delayed {
    background: #fef3c7;
}

#dmc-view .dmc-status.stale {
    background: #ffedd5;
    color: #9a3412;
}

#dmc-view .dmc-status.unknown {
    background: #e2e8f0;
    color: #475569;
}

#dmc-view .dmc-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    font-size: 12px;
}

#dmc-view .dmc-model-grid,
#dmc-view .dmc-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
    gap: 12px;
}

#dmc-view .dmc-detail-grid > div {
    padding: 14px;
    background: #f4f8fc;
    border: 1px solid #e1eaf2;
    border-radius: 8px;
    overflow-wrap: anywhere;
}

#dmc-view .dmc-detail-grid span {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-bottom: 6px;
}

#dmc-view .dmc-note,
#dmc-view .dmc-message {
    color: #64748b;
    font-size: 12px;
    line-height: 1.6;
}

@media (max-width: 760px) {
    #dmc-view {
        padding: 14px;
    }

    #dmc-view .dmc-filters {
        grid-template-columns: 1fr;
    }

    #dmc-view .dmc-kpis {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    #dmc-view .dmc-pagination {
        flex-wrap: wrap;
    }
}

/* P6-DMC-A6.1R.1 - AJUSTES CORPORATIVOS */

#dmc-menu-button::before,
#dmc-menu-button::after,
#dmc-menu-button > span::before,
#dmc-menu-button > span::after {
    content: none !important;
    display: none !important;
}

#dmc-menu-button {
    gap: 9px !important;
    padding: 12px 10px !important;
    white-space: nowrap !important;
    font-size: 13px !important;
}

#dmc-menu-button span {
    white-space: nowrap !important;
    min-width: 0;
}

#dmc-menu-button svg {
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    flex: 0 0 18px !important;
}

body.dmc-open .sidebar nav a,
body.dmc-open .sidebar nav a:hover {
    background: transparent !important;
    box-shadow: none !important;
    border-color: transparent !important;
}

body.dmc-open .sidebar nav a::before,
body.dmc-open .sidebar nav a::after {
    opacity: 0 !important;
}

body.dmc-open #app .map-area {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    align-self: stretch !important;
}

body.dmc-open #dmc-view {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 26px 28px 40px !important;
    display: block !important;
}

#dmc-view .dmc-header {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    margin: 0 0 24px !important;
    padding: 0 !important;
}

#dmc-view .dmc-kpis {
    grid-template-columns:
        repeat(5,minmax(0,1fr));
}

#dmc-view .dmc-filters {
    grid-template-columns:
        repeat(4,minmax(0,1fr));
    gap: 14px;
}

#dmc-view .dmc-filters label:first-child {
    grid-column: span 3;
}

#dmc-view .dmc-table-wrap {
    max-width: 100%;
    overflow-x: auto;
}

#dmc-view .dmc-detail-group {
    margin: 18px 0 24px;
}

#dmc-view .dmc-detail-group h3 {
    color: #1976b5;
    font-size: 14px;
    font-weight: 700;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid #dce5ee;
}

#dmc-view .dmc-detail-grid {
    grid-template-columns:
        repeat(auto-fit,minmax(190px,1fr));
}

#dmc-view .dmc-detail-grid strong {
    display: block;
    font-size: 14px;
    line-height: 1.5;
}

@media (max-width: 1100px) {

    #dmc-view .dmc-kpis {
        grid-template-columns:
            repeat(auto-fit,minmax(130px,1fr));
    }

    #dmc-view .dmc-filters {
        grid-template-columns:
            repeat(2,minmax(0,1fr));
    }

    #dmc-view .dmc-filters label:first-child {
        grid-column: span 2;
    }
}

@media (max-width: 760px) {

    body.dmc-open #dmc-view {
        padding: 14px 14px 30px !important;
    }

    #dmc-view .dmc-filters {
        grid-template-columns: 1fr;
    }

    #dmc-view .dmc-filters label:first-child {
        grid-column: auto;
    }

    #dmc-view .dmc-detail-grid {
        grid-template-columns:
            repeat(auto-fit,minmax(135px,1fr));
    }
}

/* ==========================================================
   P6-DMC-A6.2 - VIEWPORT Y NAVEGACION
   ========================================================== */

body.dmc-open #dmc-view {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: var(--dmc-left, 182px) !important;
    z-index: 4900 !important;

    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 24px 28px 40px !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;

    background: #f1f5f9 !important;
    overscroll-behavior: contain;
}

body.dmc-open #app .map-area {
    visibility: hidden !important;
}

body.dmc-open #dmc-view .dmc-header {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;

    position: relative !important;
    top: auto !important;

    min-height: 80px;
    margin-bottom: 20px !important;
}

body.dmc-open #dmc-view .dmc-header h1 {
    display: block !important;
    visibility: visible !important;
    margin: 6px 0 !important;
    font-size: 27px;
}

body.dmc-open #dmc-view .dmc-header p {
    display: block !important;
    visibility: visible !important;
}

body.dmc-open #dmc-view .dmc-actions {
    display: flex !important;
    visibility: visible !important;
}

/* Recuperar iconos de navegacion existentes. */

body.dmc-open .sidebar nav a::before,
body.dmc-open .sidebar nav a::after {
    opacity: 1 !important;
}

body.dmc-open .sidebar nav a {
    background-color: transparent !important;
    box-shadow: none !important;
}

/* Indicadores superiores. */

#dmc-view .dmc-kpis {
    grid-template-columns:
        repeat(6,minmax(0,1fr));

    gap: 12px;
    margin-bottom: 20px;
}

#dmc-view .dmc-kpis article {
    padding: 15px 16px;
}

#dmc-view .dmc-kpi-signal strong {
    color: #15803d;
}

/* Inventario mas compacto. */

#dmc-view .dmc-table td {
    padding: 10px 10px;
}

#dmc-view .dmc-table th {
    padding: 11px 10px;
}

#dmc-view .dmc-table small {
    margin-top: 3px;
}

#dmc-view .dmc-table button {
    padding: 7px 12px;
}

/* Ficha tecnica. */

#dmc-view .dmc-detail-group {
    margin: 14px 0 20px;
}

#dmc-view .dmc-detail-grid > div {
    padding: 12px;
}

#dmc-view .dmc-detail-grid strong {
    overflow-wrap: anywhere;
}

@media (max-width: 1200px) {

    #dmc-view .dmc-kpis {
        grid-template-columns:
            repeat(3,minmax(0,1fr));
    }
}

@media (max-width: 760px) {

    body.dmc-open #dmc-view {
        left: 0 !important;
        padding: 16px 14px 30px !important;
    }

    #dmc-view .dmc-kpis {
        grid-template-columns:
            repeat(2,minmax(0,1fr));
    }

    #dmc-view .dmc-header h1 {
        font-size: 23px !important;
    }
}

/* ==========================================================
   P6-DMC-B1.6.2B - COMUNICACIONES TCP
   ========================================================== */

#dmc-view .dmc-kpis {
    grid-template-columns: repeat(4,minmax(0,1fr));
    margin-bottom: 12px;
}

#dmc-view .dmc-kpi-tcp-connected strong {
    color: #15803d;
}

#dmc-view .dmc-kpi-tcp-disconnected strong {
    color: #64748b;
}

#dmc-view .dmc-tcp-health {
    margin: 0 0 20px;
    font-size: 12px;
    line-height: 1.5;
    color: #15803d;
}

#dmc-view .dmc-tcp-health-warning {
    color: #a16207;
}

#dmc-view .dmc-status.tcp-connected {
    color: #166534;
    background: #dcfce7;
}

#dmc-view .dmc-status.tcp-disconnected {
    color: #475569;
    background: #e2e8f0;
}

#dmc-view .dmc-status.tcp-unavailable {
    color: #a16207;
    background: #fef3c7;
}

#dmc-view .dmc-status.tcp-unsupported {
    color: #64748b;
    background: #f1f5f9;
}

#dmc-view .dmc-table {
    min-width: 1060px;
}

#dmc-view .dmc-status {
    white-space: nowrap;
}

@media (max-width: 1100px) {

    #dmc-view .dmc-kpis {
        grid-template-columns:
            repeat(3,minmax(0,1fr));
    }
}

@media (max-width: 760px) {

    #dmc-view .dmc-kpis {
        grid-template-columns:
            repeat(2,minmax(0,1fr));
    }
}

