.wm-portal-page,
.wm-staff-page {
    padding: 40px 0;
}

.wm-portal-section {
    margin-top: 40px;
}

.wm-modules-grid,
.wm-staff-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.wm-module-card,
.wm-staff-card,
.wm-login-error,
.wm-portal-message {
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 14px;
    background: #fff;
}

.wm-module-card h3,
.wm-staff-card h3 {
    margin-top: 0;
}

/* =========================
   FORMULARIOS PROPIOS WM
   ========================= */

.wm-login-form,
.wm-staff-form {
    max-width: 700px;
    display: grid;
    gap: 16px;
}

.wm-login-form div,
.wm-staff-form div,
.wm-login-form p,
.wm-staff-form p,
.wm-staff-form fieldset {
    margin: 0;
}

.wm-login-form label,
.wm-staff-form label,
.wm-staff-form legend {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #111 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.wm-login-form input,
.wm-staff-form input,
.wm-login-form textarea,
.wm-staff-form textarea,
.wm-login-form select,
.wm-staff-form select {
    width: 100% !important;
    height: auto !important;
    min-height: 48px;
    padding: 12px 14px !important;
    background: #fff !important;
    color: #111 !important;
    border: 1px solid #ccc !important;
    border-radius: 10px !important;
    box-sizing: border-box;
    font-family: inherit !important;
    font-size: 16px !important;
    line-height: 1.4 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    appearance: none;
    -webkit-appearance: none;
}

.wm-login-form input:focus,
.wm-staff-form input:focus,
.wm-login-form textarea:focus,
.wm-staff-form textarea:focus,
.wm-login-form select:focus,
.wm-staff-form select:focus {
    outline: none;
    border-color: #7165DA !important;
    box-shadow: 0 0 0 3px rgba(113, 101, 218, 0.15);
}

.wm-login-form button,
.wm-staff-form button {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    background: #111 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.wm-staff-form fieldset {
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 16px;
    background: #fff;
}

.wm-staff-form fieldset label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    cursor: pointer;
}

.wm-staff-form input[type="checkbox"] {
    width: 18px !important;
    min-height: 18px !important;
    height: 18px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 4px !important;
    flex: 0 0 18px;
}

.wm-login-form input::placeholder,
.wm-staff-form input::placeholder,
.wm-login-form textarea::placeholder,
.wm-staff-form textarea::placeholder {
    color: #666 !important;
    text-transform: none !important;
}

/* FORZAR VISIBILIDAD EN STAFF */

.wm-staff-page button,
.wm-staff-page form,
.wm-staff-page input,
.wm-staff-page select {
    pointer-events: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 9999 !important;
    position: relative;
}

/* Botones visibles */
.wm-staff-page button {
    background: #111 !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
}

/* Evitar overlays del theme */
.wm-staff-page *::before,
.wm-staff-page *::after {
    pointer-events: none !important;
}

.wm-whatsapp-button {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #25D366;
    color: #fff !important;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wm-whatsapp-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.wm-whatsapp-button i {
    font-size: 28px;
    line-height: 1;
}

.wm-chatbot {
    position: fixed;
    right: 20px;
    bottom: 90px;
    z-index: 9999;
}

.wm-chatbot-toggle {
    width: 58px;
    height: 58px;
    border: none;
    border-radius: 50%;
    background: #111;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
}

.wm-chatbot-toggle i {
    font-size: 24px;
}

.wm-chatbot-window {
    position: absolute;
    right: 0;
    bottom: 70px;
    width: 320px;
    max-width: calc(100vw - 40px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    border: 1px solid #ddd;
}

.wm-chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #111;
    color: #fff;
}

.wm-chatbot-header button {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.wm-chatbot-messages {
    height: 300px;
    overflow-y: auto;
    padding: 14px;
    background: #f8f8f8;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wm-chatbot-message {
    max-width: 85%;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.wm-chatbot-bot {
    align-self: flex-start;
    background: #eaeaea;
    color: #111;
}

.wm-chatbot-user {
    align-self: flex-end;
    background: #111;
    color: #fff;
}

.wm-chatbot-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #eee;
    background: #fff;
}

.wm-chatbot-form input {
    flex: 1;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background: #fff !important;
    color: #111 !important;
}

.wm-chatbot-form button {
    padding: 10px 14px;
    border: none;
    border-radius: 10px;
    background: #111;
    color: #fff;
    cursor: pointer;
}

.wm-logout-form {
    margin-top: 20px;
}

.wm-logout-form button {
    padding: 10px 14px;
    border: none;
    border-radius: 10px;
    background: #111;
    color: #fff;
    cursor: pointer;
}