@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #e6eef8;
    --text-color: #3e4a5b;
    --text-muted: #718096;
    --shadow-dark: #b8c6d9;
    --shadow-light: #ffffff;
    --primary-color: #4a90e2;
    --primary-light: #70a9eb;
    --success-color: #4caf50;
    --error-color: #f44336;
    
    --card-shadow: 10px 10px 20px var(--shadow-dark), -10px -10px 20px var(--shadow-light);
    --card-shadow-hover: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
    --inner-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    --btn-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
    --btn-shadow-active: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-x: hidden;
}

/* App Layout & Shell */
header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--text-color);
}

main#app {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 1.5rem 2rem;
    width: 100%;
}

footer {
    padding: 0;
    width: 100%;
}

/* Totalsoftware Official Footer */
footer.ts-footer {
    background-color: #17212b;
    color: #94a3b8;
    padding: 1.5rem 1.5rem 1.25rem 1.5rem;
    width: 100%;
    margin-top: auto;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    box-sizing: border-box;
}

.ts-footer-container {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.ts-footer-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 1.25rem;
}

.ts-footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.ts-footer-brand {
    display: flex;
    align-items: center;
}

.ts-footer-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.ts-footer-socials {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.ts-social-link {
    color: #94a3b8;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.ts-social-link:hover {
    color: #ffffff;
    transform: translateY(-2px);
}

.ts-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #64748b;
}

.ts-footer-copyright {
    color: #64748b;
}

.ts-footer-legal a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ts-footer-legal a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.ts-contact-link {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    transition: color 0.2s ease;
    cursor: pointer;
}

.ts-contact-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

@media (max-width: 640px) {
    .ts-footer-top, .ts-footer-bottom {
        flex-direction: column;
        gap: 0.85rem;
        text-align: center;
    }
    .ts-footer-socials {
        justify-content: center;
    }
}

/* Neumorphic Elements */
.nm-card {
    background: var(--bg-color);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    padding: 2.5rem;
    width: 100%;
    max-width: 480px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.nm-card-large {
    max-width: 1000px;
}

/* Typography */
h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
}

h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-color);
    padding-left: 0.5rem;
}

.nm-input {
    background: var(--bg-color);
    border: none;
    outline: none;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    box-shadow: var(--inner-shadow);
    font-size: 1rem;
    color: var(--text-color);
    transition: all 0.3s ease;
    width: 100%;
}

.nm-input::placeholder,
.nm-textarea::placeholder,
input::placeholder,
textarea::placeholder {
    color: #94a3b8 !important;
    opacity: 0.55 !important;
    font-weight: 400 !important;
}

::-webkit-input-placeholder {
    color: #94a3b8 !important;
    opacity: 0.55 !important;
    font-weight: 400 !important;
}

::-moz-placeholder {
    color: #94a3b8 !important;
    opacity: 0.55 !important;
    font-weight: 400 !important;
}

:-ms-input-placeholder {
    color: #94a3b8 !important;
    opacity: 0.55 !important;
    font-weight: 400 !important;
}

.nm-input:focus {
    box-shadow: inset 6px 6px 12px var(--shadow-dark), inset -6px -6px 12px var(--shadow-light);
    border: 1px solid rgba(74, 144, 226, 0.2);
}

.nm-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%233e4a5b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
}

/* Buttons */
.nm-btn {
    border: none;
    outline: none;
    background: var(--bg-color);
    color: var(--text-color);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--btn-shadow);
    transition: all 0.2s ease;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.nm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
}

.nm-btn:active {
    transform: translateY(1px);
    box-shadow: var(--btn-shadow-active);
}

.nm-btn-primary {
    background: linear-gradient(145deg, #4f9aff, #4382cb);
    color: white;
}

.nm-btn-primary:hover {
    background: linear-gradient(145deg, #5aa4ff, #478bd9);
    box-shadow: 5px 5px 12px var(--shadow-dark), -5px -5px 12px var(--shadow-light);
}

.nm-btn-primary:active {
    box-shadow: inset 4px 4px 8px #2b5687, inset -4px -4px 8px #5ba2eb;
}

.btn-full {
    width: 100%;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    box-shadow: var(--inner-shadow);
    display: none;
}

.alert-success {
    background-color: rgba(76, 175, 80, 0.1);
    color: #2e7d32;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.alert-error {
    background-color: rgba(244, 67, 54, 0.1);
    color: #c62828;
    border: 1px solid rgba(244, 67, 54, 0.2);
}

.alert-info {
    background-color: rgba(74, 144, 226, 0.1);
    color: #1565c0;
    border: 1px solid rgba(74, 144, 226, 0.2);
}

/* Link Actions */
.link-action {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
}

.link-action:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.form-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Modal Overlay Blur */
.modal-overlay {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    padding: 2rem 1rem;
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
    z-index: 10000;
}

/* Mobile Bottom Navigation Bar Styles */
.mobile-nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--bg-color);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.08), inset 1px 1px 2px rgba(255, 255, 255, 0.8);
    display: none; /* Controlled by JS and Media Query */
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    padding: 0 1rem;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    flex: 1;
    height: 100%;
}

.mobile-nav-icon {
    font-size: 1.35rem;
    margin-bottom: 2px;
}

.mobile-nav-item span:last-child {
    font-size: 0.75rem;
}

.mobile-nav-item:hover, .mobile-nav-item.active {
    color: var(--primary-color);
}

.mobile-nav-item.active .mobile-nav-icon {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Hide on desktop, override inline JS display if desktop width */
@media (min-width: 901px) {
    .mobile-nav-bar {
        display: none !important;
    }
}

@media (max-width: 900px) {
    body {
        padding-bottom: 90px !important; /* Leave bottom buffer so layout isn't overlapped by the bar */
    }
    main#app {
        padding: 1rem 0.75rem !important;
    }
}

/* ===================================================
   TABS SYSTEM
   =================================================== */
.nm-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

/* Unified Tabs Dashboard Panel */
.nm-tabs-panel {
    background: rgba(0, 0, 0, 0.02);
    box-shadow: var(--inner-shadow);
    padding: 0.45rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 1.25rem;
}

/* Row 1 flex stretching (single line) */
#consultation-tabs {
    display: flex;
    width: 100%;
    gap: 0.45rem;
    flex-wrap: nowrap;
}

#consultation-tabs .nm-tab {
    flex: 1 1 0%;
    padding: 0.65rem 0.4rem;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 14px;
}

/* Row 2 flex stretching */
#consultation-tabs-row2 {
    display: flex;
    width: 100%;
    gap: 0.45rem;
    flex-wrap: nowrap;
}
#consultation-tabs-row2 .nm-tab {
    flex: 1 1 0%;
    padding: 0.65rem 0.5rem;
    font-size: 0.88rem;
    border-radius: 14px;
}

/* All buttons in the panel share the same design */
.nm-tabs-panel .nm-tab {
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--btn-shadow);
    padding: 0.65rem 0.75rem;
    border-radius: 14px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.88rem;
    text-align: center;
    outline: none;
}

.nm-tabs-panel .nm-tab:hover {
    box-shadow: var(--inner-shadow);
    color: var(--primary-color);
}

.nm-tabs-panel .nm-tab.active {
    background: var(--bg-color);
    box-shadow: var(--inner-shadow);
    color: var(--primary-color);
    border-color: rgba(74, 144, 226, 0.15);
}

.nm-tab {
    padding: 0.75rem 1.25rem;
    border-radius: 16px;
    background: var(--bg-color);
    box-shadow: var(--btn-shadow);
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 0.95rem;
    text-align: center;
    outline: none;
}

.nm-tab:hover {
    box-shadow: var(--inner-shadow);
    color: var(--primary-color);
}

.nm-tab.active {
    box-shadow: var(--inner-shadow);
    color: var(--primary-color);
    background: var(--bg-color);
    border-color: rgba(74, 144, 226, 0.15);
}

.nm-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.nm-tab-content.active {
    display: flex;
    flex-direction: column;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===================================================
   ACCORDION SYSTEM
   =================================================== */
.nm-accordion {
    margin-bottom: 1rem;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-color);
    box-shadow: var(--btn-shadow);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.nm-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
    transition: all 0.2s ease;
    user-select: none;
}

.nm-accordion-header:hover {
    color: var(--primary-color);
}

.nm-accordion-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.nm-accordion.open .nm-accordion-arrow {
    transform: rotate(180deg);
}

.nm-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 1.5rem;
}

.nm-accordion.open .nm-accordion-body {
    max-height: 2000px;
    padding: 0 1.5rem 1.5rem;
}

/* ===================================================
   NEUMORPHIC CHECKBOXES
   =================================================== */
.nm-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.nm-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    font-size: 0.9rem;
    color: var(--text-color);
}

.nm-checkbox-item:hover {
    background: rgba(74, 144, 226, 0.04);
}

.nm-checkbox-box {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--bg-color);
    box-shadow: var(--inner-shadow);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    font-size: 0.75rem;
}

.nm-checkbox-item.checked .nm-checkbox-box {
    background: linear-gradient(145deg, #4f9aff, #4382cb);
    box-shadow: inset 2px 2px 4px #2b5687, inset -2px -2px 4px #5ba2eb;
    color: white;
}

.nm-checkbox-item input[type="checkbox"] {
    display: none;
}

/* Others textarea inside accordions */
.nm-others-group {
    margin-top: 0.75rem;
}

.nm-others-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    display: block;
}

.nm-textarea {
    background: var(--bg-color);
    border: none;
    outline: none;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    box-shadow: var(--inner-shadow);
    font-size: 0.9rem;
    font-family: 'Outfit', sans-serif;
    color: var(--text-color);
    width: 100%;
    min-height: 70px;
    resize: vertical;
    transition: all 0.3s ease;
}

.nm-textarea:focus {
    box-shadow: inset 6px 6px 12px var(--shadow-dark), inset -6px -6px 12px var(--shadow-light);
}

/* ===================================================
   TOOLBAR (Floating Action Bar - Always Visible)
   =================================================== */
.nm-toolbar {
    position: sticky;
    bottom: 20px;
    z-index: 990;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.5rem;
    margin-top: 1.5rem;
    background: var(--bg-color);
    border-radius: 24px;
    box-shadow: 10px 10px 25px var(--shadow-dark), -10px -10px 25px var(--shadow-light);
    border: 1px solid rgba(255, 255, 255, 0.6);
    flex-wrap: wrap;
    transition: all 0.3s ease;
}

@media (max-width: 900px) {
    .nm-toolbar {
        position: fixed !important;
        bottom: 75px !important;
        left: 12px !important;
        right: 12px !important;
        justify-content: space-around !important;
        padding: 0.65rem 0.85rem !important;
        margin-top: 0 !important;
        z-index: 999 !important;
    }
}

.nm-btn-sm {
    padding: 0.7rem 1.25rem;
    font-size: 0.9rem;
    border-radius: 10px;
}

.nm-btn-success {
    background: linear-gradient(145deg, #56c45a, #43a047);
    color: white;
}

.nm-btn-success:hover {
    background: linear-gradient(145deg, #66d46a, #4caf50);
    box-shadow: 5px 5px 12px var(--shadow-dark), -5px -5px 12px var(--shadow-light);
}

.nm-btn-success:active {
    box-shadow: inset 4px 4px 8px #2e7d32, inset -4px -4px 8px #66bb6a;
}

.nm-btn-danger {
    background: linear-gradient(145deg, #f55a4e, #d43427);
    color: white;
}

.nm-btn-danger:hover {
    background: linear-gradient(145deg, #f76d63, #e53935);
}

/* ===================================================
   CHAT / INTERNAL MESSAGING SYSTEM (NEUMORPHIC)
   =================================================== */
.nm-chat-trigger {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-color);
    box-shadow: var(--btn-shadow);
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.6rem;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.25s ease;
    user-select: none;
}

.nm-chat-trigger:hover {
    transform: scale(1.05);
    box-shadow: var(--inner-shadow);
}

.nm-chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff8a80; /* coral color pastel */
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.1), inset 1px 1px 2px rgba(255,255,255,0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 0 4px;
}

.nm-chat-widget {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 360px;
    max-height: 520px;
    background: var(--bg-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15), var(--btn-shadow);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
    z-index: 1001;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Mobile positioning adjustments so chat trigger floats cleanly above mobile nav bar */
@media (max-width: 900px) {
    .nm-chat-trigger {
        bottom: 85px !important;
        right: 16px !important;
        width: 52px !important;
        height: 52px !important;
        font-size: 1.35rem !important;
        z-index: 1001 !important;
    }

    .nm-chat-widget {
        bottom: 145px !important;
        right: 12px !important;
        left: 12px !important;
        width: auto !important;
        max-width: calc(100vw - 24px) !important;
        max-height: calc(100vh - 160px) !important;
        z-index: 1002 !important;
    }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.nm-chat-view {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.nm-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    background: rgba(255, 255, 255, 0.2);
}

.nm-chat-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
}

.nm-chat-close {
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s ease;
}
.nm-chat-close:hover {
    color: var(--primary-color);
}

.nm-chat-back-btn {
    cursor: pointer;
    font-size: 1.2rem;
    padding-right: 0.5rem;
    transition: transform 0.2s ease;
}
.nm-chat-back-btn:hover {
    transform: translateX(-3px);
}

.nm-inset-container {
    flex: 1;
    background: var(--bg-color);
    box-shadow: var(--inner-shadow);
    margin: 1rem;
    border-radius: 16px;
    overflow-y: auto;
    padding: 0.75rem;
}

/* Contacts layout */
.nm-chat-contact-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: var(--bg-color);
    box-shadow: var(--btn-shadow);
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,0.4);
}

.nm-chat-contact-item:hover {
    box-shadow: var(--inner-shadow);
    transform: translateY(1px);
}

.nm-chat-contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.nm-chat-contact-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
}

.nm-chat-contact-status {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.nm-chat-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.nm-chat-status-dot.online {
    background: #4db6ac; /* soft green */
    box-shadow: 0 0 4px #4db6ac;
}
.nm-chat-status-dot.offline {
    background: #b0bec5; /* grey */
}

.nm-chat-contact-unread {
    background: #ff8a80;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
}

/* Messages bubbles layout */
.nm-chat-msg-row {
    display: flex;
    width: 100%;
    margin-bottom: 0.75rem;
}
.nm-chat-msg-row.sent {
    justify-content: flex-end;
}
.nm-chat-msg-row.received {
    justify-content: flex-start;
}

.nm-chat-bubble {
    max-width: 75%;
    padding: 0.65rem 0.9rem;
    border-radius: 16px;
    font-size: 0.88rem;
    line-height: 1.35;
    position: relative;
    border: 1px solid rgba(255,255,255,0.4);
}

.nm-chat-msg-row.sent .nm-chat-bubble {
    background: #e1f5fe; /* Soft blue/grey */
    color: #0277bd;
    box-shadow: var(--btn-shadow);
    border-bottom-right-radius: 4px;
}

.nm-chat-msg-row.received .nm-chat-bubble {
    background: #ffffff; /* pure white */
    color: var(--text-color);
    box-shadow: var(--btn-shadow);
    border-bottom-left-radius: 4px;
}

.nm-chat-bubble-time {
    display: block;
    font-size: 0.65rem;
    margin-top: 0.25rem;
    text-align: right;
    opacity: 0.7;
}

/* Input area styling */
.nm-chat-input-bar {
    display: flex;
    padding: 0.75rem 1rem 1rem 1rem;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    align-items: center;
}

.nm-chat-input {
    flex: 1;
    border: none;
    outline: none;
    background: var(--bg-color);
    box-shadow: var(--inner-shadow);
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-color);
}

.nm-chat-send-btn {
    width: 38px;
    height: 38px;
    border: none;
    outline: none;
    border-radius: 50%;
    background: var(--bg-color);
    box-shadow: var(--btn-shadow);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,0.4);
}
.nm-chat-send-btn:hover {
    box-shadow: var(--inner-shadow);
    transform: scale(1.05);
}

/* ===================================================
   QUILL & REPORT EDITOR RESPONSIVE LAYOUT
   =================================================== */
#tab-informes {
    width: 100%;
    box-sizing: border-box;
}

#report-editor-container {
    width: 100%;
    box-sizing: border-box;
}

#report-quill-editor-wrapper {
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

#report-quill-editor-wrapper .ql-toolbar.ql-snow {
    border: none;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

#report-quill-editor-wrapper .ql-container.ql-snow {
    border: none;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    width: 100%;
    box-sizing: border-box;
}

#report-quill-editor-wrapper .ql-editor {
    font-size: 0.98rem;
    line-height: 1.6;
    min-height: 280px;
    box-sizing: border-box;
    color: #1e293b;
}

#report-preview-paper {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Fullscreen Maximized Mode for Report Template Editor */
#report-editor-container.report-editor-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    z-index: 999999 !important;
    border-radius: 0 !important;
    border: none !important;
    padding: 1.25rem 2rem !important;
    margin: 0 !important;
    overflow-y: auto !important;
    background: #f1f5f9 !important;
    box-shadow: none !important;
}

#report-editor-container.report-editor-fullscreen #report-quill-editor-wrapper {
    min-height: calc(100vh - 260px) !important;
}

#report-editor-container.report-editor-fullscreen #report-quill-editor {
    height: calc(100vh - 320px) !important;
}

#report-editor-container.report-editor-fullscreen #report-floating-vars-panel {
    z-index: 1000000 !important;
}

/* =========================================================
   VIRTUAL ASSISTANT & ONBOARDING HELP CENTER STYLES
   ========================================================= */

/* Fixed Centered Overlay for Help Center Modal */
#modal-help-center.xhm-help-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.55) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    z-index: 999999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

/* Floating Help Button */
.xhm-help-floating-btn {
    position: fixed;
    bottom: 24px;
    right: 96px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.1rem;
    background: linear-gradient(135deg, #ffffff, #f1f5f9);
    border: 2px solid var(--primary-color);
    border-radius: 30px;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25), var(--shadow);
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s, right 0.25s, bottom 0.25s;
    user-select: none;
}

@media (max-width: 900px) {
    .xhm-help-floating-btn {
        bottom: 85px !important;
        right: 76px !important;
        padding: 0.6rem 0.85rem !important;
        z-index: 1001 !important;
    }
    
    .xhm-help-floating-label {
        display: none !important;
    }
}

.xhm-help-floating-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

.xhm-help-floating-icon {
    font-size: 1.35rem;
}

.xhm-help-floating-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
}

.xhm-help-badge-pulse {
    width: 9px;
    height: 9px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: xhmPulse 1.8s infinite;
}

@keyframes xhmPulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Driver.js Neumorphic Popover Customizations */
.driver-popover.xhm-driver-popover {
    background: #ffffff !important;
    border-radius: 18px !important;
    border: 2px solid var(--primary-color) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22) !important;
    color: #1e293b !important;
    padding: 1.25rem !important;
    font-family: inherit !important;
    max-width: 380px !important;
}

.driver-popover.xhm-driver-popover .driver-popover-title {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: var(--primary-color) !important;
    margin-bottom: 0.5rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
}

.driver-popover.xhm-driver-popover .driver-popover-description {
    font-size: 0.88rem !important;
    line-height: 1.5 !important;
    color: #334155 !important;
    margin-bottom: 1rem !important;
}

.driver-popover.xhm-driver-popover .driver-popover-footer {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 0.8rem !important;
}

.driver-popover.xhm-driver-popover .driver-popover-btn {
    border-radius: 10px !important;
    font-weight: 700 !important;
    font-size: 0.8rem !important;
    padding: 0.4rem 0.9rem !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    text-shadow: none !important;
}

.driver-popover.xhm-driver-popover .driver-popover-next-btn {
    background: var(--primary-color) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
}

.driver-popover.xhm-driver-popover .driver-popover-prev-btn {
    background: rgba(0, 0, 0, 0.06) !important;
    color: #475569 !important;
}

.driver-popover.xhm-driver-popover .driver-popover-close-btn {
    background: transparent !important;
    color: #94a3b8 !important;
}

/* Help Center Guide Cards */
.xhm-guide-card {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: var(--shadow);
}

.xhm-guide-num {
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.3);
}

/* FAQ Accordion */
.xhm-faq-item {
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: background 0.2s;
}

.xhm-faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-color);
    cursor: pointer;
    user-select: none;
}

.xhm-faq-question:hover {
    background: rgba(59, 130, 246, 0.05);
}

.xhm-faq-arrow {
    transition: transform 0.25s ease;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.xhm-faq-item.active .xhm-faq-arrow {
    transform: rotate(180deg);
}

.xhm-faq-answer {
    display: none;
    padding: 0 1rem 0.85rem 1rem;
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.5;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.xhm-faq-item.active .xhm-faq-answer {
    display: block;
}



