/*
|--------------------------------------------------------------------------
| INTERASESOR - AGENT PANEL STYLES
|--------------------------------------------------------------------------
| File: /css/panel.css
| Used by every u_*.php page and by u_login.php.
| Does not affect asesor.css or the multi-domain CSS files.
|--------------------------------------------------------------------------
*/

:root {
    --ia-blue: #0d6efd;
    --ia-blue-soft: #eaf3ff;
    --ia-bg: #f7f9fc;
    --ia-white: #ffffff;
    --ia-text: #14213d;
    --ia-title: #101f3d;
    --ia-muted: #6f8098;
    --ia-border: #e2e8f0;
    --ia-green: #16a34a;
    --ia-green-soft: #e8f7ee;
    --ia-orange: #d97706;
    --ia-orange-soft: #fef3e2;
    --ia-red: #dc2626;
    --ia-red-soft: #fdecec;
}


/* RESET */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    background: var(--ia-bg);
    color: var(--ia-text);
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
}


/* PANEL LAYOUT */

.ia-panel {
    display: flex;
    width: 100%;
    min-height: 100vh;
}


/* SIDEBAR */

.ia-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: 270px;
    background: var(--ia-white);
    border-right: 1px solid var(--ia-border);
    overflow-y: auto;
    z-index: 100;
    transition: transform .25s ease;
}

.ia-sidebar-logo {
    padding: 21px 22px 18px;
    border-bottom: 1px solid #eef1f5;
}

.ia-logo-link {
    display: flex;
    align-items: center;
    gap: 11px;
}

.ia-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 39px;
    height: 39px;
    border-radius: 9px;
    background: var(--ia-blue);
    color: #ffffff;
    font-size: 19px;
}

.ia-logo-text {
    min-width: 0;
}

.ia-logo-name {
    color: #102a56;
    font-size: 19px;
    font-weight: 700;
}

.ia-logo-subtitle {
    margin-top: 2px;
    color: #7a8aa0;
    font-size: 10px;
}


/* NAVIGATION */

.ia-nav {
    flex: 0 0 auto;
    padding: 13px 12px 8px;
}

.ia-nav-section {
    margin: 4px -12px 4px 11px;   /* the dashed line reaches the right edge of the menu */
    padding-top: 14px;
    border-top: 1px dashed #d5dde7;
    color: #8a6100;   /* ochre / gold (previous: dark gray #444444) */
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.ia-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 36px;
    margin: 1px 0;
    padding: 0 12px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #344767;
    cursor: pointer;
    font-size: 14px;
    text-align: left;
    transition: background .15s ease, color .15s ease;
}

.ia-nav-item:hover {
    background: #f4f7fb;
    color: var(--ia-blue);
}

.ia-nav-item.active {
    background: var(--ia-blue-soft);
    color: var(--ia-blue);
    font-weight: 600;
}

.ia-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 27px;
    margin-right: 8px;
    font-size: 16px;
}

.ia-nav-label {
    flex: 1;
}

.ia-nav-arrow {
    margin-left: auto;
    color: #8b99aa;
    font-size: 10px;
    transition: transform .2s ease;
}

.ia-nav-parent.submenu-open .ia-nav-arrow {
    transform: rotate(180deg);
}

.ia-submenu {
    display: none;
    margin: 1px 0 5px 47px;
}

.ia-submenu.open {
    display: block;
}

.ia-submenu a {
    display: block;
    padding: 6px 10px;
    border-radius: 6px;
    color: #68788d;
    font-size: 13px;
}

.ia-submenu a:hover {
    background: #f4f7fb;
    color: var(--ia-blue);
}

.ia-submenu a.active {
    color: var(--ia-blue);
    font-weight: 700;
}

.ia-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 21px;
    height: 21px;
    margin-left: auto;
    padding: 0 6px;
    border-radius: 20px;
    background: var(--ia-blue);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
}

.ia-sidebar-bottom {
    padding: 8px 12px 18px;
    border-top: 1px solid #eef1f5;
    background: var(--ia-white);
}

.ia-logout {
    color: #53657b;
}

/* Dark layer behind the sidebar on mobile */
.ia-overlay {
    display: none;
}


/* MAIN CONTENT */

.ia-main {
    width: calc(100% - 270px);
    min-height: 100vh;
    margin-left: 270px;
}


/* TOP BAR */

.ia-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 68px;
    padding: 0 30px;
    background: var(--ia-white);
    border-bottom: 1px solid #e5eaf0;
}

.ia-menu-button {
    display: none;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border: 1px solid #dce3eb;
    border-radius: 8px;
    background: var(--ia-white);
    color: #344767;
    font-size: 17px;
    cursor: pointer;
}

.ia-search {
    position: relative;
    width: 100%;
    max-width: 520px;
    margin: 0;
}

.ia-search i {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: #8b99aa;
    font-size: 14px;
}

.ia-search input {
    width: 100%;
    height: 40px;
    padding: 0 15px 0 42px;
    border: 1px solid #dce3eb;
    border-radius: 8px;
    outline: none;
    background: var(--ia-white);
    color: #344767;
    font-size: 13px;
}

.ia-search input:focus {
    border-color: var(--ia-blue);
}

/* Room for the button inside the search box */
.ia-search input {
    padding-right: 96px;
}

.ia-search-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    bottom: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    border: 0;
    border-radius: 6px;
    background: var(--ia-blue);
    color: #ffffff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.ia-search-btn:hover {
    background: #0b5ed7;
}

/* The arrow icon inside the button must not take the left-icon position */
.ia-search .ia-search-btn i {
    position: static;
    transform: none;
    color: inherit;
    font-size: 11px;
}

.ia-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 25px;
    white-space: nowrap;
}

.ia-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--ia-blue-soft);
    color: var(--ia-blue);
    font-size: 12px;
    font-weight: 700;
}

/* Avatar with a real photo */
.ia-avatar-img {
    flex-shrink: 0;
    object-fit: cover;
    background: #eef1f5;
}

.ia-user-name {
    color: #253858;
    font-size: 13px;
    font-weight: 600;
}

.ia-user-plan {
    color: var(--ia-muted);
    font-size: 11px;
    font-weight: 400;
}


/* PAGE CONTENT */

.ia-content {
    padding: 30px;
}

.ia-breadcrumb {
    margin-bottom: 10px;
    color: #75869d;
    font-size: 12px;
}

.ia-content h1 {
    margin: 0;
    color: var(--ia-title);
    font-size: 28px;
}

.ia-content h2 {
    margin: 0 0 14px;
    color: var(--ia-title);
    font-size: 18px;
}

.ia-welcome-text {
    max-width: 650px;
    margin: 9px 0 0;
    color: var(--ia-muted);
    font-size: 14px;
    line-height: 1.6;
}


/* CARDS */

.ia-card {
    margin-top: 24px;
    padding: 22px;
    border: 1px solid #e1e7ef;
    border-radius: 10px;
    background: var(--ia-white);
}

.ia-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 26px;
}

.ia-stat {
    display: block;
    padding: 18px;
    border: 1px solid #e1e7ef;
    border-radius: 10px;
    background: var(--ia-white);
    transition: border-color .15s ease;
}

a.ia-stat:hover {
    border-color: var(--ia-blue);
}

.ia-stat-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ia-muted);
    font-size: 12px;
    font-weight: 600;
}

.ia-stat-label i {
    color: var(--ia-blue);
}

.ia-stat-value {
    margin-top: 10px;
    color: var(--ia-title);
    font-size: 26px;
    font-weight: 700;
}

.ia-stat-value small {
    color: var(--ia-muted);
    font-size: 14px;
    font-weight: 400;
}

.ia-progress {
    height: 6px;
    margin-top: 12px;
    border-radius: 6px;
    background: #eef1f5;
    overflow: hidden;
}

.ia-progress span {
    display: block;
    height: 100%;
    border-radius: 6px;
    background: var(--ia-blue);
}

.ia-progress.full span {
    background: var(--ia-red);
}


/* TABLES */

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

.ia-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ia-table th {
    padding: 10px 12px;
    border-bottom: 1px solid var(--ia-border);
    color: var(--ia-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.ia-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f3f7;
    vertical-align: middle;
}

.ia-table tr:last-child td {
    border-bottom: 0;
}

.ia-muted {
    color: var(--ia-muted);
}

.ia-small {
    font-size: 11px;
}


/* STATUS BADGES */

.ia-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.ia-badge-activa {
    background: var(--ia-green-soft);
    color: var(--ia-green);
}

.ia-badge-pausada {
    background: var(--ia-orange-soft);
    color: var(--ia-orange);
}

.ia-badge-expirada {
    background: var(--ia-red-soft);
    color: var(--ia-red);
}

.ia-badge-ofrezco {
    background: var(--ia-blue-soft);
    color: var(--ia-blue);
}

.ia-badge-solicito {
    background: #f1ebfd;
    color: #7c3aed;
}


/* BUTTONS */

.ia-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 40px;
    padding: 0 18px;
    border: 1px solid var(--ia-blue);
    border-radius: 8px;
    background: var(--ia-blue);
    color: #ffffff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.ia-btn:hover {
    background: #0b5ed7;
}

.ia-btn-outline {
    background: var(--ia-white);
    color: var(--ia-blue);
}

.ia-btn-outline:hover {
    background: var(--ia-blue-soft);
}

.ia-btn-block {
    width: 100%;
}


/* MESSAGES / ALERTS */

.ia-alert {
    margin-top: 18px;
    padding: 13px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.ia-alert-error {
    background: var(--ia-red-soft);
    color: #991b1b;
}

.ia-alert-info {
    background: var(--ia-blue-soft);
    color: #0a4fb8;
}

.ia-alert-warning {
    background: var(--ia-orange-soft);
    color: #92400e;
}

.ia-empty {
    padding: 30px 10px;
    color: var(--ia-muted);
    font-size: 14px;
    text-align: center;
}


/* FORMS */

.ia-field {
    margin-top: 16px;
}

.ia-field label {
    display: block;
    margin-bottom: 6px;
    color: #344767;
    font-size: 13px;
    font-weight: 600;
}

.ia-field input,
.ia-field select,
.ia-field textarea {
    width: 100%;
    height: 42px;
    padding: 0 13px;
    border: 1px solid #dce3eb;
    border-radius: 8px;
    outline: none;
    background: var(--ia-white);
    color: #344767;
    font-size: 14px;
}

.ia-field textarea {
    height: auto;
    min-height: 100px;
    padding: 11px 13px;
}

.ia-field input:focus,
.ia-field select:focus,
.ia-field textarea:focus {
    border-color: var(--ia-blue);
}


/* PAGE HEADER WITH BUTTON */

.ia-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}


/* ROW ACTIONS */

.ia-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.ia-actions form {
    display: flex;
    gap: 6px;
    margin: 0;
}

.ia-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #dce3eb;
    border-radius: 7px;
    background: var(--ia-white);
    color: #344767;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}

.ia-icon-btn:hover {
    border-color: var(--ia-blue);
    color: var(--ia-blue);
}

.ia-icon-btn-danger:hover {
    border-color: var(--ia-red);
    color: var(--ia-red);
}

.ia-icon-btn-text {
    font-weight: 600;
    color: var(--ia-blue);
}


/* LONG FORMS (publish) */

.ia-form-section {
    margin-top: 22px;
    padding: 22px;
    border: 1px solid #e1e7ef;
    border-radius: 10px;
    background: var(--ia-white);
}

.ia-form-section h2 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 4px;
    font-size: 16px;
}

.ia-form-section h2 i {
    color: var(--ia-blue);
}

.ia-form-hint {
    margin: 0;
    color: var(--ia-muted);
    font-size: 12px;
    line-height: 1.5;
}

.ia-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 16px;
}

.ia-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ia-col-full {
    grid-column: 1 / -1;
}

.ia-field-note {
    margin-top: 5px;
    color: var(--ia-muted);
    font-size: 11px;
}

.ia-field-error input,
.ia-field-error select {
    border-color: var(--ia-red);
}

.ia-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: 16px;
}

.ia-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #344767;
    font-size: 14px;
    cursor: pointer;
}

.ia-check input {
    width: 17px;
    height: 17px;
}

.ia-ubicacion-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 36px;
    gap: 10px;
    align-items: end;
    margin-top: 12px;
}

.ia-ubicacion-row .ia-field {
    margin-top: 0;
}

.ia-form-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 22px;
}


/* MATCHES */

.ia-matches {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.ia-matches .ia-card {
    margin-top: 0;
}

.ia-match {
    display: flex;
    flex-direction: column;
}

.ia-match-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ia-match-comision {
    margin-left: auto;
    padding: 3px 9px;
    border-radius: 20px;
    background: var(--ia-green-soft);
    color: var(--ia-green);
    font-size: 11px;
    font-weight: 700;
}

.ia-match-title {
    margin-top: 10px;
    color: var(--ia-title);
    font-size: 16px;
    font-weight: 700;
}

.ia-match-price {
    margin-top: 4px;
    color: var(--ia-blue);
    font-size: 18px;
    font-weight: 700;
}

.ia-match-line {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.5;
}

.ia-match-line i {
    color: var(--ia-muted);
    width: 14px;
}

.ia-match-desc {
    margin: 10px 0 0;
    color: #4a5a70;
    font-size: 13px;
    line-height: 1.55;
}

.ia-match-agent {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f0f3f7;
}

.ia-match-agent-name {
    color: var(--ia-title);
    font-size: 13px;
    font-weight: 700;
}

.ia-match-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.ia-match-buttons .ia-btn {
    flex: 1;
    height: 38px;
    padding: 0 12px;
    font-size: 13px;
}

.ia-btn-whatsapp {
    border-color: #25d366;
    background: #25d366;
}

.ia-btn-whatsapp:hover {
    background: #1ebe5b;
}

.ia-match-group {
    margin-top: 26px;
}

.ia-match-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px 16px;
    border-left: 4px solid var(--ia-blue);
    border-radius: 8px;
    background: var(--ia-white);
    font-size: 14px;
}

.ia-match-group-head strong {
    margin-left: 6px;
    color: var(--ia-title);
}

.ia-match-more {
    margin-top: 12px;
    text-align: center;
}

/* Collapse / expand groups */

.ia-match-group-head[data-collapse-toggle] {
    cursor: pointer;
    user-select: none;
    transition: background .15s ease;
}

.ia-match-group-head[data-collapse-toggle]:hover {
    background: #f8fafd;
}

.ia-match-group-head[data-collapse-toggle]:focus-visible {
    outline: 2px solid var(--ia-blue);
    outline-offset: 2px;
}

.ia-match-group-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.ia-collapse-icon {
    color: var(--ia-muted);
    font-size: 13px;
    transition: transform .2s ease;
}

.ia-match-group.collapsed .ia-collapse-icon {
    transform: rotate(180deg);
}

.ia-match-group.collapsed .ia-match-group-body {
    display: none;
}

.ia-match-group.collapsed .ia-match-group-head {
    margin-bottom: 0;
}

.ia-collapse-all {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
}

.ia-match-mine {
    border-left: 4px solid var(--ia-blue);
}

.ia-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 28px;
    padding: 0 10px;
    border-radius: 20px;
    background: #eef1f5;
    color: var(--ia-muted);
    font-weight: 700;
}

.ia-count-on {
    background: var(--ia-blue);
    color: #ffffff;
}


/* PROFILE PHOTO */

.ia-perfil-foto {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-top: 14px;
}

.ia-perfil-foto-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 110px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: var(--ia-blue-soft);
    color: var(--ia-blue);
    font-size: 34px;
    font-weight: 700;
    overflow: hidden;
}

.ia-perfil-foto-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ia-perfil-foto-actions {
    flex: 1;
    min-width: 0;
}

.ia-perfil-foto label.ia-btn {
    cursor: pointer;
}


/* TABS */

.ia-tabs {
    display: flex;
    gap: 4px;
    margin-top: 22px;
    border-bottom: 1px solid var(--ia-border);
    overflow-x: auto;
}

.ia-tabs a {
    padding: 10px 14px;
    border-bottom: 2px solid transparent;
    color: var(--ia-muted);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.ia-tabs a:hover {
    color: var(--ia-blue);
}

.ia-tabs a.active {
    border-bottom-color: var(--ia-blue);
    color: var(--ia-blue);
}


/* INBOX */

.ia-inbox {
    margin-top: 0;
    padding: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top: 0;
    overflow: hidden;
}

.ia-inbox-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f3f7;
    transition: background .15s ease;
}

.ia-inbox-row:last-child {
    border-bottom: 0;
}

.ia-inbox-row:hover {
    background: #f8fafd;
}

.ia-inbox-row .ia-avatar {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
}

.ia-inbox-main {
    flex: 1;
    min-width: 0;
}

.ia-inbox-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.ia-inbox-name {
    color: var(--ia-title);
    font-size: 14px;
    font-weight: 600;
}

.ia-inbox-date {
    color: var(--ia-muted);
    font-size: 12px;
    white-space: nowrap;
}

.ia-inbox-post {
    margin-top: 3px;
    color: #4a5a70;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ia-inbox-preview {
    margin-top: 4px;
    color: var(--ia-muted);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ia-inbox-row.unread .ia-inbox-name,
.ia-inbox-row.unread .ia-inbox-preview {
    color: var(--ia-title);
    font-weight: 700;
}


/* BACK LINK */

.ia-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 8px 14px;
    border: 1px solid #dce3eb;
    border-radius: 8px;
    background: var(--ia-white);
    color: #344767;
    font-size: 13px;
    font-weight: 600;
}

.ia-back:hover {
    border-color: var(--ia-blue);
    color: var(--ia-blue);
}


/* CONVERSATION */

.ia-chat {
    display: flex;
    flex-direction: column;
    max-width: 860px;
    margin-top: 6px;
    border: 1px solid #e1e7ef;
    border-radius: 10px;
    background: var(--ia-white);
    overflow: hidden;
}

.ia-chat-head {
    padding: 16px 20px;
    border-bottom: 1px solid #eef1f5;
}

.ia-chat-agent {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ia-chat-wa {
    margin-left: auto;
    color: #1ebe5b;
    font-size: 16px;
}

.ia-chat-post {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f7f9fc;
}

.ia-chat-post > div {
    flex: 1;
    min-width: 0;
}

.ia-chat-post-title {
    color: var(--ia-title);
    font-size: 13px;
    font-weight: 700;
}

.ia-chat-body {
    height: min(55vh, 520px);
    padding: 18px 20px;
    overflow-y: auto;
    background: #fbfcfe;
}

.ia-chat-day {
    margin: 10px 0 14px;
    color: var(--ia-muted);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.ia-bubble-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 12px;
}

.ia-bubble-row.mine {
    align-items: flex-end;
}

.ia-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 14px;
    border-bottom-left-radius: 4px;
    background: #eef1f5;
    color: var(--ia-text);
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.ia-bubble-row.mine .ia-bubble {
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 4px;
    background: var(--ia-blue);
    color: #ffffff;
}

.ia-bubble-time {
    margin-top: 3px;
    color: var(--ia-muted);
    font-size: 11px;
}

.ia-chat-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #eef1f5;
}

.ia-chat-form .ia-alert {
    flex-basis: 100%;
}

.ia-chat-form textarea {
    flex: 1;
    min-height: 44px;
    max-height: 160px;
    padding: 11px 13px;
    border: 1px solid #dce3eb;
    border-radius: 8px;
    outline: none;
    resize: vertical;
    font-size: 14px;
}

.ia-chat-form textarea:focus {
    border-color: var(--ia-blue);
}


/* SEARCH PAGE */

.ia-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ia-col-2 {
    grid-column: span 2;
}

.ia-filtros {
    margin-top: 20px;
}

.ia-filtros .ia-form-buttons {
    margin-top: 18px;
}

.ia-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}


/* INFO BUTTON (i) + POP-UP */

.ia-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ia-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    border: 1px solid #c9d6ea;
    border-radius: 50%;
    background: var(--ia-blue-soft);
    color: var(--ia-blue);
    cursor: pointer;
    font-size: 12px;
    vertical-align: middle;
}

.ia-info-btn:hover {
    background: var(--ia-blue);
    color: #ffffff;
}

.ia-dialog {
    width: min(620px, calc(100% - 32px));
    max-height: calc(100vh - 40px);
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: var(--ia-white);
    color: var(--ia-text);
    box-shadow: 0 20px 60px rgba(16, 31, 61, .25);
}

.ia-dialog::backdrop {
    background: rgba(16, 31, 61, .45);
}

.ia-dialog-head {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid #eef1f5;
    background: var(--ia-white);
}

.ia-dialog-head h2 {
    margin: 0;
    color: var(--ia-title);
    font-size: 17px;
}

.ia-dialog-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--ia-muted);
    cursor: pointer;
    font-size: 16px;
}

.ia-dialog-close:hover {
    background: #f4f7fb;
    color: var(--ia-title);
}

.ia-dialog-body {
    padding: 6px 22px 22px;
    font-size: 14px;
    line-height: 1.6;
}

.ia-dialog-body h3 {
    margin: 18px 0 6px;
    color: var(--ia-blue);
    font-size: 13px;
    letter-spacing: .4px;
    text-transform: uppercase;
}

.ia-dialog-body ul {
    margin: 0;
    padding-left: 20px;
}

.ia-dialog-body li {
    margin-bottom: 6px;
}

.ia-dialog-note {
    margin: 0 0 6px;
    color: var(--ia-muted);
    font-size: 13px;
}

.ia-dialog-tip {
    margin: 18px 0 0;
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--ia-blue-soft);
    color: #0a4fb8;
    font-size: 13px;
}


/* ADMIN */

.ia-admin-top {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 12px 30px;
    border-bottom: 1px solid var(--ia-border);
    background: var(--ia-white);
    flex-wrap: wrap;
}

.ia-admin-nav {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.ia-admin-nav a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    border-radius: 7px;
    color: #344767;
    font-size: 14px;
}

.ia-admin-nav a:hover {
    background: #f4f7fb;
    color: var(--ia-blue);
}

.ia-admin-nav a.active {
    background: var(--ia-blue-soft);
    color: var(--ia-blue);
    font-weight: 600;
}

.ia-admin-content {
    max-width: 1280px;
    margin: 0 auto;
}

.ia-admin-search {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f3f7;
}

.ia-admin-search .ia-search {
    max-width: 560px;
}

.ia-admin-agent {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ia-badge-fundador {
    margin-left: 4px;
    background: #fff4d6;
    color: #a16207;
}

.ia-text-danger {
    color: var(--ia-red);
}

.ia-card-danger {
    border-color: #f5c2c2;
}

.ia-card-danger h2 {
    color: var(--ia-red);
}

.ia-delete-list {
    margin: 0 0 6px;
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.8;
}

.ia-delete-confirm {
    max-width: 420px;
}

.ia-btn-danger {
    border-color: var(--ia-red);
    background: var(--ia-red);
}

.ia-btn-danger:hover {
    background: #b91c1c;
}

.ia-btn-danger-outline {
    border-color: #f5c2c2;
    color: var(--ia-red);
}

.ia-btn-danger-outline:hover {
    background: var(--ia-red-soft);
}

.ia-input-row {
    display: flex;
    gap: 8px;
}

.ia-input-row input {
    flex: 1;
}

.ia-table-form input,
.ia-table-form select {
    width: 100%;
    min-width: 80px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #dce3eb;
    border-radius: 7px;
    font-size: 13px;
}


/* LOGIN PAGE */

.ia-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px 16px;
}

.ia-login-box {
    width: 100%;
    max-width: 400px;
    padding: 32px 28px;
    border: 1px solid #e1e7ef;
    border-radius: 12px;
    background: var(--ia-white);
}

.ia-login-box .ia-logo-link {
    justify-content: center;
    margin-bottom: 8px;
}

.ia-login-box h1 {
    margin: 18px 0 4px;
    color: var(--ia-title);
    font-size: 22px;
    text-align: center;
}

.ia-login-box p {
    margin: 0;
    color: var(--ia-muted);
    font-size: 13px;
    text-align: center;
}

.ia-login-box .ia-btn {
    margin-top: 22px;
}

.ia-login-help {
    margin-top: 18px !important;
    font-size: 12px !important;
}


/* TABLET */

@media (max-width: 1100px) {

    .ia-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ia-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 900px) {

    .ia-sidebar {
        width: 230px;
    }

    .ia-main {
        width: calc(100% - 230px);
        margin-left: 230px;
    }

}


/* MOBILE
   The sidebar slides in from the left with the menu button. */

@media (max-width: 700px) {

    .ia-sidebar {
        width: 270px;
        transform: translateX(-100%);
        box-shadow: none;
    }

    body.ia-menu-open .ia-sidebar {
        transform: translateX(0);
        box-shadow: 0 0 30px rgba(0, 0, 0, .15);
    }

    body.ia-menu-open .ia-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 90;
        background: rgba(16, 31, 61, .35);
    }

    .ia-menu-button {
        display: inline-flex;
    }

    .ia-main {
        width: 100%;
        margin-left: 0;
    }

    .ia-topbar {
        padding: 0 15px;
    }

    .ia-user {
        margin-left: 0;
    }

    .ia-user-name {
        display: none;
    }

    /* Phone: arrow only */
    .ia-search-btn-text {
        display: none;
    }

    .ia-search input {
        padding-right: 46px;
    }

    .ia-content {
        padding: 20px 15px;
    }

    .ia-content h1 {
        font-size: 23px;
    }

    .ia-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .ia-stat {
        padding: 14px;
    }

    .ia-stat-value {
        font-size: 21px;
    }

    .ia-card {
        padding: 16px;
    }

    .ia-form-section {
        padding: 16px;
    }

    .ia-matches {
        grid-template-columns: 1fr;
    }

    .ia-inbox-row,
    .ia-chat-head,
    .ia-chat-body,
    .ia-chat-form {
        padding-left: 14px;
        padding-right: 14px;
    }

    .ia-bubble {
        max-width: 88%;
    }

    .ia-perfil-foto {
        flex-direction: column;
        align-items: flex-start;
    }

    .ia-admin-top {
        padding: 12px 15px;
        gap: 10px;
    }

    .ia-grid,
    .ia-grid-2,
    .ia-grid-4 {
        grid-template-columns: 1fr;
    }

    .ia-col-2 {
        grid-column: auto;
    }

    .ia-ubicacion-row {
        grid-template-columns: 1fr;
        padding-bottom: 12px;
        border-bottom: 1px solid #eef1f5;
    }

    .ia-form-buttons .ia-btn {
        flex: 1;
    }

}


/* ONLINE INDICATOR (admin) */

.ia-dot-online {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 4px;
    border-radius: 50%;
    background: var(--ia-green);
    box-shadow: 0 0 0 3px var(--ia-green-soft);
    vertical-align: middle;
}

.ia-session-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}


/* LOGOUT DOOR (top bar, next to the user) */

.ia-topbar-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    margin-left: 8px;
    border: 1px solid #dce3eb;
    border-radius: 8px;
    color: #53657b;
    font-size: 16px;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.ia-topbar-logout:hover {
    border-color: var(--ia-red);
    background: var(--ia-red-soft);
    color: var(--ia-red);
}

@media (max-width: 700px) {
    .ia-topbar-logout {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
        margin-left: 4px;
    }
}

/* User + door always together at the right */
.ia-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}

.ia-topbar-right .ia-user {
    margin-left: 0;
}

.ia-topbar-right .ia-topbar-logout {
    margin-left: 0;
}

/* User menu (pop-up under the photo) */
.ia-topbar-right {
    position: relative;
}

button.ia-user {
    padding: 4px 8px 4px 4px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

button.ia-user:hover,
button.ia-user[aria-expanded="true"] {
    background: #f4f7fb;
}

.ia-user-caret {
    color: #8b99aa;
    font-size: 10px;
}

.ia-user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 200;
    width: 250px;
    padding: 6px;
    border: 1px solid #e1e7ef;
    border-radius: 10px;
    background: var(--ia-white);
    box-shadow: 0 12px 32px rgba(16, 31, 61, .15);
}

.ia-user-menu[hidden] {
    display: none;
}

.ia-user-menu-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    padding: 10px;
    border-bottom: 1px solid #eef1f5;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.ia-user-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 7px;
    color: #344767;
    font-size: 14px;
}

.ia-user-menu a i {
    width: 16px;
    color: #8b99aa;
    text-align: center;
}

.ia-user-menu a:hover {
    background: #f4f7fb;
    color: var(--ia-blue);
}

.ia-user-menu a.ia-user-menu-logout:hover,
.ia-user-menu a.ia-user-menu-logout:hover i {
    background: var(--ia-red-soft);
    color: var(--ia-red);
}

@media (max-width: 700px) {
    .ia-user-caret {
        display: none;
    }
}


/* ONLINE LABEL */

.ia-online {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 4px;
    color: var(--ia-green);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    vertical-align: middle;
}

.ia-online .ia-dot-online {
    width: 7px;
    height: 7px;
    box-shadow: 0 0 0 2px var(--ia-green-soft);
}


/* MY SUBSCRIPTION */

.ia-sub-plan-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.ia-sub-plan-name {
    margin: 2px 0 4px;
    color: var(--ia-title);
    font-size: 26px;
    font-weight: 700;
}

.ia-sub-usage {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.ia-sub-usage-item {
    padding: 16px;
    border-radius: 10px;
    background: #f7f9fc;
}

.ia-sub-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
}

.ia-sub-plan-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 14px;
    border: 1px solid #e1e7ef;
    border-radius: 10px;
    text-align: center;
}

.ia-sub-plan-option.current {
    border: 2px solid var(--ia-blue);
    background: var(--ia-blue-soft);
}

.ia-sub-plan-option-name {
    color: var(--ia-title);
    font-size: 15px;
    font-weight: 700;
}

.ia-sub-plan-option-limit {
    margin: 6px 0 2px;
    color: var(--ia-blue);
    font-size: 32px;
    font-weight: 700;
}

.ia-sub-skool {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #eef1f5;
}

.ia-sub-web {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 700px) {
    .ia-sub-usage,
    .ia-sub-web {
        grid-template-columns: 1fr;
    }
}


/* MI SITIO WEB: palette, logo/cover previews, domain steps */

.ia-paleta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ia-paleta-op {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 84px;
    cursor: pointer;
}

.ia-paleta-op input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ia-paleta-color {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--ia-white), 0 0 0 4px #dce3eb;
    transition: box-shadow .15s ease;
}

.ia-paleta-op input:checked + .ia-paleta-color {
    box-shadow: 0 0 0 3px var(--ia-white), 0 0 0 6px var(--ia-title);
}

.ia-paleta-op input:focus-visible + .ia-paleta-color {
    outline: 2px solid var(--ia-blue);
    outline-offset: 6px;
}

.ia-paleta-nombre {
    color: #344767;
    font-size: 12px;
    text-align: center;
}

.ia-web-img {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #c9d6ea;
    border-radius: 10px;
    background: #f7f9fc;
    overflow: hidden;
}

.ia-web-logo {
    height: 110px;
    padding: 12px;
}

.ia-web-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.ia-web-portada {
    aspect-ratio: 12 / 5;
}

.ia-web-portada img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ia-pasos {
    margin: 12px 0 0;
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.7;
}

.ia-pasos li {
    margin-bottom: 8px;
}

.ia-dns {
    max-width: 460px;
    margin: 8px 0 4px;
    border: 1px solid #eef1f5;
}


/* PROPERTY PHOTOS (publish form) */

.ia-fotos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin: 6px 0 12px;
}

.ia-fotos-grid:empty {
    display: none;
}

.ia-foto-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    border: 1px solid #e1e7ef;
    border-radius: 9px;
    background: var(--ia-white);
    font-size: 12px;
}

.ia-foto-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 6px;
    object-fit: cover;
    background: #eef1f5;
}

.ia-foto-op {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #344767;
    cursor: pointer;
}

.ia-foto-op input[type="number"] {
    width: 58px;
    height: 28px;
    padding: 0 6px;
    border: 1px solid #dce3eb;
    border-radius: 6px;
}

.ia-foto-borrar {
    color: var(--ia-red);
}

.ia-foto-nueva {
    border-style: dashed;
    border-color: var(--ia-blue);
}

.ia-fotos-btn {
    margin-right: 8px;
    cursor: pointer;
}


/* PROPERTY THUMBNAIL ON CARDS (agents with website) */

.ia-match-thumb {
    display: block;
    width: 64px;
    height: 48px;
    flex: 0 0 64px;
    border-radius: 6px;
    object-fit: cover;
    background: #eef1f5;
}

.ia-match-buttons .ia-match-link {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.ia-match-buttons .ia-match-link .ia-btn {
    flex: 1;
}

.ia-private {
    margin-top: 3px;
    color: var(--ia-muted);
    font-size: 11px;
}


/* =========================================================
   FIX: elements inside .ia-field that are NOT normal fields
   (general ".ia-field label / input" rules were overriding them)
========================================================= */

/* Checkboxes and radios inside a field: normal small size */
.ia-field input[type="checkbox"],
.ia-field input[type="radio"] {
    width: 17px;
    height: 17px;
    padding: 0;
    border: 0;
    flex-shrink: 0;
}

/* Buttons made with <label> (file pickers) */
.ia-field label.ia-btn {
    display: inline-flex;
    margin-bottom: 0;
    color: var(--ia-blue);
    font-size: 14px;
}

/* "Quitar" and other inline checkboxes */
.ia-field label.ia-check {
    display: inline-flex;
    margin-bottom: 0;
    font-weight: 400;
}

/* Color palette */
.ia-field .ia-paleta-op {
    position: relative;
    display: flex;
    margin-bottom: 0;
    font-weight: 400;
}

.ia-field .ia-paleta-op input {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.ia-paleta-color {
    display: block;
    flex-shrink: 0;
}

.ia-paleta-op:hover .ia-paleta-color {
    box-shadow: 0 0 0 3px var(--ia-white), 0 0 0 5px #9fb0c6;
}

/* Photo controls (publish form) */
.ia-field .ia-foto-op {
    display: flex;
    margin-bottom: 0;
    font-size: 12px;
    font-weight: 400;
}

.ia-field .ia-foto-op input[type="number"] {
    width: 58px;
    height: 28px;
    padding: 0 6px;
}

.ia-field .ia-foto-borrar {
    color: var(--ia-red);
}


/* INTERASESOR LOGO (image) */

.ia-logo-img {
    display: block;
    width: 190px;
    max-width: 100%;
    height: auto;
}

.ia-logo-login {
    width: 230px;
    margin: 0 auto;
}

.ia-admin-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.ia-admin-brand .ia-logo-img {
    width: 170px;
}

.ia-admin-label {
    color: #7a8aa0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
}

@media (max-width: 900px) {
    .ia-sidebar .ia-logo-img {
        width: 165px;
    }
}


/* CHARACTER COUNTER (textareas) */

.ia-contador {
    margin-top: 4px;
    color: var(--ia-muted);
    font-size: 11px;
    text-align: right;
}

.ia-contador-casi {
    color: var(--ia-orange);
    font-weight: 700;
}

.ia-contador-lleno {
    color: var(--ia-red);
    font-weight: 700;
}


/* ---------------------------------------------------------
   SUPPORT + FAQ
--------------------------------------------------------- */

/* Small counter inside a tab or admin menu link */
.ia-tab-badge {
    min-width: 18px;
    height: 18px;
    margin-left: 6px;
    padding: 0 5px;
    font-size: 10px;
    vertical-align: middle;
}

.ia-faq {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 860px;
    margin-top: 18px;
}

.ia-faq-item {
    border: 1px solid #e1e7ef;
    border-radius: 10px;
    background: var(--ia-white);
}

.ia-faq-item summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    color: var(--ia-title);
    font-size: 15px;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}

.ia-faq-item summary::-webkit-details-marker {
    display: none;
}

.ia-faq-item summary span {
    flex: 1;
}

.ia-faq-item summary i {
    color: var(--ia-muted);
    font-size: 12px;
    transition: transform .2s;
}

.ia-faq-item[open] summary i {
    transform: rotate(180deg);
}

.ia-faq-item[open] summary {
    color: var(--ia-blue);
}

.ia-faq-answer {
    padding: 0 18px 18px;
    color: var(--ia-text);
    font-size: 14px;
    line-height: 1.65;
}

.ia-faq-help {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 860px;
    margin-top: 22px;
    padding: 16px 18px;
    border-radius: 10px;
    background: var(--ia-blue-soft);
    color: var(--ia-text);
    font-size: 14px;
}

.ia-faq-help > i {
    color: var(--ia-blue);
    font-size: 22px;
}

/* Admin support inbox */
.ia-faq-off {
    opacity: .55;
}

/* Suggestions */
.ia-sugerencia {
    padding: 14px 18px;
    border: 1px solid #e1e7ef;
    border-radius: 10px;
    background: var(--ia-white);
}

.ia-sugerencia-texto {
    margin: 4px 0 6px;
    color: var(--ia-text);
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.ia-sugerencia-admin {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f3f7;
}

.ia-sugerencia-admin:last-child {
    border-bottom: 0;
}

.ia-sugerencia-admin.unread {
    background: #f7faff;
}

.ia-sugerencia-admin.unread .ia-inbox-name {
    color: var(--ia-title);
    font-weight: 700;
}

/* Asterisk that opens the commission explanation (Afiliados) */
.ia-asterisco {
    margin-left: 3px;
    padding: 0 4px;
    border: 0;
    border-radius: 4px;
    background: var(--ia-blue-soft);
    color: var(--ia-blue);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
    vertical-align: top;
}

.ia-asterisco:hover {
    background: var(--ia-blue);
    color: #ffffff;
}

/* Registration page (registro.php) */
.ia-registro-box {
    max-width: 560px;
}

.ia-registro-box form {
    margin-top: 18px;
}

.ia-login-box .ia-alert {
    margin-top: 16px;
    text-align: left;
}

.ia-login-box form .ia-field {
    margin-top: 14px;
}

.ia-codigo-input {
    font-size: 20px !important;
    font-weight: 700;
    letter-spacing: 3px;
    text-align: center;
    text-transform: uppercase;
}

/* Invitation code in Afiliados */
.ia-codigo-grande {
    font-size: 22px !important;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--ia-title);
}

/* Radio choices (registro.php) */
.ia-opciones {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ia-opcion {
    display: flex !important;
    align-items: center;
    gap: 8px;
    flex: 1 1 140px;
    margin: 0 !important;
    padding: 11px 13px;
    border: 1px solid #dce3eb;
    border-radius: 8px;
    font-weight: 500 !important;
    cursor: pointer;
}

.ia-opcion:has(input:checked) {
    border-color: var(--ia-blue);
    background: var(--ia-blue-soft);
    color: var(--ia-blue);
}

.ia-opcion input {
    width: auto !important;
    margin: 0;
}

[hidden] {
    display: none !important;
}

.ia-ahorro-mini {
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--ia-green-soft);
    color: var(--ia-green);
    font-size: 11px;
    font-weight: 700;
}

.precio-web {
    color: var(--ia-blue);
    font-weight: 700;
}

/* Option with its own explanation below (Mi Sitio Web) */
.ia-opcion-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 240px;
}

.ia-opcion-col .ia-opcion {
    flex: 0 0 auto;
}

/* More breathing room between fields (Mi Sitio Web) */
.ia-form-aireado .ia-form-hint {
    margin-bottom: 8px;
}

.ia-form-aireado > .ia-field,
.ia-form-aireado .ia-grid > .ia-field {
    margin-top: 26px;
}

/* Each sub-section (question) separated by a thin line */
.ia-form-aireado > .ia-field {
    padding-top: 26px;
    border-top: 1px solid #eef1f5;
}

.ia-form-aireado .ia-field > label {
    margin-bottom: 10px;
    font-size: 14px;
}

.ia-form-aireado .ia-field-note {
    margin-top: 6px;
}

.ia-form-aireado .ia-form-buttons {
    margin-top: 28px;
}

/* Mis publicaciones: location as two lines, left aligned */
.ia-ubic {
    text-align: left;
    line-height: 1.4;
}

.ia-ubic-colonia {
    color: var(--ia-title);
    font-weight: 600;
}

/* Mis publicaciones: "Sitio web" column toggle */
.ia-tabla-opciones {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.ia-tabla-opciones .ia-btn {
    padding: 7px 12px;
    font-size: 13px;
}

.ocultar-col-web .col-web {
    display: none;
}


/* ---------------------------------------------------------
   NARROWER LEFT MENU (the menu is shorter now, so the
   content gets more room on the right)
--------------------------------------------------------- */
@media (min-width: 701px) {
    .ia-sidebar {
        width: 220px;
    }

    .ia-main {
        width: calc(100% - 220px);
        margin-left: 220px;
    }
}

/* Keep a little space between a menu word and its bubble (e.g. Coincidencias 12) */
.ia-nav-item .ia-nav-badge {
    flex: none;
    margin-left: 8px;
}

.ia-sidebar .ia-logo-img {
    width: 150px !important;
}

/* Coincidencias: groups a little closer together (was 26px) */
.ia-match-group {
    margin-top: 16px;
}

.ia-collapse-all + .ia-match-group {
    margin-top: 14px;
}

/* "Cerrar sesión" at the bottom of the menu: red on hover, like the door at the top */
.ia-nav-item.ia-logout:hover {
    background: var(--ia-red-soft);
    color: var(--ia-red);
}

.ia-nav-item.ia-logout:hover .ia-nav-icon,
.ia-nav-item.ia-logout:hover i {
    color: var(--ia-red);
}

/* =========================================================
   IMPORT FROM EXCEL (u_importar.php)
========================================================= */
.ia-page-head-botones {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ia-nowrap {
    white-space: nowrap;
}

.ia-imp-subir {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.ia-imp-subir input[type="file"] {
    max-width: 100%;
}

.ia-imp-tabla td {
    vertical-align: top;
}

.ia-imp-tabla tr.ia-imp-error td {
    background: var(--ia-red-soft);
}

.ia-imp-ubic {
    min-width: 260px;
}

.ia-imp-ubic select {
    width: 100%;
    max-width: 380px;
}

.ia-imp-colonia.ia-imp-falta {
    border-color: var(--ia-orange);
    background: var(--ia-orange-soft);
}

.ia-imp-cp {
    display: flex;
    gap: 6px;
}

.ia-imp-cp-input {
    width: 80px !important;
    flex: none;
}

.ia-imp-msg {
    font-size: 13px;
    color: var(--ia-muted);
    margin-top: 4px;
}

.ia-imp-msg-error {
    color: var(--ia-red);
}

.ia-imp-msg-aviso {
    color: var(--ia-orange);
}

/* =========================================================
   POSTAL CODE SEARCH (u_codigos_postales.php)
========================================================= */
.ia-cp-buscador {
    position: relative;
}

.ia-cp-buscador i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ia-muted);
}

.ia-cp-buscador input {
    width: 100%;
    height: 50px;
    padding: 0 16px 0 44px;
    font-size: 16px;
}

.ia-cp-explorar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

.ia-cp-explorar select {
    width: auto;
    min-width: 200px;
    max-width: 100%;
}

.ia-cp-resumen {
    margin: 18px 0 10px;
}

.ia-cp-codigo {
    font-weight: 700;
    color: var(--ia-blue);
    text-decoration: none;
    font-variant-numeric: tabular-nums;
}

.ia-cp-codigo:hover {
    text-decoration: underline;
}

.ia-cp-copiar {
    border: 0;
    background: transparent;
    color: var(--ia-muted);
    cursor: pointer;
    padding: 2px 4px;
}

.ia-cp-copiar:hover {
    color: var(--ia-blue);
}

/* Same look as the form fields for controls outside .ia-field */
.ia-cp-buscador input,
.ia-cp-explorar select,
.ia-imp-ubic select,
.ia-imp-ubic input {
    height: 42px;
    padding: 0 13px;
    border: 1px solid #dce3eb;
    border-radius: 8px;
    outline: none;
    background-color: var(--ia-white);
    color: #344767;
    font-size: 14px;
}

.ia-cp-buscador input {
    height: 50px;
    padding-left: 44px;
    font-size: 16px;
}

.ia-imp-ubic select,
.ia-imp-ubic input {
    height: 36px;
    padding: 0 10px;
}

.ia-cp-buscador input:focus,
.ia-cp-explorar select:focus,
.ia-imp-ubic select:focus,
.ia-imp-ubic input:focus {
    border-color: var(--ia-blue);
}

.ia-imp-colonia.ia-imp-falta {
    border-color: var(--ia-orange);
    background-color: var(--ia-orange-soft);
}

/* =========================================================
   COINCIDENCIAS: tabs + Me interesa / No me interesa
   Orange = Por revisar · Green = Me interesan · Red = Descartadas
========================================================= */
.ia-ctabs {
    display: flex;
    gap: 8px;
    margin: 22px 0 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
}

.ia-ctab {
    --c: var(--ia-blue);
    --c-soft: var(--ia-blue-soft);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: none;
    height: 40px;
    padding: 0 14px;
    border: 1.5px solid var(--c);
    border-radius: 999px;
    background: var(--ia-white);
    color: var(--c);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.ia-ctab:hover {
    background: var(--c-soft);
}

.ia-ctab.active {
    background: var(--c);
    color: #ffffff;
}

.ia-ctab-count {
    min-width: 24px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--c-soft);
    color: var(--c);
    font-size: 12px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
}

.ia-ctab.active .ia-ctab-count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.ia-ctab-revisar    { --c: var(--ia-orange); --c-soft: var(--ia-orange-soft); }
.ia-ctab-interesa   { --c: var(--ia-green);  --c-soft: var(--ia-green-soft); }
.ia-ctab-descartada { --c: var(--ia-red);    --c-soft: var(--ia-red-soft); }

/* Group counter in the tab's color */
.ia-count-revisar    { background: var(--ia-orange); }
.ia-count-interesa   { background: var(--ia-green); }
.ia-count-descartada { background: var(--ia-red); }

/* Card color by its state */
.ia-match-revisar    { border-left: 4px solid var(--ia-orange); }
.ia-match-interesa   { border-left: 4px solid var(--ia-green); }
.ia-match-descartada { border-left: 4px solid var(--ia-red); }

.ia-marca-chip {
    margin-left: auto;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ia-match-revisar .ia-marca-chip    { background: var(--ia-orange-soft); color: var(--ia-orange); }
.ia-match-interesa .ia-marca-chip   { background: var(--ia-green-soft);  color: var(--ia-green); }
.ia-match-descartada .ia-marca-chip { background: var(--ia-red-soft);    color: var(--ia-red); }

/* The buttons */
.ia-marca-form {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--ia-border);
}

.ia-marca-btn {
    flex: 1;
    height: 36px;
    border: 1.5px solid currentColor;
    border-radius: 8px;
    background: var(--ia-white);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.ia-marca-si { color: var(--ia-green); }
.ia-marca-no { color: var(--ia-red); }

.ia-marca-si:hover { background: var(--ia-green-soft); }
.ia-marca-no:hover { background: var(--ia-red-soft); }

.ia-marca-si[aria-pressed="true"] { background: var(--ia-green); border-color: var(--ia-green); color: #ffffff; }
.ia-marca-no[aria-pressed="true"] { background: var(--ia-red);   border-color: var(--ia-red);   color: #ffffff; }

.ia-marca-btn[aria-pressed="true"] {
    cursor: default;
}

.ia-marca-btn:disabled {
    opacity: 0.6;
}

/* Card leaving the tab */
.ia-match {
    transition: opacity 0.25s, transform 0.25s;
}

.ia-match-saliendo {
    opacity: 0;
    transform: scale(0.97);
}

/* Dashboard: "3 me interesan" next to the number */
.ia-stat-extra {
    margin-left: 6px;
    color: var(--ia-green);
    font-size: 13px;
    font-weight: 600;
}

/* Coincidencias menu: the group number shows only while the group is closed
   (when it's open, each Renta / Venta shows its own) */
.ia-nav-parent.submenu-open .ia-nav-badge-grupo {
    display: none !important;
}

/* "Coincidencias · Ofrezco en renta" */
.ia-h1-sub {
    color: var(--ia-muted);
    font-weight: 600;
}

/* Number on a closed group (Ofrezco 3 ˅): keep it away from the arrow */
.ia-nav-parent .ia-nav-badge {
    margin-right: 10px;
}

/* "Por revisar" button (cards already marked): orange, on the left */
.ia-marca-revisar { color: var(--ia-orange); }
.ia-marca-revisar:hover { background: var(--ia-orange-soft); }

/* =========================================================
   PREGUNTAR: menu with ready-made messages (inc.preguntas.php)
========================================================= */
.ia-preguntar {
    position: relative;
    flex: 1;
}

.ia-preguntar > summary {
    list-style: none;
    width: 100%;
    height: 38px;
    padding: 0 12px;
    font-size: 13px;
}

.ia-preguntar > summary::-webkit-details-marker {
    display: none;
}

.ia-preguntar-flecha {
    font-size: 10px;
    transition: transform 0.2s;
}

.ia-preguntar[open] .ia-preguntar-flecha {
    transform: rotate(180deg);
}

.ia-preguntar-menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    left: 0;
    width: max-content;
    min-width: 100%;
    max-width: min(340px, 90vw);
    padding: 6px;
    border: 1px solid var(--ia-border);
    border-radius: 10px;
    background: var(--ia-white);
    box-shadow: 0 10px 30px rgba(16, 31, 61, 0.15);
}

.ia-preguntar-menu a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 7px;
    color: var(--ia-text);
    text-decoration: none;
}

.ia-preguntar-menu a:hover {
    background: var(--ia-blue-soft);
}

.ia-preguntar-menu a > i {
    margin-top: 3px;
    color: var(--ia-blue);
}

.ia-preguntar-menu strong {
    display: block;
    font-size: 13px;
}

.ia-preguntar-menu small {
    display: block;
    margin-top: 2px;
    color: var(--ia-muted);
    font-size: 12px;
    line-height: 1.35;
    word-break: break-word;
}

/* Conversation: ready-made questions above the box (first message only) */
.ia-chat-preguntas {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    margin-bottom: 10px;
}

.ia-chat-pregunta {
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--ia-blue);
    border-radius: 999px;
    background: var(--ia-white);
    color: var(--ia-blue);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.ia-chat-pregunta:hover {
    background: var(--ia-blue-soft);
}

/* Coincidencias button on a row of my posts: [ (orange) ⇄ (green) ] in one button */
.ia-icon-btn.ia-coin-btn {
    width: auto;
    min-width: 34px;
    gap: 6px;
    padding: 0 6px;
}

.ia-coin-num {
    font-size: 13px;
    font-weight: 700;
}

.ia-coin-revisar  { color: var(--ia-orange); }
.ia-coin-interesa { color: var(--ia-green); }

.ia-coin-btn i {
    color: #344767;
}

/* =========================================================
   PHONE APP (u_app.php): notices only
========================================================= */
.ia-app-body {
    background: var(--ia-bg);
}

.ia-app {
    max-width: 560px;
    margin: 0 auto;
    padding: calc(14px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
}

.ia-app-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0 14px;
}

.ia-app-logo {
    width: 150px;
    min-width: 0;
    height: auto;
}

@media (max-width: 345px) {
    .ia-app-logo {
        width: 130px;
    }
}

.ia-app-salir {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 8px;
    color: var(--ia-red);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

/* Same door box as the computer header, in red */
.ia-app-salir-puerta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--ia-red);
    border-radius: 8px;
    background: var(--ia-red-soft);
    color: var(--ia-red);
    font-size: 16px;
}

.ia-app-hola {
    margin: 6px 0 16px;
    font-size: 24px;
}

.ia-app-avisos {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ia-app-aviso {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
    padding: 16px;
    border: 1px solid var(--ia-border);
    border-radius: 12px;
    background: var(--ia-white);
}

.ia-app-aviso > i {
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--ia-blue-soft);
    color: var(--ia-blue);
    font-size: 18px;
    line-height: 42px;
    text-align: center;
}

.ia-app-aviso strong {
    display: block;
    font-size: 18px;
    line-height: 1.35;
}

.ia-app-aviso span {
    display: block;
    margin-top: 3px;
    color: var(--ia-muted);
    font-size: 15px;
}

.ia-app-pausada > i {
    background: var(--ia-orange-soft);
    color: var(--ia-orange);
}

.ia-app-vacio {
    padding: 36px 20px;
    border: 1px dashed var(--ia-border);
    border-radius: 12px;
    background: var(--ia-white);
    text-align: center;
}

.ia-app-vacio i {
    color: var(--ia-muted);
    font-size: 28px;
}

.ia-app-vacio strong {
    display: block;
    margin-top: 10px;
}

.ia-app-vacio span {
    display: block;
    margin-top: 4px;
    color: var(--ia-muted);
    font-size: 14px;
}

.ia-app-nota {
    margin: 22px 4px;
    color: var(--ia-text);
    font-size: 17px;
    line-height: 1.5;
    text-align: center;
}

.ia-app-nota i {
    display: block;
    margin-bottom: 6px;
    color: var(--ia-blue);
    font-size: 22px;
}

.ia-app-instalar {
    margin-top: 8px;
    padding: 16px;
    border-radius: 12px;
    background: var(--ia-blue-soft);
    color: var(--ia-text);
    font-size: 14px;
}

.ia-app-instalar p {
    margin: 8px 0 0;
    line-height: 1.5;
}

.ia-app-instalar .ia-btn {
    margin-top: 12px;
}

/* Herramientas > App (computer) */
.ia-app-info {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 0 20px;
    align-items: start;
}

.ia-app-info .ia-form-section:last-child {
    grid-column: 1 / -1;
}

.ia-app-qr-box {
    text-align: center;
}

.ia-app-qr {
    display: inline-block;
    margin-top: 6px;
    padding: 10px;
    border: 1px solid var(--ia-border);
    border-radius: 10px;
    background: #ffffff;
}

.ia-app-url {
    margin-top: 10px;
    color: var(--ia-blue);
    font-size: 18px;
    font-weight: 700;
}

.ia-app-lista-info {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ia-app-lista-info li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--ia-border);
}

.ia-app-lista-info i {
    width: 20px;
    color: var(--ia-blue);
    text-align: center;
}

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

/* Phone app: notifications box */
.ia-app-notif {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid var(--ia-border);
    border-radius: 12px;
    background: var(--ia-white);
    font-size: 14px;
}

.ia-app-notif p {
    margin: 6px 0 0;
    color: var(--ia-muted);
    line-height: 1.5;
}

.ia-app-notif .ia-btn {
    margin-top: 12px;
}

#ia-notif-ok .ia-app-pref-btn strong {
    color: var(--ia-green);
}

/* Phone app: "Notificaciones activadas" opens / closes the preferences */
.ia-app-pref-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.ia-app-pref-ver {
    flex: 0 0 auto;
    color: var(--ia-blue);
    font-size: 13px;
    font-weight: 600;
}

.ia-app-pref-ver i {
    margin-left: 3px;
    transition: transform 0.15s;
}

.ia-app-pref-btn[aria-expanded="true"] .ia-app-pref-ver i {
    transform: rotate(180deg);
}

/* Phone app: what to be notified about (switches) */
.ia-app-switches {
    margin-top: 12px;
    border-top: 1px solid var(--ia-border);
}

.ia-app-switch {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--ia-border);
    cursor: pointer;
}

.ia-app-switch-txt {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--ia-text);
    font-weight: 600;
    line-height: 1.35;
}

.ia-app-switch-txt i {
    width: 18px;
    margin-top: 2px;
    color: var(--ia-muted);
    text-align: center;
}

.ia-app-switch-txt small {
    display: block;
    color: var(--ia-muted);
    font-size: 12px;
    font-weight: 400;
}

.ia-app-switch input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.ia-app-switch-bola {
    position: relative;
    flex: 0 0 auto;
    width: 46px;
    height: 26px;
    border-radius: 13px;
    background: #cfd6df;
    transition: background 0.15s;
}

.ia-app-switch-bola::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s;
}

.ia-app-switch input:checked + .ia-app-switch-bola {
    background: var(--ia-green);
}

.ia-app-switch input:checked + .ia-app-switch-bola::after {
    transform: translateX(20px);
}

.ia-app-switch input:focus-visible + .ia-app-switch-bola {
    outline: 2px solid var(--ia-blue);
    outline-offset: 2px;
}

.ia-app-notif .ia-app-desactivar {
    margin-top: 16px;
    color: var(--ia-muted);
}

.ia-app-notif .ia-app-desactivar-nota {
    font-size: 12px;
    text-align: center;
}

.ia-app-link {
    margin-top: 10px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ia-blue);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.ia-app-notif-msg {
    margin-top: 10px;
    color: var(--ia-text);
    font-size: 13px;
}

/* Phone app: advertising banner fixed at the bottom (1080 x 360, 3:1) */
.ia-app-con-banner {
    /* room so the last notices aren't hidden behind the banner */
    padding-bottom: calc(min(100vw - 32px, 528px) / 3 + 40px + env(safe-area-inset-bottom));
}

.ia-app-banner {
    position: fixed;
    z-index: 50;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
    background: rgba(247, 249, 252, 0.96);
    box-shadow: 0 -4px 16px rgba(16, 31, 61, 0.08);
}

.ia-app-banner-caja {
    position: relative;
    max-width: 528px;
    margin: 0 auto;
}

.ia-app-banner-caja a {
    display: block;
}

.ia-app-banner img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 1;
    border-radius: 10px;
    object-fit: cover;
}

.ia-app-banner-etiqueta {
    position: absolute;
    z-index: 1;
    top: 6px;
    left: 6px;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    pointer-events: none;
}

/* Admin preview */
.ia-banner-preview img {
    display: block;
    width: 100%;
    max-width: 540px;
    height: auto;
    border: 1px solid var(--ia-border);
    border-radius: 10px;
}


/* =========================================================
   TOP BAR: BELL AND CHAT POP-UPS (includes/inc.panel_topbar.php)
========================================================= */

.ia-pop-wrap {
    position: relative;
}

.ia-topbar-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #dce3eb;
    border-radius: 8px;
    background: transparent;
    color: #53657b;
    font-size: 17px;
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.ia-topbar-icon:hover,
.ia-topbar-icon[aria-expanded="true"] {
    border-color: var(--ia-blue);
    background: var(--ia-blue-soft);
    color: var(--ia-blue);
}

.ia-topbar-count {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border: 2px solid var(--ia-white);
    border-radius: 20px;
    background: var(--ia-red);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    line-height: 15px;
    text-align: center;
}

.ia-pop {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 210;
    width: 370px;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    border: 1px solid #e1e7ef;
    border-radius: 12px;
    background: var(--ia-white);
    box-shadow: 0 12px 32px rgba(16, 31, 61, .15);
}

.ia-pop[hidden] {
    display: none;
}

.ia-pop-head {
    padding: 12px 16px;
    border-bottom: 1px solid #eef1f5;
    color: var(--ia-title);
    font-size: 15px;
    font-weight: 700;
}

.ia-pop-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f4f8;
    color: var(--ia-text);
    text-decoration: none;
}

.ia-pop-item:hover {
    background: #f7f9fc;
}

.ia-pop-icono {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--ia-blue-soft);
    color: var(--ia-blue);
    font-size: 15px;
}

.ia-pop-avatar {
    flex: none;
    width: 36px;
    height: 36px;
}

.ia-pop-texto {
    flex: 1;
    min-width: 0;
}

.ia-pop-texto strong {
    display: block;
    color: var(--ia-title);
    font-size: 14px;
    line-height: 1.35;
}

.ia-pop-texto span {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    color: var(--ia-muted);
    font-size: 12.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ia-pop-texto .ia-pop-msj {
    color: var(--ia-text);
    font-size: 13px;
}

.ia-pop-n {
    display: inline-block;
    min-width: 18px;
    margin-left: 4px;
    padding: 0 5px;
    border-radius: 20px;
    background: var(--ia-blue);
    color: #ffffff;
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    vertical-align: 1px;
}

.ia-pop-cuando {
    flex: none;
    align-self: flex-start;
    color: var(--ia-muted);
    font-size: 11.5px;
    white-space: nowrap;
}

.ia-pop-vacio {
    padding: 26px 16px;
    color: var(--ia-muted);
    font-size: 14px;
    text-align: center;
}

.ia-pop-vacio i {
    display: block;
    margin-bottom: 8px;
    font-size: 22px;
}

.ia-pop-pie {
    display: block;
    padding: 11px 16px;
    color: var(--ia-blue);
    font-size: 13.5px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.ia-pop-pie:hover {
    background: #f7f9fc;
}

/* Bell menu: link to Novedades InterAsesor (always there) */
.ia-pop-novedades {
    border-top: 1px solid var(--ia-border);
    color: var(--ia-muted);
    font-weight: 500;
}

.ia-pop-novedades i {
    margin-right: 4px;
    color: #e0a100;
}

@media (max-width: 700px) {
    .ia-topbar-icon {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 600px) {
    .ia-pop {
        position: fixed;
        top: 64px;
        right: 10px;
        left: 10px;
        width: auto;
    }
}


/* =========================================================
   MARKETING > PROMOCIONAR (u_marketing.php)
========================================================= */

.ia-mkt-filtro {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    font-size: 14px;
}

.ia-mkt-filtro select {
    height: 38px;
    padding: 0 10px;
    border: 1px solid var(--ia-border);
    border-radius: 8px;
    background: var(--ia-white);
    font-size: 14px;
}

.ia-mkt-tipo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ia-mkt-tipo a {
    color: var(--ia-text);
    text-decoration: none;
}

.ia-mkt-tipo a:hover {
    color: var(--ia-blue);
}

.ia-mkt-foto {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 36px;
    overflow: hidden;
    border-radius: 6px;
    background: #eef2f7;
    color: #9aa8b8;
    font-size: 15px;
}

.ia-mkt-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* One narrow column per network: logo on top, only the square below */
.ia-mkt-tabla th.ia-mkt-col-red,
.ia-mkt-tabla td.ia-mkt-col-red {
    width: 44px;
    padding-right: 6px;
    padding-left: 6px;
    text-align: center;
}

.ia-mkt-tabla th.ia-mkt-col-red i {
    font-size: 17px;
}

.ia-mkt-col-instagram i { color: #d62976; }
.ia-mkt-col-facebook i { color: #1877f2; }
.ia-mkt-col-tiktok i,
.ia-mkt-col-x i { color: #111111; }

.ia-mkt-check {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--ia-green);
    cursor: pointer;
}

.ia-mkt-botones {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
}

.ia-mkt-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--ia-border);
    border-radius: 8px;
    background: var(--ia-white);
    color: var(--ia-text);
    cursor: pointer;
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap;
}

.ia-mkt-btn:hover,
.ia-mkt-btn.activo {
    border-color: var(--ia-blue);
    background: var(--ia-blue-soft);
    color: var(--ia-blue);
}

.ia-mkt-btn-whatsapp i { color: #25d366; }
.ia-mkt-btn-instagram i { color: #d62976; }
.ia-mkt-btn-facebook i { color: #1877f2; }
.ia-mkt-btn-tiktok i,
.ia-mkt-btn-x i { color: #111111; }

.ia-mkt-tabla td {
    vertical-align: middle;
}

.ia-mkt-panel {
    padding: 14px;
    border-radius: 10px;
    background: #f7f9fc;
}

.ia-mkt-panel textarea,
.ia-mkt-asunto input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--ia-border);
    border-radius: 8px;
    background: var(--ia-white);
    color: var(--ia-text);
    font: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
}

.ia-mkt-asunto {
    margin-bottom: 10px;
}

.ia-mkt-asunto label {
    display: block;
    margin-bottom: 4px;
    color: var(--ia-muted);
    font-size: 12.5px;
    font-weight: 600;
}

.ia-mkt-acciones {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.ia-mkt-acciones .ia-btn[hidden] {
    display: none;
}

.ia-mkt-contador {
    margin-left: auto;
    color: var(--ia-muted);
    font-size: 12.5px;
}

.ia-mkt-contador.excede {
    color: var(--ia-red);
    font-weight: 700;
}

.ia-mkt-nota {
    margin: 8px 0 0;
    color: var(--ia-muted);
    font-size: 12.5px;
}

.ia-mkt-fotos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin: 10px 0 16px;
}

.ia-mkt-foto-op {
    position: relative;
    padding: 0;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border: 2px solid transparent;
    border-radius: 8px;
    background: #eef2f7;
    cursor: pointer;
}

.ia-mkt-foto-op img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ia-mkt-foto-check {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: rgba(0, 0, 0, .35);
    color: transparent;
    font-size: 12px;
}

.ia-mkt-foto-op.elegida {
    border-color: var(--ia-blue);
}

.ia-mkt-foto-op.elegida .ia-mkt-foto-check {
    background: var(--ia-blue);
    color: #ffffff;
}

.ia-mkt-fotos-acciones {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ia-mkt-fotos-acciones .ia-btn[disabled] {
    opacity: .5;
    cursor: default;
}

/* Marketing: filter + gear bar, platforms pop-up */
.ia-mkt-barra {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 16px;
}

.ia-mkt-barra .ia-mkt-filtro {
    margin: 0;
}

.ia-mkt-engrane {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-left: auto;
    border: 1px solid var(--ia-border);
    border-radius: 8px;
    background: var(--ia-white);
    color: #53657b;
    cursor: pointer;
    font-size: 17px;
}

.ia-mkt-engrane:hover {
    border-color: var(--ia-blue);
    background: var(--ia-blue-soft);
    color: var(--ia-blue);
}

.ia-dialog-chico {
    width: min(380px, calc(100% - 32px));
}

.ia-mkt-redes-form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.ia-mkt-redes-op {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    font-size: 15px;
    cursor: pointer;
}

.ia-mkt-redes-op input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.ia-mkt-redes-op i {
    width: 20px;
    font-size: 18px;
    text-align: center;
}

.ia-mkt-redes-op .ia-mkt-col-whatsapp { color: #25d366; }
.ia-mkt-redes-op .ia-mkt-col-email { color: #53657b; }
.ia-mkt-redes-op .ia-mkt-col-instagram { color: #d62976; }
.ia-mkt-redes-op .ia-mkt-col-facebook { color: #1877f2; }
.ia-mkt-redes-op .ia-mkt-col-tiktok,
.ia-mkt-redes-op .ia-mkt-col-x { color: #111111; }

/* Marketing: "Incluir descripción: Sí / No" above the text */
.ia-mkt-panel-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.ia-mkt-desc {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 13.5px;
}

.ia-mkt-desc[hidden] {
    display: none;
}

.ia-mkt-desc span {
    margin-right: 10px;
    color: var(--ia-text);
}

.ia-mkt-desc button {
    height: 30px;
    padding: 0 14px;
    border: 1px solid var(--ia-border);
    background: var(--ia-white);
    color: var(--ia-text);
    cursor: pointer;
    font-size: 13px;
}

.ia-mkt-desc button:first-of-type {
    border-radius: 8px 0 0 8px;
}

.ia-mkt-desc button:last-of-type {
    margin-left: -1px;
    border-radius: 0 8px 8px 0;
}

.ia-mkt-desc button.activo {
    position: relative;
    border-color: var(--ia-blue);
    background: var(--ia-blue);
    color: #ffffff;
}

/* Marketing: client's name next to "Incluir descripción" */
.ia-mkt-nombre {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
}

.ia-mkt-nombre[hidden] {
    display: none;
}

.ia-mkt-nombre input {
    width: 200px;
    height: 30px;
    padding: 0 10px;
    border: 1px solid var(--ia-border);
    border-radius: 8px;
    background: var(--ia-white);
    font: inherit;
    font-size: 13.5px;
}

.ia-mkt-panel-top {
    flex-wrap: wrap;
}

.ia-mkt-panel-top .ia-mkt-desc {
    margin-right: 14px;
}

/* Marketing: text pop-up (fits laptop screens: the text box takes the free height) */
.ia-mkt-dialogo {
    width: min(720px, calc(100% - 32px));
}

.ia-mkt-dialogo[open] {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ia-mkt-dialogo .ia-dialog-head {
    flex: none;
    padding: 14px 18px 12px 22px;
}

.ia-mkt-dialogo-prop {
    margin-top: 2px;
    color: var(--ia-muted);
    font-size: 13px;
}

.ia-mkt-dialogo .ia-mkt-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 14px 22px 18px;
    overflow-y: auto;
    border-radius: 0;
    background: var(--ia-white);
}

.ia-mkt-panel-top[hidden] {
    display: none;
}

.ia-mkt-dialogo textarea {
    height: clamp(150px, calc(100vh - 340px), 440px);
    resize: none;
}

/* "Cerrar ventana" at the bottom right of the pop-ups */
.ia-mkt-cerrar-ventana {
    margin-left: auto;
    border-color: var(--ia-border);
    color: var(--ia-text);
}

.ia-mkt-cerrar-ventana:hover {
    border-color: #c9d3df;
    background: #f4f7fb;
}

.ia-mkt-contador + .ia-mkt-cerrar-ventana {
    margin-left: 6px;
}

/* Marketing > Fichas PDF */
.ia-fichas-filtro {
    display: inline-flex;
    margin: 0 0 16px;
}

.ia-fichas-filtro a {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 22px;
    border: 1px solid var(--ia-border);
    background: var(--ia-white);
    color: var(--ia-text);
    font-size: 14px;
    text-decoration: none;
}

.ia-fichas-filtro a:first-child {
    border-radius: 8px 0 0 8px;
}

.ia-fichas-filtro a:last-child {
    margin-left: -1px;
    border-radius: 0 8px 8px 0;
}

.ia-fichas-filtro a.activo {
    position: relative;
    border-color: var(--ia-blue);
    background: var(--ia-blue);
    color: #ffffff;
}

.ia-fichas-aviso {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.ia-fichas-aviso > i {
    margin-top: 3px;
    font-size: 18px;
}

a.ia-mkt-btn {
    text-decoration: none;
}

/* Referidos: free months per plan */
.ia-ref-planes {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ia-ref-plan {
    display: flex;
    flex-direction: column;
    min-width: 110px;
    padding: 10px 14px;
    border: 1px solid var(--ia-border);
    border-radius: 10px;
    background: var(--ia-white);
    font-size: 13px;
}

.ia-ref-plan strong {
    margin-top: 2px;
    color: var(--ia-blue);
    font-size: 16px;
}


/* =========================================================
   DASHBOARD SECTIONS (u_dashboard.php)
========================================================= */

h2.ia-dash-titulo,
.ia-content h2.ia-dash-titulo {
    margin: 30px 0 0;
    color: var(--ia-title);
    font-size: 16px;
}

.ia-dash-titulo + .ia-stats {
    margin-top: 12px;
}

.ia-stat-ancho {
    grid-column: span 2;
}

/* Coincidencias: two colored numbers in one card */
.ia-stat-dos {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.ia-stat-dos a {
    display: flex;
    align-items: baseline;
    gap: 6px;
    text-decoration: none;
}

.ia-stat-dos strong {
    font-size: 26px;
    font-weight: 700;
}

.ia-stat-dos span {
    color: var(--ia-muted);
    font-size: 13px;
}

.ia-stat-dos a:hover span {
    text-decoration: underline;
}

.ia-num-naranja,
.ia-num-naranja strong {
    color: var(--ia-orange);
}

.ia-num-verde,
.ia-num-verde strong {
    color: var(--ia-green);
}

.ia-num-rojo {
    color: var(--ia-red);
}

.ia-stat-links {
    margin-top: 6px;
    color: var(--ia-muted);
    font-size: 12.5px;
}

.ia-stat-links a {
    color: var(--ia-muted);
}

.ia-stat-links a:hover {
    color: var(--ia-blue);
}

/* Redes sociales: logo with the number below */
.ia-dash-redes {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.ia-dash-red {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 64px;
    padding: 8px 10px;
    border: 1px solid #eef1f5;
    border-radius: 10px;
    text-decoration: none;
}

.ia-dash-red:hover {
    border-color: var(--ia-blue);
}

.ia-dash-red i {
    font-size: 22px;
}

.ia-dash-red strong {
    color: var(--ia-title);
    font-size: 20px;
    font-weight: 700;
}

.ia-mkt-col-instagram.ia-dash-red i { color: #d62976; }
.ia-mkt-col-facebook.ia-dash-red i { color: #1877f2; }
.ia-mkt-col-tiktok.ia-dash-red i,
.ia-mkt-col-x.ia-dash-red i { color: #111111; }

@media (max-width: 700px) {
    .ia-stat-ancho {
        grid-column: 1 / -1;
    }
}

.ia-stats.ia-dash-fila {
    margin-top: 16px;
}

.ia-num-cero strong {
    color: #b6c0cc;
}

.ia-num-rojo strong {
    color: var(--ia-red);
}

.ia-stat-links.ia-num-naranja {
    color: var(--ia-orange);
    font-weight: 600;
}

/* Dashboard: Redes sociales in two rows (Renta / Venta), compact pills */
.ia-dash-redes-fila {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.ia-dash-redes-obj {
    width: 40px;
    color: var(--ia-muted);
    font-size: 12.5px;
    font-weight: 600;
}

.ia-dash-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border: 1px solid #eef1f5;
    border-radius: 20px;
    text-decoration: none;
}

.ia-dash-pill:hover {
    border-color: var(--ia-blue);
}

.ia-dash-pill i {
    font-size: 14px;
}

.ia-dash-pill strong {
    color: var(--ia-title);
    font-size: 15px;
    font-weight: 700;
}

.ia-dash-pill.cero strong {
    color: #b6c0cc;
}

.ia-mkt-col-instagram.ia-dash-pill i { color: #d62976; }
.ia-mkt-col-facebook.ia-dash-pill i { color: #1877f2; }
.ia-mkt-col-tiktok.ia-dash-pill i,
.ia-mkt-col-x.ia-dash-pill i { color: #111111; }


/* =========================================================
   HERRAMIENTAS > CALCULADORA (u_calculadora.php)
========================================================= */

.ia-calc {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    max-width: 980px;
}

.ia-calc-datos {
    margin: 0;
}

.ia-calc-precio,
.ia-calc-pct {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ia-calc-precio input {
    flex: 1;
    font-size: 18px;
}

.ia-calc-precio select {
    width: 90px;
}

.ia-calc-pct input {
    width: 100%;
    max-width: 120px;
    font-size: 18px;
}

.ia-calc-pct span {
    color: var(--ia-muted);
    font-size: 18px;
    font-weight: 600;
}

.ia-calc-resultados {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ia-calc-res {
    padding: 16px 18px;
    border: 1px solid #e1e7ef;
    border-radius: 12px;
    background: var(--ia-white);
}

.ia-calc-res span {
    display: block;
    color: var(--ia-muted);
    font-size: 13px;
    font-weight: 600;
}

.ia-calc-res em {
    font-style: normal;
    font-weight: 400;
}

.ia-calc-res strong {
    display: block;
    margin-top: 4px;
    color: var(--ia-title);
    font-size: 26px;
    font-weight: 800;
}

.ia-calc-res small {
    color: var(--ia-muted);
    font-size: 12.5px;
}

.ia-calc-yo {
    border-color: var(--ia-green);
    background: var(--ia-green-soft);
}

.ia-calc-yo strong {
    color: #15803d;
}

.ia-calc-otro.apagado {
    opacity: .5;
}

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

/* Calculadora: USD and MXN side by side */
.ia-calc-montos {
    display: flex;
    align-items: baseline;
    gap: 18px;
    flex-wrap: wrap;
}

.ia-calc-montos .ia-calc-mxn {
    padding-left: 18px;
    border-left: 1px solid #dfe5ee;
    color: var(--ia-muted);
    font-size: 20px;
}

.ia-calc-yo .ia-calc-montos .ia-calc-mxn {
    color: #15803d;
    border-left-color: #bfe5cc;
}

.ia-calc-datos .ia-calc-limpiar {
    margin-top: 6px;
}

/* Calculadora: Venta / Renta tabs */
.ia-calc-tabs {
    display: inline-flex;
    margin: 0 0 16px;
}

.ia-calc-tabs button {
    height: 38px;
    margin-left: -1px;
    padding: 0 26px;
    border: 1px solid var(--ia-border);
    background: var(--ia-white);
    color: var(--ia-text);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.ia-calc-tabs button:first-child {
    margin-left: 0;
    border-radius: 8px 0 0 8px;
}

.ia-calc-tabs button:last-child {
    border-radius: 0 8px 8px 0;
}

.ia-calc-tabs button.activo {
    position: relative;
    border-color: var(--ia-blue);
    background: var(--ia-blue);
    color: #ffffff;
}

.ia-calc-meses {
    max-width: 200px;
    font-size: 16px;
}

/* Pop-up from Ofrezco */
.ia-calc-dialogo {
    width: min(940px, calc(100% - 32px));
}

.ia-calc-dialogo .ia-dialog-body {
    padding-top: 18px;
}

.ia-calc-dialogo .ia-calc-datos {
    padding: 18px;
    box-shadow: none;
}


/* ---------------------------------------------------------
   MIS MENSAJES > SITIO WEB (u_mensajes_web.php)
--------------------------------------------------------- */

.ia-webmsj-filtro {
    display: inline-flex;
    margin: 0 0 16px;
}

.ia-webmsj-filtro a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    margin-left: -1px;
    padding: 0 18px;
    border: 1px solid var(--ia-border);
    background: var(--ia-white);
    color: var(--ia-text);
    font-size: 14px;
    text-decoration: none;
}

.ia-webmsj-filtro a:first-child {
    margin-left: 0;
    border-radius: 8px 0 0 8px;
}

.ia-webmsj-filtro a:last-child {
    border-radius: 0 8px 8px 0;
}

.ia-webmsj-filtro a span {
    color: #8a97a8;
    font-size: 13px;
}

.ia-webmsj-filtro a.activo {
    position: relative;
    border-color: var(--ia-blue);
    background: var(--ia-blue);
    color: #ffffff;
}

.ia-webmsj-filtro a.activo span {
    color: rgba(255, 255, 255, .8);
}

.ia-webmsj-lista {
    display: grid;
    gap: 14px;
}

.ia-webmsj {
    margin: 0;
    padding: 18px 20px;
}

.ia-webmsj.nuevo {
    border-left: 4px solid var(--ia-blue);
}

.ia-webmsj.atendido {
    opacity: .78;
}

.ia-webmsj-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ia-webmsj-quien {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 16px;
}

.ia-webmsj-nuevo {
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--ia-blue);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.ia-webmsj-datos {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin-top: 6px;
    color: #475569;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.ia-webmsj-datos i {
    width: 15px;
    color: #94a3b8;
}

.ia-webmsj-prop {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f6f8fb;
    font-size: 14px;
    line-height: 1.35;
}

.ia-webmsj-prop a {
    font-weight: 600;
}

.ia-webmsj-origen {
    margin-top: 10px;
}

.ia-webmsj-texto {
    margin-top: 12px;
    color: var(--ia-text);
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.ia-webmsj-botones {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

.ia-webmsj-botones .ia-btn {
    padding: 8px 14px;
    font-size: 14px;
}

.ia-webmsj-wa {
    border-color: #25d366;
    background: #25d366;
}

.ia-webmsj-acciones {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.ia-webmsj-borrado {
    margin: 0 0 16px;
    font-size: 13px;
}

.ia-webmsj-fecha {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ia-webmsj-borra {
    padding: 2px 9px;
    border-radius: 999px;
    background: #fff4e5;
    color: #b45309;
    font-size: 12px;
    font-weight: 600;
}


/* ---------------------------------------------------------
   PRIVATE FIELDS (only the agent sees them): red label + lock
--------------------------------------------------------- */

.ia-label-privado,
.ia-label-privado i {
    color: #c62828 !important;
}

.ia-label-privado span {
    color: #e06666;
    font-weight: 400;
}

.ia-notas-privadas {
    min-height: 70px;
}

/* Publicar: "Notas privadas" section header in red with the lock */
.ia-form-section h2.ia-h2-privado,
.ia-form-section h2.ia-h2-privado i {
    color: #c62828;
}

.ia-h2-privado label {
    cursor: pointer;
}

.ia-h2-privado span {
    color: #e06666;
    font-size: 13px;
    font-weight: 400;
}

/* Calculator pop-up: Cerrar ventana at the bottom right */
.ia-calc-pie {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

/* Ofrezco / Solicito table: private notes icon before the buttons (hover or tap) */
.ia-con-nota {
    position: relative;
    cursor: help;
}

.ia-nota-icono {
    color: #e0a100;
    font-size: 14px;
}

.ia-nota-globo {
    position: fixed;   /* placed by JS so the table's scroll area doesn't cut it */
    left: 0;
    top: 0;
    z-index: 30;
    display: none;
    width: 280px;
    padding: 10px 12px;
    border: 1px solid #f1d58a;
    border-radius: 8px;
    background: #fffbea;
    box-shadow: 0 10px 24px rgba(16, 31, 61, .15);
    color: var(--ia-text);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
}

.ia-nota-globo-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.ia-nota-globo strong {
    color: #c62828;
    font-size: 12px;
}

.ia-nota-editar {
    padding: 2px 8px;
    border: 1px solid #e8c766;
    border-radius: 6px;
    background: #ffffff;
    color: var(--ia-blue);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.ia-nota-editar:hover {
    background: #f4f7fb;
}

.ia-con-nota:hover .ia-nota-globo,
.ia-con-nota:focus .ia-nota-globo,
.ia-con-nota:focus-within .ia-nota-globo {
    display: block;
}

/* Editar publicación: "Guardar cambios" at the top right */
.ia-guardar-arriba {
    flex: none;
    margin-top: 4px;
}

/* Publicar / Editar: top buttons (Sitio web y fotos · Guardar cambios) */
.ia-page-head:has(.ia-publicar-arriba) > div:first-child {
    flex: 1 1 360px;
}

.ia-publicar-arriba {
    display: flex;
    flex: none;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
    justify-content: flex-end;
}

.ia-publicar-arriba .ia-guardar-arriba,
.ia-publicar-arriba .ia-ir-sitio {
    margin-top: 4px;
}

.ia-ir-sitio .fa-arrow-down {
    font-size: 12px;
}

/* Jumping to Visibilidad: smooth, and not hidden under the top bar */
html:has(#ia-visibilidad) {
    scroll-behavior: smooth;
}

#ia-visibilidad {
    scroll-margin-top: 90px;
}


/* ---------------------------------------------------------
   DASHBOARD: half Mensajes sin leer, half Pendientes
--------------------------------------------------------- */

.ia-stat-partido {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 0;
}

.ia-stat-mitad {
    display: block;
    min-width: 0;
    padding: 18px;
    color: inherit;
    text-decoration: none;
}

.ia-stat-mitad + .ia-stat-mitad {
    border-left: 1px solid #e1e7ef;
}

.ia-stat-mitad:hover {
    background: #f7f9fc;
}

.ia-stat-mitad:first-child:hover { border-radius: 10px 0 0 10px; }
.ia-stat-mitad:last-child:hover  { border-radius: 0 10px 10px 0; }


/* ---------------------------------------------------------
   MIS PENDIENTES (pop-up)
--------------------------------------------------------- */

.ia-pend-dialogo {
    width: min(640px, calc(100% - 32px));
}

.ia-pend-agregar {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.ia-pend-agregar input[name="texto"] {
    flex: 1;
    min-width: 0;
}

.ia-pend-agregar input[name="fecha"] {
    width: 150px;
}

.ia-pend-agregar input {
    height: 40px;
    padding: 0 12px;
    border: 1px solid #d5dde8;
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
}

.ia-pend-error {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 13px;
}

.ia-pend-deshacer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #ecfdf3;
    color: #166534;
    font-size: 13px;
}

.ia-pend-deshacer button {
    border: 0;
    background: none;
    color: var(--ia-blue);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.ia-pend-lista {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
    max-height: 50vh;
    overflow-y: auto;
}

.ia-pend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 4px;
    border-bottom: 1px solid #eef1f5;
}

.ia-pend-check {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 2px solid #c9d3df;
    border-radius: 7px;
    background: #fff;
    color: transparent;
    cursor: pointer;
}

.ia-pend-check:hover {
    border-color: #16a34a;
    color: #16a34a;
}

.ia-pend-texto {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.ia-pend-cuando {
    flex: none;
    color: var(--ia-muted);
    font-size: 13px;
}

.ia-pend-vencido .ia-pend-texto,
.ia-pend-vencido .ia-pend-cuando { color: #c62828; font-weight: 600; }
.ia-pend-hoy .ia-pend-texto,
.ia-pend-hoy .ia-pend-cuando { color: #c2610c; font-weight: 600; }

.ia-pend-vacio {
    padding: 16px 0 4px;
    text-align: center;
}


/* ---------------------------------------------------------
   REPORTES (u_reportes.php) - screen and print
--------------------------------------------------------- */

.ia-rep-tab {
    display: inline-flex;
    align-items: center;
    height: 38px;
    margin-left: -1px;
    padding: 0 22px;
    border: 1px solid var(--ia-border);
    background: var(--ia-white);
    color: var(--ia-text);
    font-size: 14px;
    text-decoration: none;
}

.ia-rep-tab:first-child { margin-left: 0; border-radius: 8px 0 0 8px; }
.ia-rep-tab:last-child  { border-radius: 0 8px 8px 0; }

.ia-rep-tab.activo {
    position: relative;
    border-color: var(--ia-blue);
    background: var(--ia-blue);
    color: #fff;
}

.ia-reporte {
    max-width: 960px;
    padding: 28px 30px;
    border: 1px solid #e1e7ef;
    border-radius: 12px;
    background: #fff;
    color: #1f2937;
    font-size: 13px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.ia-rep-encabezado {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 3px solid #101f3d;
}

.ia-rep-titulo {
    color: #101f3d;
    font-size: 22px;
    font-weight: 800;
}

.ia-rep-quien {
    color: #475569;
    font-size: 13px;
}

.ia-rep-fecha {
    color: #475569;
    font-size: 13px;
    font-weight: 600;
}

.ia-rep-opciones {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    margin: 14px 0 0;
}

.ia-rep-cajas {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.ia-rep-caja {
    padding: 12px 14px;
    border: 1px solid #dbe4ef;
    border-radius: 10px;
    background: #f5f8fc;
}

.ia-rep-caja-verde {
    border-color: #bfe5cc;
    background: #effaf3;
}

.ia-rep-caja-label {
    color: #475569;
    font-size: 11.5px;
    font-weight: 700;
}

.ia-rep-caja-verde .ia-rep-caja-label i { color: #c62828; }

.ia-rep-caja-num {
    margin-top: 4px;
    color: #101f3d;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.25;
}

.ia-rep-caja-verde .ia-rep-caja-num { color: #15803d; }

.ia-rep-caja-num small {
    font-size: 11px;
    font-weight: 600;
}

.ia-rep-caja-pie {
    margin-top: 4px;
    color: #64748b;
    font-size: 11px;
}

.ia-rep-seccion {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 22px 0 8px !important;
    padding: 6px 10px;
    border-radius: 6px;
    background: #101f3d;
    color: #fff !important;
    font-size: 14px !important;
}

.ia-rep-seccion span {
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .2);
    font-size: 12px;
}

.ia-rep-editar {
    margin-left: auto;
    padding: 4px 10px;
    border-color: rgba(255, 255, 255, .6);
    background: transparent;
    color: #fff;
    font-size: 12px;
}

.ia-rep-tabla {
    width: 100%;
    border-collapse: collapse;
}

.ia-rep-tabla th {
    padding: 6px 8px;
    border-bottom: 2px solid #cbd5e1;
    color: #475569;
    font-size: 11px;
    text-align: left;
    text-transform: uppercase;
}

.ia-rep-tabla td {
    padding: 6px 8px;
    border-bottom: 1px solid #e5e9f0;
    vertical-align: top;
}

.ia-rep-tabla tr.con-nota td {
    border-bottom: 0;
}

.ia-rep-nota-fila td {
    padding-top: 0 !important;
    color: #9a3412;
    font-size: 12px;
    font-style: italic;
}

.ia-rep-nowrap { white-space: nowrap; }
.ia-rep-muted { color: #64748b; }
.ia-rep-privado { color: #c62828; font-size: 12px; }
.ia-rep-privado-num { color: #c62828; font-weight: 600; }
.ia-rep-naranja { color: #c2610c !important; font-weight: 700; }

.ia-rep-estatus {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.ia-rep-activa   { background: #dcfce7; color: #166534; }
.ia-rep-pausada  { background: #fef3c7; color: #92400e; }
.ia-rep-expirada { background: #fee2e2; color: #b91c1c; }

.ia-rep-columnas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.ia-rep-col {
    min-width: 0;
}

.ia-rep-lista {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ia-rep-lista li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 2px;
    border-bottom: 1px solid #e5e9f0;
    line-height: 1.35;
}

.ia-rep-caja-check {
    flex: none;
    width: 14px;
    height: 14px;
    margin-top: 1px;
    border: 1.5px solid #64748b;
    border-radius: 3px;
}

.ia-rep-item-texto {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.ia-rep-item-fecha {
    flex: none;
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
}

.ia-rep-lista .ia-pend-vencido .ia-rep-item-texto,
.ia-rep-lista .ia-pend-vencido .ia-rep-item-fecha { color: #c62828; font-weight: 600; }
.ia-rep-lista .ia-pend-hoy .ia-rep-item-texto,
.ia-rep-lista .ia-pend-hoy .ia-rep-item-fecha { color: #c2610c; font-weight: 600; }

.ia-rep-vacio {
    padding: 8px 2px;
    color: #64748b;
}

@media (max-width: 760px) {
    .ia-rep-cajas { grid-template-columns: 1fr 1fr; }
    .ia-rep-columnas { grid-template-columns: 1fr; }
    .ia-reporte { padding: 18px 14px; overflow-x: auto; }
}

/* Printing: only the report, letter size, vertical */
@media print {
    @page {
        size: letter portrait;
        margin: 12mm;
    }

    .ia-sidebar,
    .ia-topbar,
    .ia-overlay,
    .ia-no-print,
    .ia-app-banner {
        display: none !important;
    }

    body,
    .ia-panel,
    .ia-main,
    .ia-content {
        margin: 0 !important;
        padding: 0 !important;
        width: auto !important;
        min-height: 0 !important;
        background: #fff !important;
    }

    .ia-reporte {
        max-width: none;
        padding: 0;
        border: 0;
        border-radius: 0;
        font-size: 11.5px;
    }

    .ia-rep-tabla tr,
    .ia-rep-lista li,
    .ia-rep-caja {
        break-inside: avoid;
    }

    .ia-rep-seccion {
        break-after: avoid;
    }
}

.ia-rep-seccion .ia-rep-editar {
    height: auto;
    min-height: 0;
    padding: 3px 10px;
    line-height: 1.4;
}

/* Reportes: ink saving (outlined headers, no filled backgrounds) */
.ia-rep-encabezado {
    border-bottom: 1px solid #101f3d;
}

.ia-rep-seccion {
    border: 1.5px solid #101f3d;
    background: #fff !important;
    color: #101f3d !important;
}

.ia-rep-seccion span {
    border: 1px solid #101f3d;
    background: transparent;
    color: #101f3d;
}

.ia-rep-seccion .ia-rep-editar {
    border-color: #101f3d;
    color: #101f3d;
}

.ia-rep-caja {
    border-color: #cbd5e1;
    background: #fff;
}

.ia-rep-caja-verde {
    border: 1.5px solid #16a34a;
    background: #fff;
}

.ia-rep-estatus {
    padding: 0;
    border-radius: 0;
    background: none !important;
    font-size: 12px;
}

/* Reportes: section count without the circle */
.ia-rep-seccion span {
    padding: 0;
    border: 0;
    border-radius: 0;
    font-size: 14px;
    font-weight: 400;
}

.ia-rep-seccion span::before { content: "("; }
.ia-rep-seccion span::after  { content: ")"; }

/* Comisión potencial: Total and Mi parte */
.ia-rep-caja-et {
    display: inline-block;
    min-width: 54px;
    color: #64748b;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
}

.ia-rep-caja-parte {
    margin-top: 2px;
    color: #15803d;
    font-size: 14px;
    font-weight: 700;
}

.ia-rep-caja-parte small {
    font-size: 10.5px;
    font-weight: 600;
}

.ia-rep-caja-verde .ia-rep-caja-num,
.ia-rep-caja-parte {
    white-space: nowrap;
}

.ia-rep-caja-verde .ia-rep-caja-num {
    font-size: 16px;
}

.ia-rep-caja-et {
    min-width: 0;
    margin-right: 2px;
}

/* Pendientes: date button (add / change) */
button.ia-pend-cuando {
    padding: 3px 8px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: none;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

button.ia-pend-cuando:hover {
    border-color: #d5dde8;
    background: #f7f9fc;
}

.ia-pend-fecha-input {
    flex: none;
    height: 30px;
    padding: 0 6px;
    border: 1px solid #d5dde8;
    border-radius: 6px;
    font: inherit;
    font-size: 13px;
}

/* Reportes: Renta / Venta inside a section */
.ia-rep-subtitulo {
    margin: 8px 0 2px;
    color: #101f3d;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
}

/* Report boxes: dotted line between MXN and USD */
.ia-rep-caja-num + .ia-rep-caja-num,
.ia-rep-caja-parte + .ia-rep-caja-num {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dotted #94a3b8;
}

/* Reportes: Coincidencias + Comparativo */
.ia-rep-resumen {
    margin-top: 12px;
    font-size: 13px;
    font-weight: 700;
}

.ia-rep-verde { color: #15803d !important; font-weight: 700; }
.ia-rep-rojo  { color: #c62828 !important; font-weight: 700; }

.ia-rep-seccion-dato {
    margin-left: auto;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
}

.ia-rep-select {
    min-width: 0;
    max-width: 100%;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #d5dde8;
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
}

.ia-rep-sub {
    margin-top: 12px;
    color: #475569;
    font-size: 13px;
}

.ia-rep-cajas-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ia-rep-caja-linea {
    margin-top: 6px;
    font-size: 13px;
}

.ia-rep-caja-linea strong {
    color: #101f3d;
    font-size: 15px;
}

@media (max-width: 760px) {
    .ia-rep-cajas-3 { grid-template-columns: 1fr; }
}

/* Comparativo: title line with the ID at the right */
.ia-rep-sub {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.ia-rep-sub strong {
    color: #101f3d;
}

.ia-rep-caja-pie strong {
    color: #101f3d;
}

.ia-rep-caja-linea strong:first-child {
    font-size: 13px;
}

.ia-rep-caja-linea span {
    white-space: nowrap;
    font-size: 12px;
}

.ia-chat-aviso-borrado {
    margin: 8px 0 0;
    text-align: center;
}

/* Publicar: format buttons above the website description */
.ia-formato {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.ia-formato button {
    min-width: 32px;
    height: 30px;
    padding: 0 10px;
    border: 1px solid #d5dde8;
    border-radius: 6px;
    background: #fff;
    color: #344767;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.ia-formato button:hover {
    border-color: var(--ia-blue);
    color: var(--ia-blue);
}

.ia-formato span {
    margin-left: 4px;
    font-size: 12px;
}

/* Website description: links after the B / I / Viñeta buttons */
.ia-formato .ia-formato-sep {
    flex: 1;
    margin: 0;
}

.ia-formato .ia-formato-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 30px;
    padding: 0 8px;
    border: 0;
    background: none;
    color: var(--ia-blue);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.ia-formato .ia-formato-link:hover {
    text-decoration: underline;
}

/* "Cómo dar formato" pop-up */
.ia-formato-ayuda p {
    margin-top: 0;
    line-height: 1.55;
}

.ia-formato-tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ia-formato-tabla th,
.ia-formato-tabla td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--ia-border);
    text-align: left;
    vertical-align: top;
}

.ia-formato-tabla th {
    color: var(--ia-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.ia-formato-tabla ul {
    margin: 0;
    padding-left: 18px;
}

.ia-formato-ayuda code {
    padding: 1px 5px;
    border-radius: 4px;
    background: #f1f4f9;
    font-size: 13px;
}

.ia-formato-tips {
    margin: 16px 0 0;
    padding-left: 18px;
    font-size: 14px;
    line-height: 1.6;
}

.ia-formato-tips li {
    margin-bottom: 6px;
}

/* "Vista previa" pop-up: looks like the property page text */
.ia-vista-previa-caja {
    max-height: 55vh;
    overflow-y: auto;
    padding: 16px 18px;
    border: 1px solid var(--ia-border);
    border-radius: 10px;
    background: #fff;
    font-size: 15px;
    line-height: 1.65;
}

.ia-vista-previa-caja p {
    margin: 0 0 12px;
}

.ia-vista-previa-caja ul {
    margin: 0 0 12px;
    padding-left: 22px;
}

.ia-vista-previa-caja li {
    margin-bottom: 4px;
}

.ia-vista-previa-caja > :last-child {
    margin-bottom: 0;
}

/* Abrir en mi sitio: "Tienes cambios sin guardar" + notice after saving */
.ia-abrir-botones {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.ia-abrir-aviso {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.ia-abrir-aviso .ia-btn {
    flex: none;
}

/* Preview with unsaved changes */
.ia-previa-aviso {
    margin: 14px 0 12px;
    color: #9a5b00;
    font-size: 13px;
}

/* Admin > Cron Job */
.ia-cron-log {
    margin: 0 0 6px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f6f8fb;
    font-size: 13px;
    white-space: pre-wrap;
}

/* Herramientas > App: how to use Preferencias (full width, screenshot + steps) */
.ia-app-info .ia-app-pref-info {
    grid-column: 1 / -1;
}

.ia-app-pref-info-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.ia-app-pref-info-grid img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.ia-app-pref-lista {
    margin: 8px 0 0;
    padding-left: 18px;
    line-height: 1.6;
}

.ia-app-pref-lista li {
    margin-bottom: 4px;
}

@media (max-width: 900px) {
    .ia-app-pref-info-grid {
        grid-template-columns: 1fr;
    }

    .ia-app-pref-info-grid img {
        max-width: 320px;
    }
}

/* Phone app: pull down to refresh (installed app) */
.ia-app-jalar {
    position: fixed;
    top: calc(env(safe-area-inset-top) - 30px);
    left: 50%;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--ia-white);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.18);
    color: var(--ia-muted);
    font-size: 16px;
    opacity: 0;
    transform: translate(-50%, 0);
    transition: color 0.15s;
    pointer-events: none;
}

.ia-app-jalar-listo {
    color: var(--ia-blue);
}

.ia-app-jalar-cargando i {
    animation: ia-app-girar 0.8s linear infinite;
}

@keyframes ia-app-girar {
    to { transform: rotate(360deg); }
}


/* Novedades InterAsesor (u_novedades.php) */
.ia-novedades td {
    vertical-align: top;
}

.ia-novedad-tipo {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.ia-novedad-nuevo {
    background: #e7f6ec;
    color: #157a3c;
}

.ia-novedad-correccion {
    background: #eef1f5;
    color: #4a5568;
}

.ia-novedad-texto {
    margin-top: 4px;
    color: var(--ia-text);
    font-size: 14px;
    line-height: 1.55;
}

.ia-novedad-texto p,
.ia-novedad-texto ul {
    margin: 0 0 6px;
}

.ia-novedad-texto ul {
    padding-left: 18px;
}

.ia-novedad-ver {
    display: inline-block;
    margin-top: 4px;
    color: var(--ia-blue);
    font-size: 13px;
    font-weight: 600;
}


/* ---------------------------------------------------------
   DASHBOARD (3 rows): publication cards, short lists, limit
--------------------------------------------------------- */

a.ia-stat-value.ia-dash-activas {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    color: var(--ia-title);
    text-decoration: none;
}

a.ia-dash-activas:hover small {
    text-decoration: underline;
}

.ia-dash-activas strong {
    font-size: 26px;
}

.ia-dash-activas.ia-num-cero strong {
    color: #b6c0cc;
}

.ia-dash-estado {
    margin-top: 8px;
    color: #b6c0cc;
    font-size: 13px;
}

.ia-dash-estado a {
    font-weight: 600;
    text-decoration: none;
}

.ia-dash-estado a:hover {
    text-decoration: underline;
}

.ia-dash-estado .ia-num-cero {
    color: #b6c0cc;
    font-weight: 400;
}

.ia-dash-estado .fa-triangle-exclamation {
    font-size: 11px;
}

.ia-dash-ok {
    color: var(--ia-muted);
}

.ia-dash-ok i {
    margin-right: 3px;
    color: var(--ia-green);
}

/* Short list of numbers (Coincidencias, Pendientes, Mensajes) */
.ia-dash-lista {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 10px;
}

.ia-dash-lista > a,
.ia-dash-lista > span {
    display: flex;
    align-items: baseline;
    gap: 8px;
    text-decoration: none;
}

.ia-dash-lista strong {
    min-width: 22px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
}

.ia-dash-lista span span,
.ia-dash-lista a span {
    color: var(--ia-muted);
    font-size: 13px;
}

.ia-dash-lista a:hover span {
    text-decoration: underline;
}

.ia-dash-lista-chica strong {
    font-size: 18px;
}

.ia-dash-lista .ia-num-cero strong {
    color: #b6c0cc;
}

.ia-num-oscuro strong {
    color: var(--ia-title);
}

.ia-num-gris strong {
    color: var(--ia-muted);
}

.ia-num-azul strong {
    color: var(--ia-blue);
}

/* Plan limit (only from 80%) */
.ia-dash-limite {
    margin-top: 8px;
    color: var(--ia-orange);
    font-size: 12.5px;
    font-weight: 600;
}

.ia-dash-limite.lleno {
    color: var(--ia-red);
}


/* Redes sociales: Publicados (Renta / Venta + big total %) | dashed line | Por publicar */
.ia-dash-redes-dos {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0;
    margin-top: 8px;
}

.ia-dash-redes-hechos {
    padding-right: 18px;
    border-right: 1px dashed #c9d3df;
}

.ia-dash-redes-pend {
    min-width: 0;
    padding-left: 18px;
}

.ia-dash-redes-sub {
    display: block;
    color: var(--ia-muted);
    font-size: 12.5px;
    font-weight: 600;
}

.ia-dash-redes-avance {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ia-dash-redes-filas {
    display: flex;
    flex-direction: column;
}

.ia-dash-redes-linea {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: inherit;
    text-decoration: none;
}

.ia-dash-redes-linea:hover .ia-dash-redes-obj {
    color: var(--ia-blue);
}

.ia-dash-redes-num {
    min-width: 42px;
    color: var(--ia-muted);
    font-size: 14px;
}

.ia-dash-redes-num strong {
    color: var(--ia-title);
    font-size: 17px;
    font-weight: 700;
}

.ia-dash-redes-pct {
    color: var(--ia-blue);
    font-size: 13px;
    font-weight: 700;
}

.ia-dash-redes-total {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--ia-blue);
}

.ia-dash-redes-total strong {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
}

.ia-dash-redes-total span {
    color: var(--ia-muted);
    font-size: 12px;
}

.ia-dash-redes-pct.completo,
.ia-dash-redes-total.completo {
    color: var(--ia-green);
}

.ia-dash-redes-pend .ia-dash-redes-fila:first-of-type {
    margin-top: 6px;
}

/* Redes sociales card: compact so 4 networks fit on one line */
.ia-dash-redes-hechos { padding-right: 14px; }
.ia-dash-redes-pend { padding-left: 14px; }
.ia-dash-redes-avance { gap: 12px; }
.ia-dash-redes-linea { gap: 6px; }
.ia-dash-redes-num { min-width: 36px; }
.ia-dash-redes-total strong { font-size: 28px; }
.ia-dash-redes-pend .ia-dash-redes-fila { flex-wrap: wrap; gap: 4px; }
.ia-dash-redes-pend .ia-dash-redes-obj { width: 38px; flex: none; }
.ia-dash-redes-pend .ia-dash-pill { gap: 4px; padding: 2px 6px; }
.ia-dash-redes-pend .ia-dash-pill strong { font-size: 14px; }

/* When the card is narrow (any screen): Publicados on top, Por publicar below */
.ia-stat:has(.ia-dash-redes-dos) {
    container-type: inline-size;
}

@container (max-width: 440px) {
    .ia-dash-redes-dos { grid-template-columns: 1fr; }
    .ia-dash-redes-hechos { padding: 0 0 12px; border-right: 0; border-bottom: 1px dashed #c9d3df; }
    .ia-dash-redes-pend { padding: 12px 0 0; }
}

@media (max-width: 700px) {
    .ia-dash-redes-dos { grid-template-columns: 1fr; }
    .ia-dash-redes-hechos { padding: 0 0 12px; border-right: 0; border-bottom: 1px dashed #c9d3df; }
    .ia-dash-redes-pend { padding: 12px 0 0; }
}

/* Pendientes and Mensajes: 2 numbers per line (keeps rows 1 and 2 short) */
.ia-dash-lista-2col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 10px;
}

.ia-stat:has(.ia-dash-lista-2col) {
    container-type: inline-size;
}

@container (max-width: 170px) {
    .ia-dash-lista-2col { grid-template-columns: 1fr; }
}


/* =========================================================
   CRM (CLIENTES)
========================================================= */

.ia-crm-totales {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ia-crm-num-grande {
    color: var(--ia-blue);
    font-size: 34px;
}

.ia-crm-buscar-caja {
    margin-top: 18px;
}

.ia-crm-buscar {
    position: relative;
}

.ia-crm-buscar i {
    position: absolute;
    top: 50%;
    left: 14px;
    color: var(--ia-muted);
    transform: translateY(-50%);
}

.ia-crm-buscar input {
    width: 100%;
    height: 46px;
    padding: 0 14px 0 40px;
    border: 1px solid var(--ia-border);
    border-radius: 10px;
    font: inherit;
    font-size: 15px;
}

.ia-crm-buscar input:focus {
    border-color: var(--ia-blue);
    outline: none;
}

.ia-crm-filtros {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
}

.ia-crm-filtros button {
    height: 30px;
    padding: 0 10px;
    border: 1px solid var(--ia-border);
    border-radius: 999px;
    background: #fff;
    color: #e0a100;
    font-size: 14px;
    letter-spacing: 1px;
    cursor: pointer;
}

.ia-crm-filtros button.activo {
    border-color: #e0a100;
    background: #fff7e0;
}

.ia-crm-resultados {
    margin-top: 12px;
}

.ia-crm-ayuda {
    margin: 14px 0 4px;
    text-align: center;
}

.ia-crm-lista {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ia-crm-fila {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #eef1f5;
}

.ia-crm-fila:last-child {
    border-bottom: 0;
}

.ia-crm-fila-info {
    flex: 1;
    min-width: 0;
    padding: 10px 6px;
    color: var(--ia-title);
    text-decoration: none;
}

.ia-crm-fila-info:hover {
    background: #f7f9fc;
}

.ia-crm-fila-sub {
    display: block;
    overflow: hidden;
    color: var(--ia-muted);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ia-crm-fila-btns {
    display: flex;
    flex: none;
    gap: 6px;
}

.ia-crm-btn-wa,
.ia-crm-btn-wa i {
    color: #1a9e4b;
}

.ia-crm-off,
.ia-crm-off i {
    opacity: .35;
    cursor: not-allowed;
}

.ia-crm-estrellas-ver {
    color: #e0a100;
    font-size: 13px;
    letter-spacing: 1px;
}

/* Client pop-up */
.ia-crm-dialogo {
    width: min(680px, calc(100% - 32px));
}

.ia-crm-acciones {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 12px 0 4px;
}

.ia-crm-acciones .ia-btn {
    height: 36px;
    padding: 0 14px;
}

.ia-btn.ia-crm-wa {
    border-color: #1a9e4b;
    background: #1a9e4b;
}

.ia-crm-estatus {
    margin-left: auto;
}

.ia-crm-tabs {
    display: flex;
    gap: 4px;
    margin: 12px 0 14px;
    border-bottom: 1px solid var(--ia-border);
}

.ia-crm-tabs button {
    padding: 9px 12px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--ia-muted);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.ia-crm-tabs button.activo {
    border-bottom-color: var(--ia-blue);
    color: var(--ia-blue);
}

.ia-crm-sub {
    margin: 14px 0 8px;
    color: var(--ia-title);
    font-size: 13.5px;
    font-weight: 700;
}

.ia-crm-sub .ia-muted {
    font-weight: 400;
}

.ia-crm-tel,
.ia-crm-dir {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.ia-crm-principal {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 6px;
    width: 92px;
    font-size: 13.5px;
    cursor: pointer;
}

.ia-crm-lada {
    flex: none;
    width: 150px;
    height: 40px;
    padding: 0 8px;
    border: 1px solid var(--ia-border);
    border-radius: 8px;
    background: #fff;
    font: inherit;
    font-size: 13.5px;
}

.ia-crm-tel input,
.ia-crm-dir input {
    flex: 1;
    min-width: 0;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--ia-border);
    border-radius: 8px;
    font: inherit;
}

.ia-crm-tel-solo .ia-crm-lada {
    width: 150px;
}

.ia-crm-estrellas-sel {
    display: flex;
    align-items: center;
    gap: 2px;
    min-height: 40px;
}

.ia-crm-estrellas-sel button {
    padding: 2px 3px;
    border: 0;
    background: none;
    color: #d5dbe3;
    font-size: 22px;
    cursor: pointer;
}

.ia-crm-estrellas-sel button.on {
    color: #e0a100;
}

.ia-crm-estrellas-sel span {
    margin-left: 6px;
}

.ia-crm-pie {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 18px;
}

.ia-crm-eliminar {
    padding: 0;
    border: 0;
    background: none;
    color: var(--ia-red);
    font: inherit;
    font-size: 13.5px;
    cursor: pointer;
}

.ia-crm-eliminar:hover {
    text-decoration: underline;
}

.ia-crm-error,
.ia-crm-ok {
    margin: 0 0 12px;
}

.ia-crm-pubs {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ia-crm-pubs li {
    padding: 8px 0;
    border-bottom: 1px solid #eef1f5;
}

.ia-crm-panel textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--ia-border);
    border-radius: 8px;
    font: inherit;
    resize: vertical;
}

@media (max-width: 600px) {
    .ia-crm-totales { grid-template-columns: 1fr; }
    .ia-crm-tel { flex-wrap: wrap; }
    .ia-crm-principal { width: 100%; }
    .ia-crm-lada { width: 120px; }
}

/* Publicar: Cliente section */
.ia-h2-nota {
    color: var(--ia-muted);
    font-size: 13px;
    font-weight: 400;
}

.ia-cliente-elegido {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #c9dafc;
    border-radius: 10px;
    background: var(--ia-blue-soft, #eef4ff);
}

.ia-cliente-elegido > i {
    color: var(--ia-blue);
}

.ia-cliente-elegido a {
    color: var(--ia-title);
    font-weight: 700;
}

.ia-cliente-quitar {
    margin-left: auto;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ia-red);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.ia-cliente-buscar-fila {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ia-cliente-input {
    position: relative;
    flex: 1;
    min-width: 240px;
}

.ia-cliente-input > i {
    position: absolute;
    top: 50%;
    left: 12px;
    color: var(--ia-muted);
    transform: translateY(-50%);
}

.ia-cliente-input input {
    width: 100%;
    height: 42px;
    padding: 0 12px 0 36px;
    border: 1px solid var(--ia-border);
    border-radius: 8px;
    font: inherit;
}

.ia-cliente-sugerencias {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    left: 0;
    z-index: 30;
    max-height: 300px;
    margin: 0;
    padding: 4px 0;
    overflow-y: auto;
    border: 1px solid var(--ia-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(16, 31, 61, .12);
    list-style: none;
}

.ia-cliente-sugerencias button {
    display: block;
    width: 100%;
    padding: 8px 14px;
    border: 0;
    background: none;
    color: var(--ia-title);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.ia-cliente-sugerencias button:hover {
    background: #f4f7fb;
}

.ia-cliente-sugerencias button span {
    display: block;
    color: var(--ia-muted);
    font-size: 12.5px;
}

.ia-cliente-vacio {
    padding: 8px 14px;
    color: var(--ia-muted);
    font-size: 13.5px;
}

/* Ofrezco / Solicito tables: client name */
.ia-cliente-tabla {
    display: inline-block;
    margin-top: 3px;
    color: #7a1f3d;
    font-size: 11px;      /* same as the city, state line (.ia-small) */
    font-weight: 600;
    line-height: 1.3;
}

.ia-cliente-tabla i {
    font-size: 10px;
}

/* Reportes > Inventario: client line in wine color */
.ia-rep-cliente-fila td {
    padding-top: 0 !important;
    color: #7a1f3d;
    font-size: 12px;
    font-weight: 600;
}

.ia-rep-tabla tr.ia-rep-cliente-fila.con-nota td {
    border-bottom: 0;
}

.ia-crm-principal input[type="radio"] {
    flex: none;
    width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
    accent-color: var(--ia-blue);
}

.ia-crm-pie-der {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-left: auto;
}

/* Pendientes with a client (CRM) */
.ia-pend-cliente {
    position: relative;
    flex-basis: 100%;
}

.ia-pend-cliente-buscar {
    position: relative;
}

.ia-pend-cliente-buscar > i {
    position: absolute;
    top: 50%;
    left: 12px;
    color: #7a1f3d;
    font-size: 12px;
    transform: translateY(-50%);
}

.ia-pend-cliente-buscar input {
    width: 100%;
    height: 38px;
    padding: 0 12px 0 32px;
    border: 1px dashed var(--ia-border);
    border-radius: 8px;
    font: inherit;
    font-size: 13.5px;
}

.ia-pend-cliente-elegido {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f8eef2;
    color: #7a1f3d;
    font-size: 13.5px;
    font-weight: 600;
}

.ia-pend-cliente-elegido button {
    padding: 0;
    border: 0;
    background: none;
    color: #7a1f3d;
    cursor: pointer;
}

.ia-pend-cliente-nombre,
.ia-rep-pend-cliente {
    color: #7a1f3d;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}

.ia-pend-cliente-nombre i {
    font-size: 11px;
}

.ia-pend-agregar { flex-wrap: wrap; }

/* Reportes > Pendientes por cliente */
.ia-rep-pc {
    margin-bottom: 18px;
    break-inside: avoid;
    page-break-inside: avoid;
}

.ia-rep-seccion.ia-rep-pc-nombre,
.ia-rep-seccion.ia-rep-pc-nombre i {
    color: #7a1f3d;
}

.ia-rep-pc-estrellas {
    color: #e0a100;
    font-weight: 400;
    letter-spacing: 1px;
}

.ia-rep-pc-datos {
    margin: -4px 0 6px;
    color: #64748b;
    font-size: 12.5px;
}

/* Invitaciones (Cuenta > Invitaciones) */
.ia-inv-codigo {
    display: inline-block;
    padding: 10px 22px;
    border: 2px dashed var(--ia-blue);
    border-radius: 12px;
    background: var(--ia-bg);
    color: var(--ia-blue);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 3px;
}

.ia-inv-botones {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

/* Skool link beside the bell (top bar). Logo images/skool.png: wide (128x28) or square, it fits */
.ia-topbar-skool:has(img) {
    width: auto;
    padding: 0 10px;
}

.ia-topbar-skool img {
    display: block;
    width: auto;
    max-width: 92px;
    height: 20px;
    object-fit: contain;
}

.ia-topbar-skool-texto {
    width: auto;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

/* Términos y condiciones (registro.php pop-up + terminos.php) */
.ia-terminos h3 {
    margin: 18px 0 6px;
    font-size: 15px;
}

.ia-terminos p {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.6;
    text-align: left;
}

.ia-terminos-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 6px 0 16px;
    font-size: 14px;
    line-height: 1.45;
    text-align: left;
}

.ia-terminos-check input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 1px;
}

.ia-terminos-check a {
    color: var(--ia-blue);
    font-weight: 600;
    text-decoration: underline;
}

/* Small footer on every panel page (Términos y condiciones) */
.ia-panel-pie {
    margin-top: 36px;
    padding: 14px 0 6px;
    border-top: 1px solid var(--ia-border);
    color: var(--ia-muted);
    font-size: 12px;
    text-align: center;
}

.ia-panel-pie a {
    color: var(--ia-muted);
    text-decoration: underline;
}

.ia-panel-pie a:hover {
    color: var(--ia-blue);
}
