/* ==========================================================================
   VM Ingenieros · Personalización de marca, idioma y Manual Interactivo
   Portal administrativo: https://soporte.vmingenieros.pe/_admin/
   ========================================================================== */

/* ---------- 1. Pantalla de Login (#/login) ---------- */
.login-container {
    background: linear-gradient(145deg, #0b1526 0%, #0f2537 55%, #0c2e36 100%) !important;
    padding: 24px !important;
}

.login-card {
    width: 400px !important;
    max-width: 100% !important;
    background: #ffffff !important;
    padding: 36px 34px 28px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: 0 24px 50px rgba(2, 8, 23, 0.38) !important;
    text-align: left !important;
}

.login-card img.login-logo {
    width: auto !important;
    max-width: 220px !important;
    height: 46px !important;
    object-fit: contain !important;
    margin: 0 auto 10px !important;
    display: block !important;
}

.vm-adm-login-sub {
    text-align: center;
    margin: 0 0 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.vm-adm-login-title {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.vm-adm-login-desc {
    margin: 0;
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.4;
}

.login-card .login-form {
    margin-bottom: 12px !important;
}

.login-card .el-form-item__label {
    color: #334155 !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
    margin-bottom: 6px !important;
}

.login-card .el-input__wrapper {
    background-color: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    min-height: 42px;
    padding: 0 12px !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.login-card .el-input__wrapper:focus-within,
.login-card .el-input__wrapper.is-focus {
    border-color: #0d9488 !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.14) !important;
}

.login-card .el-input input {
    color: #0f172a !important;
    font-size: 14px !important;
}

.login-card .el-input input:-webkit-autofill,
.login-card .el-input input:-webkit-autofill:hover,
.login-card .el-input input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #f8fafc inset !important;
    -webkit-text-fill-color: #0f172a !important;
    transition: background-color 5000s ease-in-out 0s;
}

.login-card .el-input__suffix,
.login-card .el-input__icon {
    color: #64748b !important;
}

.login-card .login-button.el-button--primary {
    width: 100% !important;
    height: 42px !important;
    margin: 6px 0 10px !important;
    background: #0d9488 !important;
    border-color: #0d9488 !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.22);
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.login-card .login-button.el-button--primary:hover {
    background: #0f766e !important;
    border-color: #0f766e !important;
}

.login-card .login-button.el-button--primary:active {
    transform: translateY(1px);
}

.login-card .divider {
    color: #64748b !important;
    font-size: 12.5px !important;
}

.vm-adm-login-foot {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: center;
}

.vm-adm-login-help-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #f0fdfa;
    color: #0f766e;
    border: 1px solid #ccfbf1;
    border-radius: 9px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.vm-adm-login-help-btn:hover {
    background: #ccfbf1;
    border-color: #99f6e4;
}

/* ---------- 2. Cabecera y barra lateral interna ---------- */
.app-header {
    background-color: #1e293b !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    height: 54px !important;
    align-items: center;
}

.header-logo {
    display: flex;
    align-items: center;
    height: 100%;
}

.header-logo img.logo {
    width: auto !important;
    height: 28px !important;
    max-width: 150px !important;
    object-fit: contain !important;
    background: #ffffff;
    padding: 4px 10px;
    border-radius: 7px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.header-logo .title {
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: #e2e8f0 !important;
    margin-left: 10px !important;
    letter-spacing: -0.01em;
}

[data-vm-lang-hidden="1"] {
    display: none !important;
}

.vm-adm-help-btn {
    background: rgba(20, 184, 166, 0.16);
    color: #5eead4;
    border: 1px solid rgba(94, 234, 212, 0.35);
    border-radius: 8px;
    padding: 5px 11px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    line-height: 1.2;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.vm-adm-help-btn:hover {
    background: rgba(20, 184, 166, 0.28);
    border-color: rgba(94, 234, 212, 0.6);
    color: #99f6e4;
}

.scroll-sidebar,
.menus {
    background-color: #0f172a !important;
}

.menus .el-menu-item,
.menus .el-sub-menu__title {
    color: #cbd5e1 !important;
}

.menus .el-menu-item:hover,
.menus .el-sub-menu__title:hover {
    background-color: rgba(255, 255, 255, 0.06) !important;
    color: #f8fafc !important;
}

.menus .el-menu-item.is-active {
    background-color: rgba(13, 148, 136, 0.16) !important;
    color: #2dd4bf !important;
    font-weight: 600;
}

/* ---------- 3. Tarjeta de bienvenida flotante ---------- */
.vm-adm-welcome {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 99990;
    width: 330px;
    max-width: calc(100vw - 32px);
    background: #ffffff;
    color: #0f172a;
    border-radius: 14px;
    padding: 16px 18px;
    border: 1px solid #99f6e4;
    box-shadow: 0 18px 40px rgba(2, 8, 23, 0.22);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.vm-adm-welcome-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #0f766e;
    background: #f0fdfa;
    border: 1px solid #ccfbf1;
    border-radius: 999px;
    padding: 2px 8px;
    margin-bottom: 8px;
}

.vm-adm-welcome h4 {
    margin: 0 0 6px;
    font-size: 14.5px;
    font-weight: 700;
    color: #0f172a;
}

.vm-adm-welcome p {
    margin: 0 0 14px;
    font-size: 12.5px;
    line-height: 1.45;
    color: #475569;
}

.vm-adm-welcome-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

html.dark .vm-adm-welcome {
    background: #1e293b;
    color: #f1f5f9;
    border-color: rgba(45, 212, 191, 0.35);
}

html.dark .vm-adm-welcome h4 {
    color: #f8fafc;
}

html.dark .vm-adm-welcome p {
    color: #94a3b8;
}

html.dark .vm-adm-welcome-badge {
    background: rgba(20, 184, 166, 0.16);
    color: #5eead4;
    border-color: rgba(45, 212, 191, 0.3);
}

/* ---------- 4. Spotlight Tour en vivo ---------- */
.vm-tour-layer {
    position: fixed;
    inset: 0;
    z-index: 100000;
    pointer-events: none;
}

.vm-tour-blocker {
    position: fixed;
    inset: 0;
    z-index: 100000;
    pointer-events: auto;
    background: transparent;
}

.vm-tour-ring {
    position: fixed;
    z-index: 100001;
    border-radius: 10px;
    border: 2px solid #14b8a6;
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.62), 0 0 0 5px rgba(20, 184, 166, 0.24);
    pointer-events: none;
    transition: top 0.24s cubic-bezier(0.22, 1, 0.36, 1),
                left 0.24s cubic-bezier(0.22, 1, 0.36, 1),
                width 0.24s cubic-bezier(0.22, 1, 0.36, 1),
                height 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.vm-tour-card {
    position: fixed;
    z-index: 100002;
    width: 350px;
    max-width: calc(100vw - 24px);
    background: #ffffff;
    color: #0f172a;
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 20px 45px rgba(2, 8, 23, 0.35);
    border: 1px solid #e2e8f0;
    pointer-events: auto;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.vm-tour-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.vm-tour-step-lbl {
    font-size: 11.5px;
    font-weight: 700;
    color: #0f766e;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.vm-tour-dots {
    display: flex;
    align-items: center;
    gap: 5px;
}

.vm-tour-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: width 0.2s ease, background-color 0.2s ease;
}

.vm-tour-dot.is-active {
    width: 16px;
    background: #0d9488;
}

.vm-tour-card h4 {
    margin: 0 0 6px;
    font-size: 15.5px;
    font-weight: 700;
    color: #0f172a;
}

.vm-tour-card p {
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.5;
    color: #475569;
}

.vm-tour-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.vm-tour-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

html.dark .vm-tour-card {
    background: #1e293b;
    color: #f1f5f9;
    border-color: #334155;
}

html.dark .vm-tour-card h4 {
    color: #f8fafc;
}

html.dark .vm-tour-card p {
    color: #cbd5e1;
}

html.dark .vm-tour-step-lbl {
    color: #5eead4;
}

html.dark .vm-tour-dot {
    background: #475569;
}

html.dark .vm-tour-dot.is-active {
    background: #14b8a6;
}

/* ---------- 5. Modal del Manual Interactivo ---------- */
.vm-manual-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100010;
    background: rgba(15, 23, 42, 0.62);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.vm-manual-modal {
    width: 100%;
    max-width: 780px;
    max-height: 88vh;
    background: #ffffff;
    color: #0f172a;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 24px 60px rgba(2, 8, 23, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.vm-manual-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 22px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.vm-manual-head-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.vm-manual-pill {
    font-size: 11px;
    font-weight: 700;
    color: #0f766e;
    background: #ccfbf1;
    padding: 3px 8px;
    border-radius: 6px;
    flex-shrink: 0;
}

.vm-manual-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.vm-manual-head-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.vm-manual-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.vm-manual-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.vm-manual-tabs {
    display: flex;
    gap: 6px;
    padding: 10px 22px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    overflow-x: auto;
}

.vm-manual-tab {
    border: 1px solid transparent;
    background: transparent;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 12px;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.vm-manual-tab:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.vm-manual-tab.is-active {
    background: #f0fdfa;
    color: #0f766e;
    border-color: #99f6e4;
}

.vm-manual-body {
    padding: 20px 22px;
    overflow-y: auto;
    flex: 1 1 auto;
}

.vm-manual-lead {
    margin: 0 0 16px;
    font-size: 13.5px;
    color: #475569;
    line-height: 1.5;
}

/* Simulador 1-2-3 */
.vm-sim-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.vm-sim-btn {
    text-align: left;
    padding: 12px 13px;
    border-radius: 11px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.vm-sim-btn:hover {
    border-color: #94a3b8;
}

.vm-sim-btn.is-active {
    background: #f0fdfa;
    border-color: #0d9488;
    box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.12);
}

.vm-sim-num {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #0f766e;
    margin-bottom: 4px;
}

.vm-sim-lbl {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.vm-sim-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px;
}

.vm-sim-panel h5 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.vm-sim-panel p {
    margin: 0 0 10px;
    font-size: 13.5px;
    line-height: 1.55;
    color: #334155;
}

.vm-sim-tip {
    background: #ffffff;
    border-left: 3px solid #0d9488;
    padding: 9px 12px;
    border-radius: 0 8px 8px 0;
    font-size: 12.5px;
    color: #475569;
}

/* Checklist PC */
.vm-chk-bar-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.vm-chk-track {
    flex: 1 1 auto;
    height: 7px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.vm-chk-fill {
    height: 100%;
    background: #0d9488;
    border-radius: 999px;
    transition: width 0.2s ease;
}

.vm-chk-pct {
    font-size: 12px;
    font-weight: 700;
    color: #0f766e;
}

.vm-chk-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vm-chk-item {
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    padding: 12px 14px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vm-chk-item.is-done {
    background: #f8fafc;
    border-color: #ccfbf1;
}

.vm-chk-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.vm-chk-row input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    accent-color: #0d9488;
    cursor: pointer;
}

.vm-chk-title {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
}

.vm-chk-desc {
    display: block;
    font-size: 12.5px;
    color: #64748b;
    margin-top: 2px;
    line-height: 1.45;
}

.vm-chk-codebox {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-left: 26px;
}

.vm-chk-code {
    flex: 1 1 260px;
    background: #0f172a;
    color: #e2e8f0;
    padding: 8px 11px;
    border-radius: 8px;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 12px;
    word-break: break-all;
}

/* Grilla de secciones */
.vm-sec-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.vm-sec-card {
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    padding: 13px 14px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
}

.vm-sec-card h5 {
    margin: 0 0 4px;
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
}

.vm-sec-card p {
    margin: 0;
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.45;
}

/* Acordeón FAQ */
.vm-faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vm-faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
}

.vm-faq-q {
    width: 100%;
    text-align: left;
    background: #f8fafc;
    border: none;
    padding: 11px 14px;
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-family: inherit;
}

.vm-faq-a {
    padding: 11px 14px;
    font-size: 13px;
    line-height: 1.5;
    color: #475569;
    border-top: 1px solid #e2e8f0;
}

/* Botones reutilizables VM */
.vm-btn {
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    line-height: 1.25;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.vm-btn--primary {
    background: #0d9488;
    border-color: #0d9488;
    color: #ffffff;
}

.vm-btn--primary:hover {
    background: #0f766e;
    border-color: #0f766e;
    color: #ffffff;
}

.vm-btn--ghost {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #334155;
}

.vm-btn--ghost:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.vm-btn--sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* Modo oscuro del modal */
html.dark .vm-manual-modal {
    background: #1e293b;
    color: #f1f5f9;
    border-color: #334155;
}

html.dark .vm-manual-head,
html.dark .vm-manual-tabs,
html.dark .vm-sim-panel,
html.dark .vm-chk-item,
html.dark .vm-sec-card,
html.dark .vm-faq-item,
html.dark .vm-faq-q {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

html.dark .vm-manual-title,
html.dark .vm-sim-lbl,
html.dark .vm-sim-panel h5,
html.dark .vm-chk-title,
html.dark .vm-sec-card h5 {
    color: #f8fafc;
}

html.dark .vm-manual-lead,
html.dark .vm-sim-panel p,
html.dark .vm-chk-desc,
html.dark .vm-sec-card p,
html.dark .vm-faq-a {
    color: #cbd5e1;
}

html.dark .vm-sim-btn {
    background: #0f172a;
    border-color: #334155;
}

html.dark .vm-sim-btn.is-active,
html.dark .vm-manual-tab.is-active {
    background: rgba(20, 184, 166, 0.16);
    border-color: #14b8a6;
    color: #5eead4;
}

html.dark .vm-sim-tip {
    background: #1e293b;
    color: #cbd5e1;
}

html.dark .vm-btn--ghost,
html.dark .vm-manual-close {
    background: #1e293b;
    border-color: #475569;
    color: #e2e8f0;
}

html.dark .vm-faq-a {
    border-top-color: #334155;
}

@media (max-width: 640px) {
    .vm-sim-steps,
    .vm-sec-grid {
        grid-template-columns: 1fr;
    }

    .vm-manual-head {
        flex-wrap: wrap;
    }
}
