/* GBP — dashboard theme inspired by the Webadmin reference.
   Panel nativo de Laravel (Blade + Livewire) y portal de cliente. */

/* Shared colors and typography */
:root {
    --cm-black:   #30354a;
    --cm-ink:     #343a50;
    --cm-white:   #FFFFFF;
    --cm-paper:   #f4f5f8;

    --cm-n-900:   #30354a;
    --cm-n-800:   #343a50;
    --cm-n-700:   #444b64;
    --cm-n-600:   #596078;
    --cm-n-500:   #717991;
    --cm-n-400:   #8790a5;
    --cm-n-300:   #c8cedc;
    --cm-n-200:   #e5e8ef;
    --cm-n-150:   #edf0f5;
    --cm-n-100:   #f0f2f7;
    --cm-n-50:    #f7f8fb;

    --font-display: "Instrument Sans", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
    --font-body: "Instrument Sans", ui-sans-serif, system-ui, "Segoe UI", sans-serif;

    --cm-primary: #5b5fc7;
    --cm-primary-hover: #484cae;
    --cm-primary-soft: #eeeffc;
    --cm-sidebar: #252b3b;
    --sidebar-width: 17.5rem;
    --shadow-1: 0 2px 8px rgba(36, 44, 76, 0.04);
    --shadow-2: 0 8px 28px rgba(36, 44, 76, 0.08);
}

/* =========================================================================
   PANEL NATIVO — armazón (sidebar, topbar, cabecera de página, tarjetas,
   botones, formularios, tablas, distintivos, menús, avisos y acceso).
   Las utilidades (flex, gap, text-sm…) vienen de Tailwind vía Vite.
   ========================================================================= */

html, body {
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.gbp-body { background-color: var(--cm-paper); color: var(--cm-n-900); font-size: 14px; }

.gbp-shell { display: flex; min-height: 100dvh; }

/* ── Sidebar ── */
.gbp-sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 40;
    display: flex; flex-direction: column; width: var(--sidebar-width);
    background: var(--cm-sidebar); color: #c6cede;
    transform: translateX(-100%); transition: transform 180ms ease;
}
.gbp-sidebar.is-open { transform: none; }
.gbp-sidebar-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 64px; padding: 0 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.gbp-sidebar-header a { text-decoration: none; }
.gbp-sidebar-close { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: #c6cede; }
.gbp-sidebar-close:hover { background: #353d52; color: #fff; }
.gbp-sidebar-close svg { width: 20px; height: 20px; }
.gbp-sidebar-nav { flex: 1 1 0%; min-height: 0; overflow-y: auto; padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; }
.gbp-nav-group { display: flex; flex-direction: column; gap: 2px; }
.gbp-nav-group-label { padding: 14px 10px 8px; font-family: var(--font-display); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #99a5c1; line-height: 1; }
.gbp-nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; color: #c6cede; text-decoration: none; transition: background-color 120ms ease, color 120ms ease; }
.gbp-nav-item svg { width: 20px; height: 20px; flex-shrink: 0; color: #9aa8c5; }
.gbp-nav-item:hover, .gbp-nav-item:focus-visible { background: #353d52; color: #fff; }
.gbp-nav-item:hover svg, .gbp-nav-item:focus-visible svg { color: #fff; }
.gbp-nav-item:focus-visible { outline: 2px solid #bfc3ff; outline-offset: 2px; }
.gbp-nav-item.is-active, .gbp-nav-item.is-active:hover { background: var(--cm-primary); color: #fff; }
.gbp-nav-item.is-active svg { color: #fff; }
.gbp-nav-item.is-active:hover { background: var(--cm-primary-hover); }
.gbp-nav-badge { margin-left: auto; padding: 2px 7px; border-radius: 6px; font-family: var(--font-display); font-size: 11px; font-weight: 600; background: var(--cm-n-100); color: var(--cm-n-700); }
.gbp-nav-item.is-active .gbp-nav-badge { background: #fff; color: var(--cm-black); }
.gbp-nav-badge.is-warning { background: #fffbeb; border: 1px solid #fcd34d; color: #b45309; }
.gbp-sidebar-footer { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.gbp-sidebar .gbp-brand-name { color: #fff; }
.gbp-sidebar .gbp-brand-name small { color: #a4afc6; }
.gbp-plan-usage { display: grid; gap: 10px; padding: 14px 20px; font-size: 11px; color: #a4afc6; }
.gbp-plan-usage-head { display: flex; justify-content: space-between; align-items: center; }
.gbp-plan-usage-head span { font-size: 9px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.gbp-plan-usage-head strong { color: #dbe1ee; font-weight: 600; }
.gbp-plan-usage-line { display: flex; justify-content: space-between; gap: 8px; }
.gbp-plan-usage-line span:first-child { display: inline-flex; align-items: center; gap: 4px; }
.gbp-plan-usage-line span:last-child { color: #dbe1ee; font-weight: 500; }
.gbp-plan-usage-line svg { width: 12px; height: 12px; flex-shrink: 0; }
.gbp-plan-usage-bar { height: 4px; margin-top: 5px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.gbp-plan-usage-bar span { display: block; height: 100%; border-radius: 2px; background: #9296eb; }
.gbp-plan-usage-row.is-high .gbp-plan-usage-bar span { background: #e5a83b; }
.gbp-plan-usage-row.is-full .gbp-plan-usage-bar span { background: #e5604f; }
.gbp-plan-usage-row.is-full .gbp-plan-usage-line span:last-child { color: #ffb3a8; }
.gbp-sidebar-overlay { position: fixed; inset: 0; z-index: 39; background: rgba(36, 44, 76, 0.45); }

/* ── Contenido ── */
.gbp-content { flex: 1 1 0%; min-width: 0; display: flex; flex-direction: column; }
.gbp-topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 0 24px; background: #fff; border-bottom: 1px solid var(--cm-n-200); }
.gbp-topbar-menu { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; color: var(--cm-n-600); }
.gbp-topbar-menu:hover { background: var(--cm-n-100); }
.gbp-topbar-menu svg { width: 22px; height: 22px; }
.gbp-topbar-end { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.gbp-main { flex: 1 1 0%; width: 100%; padding: 28px 24px 40px; }
.gbp-main > * + * { margin-top: 24px; }
.gbp-footer { padding: 12px; text-align: center; font-size: 12px; color: var(--cm-n-500); }

/* ── Cabecera de página ── */
.gbp-page-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; }
.gbp-page-title { font-family: var(--font-display); font-size: 24px; font-weight: 600; letter-spacing: -0.02em; color: var(--cm-n-900); line-height: 1.25; }
.gbp-page-subheading { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 13px; color: var(--cm-n-500); }
.gbp-page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gbp-synced-icon { width: 16px; height: 16px; color: var(--cm-n-400); }

/* ── Tarjetas (secciones) ── */
.gbp-card { background: #fff; border: 1px solid var(--cm-n-200); border-radius: 12px; box-shadow: var(--shadow-1); }
.gbp-card-header { display: flex; align-items: flex-start; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--cm-n-200); }
.gbp-card-header-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0; color: var(--cm-primary); background: var(--cm-primary-soft); }
.gbp-card-header-icon svg { width: 18px; height: 18px; }
.gbp-card-heading { font-family: var(--font-display); font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--cm-n-900); }
.gbp-card-description { margin-top: 3px; font-size: 13px; color: var(--cm-n-500); }
.gbp-card-toggle { margin-left: auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--cm-n-500); }
.gbp-card-toggle:hover { background: var(--cm-n-100); }
.gbp-card-toggle svg { width: 18px; height: 18px; transition: transform 150ms ease; }
.gbp-card.is-collapsed .gbp-card-toggle svg { transform: rotate(-90deg); }
.gbp-card.is-collapsed .gbp-card-header { border-bottom: 0; }
.gbp-card-body { padding: 24px; }
.gbp-card-body > * + * { margin-top: 20px; }
.gbp-card-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding: 16px 24px; background: var(--cm-n-50); border-top: 1px solid var(--cm-n-200); border-radius: 0 0 12px 12px; }

/* ── Botones ── */
.gbp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 8px 14px; border: 1px solid transparent; border-radius: 8px; font-family: var(--font-display); font-size: 13px; font-weight: 600; line-height: 1.2; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease; }
.gbp-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.gbp-btn:disabled, .gbp-btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.gbp-btn:focus-visible { outline: 2px solid var(--cm-primary); outline-offset: 2px; }
.gbp-btn.is-primary { background: var(--cm-primary); border-color: var(--cm-primary); color: #fff; }
.gbp-btn.is-primary:hover { background: var(--cm-primary-hover); border-color: var(--cm-primary-hover); }
.gbp-btn.is-secondary { background: #fff; border-color: var(--cm-n-200); color: var(--cm-n-700); }
.gbp-btn.is-secondary:hover { border-color: var(--cm-n-400); color: var(--cm-n-900); }
.gbp-btn.is-danger { background: #fff; border-color: #fecaca; color: #b91c1c; }
.gbp-btn.is-danger:hover { background: #fef2f2; border-color: #f87171; }
.gbp-btn.is-danger-solid { background: #dc2626; border-color: #dc2626; color: #fff; }
.gbp-btn.is-danger-solid:hover { background: #b91c1c; border-color: #b91c1c; }
.gbp-btn.is-ghost { background: transparent; color: var(--cm-n-600); }
.gbp-btn.is-ghost:hover { background: var(--cm-n-100); color: var(--cm-n-900); }
.gbp-btn.is-sm { min-height: 32px; padding: 5px 10px; font-size: 12px; }
.gbp-btn.is-soft { background: var(--cm-primary-soft); border-color: var(--cm-primary); color: var(--cm-primary-hover); }
.gbp-btn.is-soft:hover:not(:disabled) { background: var(--cm-primary); color: #fff; }
.gbp-btn.is-lg { min-height: 44px; padding: 10px 20px; font-size: 14px; }
.gbp-link { color: var(--cm-primary); font-weight: 600; text-decoration: none; }
.gbp-link:hover { color: var(--cm-primary-hover); text-decoration: underline; }
.gbp-link.is-danger { color: #dc2626; }
.gbp-link.is-danger:hover { color: #b91c1c; }

/* ── Formularios ── */
.gbp-form { display: flex; flex-direction: column; gap: 20px; }
.gbp-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.gbp-form-grid.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gbp-form-grid > .is-full { grid-column: 1 / -1; }
.gbp-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gbp-label { font-family: var(--font-display); font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--cm-n-700); }
.gbp-label .is-required { color: #dc2626; margin-left: 2px; }
.gbp-help { font-size: 12px; line-height: 1.5; color: var(--cm-n-500); }
.gbp-error { font-size: 12px; color: #dc2626; }
.gbp-input, .gbp-select, .gbp-textarea {
    width: 100%; padding: 9px 12px; border: 1px solid var(--cm-n-200); border-radius: 8px;
    background: #fff; font-family: var(--font-body); font-size: 14px; color: var(--cm-n-900);
    outline: 0; transition: border-color 120ms ease, box-shadow 120ms ease;
}
.gbp-input::placeholder, .gbp-textarea::placeholder { color: var(--cm-n-400); }
.gbp-input:focus, .gbp-select:focus, .gbp-textarea:focus { border-color: var(--cm-primary); box-shadow: 0 0 0 3px rgba(91, 95, 199, 0.18); }
.gbp-input:disabled, .gbp-select:disabled, .gbp-textarea:disabled { background: var(--cm-n-50); color: var(--cm-n-500); cursor: not-allowed; }
.gbp-input.is-invalid, .gbp-select.is-invalid, .gbp-textarea.is-invalid { border-color: #f87171; }
.gbp-select { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238790a5' stroke-width='2'><path d='m6 9 6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; }
.gbp-textarea { resize: vertical; line-height: 1.55; }
.gbp-input-group { display: flex; align-items: stretch; }
.gbp-input-group .gbp-input { border-radius: 8px 0 0 8px; }
.gbp-input-suffix { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--cm-n-200); border-left: 0; border-radius: 0 8px 8px 0; background: var(--cm-n-50); font-size: 13px; color: var(--cm-n-500); white-space: nowrap; }
.gbp-checkbox { width: 16px; height: 16px; accent-color: var(--cm-primary); }
.gbp-check-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.gbp-check-list label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--cm-n-800); }
.gbp-toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.gbp-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.gbp-toggle-track { position: relative; width: 40px; height: 22px; border-radius: 999px; background: var(--cm-n-300); transition: background-color 150ms ease; flex-shrink: 0; }
.gbp-toggle-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: transform 150ms ease; }
.gbp-toggle input:checked + .gbp-toggle-track { background: var(--cm-primary); }
.gbp-toggle input:checked + .gbp-toggle-track::after { transform: translateX(18px); }
.gbp-toggle input:focus-visible + .gbp-toggle-track { outline: 2px solid var(--cm-primary); outline-offset: 2px; }
.gbp-toggle input:disabled + .gbp-toggle-track { opacity: 0.5; cursor: not-allowed; }
.gbp-toggle-label { font-size: 14px; color: var(--cm-n-800); }
.gbp-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 42px; padding: 6px 8px; border: 1px solid var(--cm-n-200); border-radius: 8px; background: #fff; cursor: text; }
.gbp-tags:focus-within { border-color: var(--cm-primary); box-shadow: 0 0 0 3px rgba(91, 95, 199, 0.18); }
.gbp-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px; background: var(--cm-primary-soft); color: var(--cm-primary-hover); font-size: 13px; font-weight: 500; }
.gbp-tag button { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; color: inherit; opacity: 0.7; }
.gbp-tag button:hover { opacity: 1; background: rgba(91, 95, 199, 0.15); }
.gbp-tag button svg { width: 12px; height: 12px; }
.gbp-tags input { flex: 1 1 120px; min-width: 120px; border: 0; outline: 0; padding: 4px; font-size: 14px; background: transparent; }
.gbp-fieldset { border: 1px solid var(--cm-n-200); border-radius: 10px; padding: 18px 20px; }
.gbp-fieldset > legend { padding: 0 6px; font-family: var(--font-display); font-size: 13px; font-weight: 600; color: var(--cm-n-700); }
.gbp-fieldset > * + * { margin-top: 16px; }
.gbp-file { font-size: 13px; color: var(--cm-n-700); }
.gbp-file::file-selector-button { margin-right: 12px; padding: 7px 12px; border: 1px solid var(--cm-n-200); border-radius: 8px; background: #fff; font-family: var(--font-display); font-size: 13px; font-weight: 600; color: var(--cm-n-700); cursor: pointer; }
.gbp-file::file-selector-button:hover { border-color: var(--cm-n-400); }
.gbp-readonly { padding: 9px 12px; border-radius: 8px; background: var(--cm-n-50); border: 1px dashed var(--cm-n-200); font-size: 14px; color: var(--cm-n-700); }
.gbp-actions-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ── Tablas ── */
.gbp-table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--cm-n-200); border-radius: 12px; box-shadow: var(--shadow-1); }
.gbp-table-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--cm-n-200); }
.gbp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.gbp-table thead { background: var(--cm-n-50); }
.gbp-table th { padding: 13px 16px; text-align: left; font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: var(--cm-n-500); white-space: nowrap; border-bottom: 1px solid var(--cm-n-200); }
.gbp-table th.is-center, .gbp-table td.is-center { text-align: center; }
.gbp-table th.is-right, .gbp-table td.is-right { text-align: right; }
.gbp-table th a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.gbp-table th a svg { width: 14px; height: 14px; }
.gbp-table td { padding: 16px; color: var(--cm-n-800); border-bottom: 1px solid var(--cm-n-150); vertical-align: middle; }
.gbp-table tbody tr:last-child td { border-bottom: 0; }
.gbp-table tbody tr:hover td { background: #f6f7fc; }
.gbp-table tr.is-link { cursor: pointer; }
.gbp-table .gbp-table-actions { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
.gbp-table-empty { padding: 48px 20px; text-align: center; color: var(--cm-n-500); }
.gbp-table-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; background: var(--cm-n-50); border-top: 1px solid var(--cm-n-200); border-radius: 0 0 12px 12px; font-size: 13px; color: var(--cm-n-500); }
.gbp-pagination { display: flex; align-items: center; gap: 4px; }
.gbp-pagination a, .gbp-pagination button, .gbp-pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--cm-n-700); text-decoration: none; }
.gbp-pagination a:hover, .gbp-pagination button:hover { background: var(--cm-n-100); }
.gbp-pagination a:focus-visible, .gbp-pagination button:focus-visible { outline: 2px solid var(--cm-primary); outline-offset: 1px; }
.gbp-pagination .is-current { background: var(--cm-primary); color: #fff; }
.gbp-pagination .is-disabled { color: var(--cm-n-300); }
.gbp-pagination svg { width: 16px; height: 16px; }

/* ── Distintivos ── */
.gbp-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px; font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: 0.03em; line-height: 1.3; white-space: nowrap; }
.gbp-badge.is-gray { background: var(--cm-n-100); color: var(--cm-n-700); }
.gbp-badge.is-primary { background: var(--cm-primary-soft); color: var(--cm-primary-hover); }
.gbp-badge.is-success { background: #e8f6f1; color: #0f6b52; }
.gbp-badge.is-warning { background: #fffbeb; color: #b45309; }
.gbp-badge.is-danger { background: #fef2f2; color: #b91c1c; }
.gbp-badge.is-info { background: #eaf3fd; color: #1d5f9b; }

/* ── Menú desplegable ── */
.gbp-dropdown { position: relative; }
.gbp-dropdown-trigger { display: inline-flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; color: var(--cm-n-800); }
.gbp-dropdown-trigger:hover { background: var(--cm-n-100); }
.gbp-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--cm-primary-soft); color: var(--cm-primary-hover); font-family: var(--font-display); font-size: 13px; font-weight: 700; }
.gbp-dropdown-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 220px; padding: 6px; border: 1px solid var(--cm-n-200); border-radius: 12px; background: #fff; box-shadow: 0 8px 28px rgba(36, 44, 76, 0.12); }
.gbp-dropdown-header { padding: 10px 12px 8px; border-bottom: 1px solid var(--cm-n-150); margin-bottom: 4px; }
.gbp-dropdown-header strong { display: block; font-family: var(--font-display); font-size: 13px; font-weight: 600; color: var(--cm-n-900); }
.gbp-dropdown-header span { display: block; font-size: 12px; color: var(--cm-n-500); overflow: hidden; text-overflow: ellipsis; }
.gbp-dropdown-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border-radius: 8px; font-size: 13px; color: var(--cm-n-800); text-decoration: none; text-align: left; }
.gbp-dropdown-item svg { width: 18px; height: 18px; color: var(--cm-n-500); }
.gbp-dropdown-item:hover { background: var(--cm-n-100); }

/* Bandeja: borrador preparado por la IA */
.gbp-item-draft { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--cm-primary); }
.gbp-item-draft svg { width: 14px; height: 14px; flex-shrink: 0; }
.gbp-reply-draft-note { display: block; margin-top: 2px; font-size: 12px; color: var(--cm-n-500); }

/* Cuenta: resumen del plan */
.gbp-plan-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 0; }
.gbp-plan-summary dt { font-size: 12px; color: var(--cm-n-500); }
.gbp-plan-summary dd { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; font-size: 16px; font-weight: 600; color: var(--cm-n-900); }

/* Usuarios del equipo */
.gbp-team-list { margin: 0; padding: 0; list-style: none; }
.gbp-team-list > li + li { border-top: 1px solid var(--cm-n-150); }
.gbp-team-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 16px; padding: 14px 0; }
.gbp-team-row strong { display: block; font-size: 14px; color: var(--cm-n-900); }
.gbp-team-email { display: block; font-size: 13px; color: var(--cm-n-500); overflow: hidden; text-overflow: ellipsis; }
.gbp-team-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--cm-n-600); }
.gbp-team-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 16px; }
.gbp-team-edit { display: grid; gap: 14px; padding: 4px 0 18px; }
.gbp-check-list small { color: var(--cm-n-500); }
@media (max-width: 760px) { .gbp-team-row { grid-template-columns: minmax(0, 1fr); gap: 8px; } }

/* Accesibilidad: saltar al contenido */
.gbp-skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: var(--cm-primary); color: #fff; font-weight: 600; text-decoration: none; }
.gbp-skip-link:focus { top: 12px; }
.gbp-main:focus { outline: none; }

/* Recalculando cifras al cambiar de período */
.gbp-loading-hint { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--cm-n-500); }
.gbp-loading-hint svg { width: 16px; height: 16px; }
.gbp-is-updating .stat, .gbp-is-updating .gbp-card { opacity: .55; transition: opacity .15s; }

/* Menciones: confirmar la fusión */
.gbp-team-merge-wrap { display: inline-flex; align-items: center; gap: 10px; }
.gbp-team-merge-confirm { display: inline-flex; gap: 10px; font-size: 13px; }

/* Grupo de opciones (radio) en tarjetas */
.gbp-choice-group { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; border: 0; padding: 0; margin: 0 0 16px; }
.gbp-choice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--cm-n-200); border-radius: 10px; cursor: pointer; }
.gbp-choice:has(input:checked) { border-color: var(--cm-primary); background: var(--cm-primary-soft); }
.gbp-choice:has(input:focus-visible) { outline: 2px solid var(--cm-primary); outline-offset: 2px; }
.gbp-choice input { margin-top: 3px; accent-color: var(--cm-primary); }
.gbp-choice strong { display: block; font-size: 14px; color: var(--cm-n-900); }
.gbp-choice small { display: block; font-size: 12.5px; color: var(--cm-n-500); }

/* Estados vacíos con acción y chips de filtros */
.gbp-empty-action { margin-top: 14px; }
.gbp-filter-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--cm-primary-soft); color: var(--cm-primary-hover); }
.gbp-filter-chip:hover { background: #e1e2fa; }
.gbp-filter-chip:focus-visible { outline: 2px solid var(--cm-primary); outline-offset: 2px; }

/* Dashboard: primeros pasos */
.gbp-onboarding-bar { height: 6px; border-radius: 3px; background: var(--cm-n-150); overflow: hidden; margin-bottom: 8px; }
.gbp-onboarding-bar span { display: block; height: 100%; background: var(--cm-primary); border-radius: 3px; transition: width .3s; }
.gbp-onboarding-steps { margin: 0; padding: 0; list-style: none; }
.gbp-onboarding-steps li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--cm-n-150); }
.gbp-onboarding-steps li:first-child { border-top: 0; }
.gbp-onboarding-check { display: grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid var(--cm-n-300); font-size: 12px; font-weight: 700; color: var(--cm-n-600); }
.gbp-onboarding-check svg { width: 16px; height: 16px; }
.gbp-onboarding-steps li.is-done .gbp-onboarding-check { border-color: #0f9f6e; background: #0f9f6e; color: #fff; }
.gbp-onboarding-text { flex: 1; min-width: 0; }
.gbp-onboarding-text strong { display: block; font-size: 14px; color: var(--cm-n-900); }
.gbp-onboarding-text span { display: block; font-size: 13px; color: var(--cm-n-500); }
.gbp-onboarding-steps li.is-done strong { color: var(--cm-n-500); text-decoration: line-through; }

/* Avisos globales bajo la barra superior */
.gbp-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 24px; font-size: 13px; border-bottom: 1px solid; }
.gbp-banner > svg { width: 18px; height: 18px; flex-shrink: 0; }
.gbp-banner > span { flex: 1 1 280px; }
.gbp-banner.is-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.gbp-banner.is-impersonating { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.gbp-banner-action { font-weight: 600; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.gbp-banner-action:hover { text-decoration-thickness: 2px; }

/* Páginas de error */
.gbp-error-page { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--cm-paper); }
.gbp-error-card { max-width: 480px; text-align: center; }
.gbp-error-code { display: inline-block; margin-bottom: 12px; padding: 4px 10px; border-radius: 999px; background: var(--cm-primary-soft); color: var(--cm-primary-hover); font-size: 13px; font-weight: 700; }
.gbp-error-card h1 { font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--cm-n-900); }
.gbp-error-card p { margin: 10px 0 24px; color: var(--cm-n-600); line-height: 1.6; }
.gbp-error-card .gbp-actions-row { justify-content: center; }

/* Conseguir reseñas: pedir por WhatsApp o email */
.gbp-review-request { margin-top: 24px; padding: 18px 20px; border: 1px solid var(--cm-n-200); border-radius: 12px; background: var(--cm-n-50); }
.gbp-review-request h3 { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--cm-n-900); }
.gbp-review-request > p { margin: 4px 0 14px; font-size: 13px; color: var(--cm-n-500); }
.gbp-review-request-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.gbp-review-request-fields small { font-weight: 400; color: var(--cm-n-500); }
.gbp-review-request-preview { margin: 14px 0; padding: 12px 14px; border-radius: 10px; background: #fff; border: 1px dashed var(--cm-n-300); font-size: 13.5px; color: var(--cm-n-700); white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 640px) { .gbp-review-request-fields { grid-template-columns: minmax(0, 1fr); } }

/* Ayuda emergente accesible */
.gbp-tip { position: relative; display: inline-flex; vertical-align: -3px; margin-left: 3px; }
.gbp-tip-trigger { display: grid; place-items: center; color: var(--cm-n-500); border-radius: 50%; }
.gbp-tip-trigger svg { width: 16px; height: 16px; }
.gbp-tip-trigger:focus-visible { outline: 2px solid var(--cm-primary); outline-offset: 2px; }
.gbp-tip-bubble { position: absolute; z-index: 30; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: max-content; max-width: 260px; padding: 8px 10px; border-radius: 8px; background: var(--cm-n-900); color: #fff; font-size: 12px; font-weight: 400; line-height: 1.45; letter-spacing: 0; text-transform: none; white-space: normal; box-shadow: 0 6px 18px rgba(36, 44, 76, .2); }

/* Selector de archivo propio */
.gbp-file-picker { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.gbp-file-picker:focus-within label { outline: 2px solid var(--cm-primary); outline-offset: 2px; }
.gbp-file-name { font-size: 13px; color: var(--cm-n-500); }

/* Estado de la cuenta de Google */
.gbp-google-status { display: flex; align-items: center; gap: 12px; }
.gbp-google-status > svg { width: 28px; height: 28px; flex-shrink: 0; color: var(--cm-n-400); }
.gbp-google-status.is-success > svg { color: #0f9f6e; }
.gbp-google-status.is-danger > svg { color: #dc2626; }
.gbp-google-status strong { display: block; margin-bottom: 4px; font-size: 14px; color: var(--cm-n-900); }

/* Campana de avisos */
.gbp-bell { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; color: var(--cm-n-600); }
.gbp-bell:hover { background: var(--cm-n-100); color: var(--cm-n-900); }
.gbp-bell:focus-visible { outline: 2px solid var(--cm-primary); outline-offset: 2px; }
.gbp-bell svg { width: 22px; height: 22px; }
.gbp-bell-count { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #d93a3a; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.gbp-bell-panel { width: min(360px, calc(100vw - 24px)); padding: 0; }
.gbp-bell-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--cm-n-150); font-size: 13px; }
.gbp-bell-head strong { font-family: var(--font-display); color: var(--cm-n-900); }
.gbp-bell-list { max-height: 380px; overflow-y: auto; padding: 6px; margin: 0; list-style: none; }
.gbp-bell-item { display: flex; gap: 10px; width: 100%; padding: 10px; border-radius: 8px; text-align: left; font-size: 13px; color: var(--cm-n-700); }
.gbp-bell-item:hover { background: var(--cm-n-100); }
.gbp-bell-item:focus-visible { outline: 2px solid var(--cm-primary); outline-offset: -2px; }
.gbp-bell-item > svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: var(--cm-n-500); }
.gbp-bell-item.is-unread { background: var(--cm-primary-soft); color: var(--cm-n-900); }
.gbp-bell-item.is-unread > svg { color: var(--cm-primary); }
.gbp-bell-text { display: block; }
.gbp-bell-time { display: block; margin-top: 2px; font-size: 12px; color: var(--cm-n-500); }
.gbp-bell-empty { padding: 20px 14px; font-size: 13px; color: var(--cm-n-500); text-align: center; }
.gbp-dropdown-item.is-danger { color: #b91c1c; }
.gbp-dropdown-item.is-danger svg { color: #dc2626; }

/* ── Avisos (toasts) ── */
.gbp-toasts { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 40px)); }
.gbp-toast { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--cm-n-200); box-shadow: 0 8px 28px rgba(36, 44, 76, 0.14); }
.gbp-toast-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0; }
.gbp-toast-icon svg { width: 18px; height: 18px; }
.gbp-toast.is-success .gbp-toast-icon { background: #e8f6f1; color: #168568; }
.gbp-toast.is-info .gbp-toast-icon { background: #eaf3fd; color: #3b82c4; }
.gbp-toast.is-warning .gbp-toast-icon { background: #fff5df; color: #b97b16; }
.gbp-toast.is-danger .gbp-toast-icon { background: #fef2f2; color: #dc2626; }
.gbp-toast-title { font-family: var(--font-display); font-size: 13px; font-weight: 600; color: var(--cm-n-900); }
.gbp-toast-body { margin-top: 2px; font-size: 13px; line-height: 1.5; color: var(--cm-n-600); }
.gbp-toast-close { margin-left: auto; align-self: flex-start; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; color: var(--cm-n-400); }
.gbp-toast-close:hover { background: var(--cm-n-100); color: var(--cm-n-700); }
.gbp-toast-close svg { width: 14px; height: 14px; }

/* ── Aviso persistente en página ── */
.gbp-alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1px solid; font-size: 13px; line-height: 1.5; }
.gbp-alert svg { width: 20px; height: 20px; flex-shrink: 0; }
.gbp-alert.is-info { background: #eef2fd; border-color: #c7d2fe; color: #3730a3; }
.gbp-alert.is-warning { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.gbp-alert.is-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.gbp-alert.is-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }

/* ── Estado vacío ── */
.gbp-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 48px 24px; text-align: center; color: var(--cm-n-500); }
.gbp-empty > svg { width: 40px; height: 40px; margin-bottom: 8px; color: var(--cm-n-300); }
.gbp-empty strong { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--cm-n-800); }
.gbp-empty p { font-size: 13px; }

/* ── Acceso ── */
.gbp-guest { min-height: 100dvh; display: flex; align-items: center; justify-content: center; background: var(--cm-paper); padding: 24px; }
.gbp-login-card { width: 100%; max-width: 1000px; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-2); background: #fff; margin: 40px 24px; }
.gbp-login-form h1 { font-family: var(--font-display); font-size: 23px; font-weight: 600; letter-spacing: -0.4px; color: var(--cm-n-900); }
.gbp-login-form .gbp-login-sub { margin-top: 6px; margin-bottom: 28px; font-size: 14px; color: var(--cm-n-500); }
.gbp-login-form .gbp-input { padding-top: 11px; padding-bottom: 11px; }
.gbp-login-form .gbp-btn { min-height: 44px; width: 100%; }

@media (max-width: 767px) {
    .gbp-login-card { margin: 20px 16px; }
    .gbp-page-title { font-size: 21px; }
    .gbp-form-grid, .gbp-form-grid.is-3, .gbp-check-list { grid-template-columns: minmax(0, 1fr); }
    .gbp-main { padding: 20px 16px 32px; }
    .gbp-topbar { padding: 0 16px; }
    .gbp-card-body { padding: 18px; }
    .gbp-card-header { padding: 16px 18px; }
}

@media (min-width: 64rem) {
    .gbp-sidebar { position: sticky; top: 0; height: 100dvh; transform: none; flex-shrink: 0; }
    .gbp-sidebar-close, .gbp-topbar-menu, .gbp-sidebar-overlay { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .gbp-sidebar, .gbp-btn, .gbp-nav-item, .gbp-toggle-track, .gbp-toggle-track::after { transition: none; }
}

/* =========================================================================
   BASE
   ========================================================================= */
html,
body {
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
/* =========================================================================
   STATS GRID — KPI summary cards
   ========================================================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.stat {
    background: var(--cm-white);
    border: 1px solid var(--cm-n-200);
    padding: 22px;
    border-radius: 12px;
    box-shadow: var(--shadow-1);
    position: relative;
    min-width: 0;
}
.stat-label {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: none;
    color: var(--cm-n-500);
}
.stat-value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 32px;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--cm-n-900);
}
.stat-unit {
    font-size: 16px;
    font-weight: 500;
    color: var(--cm-n-500);
}
.stat-delta {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-top: 4px;
    min-height: 18px;
}
.stat-vs {
    font-size: 13px;
    font-weight: 500;
    color: var(--cm-n-500);
}
.stat-delta.up { color: #168568; }
.stat-delta.down { color: #d34f61; }
/* =========================================================================
   REVIEWS INBOX
   ========================================================================= */
.gbp-inbox {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-1);
    min-height: 640px;
    border: 1px solid var(--cm-n-200);
    background: var(--cm-white);
}
.gbp-inbox-item {
    position: relative;
    cursor: pointer;
    transition: background 120ms ease;
    display: block;
    width: 100%;
    text-align: left;
}
.gbp-inbox-item:hover { background: var(--cm-n-50); }
.gbp-inbox-item.is-selected { background: var(--cm-primary-soft); }
.gbp-inbox-item.is-selected::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--cm-primary);
}
/* ── Filter selects ── */
.gbp-filter-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--cm-white);
    border: 1px solid var(--cm-n-200);
    padding: 7px 30px 7px 12px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: none;
    color: var(--cm-n-700);
    cursor: pointer;
    outline: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239A938B' stroke-width='2'><path d='m6 9 6 6 6-6'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    transition: border-color 120ms ease;
}
.gbp-filter-select:hover { border-color: var(--cm-n-400); }
/* ── Search input (sin chevron, con aire para la lupa) ── */
.gbp-search-input {
    appearance: none;
    -webkit-appearance: none;
    background: var(--cm-white);
    border: 1px solid var(--cm-n-200);
    padding: 7px 12px 7px 38px; /* hueco izq. para la lupa con aire a ambos lados */
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none !important;
    color: var(--cm-n-700);
    cursor: text;
    outline: 0;
    transition: border-color 120ms ease;
}
/* ── Toggle tipo filtro (Todas / Sin responder) ── */
.gbp-search-input::placeholder {
    text-transform: none !important;
    letter-spacing: normal;
    font-weight: 500;
    color: var(--cm-n-400);
}
.gbp-search-input:hover, .gbp-search-input:focus { border-color: var(--cm-n-400); }
/* ── Inbox chips ── */
.gbp-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: none;
    padding: 2px 7px;
    white-space: nowrap;
}
.gbp-chip-outline {
    border: 1px solid var(--cm-n-200);
    color: var(--cm-n-600);
}
.gbp-chip-muted {
    background: var(--cm-n-100);
    color: var(--cm-n-500);
}
.gbp-chip-new {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #b45309;
}
/* ── Reply box buttons ── */
.gbp-inbox textarea:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    --tw-ring-shadow: none !important;
}
@media (max-width: 1100px) {
    .gbp-inbox { grid-template-columns: 1fr; }
}
/* Sidebar footer and shared branding */
.gbp-brand { display: inline-flex; align-items: center; gap: 10px; }
.gbp-brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--cm-primary); color: #fff; font-size: 13px; font-weight: 700; }
.gbp-brand-name { color: var(--cm-n-900); font-size: 19px; font-weight: 700; letter-spacing: -0.4px; }
.gbp-brand-name small { display: block; color: var(--cm-n-500); font-size: 10px; font-weight: 400; letter-spacing: 1.2px; line-height: 1.2; }
.gbp-filter-select, .gbp-search-input { border-radius: 7px; min-height: 36px; }
.gbp-chip { border-radius: 5px; letter-spacing: 0; }
.gbp-inbox-item.is-selected::before { width: 3px; }
.gbp-filter-select:focus-visible,
.gbp-search-input:focus-visible,
.gbp-inbox-item:focus-visible {
    outline: 2px solid var(--cm-primary);
    outline-offset: 3px;
}
.gbp-dashboard-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.gbp-dashboard-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.gbp-page-header .gbp-dashboard-filters { margin-top: 12px; }
.gbp-dashboard-synced { margin-top: 8px; }
.gbp-dashboard-filters label { color: var(--cm-n-500); font-size: 13px; margin-right: 4px; }
.gbp-dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-bottom: 24px; align-items: start; }
.gbp-dashboard-grid > * { min-width: 0; }
.gbp-dashboard-col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.gbp-dashboard-row { display: grid; gap: 24px; margin-bottom: 24px; align-items: stretch; }
.gbp-dashboard-row > * { min-width: 0; }
.gbp-dashboard-row.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gbp-dashboard-row.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Tarjetas de la fila: el cuerpo ocupa todo el alto y el resumen se ancla al pie,
   para que las cifras grandes queden alineadas aunque el contenido mida distinto. */
.gbp-dashboard-row > .gbp-card { display: flex; flex-direction: column; }
.gbp-dashboard-row > .gbp-card > .gbp-card-body { flex: 1; display: flex; flex-direction: column; row-gap: 20px; }
.gbp-dashboard-row > .gbp-card > .gbp-card-body > .gbp-chart-summary { margin-top: auto; }
.stats-grid { gap: 20px; margin-bottom: 24px; }
.stats-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-label { color: var(--cm-n-500); font-size: 13px; font-weight: 500; letter-spacing: 0; padding-right: 30px; }
.stat-icon { position: absolute; right: 20px; top: 17px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: var(--cm-primary); background: var(--cm-primary-soft); }
.stat-icon svg { width: 17px; height: 17px; }
.stat-icon-green { color: #168568; background: #e8f6f1; }
.stat-icon-blue { color: #3b82c4; background: #eaf3fd; }
.stat-icon-amber { color: #b97b16; background: #fff5df; }
.stat-value { font-variant-numeric: tabular-nums; }
.gbp-progress-track { border-radius: 6px; }
.gbp-progress-fill { border-radius: 6px; background: var(--cm-primary) !important; }
.gbp-chart-eyebrow { color: var(--cm-n-500); font-size: 12px; font-weight: 500; margin-bottom: 4px; }
.gbp-chart-title { color: var(--cm-n-900); font-size: 16px; font-weight: 600; }
/* Cifra global de una gráfica, al pie de la tarjeta como en «Distribución de rating». */
.gbp-chart-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--cm-n-150); }
.gbp-chart-summary strong { font-family: var(--font-display); font-size: 36px; font-weight: 800; line-height: 1; color: var(--cm-n-900); font-variant-numeric: tabular-nums; }
.gbp-chart-summary span { font-family: var(--font-display); font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cm-n-500); }
.gbp-breadcrumbs { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--cm-n-500); }
.gbp-client-nav { background: #fff; border-bottom: 1px solid var(--cm-n-200); }
.gbp-client-nav-links { display: flex; flex-wrap: wrap; gap: 4px; }
.gbp-client-nav-links a { border-radius: 7px; }
.gbp-client-nav-links a[aria-current="page"] { background: var(--cm-primary-soft); color: var(--cm-primary); border-bottom: 0; }
.gbp-client-body main { max-width: 1440px; }
.gbp-client-body main > div > .bg-white { border-radius: 12px; box-shadow: var(--shadow-1); }
/* Ancho tope: la lista ocupa un tercio y el panel de lectura queda en unos 750px. */
.gbp-mailbox { display: flex; flex-direction: column; gap: 16px; max-width: 1140px; }
.gbp-mailbox-detail { max-width: 750px; }
.gbp-mailbox-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.gbp-mailbox-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-left: auto; }
.gbp-mailbox-folder { display: flex; align-items: center; gap: 7px; width: auto; min-height: 36px; padding: 6px 11px; border-radius: 7px; font-size: 13px; text-align: left; color: var(--cm-n-600); }
.gbp-mailbox-folder svg { width: 16px; height: 16px; flex-shrink: 0; }
.gbp-mailbox-folder strong { margin-left: 2px; font-size: 11px; font-variant-numeric: tabular-nums; background: var(--cm-n-100); border-radius: 5px; padding: 2px 6px; }
.gbp-mailbox-folder:hover { background: var(--cm-n-50); }
.gbp-mailbox-folder.is-active { color: var(--cm-primary); background: var(--cm-primary-soft); font-weight: 600; }
.gbp-mailbox-folder.is-active strong { background: #dcdef8; }
.gbp-mailbox-main { min-width: 0; border: 1px solid var(--cm-n-200); background: #fff; border-radius: 12px; box-shadow: var(--shadow-1); }
.gbp-mailbox-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; padding: 12px 16px; border-bottom: 1px solid var(--cm-n-200); }
.gbp-mailbox-search { flex: 1 1 160px; min-width: 140px; }
.gbp-mailbox-toolbar .gbp-search-input { width: 100%; }
@media (min-width: 64rem) {
    /* En escritorio todo va en una línea: el buscador absorbe el sobrante y encoge si hace falta;
       si aun así no cabe (chips activos), la barra salta de línea en lugar de desbordar. */
    .gbp-mailbox-tabs { flex-shrink: 0; }
    .gbp-mailbox-tools { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; }
    .gbp-mailbox-tools > select { flex-shrink: 0; }
    .gbp-mailbox-search { flex: 1 1 120px; min-width: 110px; }
}
.gbp-mailbox .gbp-inbox { grid-template-columns: minmax(260px, 34%) minmax(0, 1fr); min-height: 580px; border: 0; border-radius: 0 0 12px 12px; box-shadow: none; }
.gbp-mailbox-list, .gbp-mailbox-detail { max-height: max(580px, calc(100vh - 280px)); overflow-y: auto; min-width: 0; }
.gbp-mailbox-list { border-right: 1px solid var(--cm-n-200); }
.gbp-mailbox-list-heading { display: flex; justify-content: space-between; gap: 8px; padding: 14px 18px; font-size: 11px; color: var(--cm-n-500); background: var(--cm-n-50); border-bottom: 1px solid var(--cm-n-200); }
.gbp-mailbox .gbp-inbox-item { display: flex; gap: 10px; padding: 18px; }
.gbp-mailbox-author { display: flex; align-items: center; gap: 8px; min-width: 0; }
.gbp-mailbox .gbp-inbox-item .uppercase { text-transform: none; letter-spacing: 0 !important; font-weight: 400; }
.gbp-mailbox-detail-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px; border-bottom: 1px solid var(--cm-n-200); }
.gbp-mailbox-detail-header > div { min-width: 0; max-width: 100%; flex-wrap: wrap; }
.gbp-mailbox-detail-body { padding: 28px 24px; overflow-wrap: anywhere; }
.gbp-mailbox-detail-body > .max-w-2xl { padding-bottom: 28px !important; }
.gbp-mailbox-detail-body > .max-w-2xl p { font-size: 15px !important; }
.gbp-mailbox-empty { display: flex; min-height: 480px; height: 100%; padding: 32px; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--cm-n-600); }
.gbp-mailbox-empty > svg { color: var(--cm-primary); background: var(--cm-primary-soft); border-radius: 20px; padding: 14px; width: 76px; height: 76px; }
.gbp-reply-composer { border-radius: 10px; overflow: hidden; }
/* El textarea no muestra foco propio: lo enseña el recuadro entero. */
.gbp-reply-composer:focus-within { border-color: var(--cm-primary) !important; box-shadow: 0 0 0 3px var(--cm-primary-soft); }
.gbp-reply-title { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--cm-n-900); }
.gbp-reply-input { font-size: 15px; line-height: 1.6; color: var(--cm-n-900); border: 0; outline: 0; box-shadow: none; }
.gbp-reply-input:focus, .gbp-reply-input:focus-visible { border: 0; outline: 0; box-shadow: none; }
.gbp-reply-composer .gbp-btn { min-height: 40px; padding: 9px 16px; }
/* Respuesta ya enviada: se lee como texto, no como campo apagado. */
.gbp-reply-sent { font-size: 16px; line-height: 1.6; color: var(--cm-n-900); }
.gbp-reply-sent:disabled { color: var(--cm-n-900); opacity: 1; -webkit-text-fill-color: var(--cm-n-900); }
.gbp-reply-composer > .flex { flex-wrap: wrap; gap: 14px; padding: 18px !important; }
.gbp-reply-composer .flex { flex-wrap: wrap; }
.gbp-mailbox-back { display: none; }
.gbp-mailbox-back svg { width: 16px; height: 16px; }
.gbp-mailbox-folder:focus-visible, .gbp-mailbox-back:focus-visible { outline: 2px solid var(--cm-primary); outline-offset: 2px; }
/* Pantalla de acceso */
.gbp-login { display: grid; grid-template-columns: 1fr 1fr; min-height: 570px; }
.gbp-login-intro { display: flex; flex-direction: column; justify-content: space-between; gap: 44px; padding: 44px; background: radial-gradient(ellipse at top right, #6569ce 0, transparent 65%), #343965; color: #fff; }
.gbp-login-eyebrow { font-size: 12px; letter-spacing: 0.08em; font-weight: 600; }
.gbp-login-symbol { width: 60px; height: 60px; display: grid; place-items: center; border: 1px solid #ffffff38; border-radius: 16px; background: #ffffff12; margin-bottom: 24px; }
.gbp-login-symbol svg { width: 30px; height: 30px; }
.gbp-login-intro .gbp-login-claim { color: #fff; font-size: 32px; line-height: 1.3; letter-spacing: -0.7px; font-weight: 600; margin-bottom: 16px; }
.gbp-login-intro p { color: #e0e2f4; font-size: 14px; line-height: 1.8; }
.gbp-login-features { display: flex; flex-direction: column; gap: 14px; font-size: 13px; color: #e0e2f4; }
.gbp-login-features li { display: flex; align-items: center; gap: 10px; }
.gbp-login-features svg { width: 18px; height: 18px; color: #bfc3ff; }
.gbp-login-form { display: flex; flex-direction: column; justify-content: center; padding: 48px; background: #fff; }
@media (max-width: 767px) {
    .gbp-mailbox .gbp-inbox { grid-template-columns: minmax(0, 1fr); min-height: 0; }
    .gbp-mailbox-list, .gbp-mailbox-detail { max-height: none; }
    .gbp-mailbox-list { border-right: 0; }
    .gbp-mailbox .gbp-inbox:not(.has-selection) .gbp-mailbox-detail, .gbp-mailbox .gbp-inbox.has-selection .gbp-mailbox-list { display: none; }
    .gbp-mailbox-back { display: inline-flex; margin: 16px 16px 0; }
    .gbp-mailbox-detail-header, .gbp-mailbox-detail-body { padding: 20px 16px; }
    .gbp-mailbox-tools { margin-left: 0; width: 100%; }
    .gbp-mailbox-tools > .relative { width: 100%; flex-basis: 100%; }
    .gbp-mailbox-tools > select { flex: 1 1 45%; min-width: 0; }
    .gbp-mailbox-toolbar .gbp-search-input { width: 100%; }
    .gbp-mailbox-folder { padding: 9px 8px; font-size: 12px; }
    .gbp-login { grid-template-columns: minmax(0, 1fr); min-height: 0; }
    .gbp-login-intro { padding: 24px; gap: 18px; }
    .gbp-login-intro .gbp-login-claim { font-size: 24px; margin-bottom: 0; }
    .gbp-login-intro .gbp-login-claim br { display: none; }
    .gbp-login-symbol, .gbp-login-features, .gbp-login-intro p:not(.gbp-login-claim) { display: none; }
    .gbp-login-form { padding: 30px 24px; }
}
/* Utilidades que usan las vistas del portal de cliente. */
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mb-8 { margin-bottom: 2rem; }
@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1279px) {
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gbp-dashboard-row.is-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gbp-dashboard-row.is-3 > :nth-child(3) { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
    .gbp-dashboard-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .gbp-dashboard-col { gap: 16px; }
    .gbp-dashboard-row, .gbp-dashboard-row.is-3, .gbp-dashboard-row.is-2 { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
    .gbp-dashboard-toolbar { gap: 12px; }
    .gbp-dashboard-filters { width: 100%; }
    .gbp-dashboard-filters input, .gbp-dashboard-filters select { min-width: 0; max-width: 100%; }
    .gbp-client-nav, .gbp-client-nav > div { flex-wrap: wrap; gap: 12px; }
    .gbp-client-body main { padding: 20px 16px; }
    .gbp-inbox { min-height: 0; }
}
@media (max-width: 479px) {
    .stats-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .gbp-breadcrumbs { display: none; }
    .gbp-search-input { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .gbp-inbox-item, .gbp-btn, .gbp-progress-fill { transition: none !important; }
}
.stat-share { font-size: 13px; font-weight: 600; color: var(--cm-n-500); font-variant-numeric: tabular-nums; }
/* ── Reseñas: legibilidad ──────────────────────────────────────────────────
   Suelo de 14px en todo el texto de la página y grises más oscuros, porque
   el gris medio sobre blanco se quedaba en el límite del contraste AA.      */
.gbp-mailbox { color: var(--cm-n-700); }
/* Utilidades de Tailwind que bajaban de 14px dentro del buzón. */
.gbp-mailbox .text-xs, .gbp-mailbox .text-sm { font-size: 14px; line-height: 1.5; }
/* Grises de Tailwind: se suben de tono para ganar contraste. */
.gbp-mailbox .text-gray-400, .gbp-mailbox .text-gray-500 { color: var(--cm-n-600) !important; }
.gbp-mailbox .text-gray-600 { color: var(--cm-n-700) !important; }
/* Carpetas, cabeceras y metadatos del listado. */
.gbp-mailbox-folder { font-size: 13px; color: var(--cm-n-700); }
.gbp-mailbox-folder strong { font-size: 12px; color: var(--cm-n-800); }
.gbp-mailbox-list-heading { font-size: 14px; color: var(--cm-n-700); font-weight: 600; }
.gbp-mailbox-empty { color: var(--cm-n-700); }
/* Cuerpo de la reseña abierta. */
.gbp-mailbox-detail-body > .max-w-2xl p { font-size: 16px !important; line-height: 1.65; color: var(--cm-n-800); }
/* Chips y botones de la página. */
.gbp-mailbox .gbp-chip { font-size: 14px; }
.gbp-mailbox .gbp-chip-outline { color: var(--cm-n-700); }
.gbp-mailbox .gbp-chip-muted { color: var(--cm-n-700); }
.gbp-mailbox .gbp-chip-new { color: #92400e; }
.gbp-mailbox .gbp-btn.is-sm { font-size: 14px; }
/* Sugerir con IA: es la acción que ahorra el trabajo, así que se ve más
   que un secundario, por debajo de «Publicar respuesta». */
.gbp-mailbox .gbp-btn.is-soft { min-height: 40px; padding: 9px 16px; font-weight: 700; }
.gbp-mailbox .gbp-search-input::placeholder { color: var(--cm-n-600); }
/* ── Estrellas de puntuación ───────────────────────────────────────────────
   Iconos en lugar de los caracteres ★/☆: tamaño y color controlables.       */
.gbp-stars { display: inline-flex; align-items: center; gap: 2px; line-height: 1; flex-shrink: 0; }
.gbp-stars .gbp-star { width: var(--gbp-star-size, 18px); height: var(--gbp-star-size, 18px); flex: none; color: var(--cm-n-400); }
.gbp-stars .gbp-star.is-on { color: #f5a524; }
.gbp-stars.is-low .gbp-star.is-on { color: #dc2626; }
/* ── Temas más mencionados ─────────────────────────────────────────────────
   Lista con barra apilada de sentimiento en lugar de nube de etiquetas.     */
.gbp-topics { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
/* Variante sin barras (Temas con quejas): filas separadas por una línea. */
.gbp-topics.is-list { gap: 0; }
.gbp-topics.is-list .gbp-topic + .gbp-topic { border-top: 1px solid var(--cm-n-150); }
.gbp-topics.is-list .gbp-topic-row { margin: 0; padding: 12px 0; }
.gbp-topics.is-list .gbp-topic:first-child .gbp-topic-row { padding-top: 0; }
.gbp-topics.is-list .gbp-topic:last-child .gbp-topic-row { padding-bottom: 0; }
.gbp-topic-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; text-decoration: none; margin-bottom: 7px; }
.gbp-topic-row:hover .gbp-topic-name { color: var(--cm-primary); }
.gbp-topic-name { font-size: 15px; font-weight: 600; color: var(--cm-n-900); min-width: 0; overflow-wrap: anywhere; }
.gbp-topic-meta { font-size: 14px; color: var(--cm-n-600); white-space: nowrap; flex: none; }
.gbp-topic-sep { color: var(--cm-n-300); margin: 0 2px; }
.gbp-topic-pct { font-weight: 600; color: var(--cm-n-700); }
.gbp-topic-pct.is-neg { color: #b4453d; }
.gbp-topic-bar { display: flex; height: 9px; border-radius: 5px; overflow: hidden; background: var(--cm-n-100); }
.gbp-topic-bar span { display: block; height: 100%; }
.gbp-topic-bar .is-pos { background: #6db894; }
.gbp-topic-bar .is-neu { background: var(--cm-n-300); }
.gbp-topic-bar .is-neg { background: #d98b86; }
/* Búsquedas: ranking numerado, sin barras. */
.gbp-search-list { list-style: none; margin: 0; padding: 0; }
.gbp-search-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--cm-n-150); }
.gbp-search-item:last-child { border-bottom: 0; }
.gbp-search-pos { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--cm-n-100); font-family: var(--font-display); font-size: 12px; font-weight: 700; color: var(--cm-n-600); }
.gbp-search-item.is-first .gbp-search-pos { background: var(--cm-primary); color: #fff; }
.gbp-search-term { font-size: 14px; font-weight: 500; color: var(--cm-n-800); min-width: 0; overflow-wrap: anywhere; }
.gbp-search-item.is-first .gbp-search-term { font-weight: 600; color: var(--cm-n-900); }
.gbp-search-value { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.gbp-search-value strong { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--cm-n-900); font-variant-numeric: tabular-nums; }
.gbp-search-value small { min-width: 34px; text-align: right; font-size: 12px; font-weight: 600; color: var(--cm-n-500); font-variant-numeric: tabular-nums; }
.gbp-search-foot { margin-top: 14px; font-size: 12px; color: var(--cm-n-500); }
/* ── Equipo: configuración de nombres y ranking ────────────────────────────*/
.gbp-team-warning { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; margin-bottom: 20px; border: 1px solid #fcd34d; background: #fffbeb; border-radius: 10px; font-size: 14px; line-height: 1.55; color: #78350f; }
.gbp-team-warning svg { width: 22px; height: 22px; flex: none; color: #b45309; }
.gbp-team-warning strong { display: block; }
.gbp-team-add { display: flex; gap: 8px; margin-bottom: 18px; }
.gbp-team-add .gbp-search-input { flex: 1; min-width: 0; }
.gbp-team-empty { font-size: 14px; color: var(--cm-n-600); margin: 0; }
.gbp-team-names { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.gbp-team-names { flex-direction: column; gap: 10px; }
.gbp-team-name { display: block; padding: 10px 10px 10px 14px; border: 1px solid var(--cm-n-200); background: var(--cm-white); border-radius: 12px; font-size: 14px; color: var(--cm-n-800); }
.gbp-team-name-head { display: flex; align-items: center; gap: 10px; }
.gbp-team-name-label { font-weight: 600; margin-right: auto; overflow-wrap: anywhere; }
.gbp-team-name button { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; color: var(--cm-n-500); cursor: pointer; }
.gbp-team-name button:hover { background: #fdeceb; color: #b91c1c; }
.gbp-team-merge { flex: none; max-width: 150px; padding: 4px 8px; border: 1px solid var(--cm-n-200); border-radius: 7px; background: var(--cm-n-50); font-size: 13px; font-weight: 500; color: var(--cm-n-700); cursor: pointer; }
.gbp-team-merge:hover { border-color: var(--cm-primary); color: var(--cm-primary-hover); }
.gbp-team-aliases { list-style: none; margin: 8px 0 0; padding: 8px 0 0; border-top: 1px dashed var(--cm-n-200); display: flex; flex-wrap: wrap; gap: 6px 14px; }
.gbp-team-aliases li { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--cm-n-600); }
.gbp-team-aliases button { width: auto; height: auto; padding: 2px 8px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--cm-primary-hover); background: var(--cm-primary-soft); }
.gbp-team-aliases button:hover { background: var(--cm-primary); color: var(--cm-white); }
.gbp-team-pending { margin-top: 20px; padding: 16px; border: 1px solid var(--cm-n-200); border-radius: 10px; background: var(--cm-n-50); }
.gbp-team-pending-title { font-size: 14px; font-weight: 600; color: var(--cm-n-700); margin-bottom: 12px; }
.gbp-team-pending ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gbp-team-pending li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.gbp-team-pending li > span { font-weight: 600; color: var(--cm-n-900); margin-right: auto; }
.gbp-team-pending button { font-size: 14px; font-weight: 600; padding: 4px 10px; border-radius: 6px; cursor: pointer; border: 1px solid transparent; }
.gbp-team-pending .is-yes { color: #166534; border-color: #86efac; background: #f0fdf4; }
.gbp-team-pending .is-yes:hover { background: #dcfce7; }
.gbp-team-pending .is-no { color: var(--cm-n-700); border-color: var(--cm-n-200); background: var(--cm-white); }
.gbp-team-pending .is-no:hover { background: var(--cm-n-100); }
.gbp-team-backlog { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--cm-n-200); }
.gbp-team-backlog p { margin: 10px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--cm-n-600); }
.gbp-rank-toggle { display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 18px; border-radius: 9px; background: var(--cm-n-100); }
.gbp-rank-toggle button { padding: 7px 16px; border-radius: 7px; font-size: 14px; font-weight: 600; color: var(--cm-n-600); cursor: pointer; transition: all 120ms ease; }
.gbp-rank-toggle button:hover { color: var(--cm-n-900); }
.gbp-rank-toggle button.is-active { background: var(--cm-n-900); color: var(--cm-white); }
.gbp-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.gbp-rank-row { display: flex; width: 100%; text-align: left; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 12px; background: var(--cm-n-50); cursor: pointer; transition: background 120ms ease; }
.gbp-rank-row:hover { background: var(--cm-n-100); }
.gbp-rank-row.is-open { border-radius: 12px 12px 0 0; background: var(--cm-n-100); }
.gbp-rank-row:focus-visible { outline: 2px solid var(--cm-primary); outline-offset: 2px; }
.gbp-rank-chevron { width: 18px; height: 18px; flex: none; color: var(--cm-n-500); transition: transform 150ms ease; }
.gbp-rank-row.is-open .gbp-rank-chevron { transform: rotate(180deg); }
.gbp-rank-row.is-first { background: var(--cm-primary-soft); }
.gbp-rank-avatar { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--cm-white); border: 1px solid var(--cm-n-200); font-size: 14px; font-weight: 700; color: var(--cm-n-700); }
.gbp-rank-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; margin-right: auto; }
/* Caras del ranking de empleados: nivel 1 (terrible) a 5 (excelente). */
.gbp-face { display: inline-grid; place-items: center; flex: none; width: var(--gbp-face-size, 38px); height: var(--gbp-face-size, 38px); }
.gbp-face svg { width: 100%; height: 100%; display: block; }
.gbp-rank-mood { font-weight: 600; }
.gbp-rank-mood.is-level-1 { color: #b91c1c; }
.gbp-rank-mood.is-level-2 { color: #b45309; }
.gbp-rank-mood.is-level-3 { color: #8a6d0b; }
.gbp-rank-mood.is-level-4 { color: #4d7c0f; }
.gbp-rank-mood.is-level-5 { color: #15803d; }
.gbp-face-legend { display: flex; flex-wrap: wrap; gap: 14px 18px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--cm-n-150); }
.gbp-face-legend li { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--cm-n-600); }
.gbp-rank-name { font-size: 15px; font-weight: 700; color: var(--cm-n-900); overflow-wrap: anywhere; }
.gbp-rank-sub { font-size: 14px; color: var(--cm-n-600); overflow-wrap: anywhere; }
.gbp-rank-score { flex: none; text-align: right; font-size: 14px; color: var(--cm-n-600); }
.gbp-rank-score strong { font-size: 17px; color: var(--cm-n-900); font-variant-numeric: tabular-nums; }
.gbp-rank-pct { display: block; font-size: 13px; color: var(--cm-n-500); }
.gbp-rank-trophy { width: 22px; height: 22px; flex: none; color: #f5a524; }
.gbp-rank-more { width: 100%; margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--cm-n-50); font-size: 14px; font-weight: 600; color: var(--cm-n-700); cursor: pointer; }
.gbp-rank-more:hover { background: var(--cm-n-100); color: var(--cm-n-900); }
.gbp-rank-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 40px 24px; }
.gbp-rank-empty svg { width: 54px; height: 54px; padding: 12px; border-radius: 16px; color: var(--cm-primary); background: var(--cm-primary-soft); }
.gbp-rank-empty p { margin: 6px 0 0; font-size: 15px; font-weight: 600; color: var(--cm-n-800); }
.gbp-rank-empty span { font-size: 14px; color: var(--cm-n-600); max-width: 340px; line-height: 1.55; }
/* ── Reseñas de una persona del ranking ───────────────────────────────────*/
.gbp-mentions { padding: 16px 18px 18px; border: 1px solid var(--cm-n-200); border-top: 0; border-radius: 0 0 12px 12px; background: var(--cm-white); }
.gbp-mentions-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.gbp-mentions-filter button, .gbp-mentions-filter a { text-decoration: none; padding: 5px 12px; border: 1px solid var(--cm-n-200); border-radius: 999px; background: var(--cm-white); font-size: 14px; font-weight: 600; color: var(--cm-n-700); cursor: pointer; }
.gbp-mentions-filter button:hover, .gbp-mentions-filter a:hover { border-color: var(--cm-n-400); }
.gbp-mentions-filter button.is-active, .gbp-mentions-filter a.is-active { background: var(--cm-n-900); border-color: var(--cm-n-900); color: var(--cm-white); }
.gbp-mentions-filter .is-pos.is-active { background: #166534; border-color: #166534; }
.gbp-mentions-filter .is-neg.is-active { background: #b91c1c; border-color: #b91c1c; }
.gbp-mentions-empty { margin: 0; font-size: 14px; color: var(--cm-n-600); }
.gbp-mentions-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.gbp-mention { padding: 12px 14px; border-radius: 10px; background: var(--cm-n-50); border-left: 3px solid var(--cm-n-300); }
.gbp-mention.is-positive { border-left-color: #6db894; }
.gbp-mention.is-negative { border-left-color: #d98b86; }
.gbp-mention-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; min-width: 0; }
.gbp-mention-head > .gbp-avatar-photo, .gbp-mention-head > :last-child { flex: none; }
.gbp-mention-who { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.gbp-mention-author { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--cm-n-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gbp-mention-date { font-size: 13px; color: var(--cm-n-500); white-space: nowrap; font-variant-numeric: tabular-nums; }
.gbp-mention-alias { flex: none; font-size: 13px; color: var(--cm-n-600); background: var(--cm-n-100); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.gbp-mention-text { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--cm-n-800); overflow-wrap: anywhere; }
.gbp-mention .gbp-mention-reply { margin-top: 8px; }
/* ── Selector de ubicación de la topbar ────────────────────────────────────
   Manda sobre todo lo que se ve debajo, así que pesa más que un filtro.    */
.gbp-location-switcher { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border: 1px solid var(--cm-n-200); border-radius: 10px; background: var(--cm-white); box-shadow: var(--shadow-1); max-width: 100%; }
.gbp-location-switcher:focus-within { border-color: var(--cm-primary); box-shadow: 0 0 0 3px rgba(91, 95, 199, 0.16); }
.gbp-location-switcher > svg { width: 18px; height: 18px; flex: none; color: var(--cm-primary); }
.gbp-location-switcher select { max-width: 320px; padding: 6px 4px; border: 0; background: transparent; font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--cm-n-900); cursor: pointer; text-overflow: ellipsis; }
.gbp-location-switcher select:focus { outline: none; }
@media (max-width: 767px) {
    .gbp-location-switcher select { max-width: 190px; font-size: 14px; }
}
/* ── Etiquetas de tema de las reseñas ──────────────────────────────────────
   Píldoras uniformes: el sentimiento ya se lee en el chip de estado, y
   colorearlas también convertía la ficha en un semáforo.                   */
.gbp-topic-tag { display: inline-flex; align-items: center; padding: 5px 13px; border-radius: 999px; background: var(--cm-primary-soft); color: var(--cm-n-700); font-size: 14px; font-weight: 500; line-height: 1.3; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.gbp-topic-tag.is-clickable { cursor: pointer; transition: background 120ms ease, color 120ms ease; }
.gbp-topic-tag.is-clickable:hover { background: #e2e4f8; color: var(--cm-n-900); }
.gbp-topic-tag.is-active { background: var(--cm-primary); color: var(--cm-white); }
.gbp-topic-tag.is-clickable:focus-visible { outline: 2px solid var(--cm-primary); outline-offset: 2px; }
/* ── Modal de confirmación ─────────────────────────────────────────────────*/
.gbp-modal-overlay { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(36, 44, 76, 0.45); backdrop-filter: blur(2px); }
.gbp-modal { width: 100%; max-width: 420px; padding: 28px; border-radius: 16px; background: var(--cm-white); box-shadow: 0 24px 60px rgba(36, 44, 76, 0.28); text-align: center; }
.gbp-modal-icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 15px; background: var(--cm-n-100); color: var(--cm-n-600); }
.gbp-modal-icon svg { width: 25px; height: 25px; }
.gbp-modal-title { margin: 0 0 10px; font-size: 19px; font-weight: 700; color: var(--cm-n-900); }
.gbp-modal-text { margin: 0 0 24px; font-size: 14.5px; line-height: 1.6; color: var(--cm-n-600); }
.gbp-modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.gbp-modal-actions .gbp-btn { min-width: 128px; }
.gbp-ignore-link { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--cm-n-600); cursor: pointer; transition: background 120ms ease, color 120ms ease; }
.gbp-ignore-link:hover { background: var(--cm-n-100); color: var(--cm-n-900); }
.gbp-ignore-link:focus-visible { outline: 2px solid var(--cm-primary); outline-offset: 2px; }
@media (max-width: 479px) {
    .gbp-modal-actions { flex-direction: column-reverse; }
    .gbp-modal-actions .gbp-btn { width: 100%; }
}
/* ── Días en espera de respuesta ───────────────────────────────────────────
   Solo aparece en lo pendiente: lo respondido no necesita distintivo.      */
.gbp-waiting-badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; background: #fdeceb; color: #c0392b; font-size: 13px; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Etiquetas de tema dentro del listado: más pequeñas que en el detalle, porque
   ahí son una pista de vistazo y compiten con el nombre y la puntuación. */
.gbp-inbox-item .gbp-topic-tag { padding: 3px 10px; font-size: 12px; }
/* ── Fila del listado de reseñas ───────────────────────────────────────────
   Tres alturas: cabecera (nota, autor, estado), texto y pie (temas, fecha). */
.gbp-mailbox .gbp-inbox-item { display: flex; flex-direction: column; gap: 7px; width: 100%; padding: 16px 22px; text-align: left; border-bottom: 1px solid var(--cm-n-100); }
.gbp-item-head { display: flex; align-items: center; gap: 9px; width: 100%; min-width: 0; }
/* Avatar del autor de la reseña: foto de Google o iniciales. */
.gbp-avatar-photo { position: relative; display: inline-grid; place-items: center; flex: none; width: var(--gbp-avatar-size, 36px); height: var(--gbp-avatar-size, 36px); border-radius: 50%; overflow: hidden; background: var(--cm-primary-soft); color: var(--cm-primary-hover); }
.gbp-avatar-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gbp-avatar-initials { font-family: var(--font-display); font-size: calc(var(--gbp-avatar-size, 36px) * 0.38); font-weight: 700; line-height: 1; }
.gbp-inbox-item.is-ignored .gbp-avatar-photo { filter: grayscale(1); opacity: 0.7; }
.gbp-item-author { flex: 1; min-width: 0; font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--cm-n-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gbp-item-head > :last-child { flex: none; }
.gbp-item-who { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.gbp-item-who .gbp-item-author { flex: none; }
.gbp-item-date { font-size: 13px; color: var(--cm-n-500); white-space: nowrap; font-variant-numeric: tabular-nums; }
.gbp-item-ignored { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 500; color: var(--cm-n-500); white-space: nowrap; }
.gbp-item-ignored svg { width: 15px; height: 15px; }
.gbp-item-text { margin: 0; font-size: 14px; line-height: 1.5; color: var(--cm-n-800); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.gbp-item-text.is-empty { font-style: italic; color: var(--cm-n-500); }
.gbp-item-reply { display: flex; align-items: flex-start; gap: 7px; margin: 0; font-size: 13.5px; line-height: 1.45; color: #168568; }
.gbp-item-reply svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.gbp-item-reply span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gbp-item-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.gbp-item-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
/* Lo ignorado se apaga entero, estrellas incluidas: no compite por atención. */
.gbp-inbox-item.is-ignored .gbp-item-author { color: var(--cm-n-500); font-weight: 600; }
.gbp-inbox-item.is-ignored .gbp-item-text { color: var(--cm-n-500); }
.gbp-inbox-item.is-ignored .gbp-stars .gbp-star.is-on { color: var(--cm-n-400); }
.gbp-synced-icon { width: 15px; height: 15px; flex: none; }
/* Menciones: marcas de nombres fusionados */
.gbp-team-aliases-label { width: 100%; gap: 5px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--cm-n-500); }
.gbp-rank-merged { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: var(--cm-primary-hover); background: var(--cm-primary-soft); vertical-align: middle; }
.gbp-team-name.is-unlisted { border-style: dashed; }
.gbp-team-tag { margin-left: 8px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: 0.01em; color: var(--cm-n-600); background: var(--cm-n-100); vertical-align: middle; }
/* Ranking de empleados: puntuación ponderada y menciones neutras */
.gbp-rank-points { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--cm-n-500); }
.gbp-mentions-filter .is-neu.is-active { color: var(--cm-n-700); border-color: var(--cm-n-300); background: var(--cm-n-100); }

/* Ubicaciones, widgets y publicaciones */
[x-cloak] { display: none !important; }
.gbp-table-toolbar form { min-width: 0; }

/* ── ¿Puede eliminarse esta reseña? ── */
.gbp-removal { --removal-accent: var(--cm-n-300); margin-bottom: 32px; padding: 18px; border: 1px solid var(--cm-n-200); border-left: 3px solid var(--removal-accent); border-radius: 10px; background: var(--cm-white); }
.gbp-removal.is-likely { --removal-accent: #43a36f; }
.gbp-removal.is-possible { --removal-accent: #e0a422; }
.gbp-removal.is-unlikely { --removal-accent: var(--cm-n-300); }
.gbp-removal-head { display: flex; align-items: flex-start; gap: 12px; }
.gbp-removal-icon { width: 22px; height: 22px; flex: none; margin-top: 1px; color: var(--cm-n-500); }
.gbp-removal-heading { flex: 1; min-width: 0; }
.gbp-removal-heading h3 { margin: 0; font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--cm-n-900); }
.gbp-removal-heading p { margin: 4px 0 0; font-size: 14px; line-height: 1.55; color: var(--cm-n-600); }
.gbp-removal-verdict { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; background: var(--cm-n-100); color: var(--cm-n-700); }
.gbp-removal-verdict svg { width: 16px; height: 16px; }
.gbp-removal.is-likely .gbp-removal-verdict { background: #e3f4ea; color: #1d6b42; }
.gbp-removal.is-possible .gbp-removal-verdict { background: #fdf1d6; color: #8a5a06; }
.gbp-removal-summary { margin: 12px 0 0; font-size: 14.5px; line-height: 1.6; color: var(--cm-n-800); }
.gbp-removal-pick { margin: 12px 0 0; font-size: 14px; color: var(--cm-n-700); }
.gbp-removal-pick strong { color: var(--cm-n-900); }
.gbp-removal-reasons { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.gbp-removal-reasons li { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 8px; background: var(--cm-n-50); font-size: 14px; line-height: 1.5; color: var(--cm-n-700); }
.gbp-removal-reasons strong { color: var(--cm-n-900); }
.gbp-removal-reasons q { font-style: italic; color: var(--cm-n-800); overflow-wrap: anywhere; }
.gbp-removal-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.gbp-removal-note { font-size: 12.5px; color: var(--cm-n-500); }
.gbp-removal-toggle { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; padding: 2px 0; border: 0; background: none; font-size: 13.5px; font-weight: 600; color: var(--cm-n-600); cursor: pointer; }
.gbp-removal-toggle:hover { color: var(--cm-n-900); }
.gbp-removal-toggle-icon { width: 16px; height: 16px; transition: transform 160ms ease; }
.gbp-removal-toggle-icon.is-open { transform: rotate(90deg); }
.gbp-removal-why .gbp-removal-summary { margin-top: 6px; }

/* ── Historia de una reseña ── */
.gbp-story-modal { max-width: 420px; }
.gbp-story-preview { aspect-ratio: 9 / 16; max-height: 62vh; margin: 14px auto 0; border-radius: 14px; overflow: hidden; background: var(--cm-n-100); box-shadow: 0 6px 24px rgba(15, 23, 42, .12); transition: opacity .15s; }
.gbp-story-preview.is-busy { opacity: .6; }
.gbp-story-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gbp-story-swatches { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }
.gbp-story-swatch { width: 30px; height: 30px; border-radius: 999px; border: 1px solid rgba(15, 23, 42, .15); cursor: pointer; }
.gbp-story-modal .gbp-modal-actions { margin-top: 22px; }
.gbp-story-swatch.is-active { outline: 2px solid var(--cm-n-900); outline-offset: 3px; }

/* ── Seguimiento de denuncias ── */
.gbp-removal-track { display: flex; gap: 10px; margin-top: 16px; padding: 12px 14px; border-radius: 8px; background: #eef4fd; color: #1d4f86; font-size: 14px; line-height: 1.5; }
.gbp-removal-track > svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.gbp-removal-track > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gbp-removal-track strong { color: inherit; }
.gbp-removal-track span { color: var(--cm-n-700); }
.gbp-removal-track.is-removed { background: #e8f6f1; color: #0f6b52; }
.gbp-removal-track.is-rejected { background: var(--cm-n-100); color: var(--cm-n-700); }
.gbp-removal-track-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
.gbp-link-btn { padding: 0; border: 0; background: none; font-size: 13.5px; font-weight: 600; color: var(--cm-n-600); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.gbp-link-btn:hover { color: var(--cm-n-900); }
.gbp-item-report { flex: none; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eef4fd; color: #1d4f86; }
.gbp-item-report.is-removed { background: #e8f6f1; color: #0f6b52; }
.gbp-item-report.is-rejected { background: var(--cm-n-100); color: var(--cm-n-600); }

/* ── Página Denuncias ── */
.gbp-item-report.is-pending { background: #fff1e6; color: #c2410c; }

/* ── Tarjetas KPI: ayuda y pie ── */
.stat-label .stat-info { display: inline-grid; vertical-align: -3px; margin-left: 3px; color: var(--cm-n-400); cursor: help; }
.stat-label .stat-info svg { width: 15px; height: 15px; }
.stat-foot { margin-top: 10px; font-size: 13px; color: var(--cm-n-500); }

/* ── Enlaces legales en el acceso ── */
.gbp-login-legal { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 28px; font-size: 12.5px; }
.gbp-login-legal a { color: var(--cm-n-500); text-decoration: none; }
.gbp-login-legal a:hover { color: var(--cm-n-900); text-decoration: underline; }

/* Denuncias: KPI como el dashboard y dos columnas (pendientes | denunciadas). */
.gbp-report-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 0; }
.gbp-report-columns { margin-top: 24px; }
.gbp-stat-line { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; }
.stat-icon-orange { color: #c2410c; background: #fff1e6; }
.stat-icon-gray { color: var(--cm-n-500); background: var(--cm-n-100); }
.stat.is-pending .stat-value { color: #c2410c; }
.gbp-report-columns.is-2 { align-items: start; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.gbp-report-count { display: inline-grid; place-items: center; min-width: 28px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--cm-n-100); font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--cm-n-700); font-variant-numeric: tabular-nums; }
.gbp-report-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.gbp-report-card { border: 1px solid var(--cm-n-200); border-radius: 10px; background: var(--cm-white); transition: border-color 120ms ease, box-shadow 120ms ease; }
.gbp-report-card:hover { box-shadow: var(--shadow-1); }
.gbp-report-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; color: inherit; text-decoration: none; border-radius: 10px; }
.gbp-report-row:hover .gbp-report-who strong { text-decoration: underline; text-underline-offset: 2px; }
.gbp-report-row > .gbp-avatar-photo { flex: none; }
.gbp-report-main { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.gbp-report-who { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.gbp-report-who strong { font-family: var(--font-display); font-size: 15px; color: var(--cm-n-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.gbp-report-badge { margin-left: auto; }
.gbp-report-meta { font-size: 13px; color: var(--cm-n-500); }
.gbp-report-text { margin-top: 2px; font-size: 14px; line-height: 1.55; color: var(--cm-n-800); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.gbp-report-when { margin-top: 2px; font-size: 12.5px; color: var(--cm-n-500); }
.gbp-pending-pick { display: flex; align-items: center; gap: 6px; margin: 0 16px; padding: 8px 10px; border-radius: 8px; background: #fff8f2; font-size: 13.5px; color: var(--cm-n-700); }
.gbp-pending-pick svg { width: 16px; height: 16px; flex: none; color: #c2410c; }
.gbp-pending-pick strong { color: var(--cm-n-900); }
.gbp-pending-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px 14px; }
@media (max-width: 1100px) { .gbp-report-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .gbp-report-columns.is-2 { grid-template-columns: minmax(0, 1fr); } }
.gbp-report-location { display: flex; align-items: flex-start; gap: 5px; font-size: 13px; line-height: 1.45; color: var(--cm-n-600); }
.gbp-report-location svg { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--cm-n-400); }
.gbp-report-location strong { font-weight: 600; color: var(--cm-n-700); }
.gbp-report-reply { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: var(--cm-n-50); }
.gbp-report-reply-head { display: flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: #1d6b42; }
.gbp-report-reply-head svg { width: 14px; height: 14px; }
.gbp-report-reply-text { font-size: 13.5px; line-height: 1.5; color: var(--cm-n-700); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }

/* Conseguir reseñas: QR + enlaces por ubicación y enlaces por canal. */
.gbp-stat-text { font-size: 22px; letter-spacing: -0.01em; }
.stat-share.is-up { color: #168568; }
.stat-share.is-down { color: #d34f61; }
.gbp-review-link { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; align-items: start; }
.gbp-review-link-qr { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.gbp-review-link-qr-img { width: 200px; height: 200px; padding: 12px; border: 1px solid var(--cm-n-200); border-radius: 14px; background: var(--cm-white); }
.gbp-review-link-qr-img svg { display: block; width: 100%; height: 100%; }
.gbp-review-link-qr-img svg path { fill: var(--cm-n-900); }
.gbp-review-link-qr-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.gbp-review-link-qr-actions > :first-child { width: 100%; justify-content: center; }
.gbp-review-link-body { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.gbp-review-link-label { margin-bottom: 6px; font-family: var(--font-display); font-size: 13px; font-weight: 600; color: var(--cm-n-700); }
.gbp-review-link-label span { font-weight: 500; color: var(--cm-n-500); }
.gbp-review-link-hint { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: var(--cm-n-500); }
.gbp-review-link-visits { display: flex; align-items: baseline; gap: 8px; padding: 12px 14px; border-radius: 10px; background: var(--cm-n-50); }
.gbp-review-link-visits strong { font-family: var(--font-display); font-size: 26px; font-weight: 700; line-height: 1; color: var(--cm-n-900); font-variant-numeric: tabular-nums; }
.gbp-review-link-visits span { font-size: 13px; color: var(--cm-n-500); }
.gbp-copy-link { display: flex; gap: 8px; }
.gbp-copy-link .gbp-input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.gbp-copy-link.is-muted .gbp-input { color: var(--cm-n-500); background: var(--cm-n-50); }
.gbp-copy-link .gbp-btn { flex: none; }
.gbp-review-channels { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--cm-n-150); }
.gbp-review-channels-head h3 { margin: 0; font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--cm-n-900); }
.gbp-review-channels-head p { margin: 4px 0 14px; font-size: 13.5px; line-height: 1.5; color: var(--cm-n-500); }
.gbp-review-channel-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.gbp-review-channel { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(0, 1.6fr) 90px auto; align-items: center; gap: 14px; padding: 10px 12px; border: 1px solid var(--cm-n-200); border-radius: 10px; }
.gbp-review-channel-name { display: flex; flex-direction: column; min-width: 0; }
.gbp-review-channel-name strong { font-size: 14px; color: var(--cm-n-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gbp-review-channel-name span { font-size: 12.5px; color: var(--cm-n-500); }
.gbp-review-channel-visits { display: flex; flex-direction: column; align-items: flex-end; }
.gbp-review-channel-visits strong { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--cm-n-900); font-variant-numeric: tabular-nums; line-height: 1.1; }
.gbp-review-channel-visits span { font-size: 12px; color: var(--cm-n-500); white-space: nowrap; }
.gbp-review-channel-actions { display: flex; gap: 6px; }
.gbp-review-channel-new { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
@media (max-width: 900px) {
    .gbp-review-link { grid-template-columns: minmax(0, 1fr); }
    .gbp-review-channel { grid-template-columns: minmax(0, 1fr) auto; }
    .gbp-review-channel-url { grid-column: 1 / -1; grid-row: 2; }
    .gbp-review-channel-actions { grid-column: 1 / -1; }
    .gbp-review-channel-new { grid-template-columns: minmax(0, 1fr); }
}

/* Menciones de empleados: KPI, «Requieren atención» y tabla del ranking. */
.gbp-segmented { display: inline-flex; max-width: 100%; overflow-x: auto; gap: 2px; padding: 3px; border: 1px solid var(--cm-n-200); border-radius: 9px; background: var(--cm-white); }
.gbp-segmented button { padding: 6px 12px; border-radius: 6px; font-size: 13.5px; font-weight: 500; color: var(--cm-n-600); cursor: pointer; white-space: nowrap; }
.gbp-segmented button:hover { color: var(--cm-n-900); }
.gbp-segmented button.is-active { background: var(--cm-primary-soft); color: var(--cm-primary); font-weight: 600; }
.gbp-segmented.is-soft { border-color: transparent; background: var(--cm-n-100); }
.gbp-segmented.is-soft button.is-active { background: var(--cm-white); color: var(--cm-n-900); box-shadow: 0 1px 2px rgba(20, 24, 40, .08); }
.gbp-team-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gbp-text-positive { color: #168568; }
.stat.is-alert { border-color: #f5b5b5; }
.stat.is-alert .stat-label, .stat.is-alert .stat-value, .stat.is-alert .stat-foot { color: #c62f2f; }
.gbp-team-sentiment { height: 6px; margin-top: 12px; border-radius: 999px; background: #f7c9c9; overflow: hidden; }
.gbp-team-sentiment span { display: block; height: 100%; border-radius: 999px; background: #1f9d6a; }
.gbp-team-review-link { color: inherit; font-weight: 600; text-decoration: none; white-space: nowrap; }
.gbp-team-review-link:hover { text-decoration: underline; }

.gbp-team-avatar { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; font-family: var(--font-display); font-size: 12.5px; font-weight: 700; }
.gbp-team-avatar.is-level-5 { background: #e3f4ea; color: #1d6b42; }
.gbp-team-avatar.is-level-4 { background: #eef6dc; color: #4d7c0f; }
.gbp-team-avatar.is-level-3 { background: #fdf1d6; color: #8a5a06; }
.gbp-team-avatar.is-level-2 { background: #fde8d7; color: #b45309; }
.gbp-team-avatar.is-level-1 { background: #fde3e3; color: #c62f2f; }

.gbp-attention { overflow: hidden; }
.gbp-attention-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; padding: 16px 20px; border-bottom: 1px solid var(--cm-n-150); }
.gbp-attention-head h2 { margin: 0; font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--cm-n-900); }
.gbp-attention-head > span:last-child { font-size: 13.5px; color: var(--cm-n-500); }
.gbp-attention-dot { width: 9px; height: 9px; border-radius: 50%; background: #d93b3b; align-self: center; }
.gbp-attention-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.gbp-attention-item { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; border-left: 1px solid var(--cm-n-150); }
.gbp-attention-item:first-child { border-left: 0; }
.gbp-attention-item header { display: flex; align-items: flex-start; gap: 10px; }
.gbp-attention-who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.gbp-attention-who strong { font-size: 14.5px; color: var(--cm-n-900); }
.gbp-attention-who span { font-size: 12.5px; color: var(--cm-n-500); }
.gbp-attention-item time { flex: none; font-size: 12.5px; color: var(--cm-n-500); }
.gbp-attention-item blockquote { margin: 0; font-size: 14px; line-height: 1.6; color: var(--cm-n-800); overflow-wrap: anywhere; }
.gbp-attention-item mark { padding: 0 3px; border-radius: 4px; background: #fde3e3; color: #b42323; }
.gbp-attention-item footer { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.gbp-attention-author { margin-right: auto; font-size: 13px; color: var(--cm-n-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gbp-attention-item .gbp-link-btn { color: var(--cm-primary); text-decoration: none; }
.gbp-attention-item .gbp-link-btn:hover { text-decoration: underline; }

.gbp-team-table { overflow: hidden; }
.gbp-team-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; }
.gbp-team-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gbp-team-chips button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--cm-n-200); border-radius: 999px; background: var(--cm-white); font-size: 13.5px; font-weight: 600; color: var(--cm-n-800); cursor: pointer; }
.gbp-team-chips button span { font-weight: 500; color: var(--cm-n-500); }
.gbp-team-chips button:hover { border-color: var(--cm-n-400); }
.gbp-team-chips button.is-active { background: var(--cm-n-900); border-color: var(--cm-n-900); color: var(--cm-white); }
.gbp-team-chips button.is-active span { color: var(--cm-n-300); }
.gbp-team-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.gbp-team-search { width: 200px; }
.gbp-team-sort-label { font-size: 13.5px; color: var(--cm-n-500); }

.gbp-team-grid { display: grid; grid-template-columns: 40px minmax(200px, 1.5fr) minmax(220px, 1.8fr) 110px minmax(140px, .9fr) 20px; align-items: center; gap: 16px; }
.gbp-team-grid-head { padding: 10px 20px; border-top: 1px solid var(--cm-n-150); border-bottom: 1px solid var(--cm-n-150); background: var(--cm-n-50); font-family: var(--font-display); font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--cm-n-500); }
.gbp-team-rows { list-style: none; margin: 0; padding: 0; }
.gbp-team-rows > li { border-bottom: 1px solid var(--cm-n-150); }
.gbp-team-row { width: 100%; padding: 14px 20px; text-align: left; background: var(--cm-white); cursor: pointer; transition: background 120ms ease; }
.gbp-team-row:hover, .gbp-team-rows > li.is-open .gbp-team-row { background: #f7f8fc; }
.gbp-team-row:focus-visible { outline: 2px solid var(--cm-primary); outline-offset: -2px; }
.gbp-team-pos { font-size: 14px; color: var(--cm-n-500); font-variant-numeric: tabular-nums; }
.gbp-team-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.gbp-team-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gbp-team-person-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 15px; font-weight: 600; color: var(--cm-n-900); }
.gbp-team-tag { padding: 1px 7px; border-radius: 5px; background: var(--cm-n-100); font-size: 11.5px; font-weight: 500; color: var(--cm-n-600); }
.gbp-team-tag.is-alias { background: var(--cm-primary-soft); color: var(--cm-primary); }
.gbp-team-sub { font-size: 13px; color: var(--cm-n-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gbp-team-mood { font-weight: 600; }
.gbp-team-mood::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.gbp-team-mood.is-level-5 { color: #168568; }
.gbp-team-mood.is-level-4 { color: #4d7c0f; }
.gbp-team-mood.is-level-3 { color: #8a6d0b; }
.gbp-team-mood.is-level-2 { color: #b45309; }
.gbp-team-mood.is-level-1 { color: #c62f2f; }
.gbp-team-mentions { display: flex; align-items: center; gap: 12px; min-width: 0; }
.gbp-team-mentions > strong { width: 28px; flex: none; text-align: right; font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--cm-n-900); font-variant-numeric: tabular-nums; }
.gbp-team-mentions-bar { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
.gbp-team-track { display: flex; height: 7px; border-radius: 999px; background: var(--cm-n-100); overflow: hidden; }
.gbp-team-track > span { display: block; height: 100%; }
.gbp-team-track .is-pos { background: #1f9d6a; }
.gbp-team-track .is-neu { background: var(--cm-n-300); }
.gbp-team-track .is-neg { background: #d93b3b; }
.gbp-team-track.is-score { flex: 1; height: 6px; }
.gbp-team-track.is-score span { background: var(--cm-primary); border-radius: 999px; }
.gbp-team-split { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12.5px; }
.gbp-team-split .is-pos { color: #168568; }
.gbp-team-split .is-neu { color: var(--cm-n-500); }
.gbp-team-split .is-neg { color: #c62f2f; font-weight: 600; }
.gbp-team-pct { font-family: var(--font-display); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.gbp-team-pct.is-good { color: #168568; }
.gbp-team-pct.is-ok { color: #8a6d0b; }
.gbp-team-pct.is-meh { color: #b45309; }
.gbp-team-pct.is-bad { color: #c62f2f; }
.gbp-team-score { display: flex; align-items: center; gap: 12px; }
.gbp-team-score strong { width: 28px; flex: none; font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--cm-n-900); font-variant-numeric: tabular-nums; }
.gbp-team-chevron { width: 18px; height: 18px; color: var(--cm-n-400); transition: transform 150ms ease; }
.gbp-team-rows > li.is-open .gbp-team-chevron { transform: rotate(180deg); }
.gbp-team-detail { border: 0; border-radius: 0; padding: 4px 20px 20px 76px; background: #f7f8fc; }
.gbp-team-detail .gbp-mention { background: var(--cm-white); }
.gbp-mention-foot { display: flex; justify-content: flex-end; margin-top: 8px; }
.gbp-mention-foot .gbp-mention-reply { margin: 0 auto 0 0; }
.gbp-team-noresults { margin: 0; padding: 28px 20px; text-align: center; font-size: 14px; color: var(--cm-n-500); }
.gbp-team-foot { margin: 0; padding: 14px 20px; background: var(--cm-n-50); font-size: 13px; color: var(--cm-n-600); }
.gbp-team-foot strong { color: var(--cm-n-900); }

@media (max-width: 1100px) {
    .gbp-team-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gbp-attention-item { border-left: 0; border-top: 1px solid var(--cm-n-150); }
    .gbp-attention-item:first-child { border-top: 0; }
}
@media (max-width: 900px) {
    .gbp-team-grid-head { display: none; }
    .gbp-team-grid { grid-template-columns: 24px minmax(0, 1fr) auto 18px; gap: 8px 12px; }
    .gbp-team-person { grid-column: 2; }
    .gbp-team-pct { grid-column: 3; grid-row: 1; text-align: right; }
    .gbp-team-chevron { grid-column: 4; grid-row: 1; }
    .gbp-team-mentions, .gbp-team-score { grid-column: 2 / -1; }
    .gbp-team-detail { padding-left: 20px; }
    .gbp-team-search { width: 100%; }
    .gbp-team-tools { width: 100%; }
}
@media (max-width: 560px) {
    .gbp-team-kpis { grid-template-columns: minmax(0, 1fr); }
    .gbp-page-actions:has(.gbp-segmented) { width: 100%; min-width: 0; }
}
/* Con selector de período la cabecera va en una línea: el subtítulo se ajusta. */
@media (min-width: 1200px) {
    .gbp-page-header:has(> .gbp-page-actions .gbp-segmented) { flex-wrap: nowrap; }
    .gbp-page-header:has(> .gbp-page-actions .gbp-segmented) > div:first-child { min-width: 0; }
    .gbp-page-header:has(> .gbp-page-actions .gbp-segmented) > .gbp-page-actions { flex: none; }
}
.gbp-team-rows > li { scroll-margin-top: 80px; }
.gbp-team-detail .gbp-mention { border-left: 0; }
.gbp-team-detail .gbp-mention-text strong { font-weight: 700; color: var(--cm-n-900); }
/* Reseñas de la ficha: cada caja, como mucho media pantalla. */
.gbp-team-detail .gbp-mentions-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 10px; }
@media (max-width: 900px) { .gbp-team-detail .gbp-mentions-list { grid-template-columns: minmax(0, 1fr); } }
.gbp-mention-foot { justify-content: flex-start; min-width: 0; }
.gbp-mention-foot .gbp-mention-reply { min-width: 0; max-width: 100%; }
.gbp-mention-foot .gbp-mention-reply span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
