/* ============================================================================
   AsiscomexIIS — tema visual estilo "IIS Manager" (inetmgr).
   Shell de 3 paneles: Conexiones (izq) · Contenido (centro) · Acciones (der).
   Paleta clara, Segoe UI, selección estilo Windows.
   ============================================================================ */

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: "Segoe UI", "Segoe UI Web", Tahoma, Geneva, sans-serif;
    font-size: 13px;
    color: #1e1e1e;
    background: #ffffff;
}

/* ---- shell ---- */
.iis-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* ---- barra de título ---- */
.iis-titlebar {
    display: flex;
    align-items: center;
    height: 46px;
    flex-shrink: 0;
    background: #f0f0f0;
    border-bottom: 1px solid #d4d4d4;
    padding: 0 12px;
    gap: 14px;
}
.iis-titlebar-brand { display: flex; align-items: baseline; gap: 8px; }
.iis-logo {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px;
    background: #2b5797; color: #fff; border-radius: 3px;
    font-size: 15px; font-weight: 700; align-self: center;
}
.iis-title { font-size: 15px; font-weight: 600; color: #1e1e1e; }
.iis-subtitle { font-size: 11px; color: #6b6b6b; }

.iis-topnav { display: flex; gap: 2px; margin-left: 8px; }
.iis-topnav a {
    padding: 5px 10px;
    color: #1e1e1e;
    text-decoration: none;
    border-radius: 3px;
    font-size: 12.5px;
}
.iis-topnav a:hover { background: #e5f1fb; }
.iis-topnav a.active { background: #cbe8ff; }

.iis-titlebar-user { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.iis-user { font-size: 12px; color: #444; }
.iis-logout {
    font-size: 12px; color: #1f5a99; text-decoration: none;
    padding: 4px 9px; border: 1px solid #c5c5c5; border-radius: 3px; background: #fff;
}
.iis-logout:hover { background: #e5f1fb; }

/* ---- cuerpo: 3 paneles ---- */
.iis-body { flex: 1; display: flex; min-height: 0; }

.iis-pane {
    display: flex;
    flex-direction: column;
    background: #fafafa;
    flex-shrink: 0;
}
.iis-connections { width: 270px; border-right: 1px solid #d4d4d4; }
.iis-actions { width: 210px; border-left: 1px solid #d4d4d4; }

.iis-pane-header {
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px 0 10px;
    font-weight: 600;
    font-size: 12px;
    color: #2b3a4a;
    background: linear-gradient(#fbfbfb, #eef0f2);
    border-bottom: 1px solid #d4d4d4;
    flex-shrink: 0;
}
.iis-pane-body { flex: 1; overflow: auto; }

/* botón ocultar panel + riel de reapertura */
.iis-pane-toggle {
    display: inline-flex; align-items: center;
    cursor: pointer; color: #6b6b6b; border-radius: 3px; padding: 1px;
}
.iis-pane-toggle:hover { background: #dce9f5; color: #1e1e1e; }

.iis-rail {
    width: 26px; flex-shrink: 0;
    background: linear-gradient(#fbfbfb, #eef0f2);
    border-left: 1px solid #d4d4d4; border-right: 1px solid #d4d4d4;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding-top: 6px; cursor: pointer; color: #2b3a4a;
}
.iis-rail:hover { background: #e5f1fb; }
.iis-rail-label {
    writing-mode: vertical-rl;
    font-size: 11px; font-weight: 600; letter-spacing: .3px;
}

/* ---- contenido central ---- */
.iis-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    overflow: auto;
}
.iis-content-body { flex: 1; padding: 14px 18px; }

/* ---- árbol de conexiones ---- */
.iis-tree { padding: 4px 0; user-select: none; }
.iis-tree-node {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    cursor: pointer;
    white-space: nowrap;
    line-height: 20px;
}
.iis-tree-node:hover { background: #e5f3ff; }
.iis-tree-node.active { background: #cbe8ff; box-shadow: inset 0 0 0 1px #a6d2ff; }
.iis-tree-twisty {
    width: 14px; text-align: center; color: #6b6b6b; font-size: 10px; flex-shrink: 0;
}
.iis-tree-icon { display: inline-flex; align-items: center; flex-shrink: 0; }
.iis-tree-label { overflow: hidden; text-overflow: ellipsis; }
.iis-tree-root { font-weight: 600; padding-left: 10px; }
.iis-tree-server { font-weight: 600; }
.iis-tree-children { }
.iis-tree-leaf { padding-left: 40px; }
.iis-tree-leaf2 { padding-left: 60px; }
.iis-tree-leaf3 { padding-left: 84px; }
.iis-tree-loading, .iis-tree-empty {
    padding: 8px 12px; color: #6b6b6b; font-size: 12px; font-style: italic;
}

/* nodo deshabilitado (bridge no apto para IIS) */
.iis-tree-node.disabled { color: #9a9a9a; cursor: default; }
.iis-tree-node.disabled:hover { background: transparent; }
.iis-tree-node.disabled .iis-tree-icon { opacity: .55; }

/* punto de estado del sondeo */
.iis-status-dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
    margin-right: 1px;
}
.iis-status-available   { background: #3aa655; }
.iis-status-noiis       { background: #d9a23a; }
.iis-status-unreachable { background: #c0c0c0; }
.iis-status-probing     { background: #b9d3ec; animation: iis-pulse 1.1s ease-in-out infinite; }
@keyframes iis-pulse { 0%,100% { opacity: .35; } 50% { opacity: 1; } }

/* etiqueta de entorno (Dev/QA/Prod) */
.iis-env {
    margin-left: auto;
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 1px 5px;
    border-radius: 2px;
    letter-spacing: .3px;
}
.iis-env-dev  { background: #e3effa; color: #2b5797; }
.iis-env-qa   { background: #fdf2d6; color: #8a6d1f; }
.iis-env-prod { background: #fbdcdc; color: #b02a2a; }

/* ---- panel de acciones ---- */
.iis-actions-group { padding: 6px 0; }
.iis-actions-group + .iis-actions-group { border-top: 1px solid #e4e4e4; }
.iis-actions-title {
    padding: 4px 12px; font-size: 11px; font-weight: 700;
    color: #6b6b6b; text-transform: uppercase; letter-spacing: .3px;
}
.iis-action {
    display: flex; align-items: center; gap: 7px;
    padding: 4px 12px;
    cursor: pointer; color: #1e1e1e; text-decoration: none;
    font-size: 12.5px;
}
.iis-action:hover { background: #e5f3ff; }
.iis-action-icon { display: inline-flex; color: #2b5797; }

/* acción no disponible (p. ej. Detener cuando el sitio ya está detenido) */
.iis-action.iis-action-disabled { color: #bbb; cursor: default; }
.iis-action.iis-action-disabled:hover { background: transparent; }
.iis-action.iis-action-disabled .iis-action-icon { color: #cfcfcf; }

/* etiqueta "detenido" junto a un sitio en el árbol */
.iis-site-stopped {
    margin-left: auto;
    font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
    padding: 1px 5px; border-radius: 2px;
    background: #fbdcdc; color: #b02a2a;
}

/* ---- scrollbars discretos estilo Windows ---- */
.iis-pane-body::-webkit-scrollbar, .iis-content::-webkit-scrollbar { width: 12px; height: 12px; }
.iis-pane-body::-webkit-scrollbar-thumb, .iis-content::-webkit-scrollbar-thumb {
    background: #c8c8c8; border: 3px solid transparent; background-clip: padding-box; border-radius: 7px;
}
.iis-pane-body::-webkit-scrollbar-thumb:hover, .iis-content::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }

/* ---- Vista de características de un sitio ---- */
.iis-feature-group { margin-bottom: 18px; }
.iis-feature-group-title {
    font-size: 12px; font-weight: 700; color: #2b3a4a;
    border-bottom: 1px solid #d4d4d4; padding: 4px 0; margin-bottom: 10px;
}
.iis-feature-grid { display: flex; flex-wrap: wrap; gap: 4px; }
.iis-feature-tile {
    position: relative;
    width: 96px; padding: 10px 4px 8px;
    text-align: center; cursor: pointer;
    border: 1px solid transparent; border-radius: 3px;
}
.iis-feature-tile:hover { background: #e5f3ff; border-color: #cce4f7; }
.iis-feature-label {
    font-size: 11px; line-height: 1.25; margin-top: 5px; color: #1e1e1e;
}
.iis-feature-soon {
    position: absolute; top: 3px; right: 4px;
    font-size: 8.5px; font-weight: 700; color: #8a6d1f;
    background: #fdf2d6; border-radius: 2px; padding: 0 3px;
}

/* ---- fila seleccionada en grillas estilo IIS ---- */
.iis-row-selected > td { background: #cbe8ff !important; box-shadow: inset 0 0 0 1px #a6d2ff; }

/* ---- breadcrumb / nombres clickeables del explorador de archivos ---- */
.iis-crumb { cursor: pointer; color: #1f5a99; }
.iis-crumb:hover { text-decoration: underline; }

/* ---- editor Monaco (FileEditorDialog): altura explícita para que no se monte en 0px ---- */
.asx-monaco-editor { height: 68vh; width: 100%; border: 1px solid #d4d4d4; }

/* ---- carpeta resaltada como zona de drop al arrastrar (drag & drop) ---- */
.iis-drop-hover { background: #e5f3ff; outline: 1px dashed #5a9bd4; border-radius: 2px; }

/* ---- layout en blanco (login / MFA) ---- */
.iis-blank { min-height: 100vh; background: #f3f3f3; }
