nav{
    background-color: black;
}

/*
estilos para el login
*/

.bodyLogin {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}
body{
    background-color: #333333;
}
.mainLogin {
    flex: 1 0 auto;
}

.input-field input[type=date]:focus + label,
.input-field input[type=text]:focus + label,
.input-field input[type=email]:focus + label,
.input-field input[type=password]:focus + label {
    color: #31bb67!important;
}

.input-field input[type=date]:focus,
.input-field input[type=text]:focus,
.input-field input[type=email]:focus,
.input-field input[type=password]:focus {
  border-bottom: 2px solid #31bb67!important;
  box-shadow: none;
}

/*
fin estilos login
*/

.mexlife-backgreen{
    background-color: #31bb67!important;
}

.mexlife-fontgreen{
    color: #31bb67!important;
}

.top-separator{
    padding-top: 25px;
}

/* new lead badge*/
span.badge.newlead {
    font-weight: 300;
    font-size: 0.8rem;
    color: #fff;
    background-color: #31bb67;
    border-radius: 2px;
}

span.badge.newlead:after {
    content: " nuevo(s) lead(s)";
}

/* new form badge*/
span.badge.newform {
    font-weight: 300;
    font-size: 0.8rem;
    color: #fff;
    background-color: #31bb67;
    border-radius: 2px;
}

span.badge.newform:after {
    content: " nuevo(s) formulario(s)";
}

.collapsible-body{
    background-color: #ffffff;
}

/* dashboard styles */
.dashboard-shell {
    padding-top: 24px;
}

.dashboard-hero {
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #f5fff9 55%, #e9f9f0 100%);
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.09);
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 20px 24px;
}

.dashboard-hero h1 {
    color: #14181f;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.dashboard-hero p {
    color: #4b5563;
    margin: 8px 0 0;
}

.dashboard-hero-icon {
    align-items: center;
    background: #31bb67;
    border-radius: 16px;
    color: #fff;
    display: inline-flex;
    height: 52px;
    justify-content: center;
    width: 52px;
}

.dashboard-hero-icon .material-icons {
    font-size: 30px;
}

.dashboard-stats-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 16px;
}

.dashboard-stat-card {
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    padding: 16px;
}

.dashboard-stat-card .label {
    color: #667085;
    display: block;
    font-size: 0.9rem;
}

.dashboard-stat-card strong {
    color: #111827;
    display: block;
    font-size: 1.7rem;
    line-height: 1.2;
    margin-top: 8px;
}

.dashboard-stat-card small {
    color: #667085;
    display: block;
    margin-top: 6px;
}

.dashboard-panel {
    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    overflow: hidden;
}

.dashboard-panel-secondary {
    margin-top: 18px;
}

.dashboard-panel-header {
    border-bottom: 1px solid #edf0f3;
    padding: 18px 22px 10px;
}

.dashboard-panel-header h2 {
    color: #101828;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.dashboard-panel-header p {
    color: #667085;
    margin: 6px 0 0;
}

.dashboard-tabs-wrap {
    border-bottom: 1px solid #edf0f3;
    padding: 0 10px;
}

.dashboard-tabs {
    background: transparent;
}

.dashboard-tabs .tab a {
    color: #667085;
    font-weight: 700;
}

.dashboard-tabs .tab a:focus,
.dashboard-tabs .tab a:focus.active {
    background-color: rgba(49, 187, 103, 0.08) !important;
}

.dashboard-tabs .tab a:hover,
.dashboard-tabs .tab a.active {
    background-color: rgba(49, 187, 103, 0.08) !important;
    color: #1ea055 !important;
}

.dashboard-tab-count {
    background: #f2f4f7;
    border-radius: 999px;
    color: #344054;
    display: inline-flex;
    font-size: 0.74rem;
    font-weight: 700;
    height: 20px;
    justify-content: center;
    margin-left: 6px;
    min-width: 20px;
    padding: 0 6px;
}

.dashboard-tabs .indicator {
    background-color: #31bb67;
}

.dashboard-tab-panel {
    display: none;
    padding: 18px 20px 22px;
}

.dashboard-tab-panel.active {
    display: block;
}

.dashboard-section-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.dashboard-section-head h3 {
    color: #101828;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.dashboard-section-head p {
    color: #667085;
    margin: 4px 0 0;
}

.section-counter {
    align-items: center;
    background: #f2f4f7;
    border-radius: 999px;
    color: #344054;
    display: inline-flex;
    font-size: 0.9rem;
    font-weight: 700;
    height: 34px;
    justify-content: center;
    min-width: 34px;
    padding: 0 12px;
}

.dashboard-table-wrap {
    overflow-x: auto;
}

.dashboard-table {
    min-width: 960px;
}

.dashboard-table td,
.dashboard-table th {
    vertical-align: middle;
}

.form-title {
    color: #111827;
    font-weight: 600;
}

.form-url {
    color: #1976d2;
    display: inline-block;
    font-size: 0.85rem;
    margin-top: 2px;
    word-break: break-all;
}

.lead-pill {
    background: #ecfdf3;
    border: 1px solid #b7efcf;
    border-radius: 999px;
    color: #116337;
    display: inline-block;
    font-weight: 700;
    min-width: 40px;
    padding: 3px 12px;
    text-align: center;
}

.route-field {
    margin-bottom: 0;
    min-width: 220px;
}

.new-forms-grid {
    display: grid;
    gap: 12px;
}

.new-form-card {
    background: #fbfcfd;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
}

.form-review-card-moving-out {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
    transition: opacity 180ms ease, transform 180ms ease;
}

.form-review-card-moving-in {
    animation: formCardIn 220ms ease;
}

.obs-notice-panel {
    align-items: center;
    background: #ecfdf3;
    border: 1px solid #b7efcf;
    color: #116337;
    display: flex;
    font-weight: 600;
    gap: 10px;
}

.obs-inline-form {
    display: inline-flex;
}

.obs-retry-limit-field {
    align-items: center;
    color: #475467;
    display: inline-flex;
    font-size: 0.85rem;
    font-weight: 600;
    gap: 8px;
    margin-left: 6px;
}

.obs-retry-limit-field select {
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    height: 32px;
    min-width: 88px;
    padding: 0 10px;
}

.obs-col-action {
    white-space: nowrap;
}

.obs-row-action {
    align-items: center;
    border: 1px solid #d0d5dd;
    border-radius: 999px;
    color: #344054;
    display: inline-flex;
    gap: 6px;
    height: auto;
    line-height: 1.2;
    padding: 6px 12px;
    text-transform: none;
}

.obs-row-action:hover,
.obs-row-action:focus {
    background: #f8fafc;
}

.obs-retry-meta {
    align-items: center;
    color: #667085;
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

@keyframes formCardIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.99);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.new-form-card-head {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.new-form-card-head h4 {
    color: #111827;
    font-size: 1.08rem;
    font-weight: 700;
    margin: 0;
}

.new-form-card-meta {
    align-items: center;
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.new-form-card-meta .meta-label {
    color: #667085;
    font-size: 0.85rem;
}

.new-form-card-body {
    align-items: center;
    display: flex;
    gap: 16px;
    margin-top: 12px;
}

.new-form-route-field {
    flex: 1;
    min-width: 240px;
}

.new-form-route-field .select-wrapper input.select-dropdown {
    margin-bottom: 0;
}

.new-form-switch {
    flex-shrink: 0;
}

.route-field .select-wrapper input.select-dropdown {
    border-bottom: 1px solid #d0d5dd;
    height: 2.7rem;
    margin-bottom: 0;
}

.status-cell {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.status-badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 5px 10px;
    text-transform: uppercase;
}

.status-active {
    background: #e8fff1;
    color: #0f8a45;
}

.status-inactive {
    background: #f3f4f6;
    color: #4b5563;
}

.status-new {
    background: #fff4e5;
    color: #b54708;
}

.compact-switch label {
    color: #667085;
    font-size: 0.85rem;
}

.dashboard-empty-state {
    align-items: center;
    background: linear-gradient(180deg, #fafafa 0%, #f5fff9 100%);
    border: 1px dashed #c6d0db;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 260px;
    padding: 24px;
    text-align: center;
}

.dashboard-empty-state .material-icons {
    color: #31bb67;
    font-size: 42px;
    margin-bottom: 10px;
}

.dashboard-empty-state h3 {
    color: #101828;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}

.dashboard-empty-state p {
    color: #667085;
    margin: 8px 0 0;
    max-width: 480px;
}

.dashboard-empty-state-compact {
    min-height: 220px;
}

.dashboard-leads-table {
    min-width: 1120px;
}

.lead-date-cell {
    color: #475467;
    font-size: 0.88rem;
    white-space: nowrap;
}

.lead-origin-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.origin-chip {
    background: #ecfdf3;
    border: 1px solid #b7efcf;
    border-radius: 999px;
    color: #116337;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 10px;
    width: fit-content;
}

.origin-chip-muted {
    background: #f2f4f7;
    border-color: #d0d5dd;
    color: #344054;
}

.field-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.field-chip {
    background: #f8fafc;
    border: 1px solid #d8dee6;
    border-radius: 10px;
    color: #344054;
    display: inline-flex;
    gap: 4px;
    max-width: 100%;
    padding: 6px 10px;
}

.lead-details {
    margin-top: 10px;
}

.lead-details summary {
    color: #1976d2;
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 600;
}

.lead-json {
    background: #0f172a;
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 0.78rem;
    margin-top: 8px;
    max-width: 520px;
    overflow-x: auto;
    padding: 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

.field-empty {
    color: #667085;
    font-size: 0.88rem;
}

.domain-snippet-code {
    background: #0b1220 !important;
    border: 1px solid #334155 !important;
    border-radius: 10px !important;
    box-sizing: border-box;
    color: #e5e7eb !important;
    font-family: "Courier New", Courier, monospace !important;
    font-size: 0.78rem !important;
    line-height: 1.4;
    margin: 0 !important;
    min-height: 102px !important;
    padding: 12px !important;
    white-space: pre-wrap;
    word-break: break-word;
}

.domain-snippet-code:focus {
    border-bottom: 1px solid #60a5fa !important;
    box-shadow: 0 0 0 1px #60a5fa !important;
}

.copySnippetBtn {
    min-width: 136px;
}

.fub-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 20px;
}

.fub-result-console {
    background: #0f172a;
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 0.82rem;
    margin: 0;
    min-height: 160px;
    overflow-x: auto;
    padding: 14px;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 992px) {
    .dashboard-hero {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .dashboard-stats-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .fub-action-buttons {
        padding-top: 6px;
    }

    .new-form-card-body {
        align-items: flex-start;
        flex-direction: column;
    }

    .new-form-route-field {
        width: 100%;
    }
}

/* ── Settings page ──────────────────────────────────────────────────────── */
.settings-notice {
    align-items: flex-start;
    border-radius: 10px;
    display: flex;
    font-size: 0.92rem;
    gap: 10px;
    margin-bottom: 16px;
    padding: 13px 16px;
}

.settings-notice--ok {
    background: #ecfdf3;
    border: 1px solid #a7f3c1;
    color: #166534;
}

.settings-notice--err {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #9f1239;
}

.settings-notice .material-icons {
    flex-shrink: 0;
    font-size: 20px;
    margin-top: 1px;
}

.settings-notice-list {
    margin: 0;
    padding-left: 18px;
}

/* tab icons */
.settings-tabs .tab a {
    align-items: center;
    display: inline-flex;
    gap: 6px;
}

.settings-tab-icon {
    font-size: 18px;
}

/* tab content area */
.settings-tab-panel {
    display: none;
    padding: 0 22px 8px;
}

.settings-tab-panel.active {
    display: block;
}

.settings-tab-desc {
    border-bottom: 1px solid #edf0f3;
    color: #667085;
    font-size: 0.87rem;
    margin: 0;
    padding: 14px 0 16px;
}

/* field rows */
.settings-row {
    align-items: center;
    display: flex;
    gap: 32px;
    padding: 16px 0;
}

.settings-row--bordered {
    border-bottom: 1px solid #f2f4f7;
}

.settings-row-label {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    min-width: 0;
}

.settings-row-title {
    align-items: center;
    color: #111827;
    display: inline-flex;
    font-size: 0.93rem;
    font-weight: 600;
    gap: 5px;
}

.settings-lock-badge .material-icons {
    color: #9ca3af;
    font-size: 14px;
}

.settings-row-help {
    color: #6b7280;
    font-size: 0.83rem;
    margin-top: 3px;
}

.settings-row-default {
    color: #9ca3af;
    font-size: 0.78rem;
    margin-top: 5px;
}

.settings-row-default code {
    background: #f3f4f6;
    border-radius: 4px;
    color: #374151;
    font-family: monospace;
    padding: 1px 5px;
}

.settings-row-control {
    flex-shrink: 0;
    width: 280px;
}

.settings-row-control .switch label {
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

.settings-switch-label {
    color: #667085;
    font-size: 0.88rem;
}

.settings-input-field {
    margin-bottom: 0 !important;
    margin-top: 8px !important;
}

.settings-input-field input {
    margin-bottom: 4px !important;
}

/* footer */
.settings-save-footer {
    border-top: 1px solid #edf0f3;
    display: flex;
    justify-content: flex-end;
    padding: 16px 22px;
}

@media (max-width: 768px) {
    .settings-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .settings-row-control {
        width: 100%;
    }
}

/* ── Auth pages ─────────────────────────────────────────────────────────── */
.auth-shell {
    margin: 0 auto;
    max-width: 760px;
}

.auth-hero {
    margin-bottom: 14px;
}

.auth-panel {
    margin-bottom: 12px;
}

.auth-actions-row {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.auth-inline-link {
    color: #1ea055;
    font-size: 0.92rem;
    font-weight: 600;
}

.auth-inline-link:hover {
    color: #148746;
}

.auth-footer-link {
    color: #d0d5dd;
    margin: 4px 0 0;
    text-align: center;
}

.auth-footer-link a {
    color: #31bb67;
    font-weight: 700;
}

.auth-text {
    color: #475467;
    margin: 0 0 14px;
}

@media (max-width: 600px) {
    .auth-actions-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ═══════════════════════════════════════════════════════════
   Field-map modal
═══════════════════════════════════════════════════════════ */

#modalFieldMap .modal-content {
    background: #fafbfc;
    padding: 28px 32px;
}

#modalFieldMap .modal-footer {
    background: #f5f7fa;
    border-top: 1px solid #e5e7eb;
}

.fmap-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.fmap-icon {
    font-size: 2rem;
    color: #fff;
    margin-top: 0;
    flex-shrink: 0;
    background: #31bb67;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.fmap-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: #101828;
    letter-spacing: -0.3px;
}

.fmap-subtitle {
    font-size: 0.87rem;
    margin: 0;
    color: #667085;
    font-weight: 500;
}

.fmap-intro {
    font-size: 0.87rem;
    margin: 0 0 22px;
    line-height: 1.6;
    color: #475467;
    background: #f3faf8;
    padding: 14px 16px;
    border-radius: 8px;
    border-left: 3px solid #31bb67;
}

.fmap-intro strong {
    color: #1a7a44;
    font-weight: 600;
}

.fmap-hints-wrap {
    background: linear-gradient(135deg, #f0fdf4 0%, #f3faf8 100%);
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 24px;
}

.fmap-hints-label {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 10px;
    color: #1a7a44;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.fmap-hints-label i {
    color: #31bb67;
}

.fmap-hint-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.fmap-chip {
    background: #fff;
    border: 1.5px solid #bbf7d0;
    border-radius: 6px;
    padding: 5px 11px;
    font-size: 0.79rem;
    cursor: pointer;
    color: #1a7a44;
    transition: all 0.2s ease;
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

.fmap-chip:hover {
    background: #e7f8f0;
    border-color: #31bb67;
    color: #1a5a34;
    box-shadow: 0 2px 6px rgba(49, 187, 103, 0.15);
}

.fmap-badge {
    display: inline-block;
    font-size: 0.7rem;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 4px;
    padding: 3px 8px;
    margin-top: 3px;
    font-weight: 600;
}

.fmap-input {
    margin: 0 !important;
}

.fmap-input input {
    font-size: 0.84rem !important;
    border-bottom: 1.5px solid #e5e7eb !important;
    padding: 8px 0 6px 0 !important;
    transition: border-color 0.2s !important;
}

.fmap-input input:focus {
    border-bottom-color: #31bb67 !important;
    box-shadow: 0 1px 0 0 #31bb67 !important;
}

.map-fields-btn {
    margin-top: 10px;
    font-size: 0.76rem;
    color: #667085;
    padding: 0 8px;
    height: 28px;
    line-height: 28px;
    transition: all 0.2s;
}

.map-fields-btn:hover {
    color: #31bb67;
    background-color: #f0fdf4;
}

.map-fields-btn .material-icons.left.tiny {
    font-size: 0.85rem;
    line-height: 28px;
}

/* Chip-based token editor */
.fmap-tokens-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    min-height: 32px;
    border-bottom: 1px solid #e5e7eb;
}

.fmap-token-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fff;
    color: #1a7a44;
    border: 1.5px solid #bbf7d0;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: 'Courier New', monospace;
}

.fmap-token-field {
    background: #f0fdf4 !important;
    color: #1a7a44 !important;
    border-color: #31bb67 !important;
}

.fmap-token-literal {
    background: #fef3c7 !important;
    color: #92400e !important;
    border-color: #fcd34d !important;
}

.fmap-token-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    margin-left: 2px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.15s;
    font-weight: bold;
}

.fmap-token-close:hover {
    opacity: 1;
}

.fmap-token-input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.84rem;
    padding: 3px 4px;
    min-width: 100px;
    font-family: 'Courier New', monospace;
}

.fmap-token-input::placeholder {
    color: #d1d5db;
    font-size: 0.79rem;
}

/* Scrollable grid with sticky labels */
.fmap-grid-scrollable {
    max-height: 380px;
    overflow-y: auto;
    overflow-x: hidden;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    margin: 20px 0;
    background: #fff;
    border-radius: 8px;
}

.fmap-grid-scrollable .fmap-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid #f3f4f6;
    align-items: center;
}

.fmap-grid-scrollable .fmap-row:last-child {
    border-bottom: none;
}

.fmap-grid-scrollable .fmap-fub-label {
    position: sticky;
    left: 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.84rem;
    color: #374151;
    padding: 0;
    background: #fff;
    z-index: 10;
    font-weight: 600;
}

.fmap-grid-scrollable .fmap-fub-label .material-icons.tiny {
    font-size: 1rem;
    color: #31bb67;
    margin-top: 0;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   Observability views — Leads & Webhook Logs
═══════════════════════════════════════════════════════════ */

.obs-stat-link {
    text-decoration: none;
    display: block;
    transition: transform 0.15s, box-shadow 0.15s;
}

.obs-stat-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* Toolbar: search + filter pills */
.obs-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid #f3f4f6;
}

.obs-toolbar-actions {
    margin-left: auto;
}

.obs-export-btn {
    display: inline-flex;
    align-items: center;
}

.obs-search-form {
    flex: 1;
    min-width: 200px;
    max-width: 380px;
}

.obs-search-field {
    margin: 0 !important;
}

.obs-search-field input {
    font-size: 0.88rem !important;
}

.obs-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.obs-pill {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.79rem;
    font-weight: 500;
    border: 1.5px solid #e5e7eb;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.15s;
    background: #fff;
}

.obs-pill:hover {
    border-color: #31bb67;
    color: #1a7a44;
    background: #f0fdf4;
}

.obs-pill--active {
    background: #31bb67;
    border-color: #31bb67;
    color: #fff;
}

.obs-pill--event {
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.76rem;
}

/* Table */
.obs-table-wrap {
    overflow-x: auto;
}

.obs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.obs-table thead tr {
    background: #f8fafc;
    border-bottom: 2px solid #e5e7eb;
}

.obs-table th {
    padding: 11px 14px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.obs-row {
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.1s;
}

.obs-row:hover {
    background: #fafbfc;
}

.obs-row td {
    padding: 10px 14px;
    vertical-align: middle;
}

/* Cell styles */
.obs-cell-id {
    color: #9ca3af;
    font-size: 0.78rem;
    font-family: monospace;
    white-space: nowrap;
}

.obs-cell-date {
    white-space: nowrap;
    font-size: 0.82rem;
}

.obs-date-exact {
    display: block;
    color: #9ca3af;
    font-size: 0.73rem;
    margin-top: 2px;
}

.obs-cell-form {
    font-weight: 500;
    color: #374151;
    max-width: 160px;
}

.obs-form-name {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 155px;
}

.obs-cell-domain {
    color: #6b7280;
    font-size: 0.81rem;
    white-space: nowrap;
}

/* Field data pills */
.obs-field-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 360px;
}

.obs-field-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    font-size: 0.74rem;
}

.obs-field-key {
    background: #f3f4f6;
    color: #6b7280;
    padding: 2px 6px;
    font-weight: 600;
    border-right: 1px solid #e5e7eb;
}

.obs-field-val {
    color: #374151;
    padding: 2px 7px;
    background: #fff;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.obs-field-more {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    color: #9ca3af;
    padding: 2px 6px;
    border: 1px dashed #e5e7eb;
    border-radius: 4px;
}

/* FUB column */
.obs-fub-id {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.obs-sync-time {
    display: block;
    color: #9ca3af;
    font-size: 0.72rem;
    margin-top: 2px;
}

/* Status badges */
.obs-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.73rem;
    font-weight: 600;
    white-space: nowrap;
}

.obs-badge--green {
    background: #dcfce7;
    color: #166534;
}

.obs-badge--blue {
    background: #dbeafe;
    color: #1e40af;
}

.obs-badge--orange {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
}

.obs-badge--red {
    background: #fee2e2;
    color: #991b1b;
}

.obs-badge--grey {
    background: #f3f4f6;
    color: #6b7280;
}

/* HTTP codes */
.obs-http-code {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: monospace;
}

.obs-http-2xx { background: #dcfce7; color: #166534; }
.obs-http-4xx { background: #fff7ed; color: #9a3412; }
.obs-http-5xx { background: #fee2e2; color: #991b1b; }

/* Webhook-specific */
.obs-event-tag {
    background: #f3f4f6;
    color: #374151;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.77rem;
    font-family: 'Courier New', monospace;
}

.obs-cell-ip {
    font-size: 0.78rem;
    font-family: monospace;
    white-space: nowrap;
}

.obs-resource-ids {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 4px;
}

.obs-person-summary {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.obs-person-name {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #374151;
}

.obs-person-email {
    font-size: 0.77rem;
}

.obs-error-msg {
    display: block;
    font-size: 0.77rem;
    max-width: 260px;
    word-break: break-word;
}

.obs-event-id {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.76rem;
    font-family: monospace;
}

/* Empty state */
.obs-empty {
    text-align: center;
    padding: 48px 20px !important;
    color: #9ca3af;
}

.obs-empty i {
    font-size: 3rem;
    margin-bottom: 12px;
    display: block;
}

.obs-empty p {
    margin: 0;
    font-size: 0.9rem;
}

/* Pagination */
.obs-pagination {
    padding: 14px 20px;
    border-top: 1px solid #f3f4f6;
}

.obs-pagination-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.obs-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.83rem;
    color: #374151;
    text-decoration: none;
    background: #fff;
    transition: all 0.15s;
}

.obs-page-btn:hover:not(.obs-page-btn--disabled):not(.obs-page-btn--active) {
    border-color: #31bb67;
    color: #1a7a44;
    background: #f0fdf4;
}

.obs-page-btn--active {
    background: #31bb67;
    border-color: #31bb67;
    color: #fff;
}

.obs-page-btn--disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.obs-page-btn--dots {
    border: none;
    background: transparent;
}

.obs-page-info {
    margin-left: 10px;
    font-size: 0.79rem;
}

@media (max-width: 1100px) {
    .obs-table--leads .obs-col-data,
    .obs-table--webhooks .obs-col-detail {
        display: none;
    }
}

@media (max-width: 860px) {
    .obs-table th,
    .obs-table td {
        padding: 8px 9px;
    }

    .obs-table--leads .obs-col-domain,
    .obs-table--webhooks .obs-col-resource,
    .obs-table--webhooks .obs-col-ip {
        display: none;
    }

    .obs-pill {
        padding: 4px 11px;
    }
}

@media (max-width: 640px) {
    .obs-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .obs-search-form {
        max-width: 100%;
        width: 100%;
    }

    .obs-toolbar-actions {
        margin-left: 0;
    }

    .obs-export-btn {
        width: 100%;
        justify-content: center;
    }

    .obs-table--leads .obs-col-fub,
    .obs-table--webhooks .obs-col-http {
        display: none;
    }

    .obs-date-exact {
        display: none;
    }

    .obs-table--tracking .obs-col-match,
    .obs-table--tracking .obs-col-origin {
        display: none;
    }
}

@media (max-width: 860px) {
    .obs-table--tracking .obs-col-data,
    .obs-table--tracking .obs-col-detail {
        display: none;
    }
}

/* ── Backoffice help ───────────────────────────────────────────────────── */
.help-panel {
    overflow: visible;
}

.help-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 18px 20px 22px;
}

.help-card {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdfc 100%);
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
}

.help-card-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.help-card-head h3 {
    color: #111827;
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
}

.help-card-head p {
    color: #667085;
    margin: 6px 0 0;
}

.help-card-icon {
    align-items: center;
    background: #ecfdf3;
    border-radius: 12px;
    color: #148746;
    display: inline-flex;
    flex-shrink: 0;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.help-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.help-chip {
    background: #f3f4f6;
    border-radius: 999px;
    color: #374151;
    display: inline-flex;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 5px 10px;
}

.help-chip--link {
    background: #31bb67;
    color: #fff;
    text-decoration: none;
}

.help-chip--link:hover {
    background: #239552;
}

.help-block + .help-block {
    margin-top: 14px;
}

.help-block h4 {
    color: #111827;
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.help-list {
    color: #4b5563;
    margin: 0;
    padding-left: 18px;
}

.help-list li + li {
    margin-top: 6px;
}

.help-inline-code {
    background: #0f172a;
    border-radius: 6px;
    color: #e2e8f0;
    display: inline-flex;
    font-family: "Courier New", monospace;
    font-size: 0.78rem;
    padding: 4px 8px;
}

.help-flow-list {
    display: grid;
    gap: 12px;
    padding: 18px 20px 22px;
}

.help-flow-item {
    align-items: center;
    background: #fbfcfd;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 16px 18px;
}

.help-flow-item h3 {
    color: #111827;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.help-flow-item p {
    color: #667085;
    margin: 6px 0 0;
}

.help-snippet-list {
    display: grid;
    gap: 12px;
    padding: 18px 20px 22px;
}

.help-snippet-item {
    background: #fbfcfd;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
}

.help-snippet-item h3 {
    color: #111827;
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 10px;
}

.help-snippet-code {
    background: #0f172a;
    border-radius: 10px;
    color: #e2e8f0;
    font-family: "Courier New", monospace;
    font-size: 0.78rem;
    line-height: 1.45;
    margin: 0;
    overflow-x: auto;
    padding: 12px;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    max-width: 100%;
}

@media (max-width: 900px) {
    .help-grid {
        grid-template-columns: 1fr;
    }

    .help-flow-item {
        align-items: flex-start;
        flex-direction: column;
    }
}
/* ═══════════════════════════════════════════════════════════
   SaaS Layout Redesign (Appended by Modernization Plan)
═══════════════════════════════════════════════════════════ */

:root {
    --bg-color: #f8fafc;
    --sidebar-bg: #111827;
    --sidebar-text: #9ca3af;
    --sidebar-hover-bg: #1f2937;
    --sidebar-hover-text: #ffffff;
    --sidebar-active-bg: #31bb67;
    --sidebar-active-text: #ffffff;
    --sidebar-width: 250px;
    --border-color: #e5e7eb;
}

body:not(.bodyLogin) {
    background-color: var(--bg-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #374151;
}

/* Materialize Overrides for modern look */
.card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}

.btn, .btn-large, .btn-small, .btn-floating {
    box-shadow: none !important;
    text-transform: none;
    border-radius: 8px;
    font-weight: 600;
}
.btn-floating {
    border-radius: 50%;
}

.btn:hover, .btn-large:hover, .btn-small:hover {
    box-shadow: 0 4px 6px rgba(49, 187, 103, 0.2) !important;
}

/* Layout Structure */
#app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Sidenav */
.sidenav.sidenav-fixed {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    border-right: none;
    padding-top: 20px;
    z-index: 999;
}

.sidenav-logo {
    padding: 32px 24px 24px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
}
.sidenav-logo img {
    height: 48px;
    max-width: 100%;
    filter: brightness(0) invert(1); /* Force white for dark sidebars */
}

.sidenav li > a {
    color: var(--sidebar-text);
    font-weight: 500;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
    height: 44px;
    line-height: 44px;
    border-radius: 6px;
    margin: 4px 12px;
}

.sidenav li > a i.material-icons {
    color: inherit;
    margin: 0;
}

.sidenav li > a:hover {
    background-color: var(--sidebar-hover-bg);
    color: var(--sidebar-hover-text);
}

.sidenav li.active > a {
    background-color: rgba(49, 187, 103, 0.1);
    color: var(--sidebar-active-bg);
    font-weight: 600;
}

.sidenav li.active > a i.material-icons {
    color: var(--sidebar-active-bg);
}

.sidenav-subheader {
    color: #6b7280;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 24px 24px 8px;
    font-weight: 700;
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

@media only screen and (min-width: 993px) {
    .main-content {
        padding-left: var(--sidebar-width);
    }
}

/* Top Navbar (Header) */
.top-navbar {
    background-color: #ffffff !important;
    border-bottom: 1px solid var(--border-color);
    box-shadow: none;
    height: 64px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.top-navbar .nav-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.top-navbar .page-title {
    color: #111827;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.top-navbar .sidenav-trigger {
    color: #4b5563;
    display: inline-flex;
    align-items: center;
    margin-right: 16px;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4b5563;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.user-profile-btn:hover {
    background-color: #f3f4f6;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #31bb67;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.content-wrapper {
    padding: 24px;
    flex: 1;
}

/* Hide original nav default */
nav { background-color: transparent; }

/* Table modernizations */
table.striped > tbody > tr:nth-child(odd) {
    background-color: #f8fafc;
}
table.striped > tbody > tr {
    border-bottom: 1px solid #f1f5f9;
}
/* ── Profile Dropdown Modernization ────────────────────────────────────── */

#profile-dropdown {
    border-radius: 12px !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid var(--border-color) !important;
    top: 64px !important; /* Force below the 64px navbar */
    min-width: 180px !important;
}

#profile-dropdown li {
    min-height: 44px;
}

#profile-dropdown li > a {
    color: #4b5563 !important;
    font-size: 0.9rem !important;
    padding: 12px 20px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

#profile-dropdown li > a:hover {
    background-color: #f3f4f6 !important;
}

#profile-dropdown li > a i.material-icons {
    margin: 0 !important;
    font-size: 20px !important;
    color: inherit !important;
}


/* ── Sidebar Collapsible Logic ─────────────────────────────────────────── */

:root {
    --sidebar-collapsed-width: 70px;
}

/* Transition for smooth expansion/contraction */
.sidenav.sidenav-fixed, 
.main-content {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* State: Collapsed */
.sidebar-collapsed .sidenav.sidenav-fixed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-collapsed .sidenav.sidenav-fixed:hover {
    width: var(--sidebar-width);
}

/* Hide text labels when collapsed, but show on hover */
.sidebar-collapsed .sidenav li > a span,
.sidebar-collapsed .sidenav-subheader {
    opacity: 0;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.sidebar-collapsed .sidenav:hover li > a span,
.sidebar-collapsed .sidenav:hover .sidenav-subheader {
    opacity: 1;
}

/* Center icons when collapsed */
.sidebar-collapsed .sidenav li > a {
    padding: 0 23px;
    margin: 4px 0;
    border-radius: 0;
}

.sidebar-collapsed .sidenav:hover li > a {
    padding: 0 24px;
    margin: 4px 12px;
    border-radius: 6px;
}

.sidebar-collapsed .sidenav-logo {
    padding: 24px 11px;
}

.sidebar-collapsed .sidenav:hover .sidenav-logo {
    padding: 32px 24px 24px;
}

.sidebar-collapsed .sidenav-logo img {
    height: 32px;
}

.sidebar-collapsed .sidenav:hover .sidenav-logo img {
    height: 48px;
}

/* Adjust main content margin when collapsed */
@media only screen and (min-width: 993px) {
    .sidebar-collapsed .main-content {
        padding-left: var(--sidebar-collapsed-width);
    }
}

/* Toggle Button Style */
.sidebar-toggle-btn {
    cursor: pointer;
    color: #4b5563;
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background 0.2s;
}

.sidebar-toggle-btn:hover {
    background-color: #f3f4f6;
}


/* ── Bento Grid Dashboard Styles ────────────────────────────────────────── */

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(120px, auto);
    gap: 20px;
    margin-bottom: 30px;
}

.bento-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bento-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.05);
    border-color: #31bb67;
}

/* Bento Hero / Large Item */
.bento-hero {
    grid-column: span 2;
    grid-row: span 2;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    position: relative;
    overflow: hidden;
}

.bento-hero::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 150px;
    height: 150px;
    background: rgba(49, 187, 103, 0.05);
    border-radius: 50%;
}

.bento-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0;
    color: #1e293b;
    line-height: 1.1;
}

.bento-hero p {
    color: #64748b;
    font-size: 1.1rem;
    margin-top: 15px;
    max-width: 80%;
}

/* Bento Stat Cards */
.bento-stat {
    grid-column: span 1;
}

.bento-stat .label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bento-stat strong {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1e293b;
    margin: 10px 0;
}

.bento-stat .trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.trend-up { color: #10b981; }
.trend-down { color: #f43f5e; }

/* Bento Secondary items */
.bento-action {
    grid-column: span 1;
    background: #111827;
    color: #ffffff;
}

.bento-action .label { color: #9ca3af; }
.bento-action strong { color: #ffffff; }

@media (max-width: 1200px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .bento-hero {
        grid-column: span 1;
        grid-row: span 1;
    }
}

