/* ══════════════════════════════════════════════
   TelMaster — CSS Principal
   ══════════════════════════════════════════════ */

:root {
    --primary: #1e40af;
    --primary-light: #3b82f6;
    --primary-dark: #1e3a8a;
    --accent: #06b6d4;
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-alt: #f1f5f9;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --shadow-lg: 0 4px 12px rgba(0,0,0,.12);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-full: 9999px;
    --transition: .2s ease;
    --nav-h: 56px;
    --tab-h: 64px;
    --content-max: 1120px;
    --list-max: 1040px;
    --detail-max: 920px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%; width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    color: var(--text); background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

body.theme-dark {
    --primary: #7cc4ff;
    --primary-light: #a5dcff;
    --primary-dark: #3b82f6;
    --accent: #22d3ee;
    --bg: #08111f;
    --surface: #0f172a;
    --surface-alt: #172033;
    --text: #e5eefc;
    --text-muted: #94a3b8;
    --border: #334155;
    --shadow: 0 1px 3px rgba(0,0,0,.35), 0 1px 2px rgba(0,0,0,.28);
    --shadow-lg: 0 12px 28px rgba(0,0,0,.38);
}

body.theme-dark .app-main {
    background: linear-gradient(180deg, #0b1220 0%, #111827 100%);
}

body.theme-dark .topbar {
    background: #1d4ed8;
}

body.theme-dark .detail-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
}

body.theme-dark .detail-avatar {
    background: rgba(148, 197, 255, .16);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

body.theme-dark .card,
body.theme-dark .settings-card,
body.theme-dark .event-card,
body.theme-dark .events-summary-card,
body.theme-dark .messages-toolbar-card,
body.theme-dark .message-card,
body.theme-dark .search-box,
body.theme-dark .export-btn,
body.theme-dark .send-option,
body.theme-dark .btn-outline,
body.theme-dark .inline-action-btn,
body.theme-dark .radio-item,
body.theme-dark .mapping-source,
body.theme-dark .form-input,
body.theme-dark .form-select,
body.theme-dark .form-textarea {
    background: var(--surface);
    color: var(--text);
}

body.theme-dark .btn-outline,
body.theme-dark .inline-action-btn,
body.theme-dark .export-btn,
body.theme-dark .send-option,
body.theme-dark .radio-item,
body.theme-dark .search-box,
body.theme-dark .form-input,
body.theme-dark .form-select,
body.theme-dark .form-textarea,
body.theme-dark .contact-item,
body.theme-dark .detail-row,
body.theme-dark .settings-card,
body.theme-dark .event-card,
body.theme-dark .message-card {
    border-color: var(--border);
}

body.theme-dark .contact-item:hover,
body.theme-dark .btn-outline:hover,
body.theme-dark .inline-action-btn:hover,
body.theme-dark .radio-item:hover,
body.theme-dark .chart-bar-item:hover,
body.theme-dark .export-btn:hover,
body.theme-dark .send-option.selected {
    background: #172033;
}

body.theme-dark .calendar-day.has-events,
body.theme-dark .event-card.unread {
    background: linear-gradient(180deg, #111827 0%, #0f253f 100%);
}

body.theme-dark .settings-card .material-symbols-rounded,
body.theme-dark .export-btn .material-symbols-rounded,
body.theme-dark .inline-action-btn,
body.theme-dark .event-contact-link,
body.theme-dark .event-text-toggle,
body.theme-dark .cta-btn {
    color: #a5dcff;
}

body.theme-dark .event-card-meta {
    color: rgba(226,232,240,.74);
}

body.theme-dark .events-summary-card,
body.theme-dark .event-card-contact,
body.theme-dark .event-card-title,
body.theme-dark .events-summary-title,
body.theme-dark .calendar-day-number,
body.theme-dark .calendar-weekday {
    color: var(--text);
}

body.theme-dark .event-card-text {
    color: #e2e8f0;
}

body.theme-dark #reminder-alert-body .event-card-text {
    color: #e2e8f0;
}

body.theme-dark .cta-btn.whatsapp {
    color: #4ade80;
}

body.theme-dark .cta-btn.danger {
    color: #fda4af;
}

body.theme-dark .cta-btn,
body.theme-dark .inline-action-btn {
    background: linear-gradient(180deg, rgba(37,99,235,.16) 0%, rgba(15,23,42,.88) 100%);
    border: 1px solid rgba(147,197,253,.24);
    box-shadow: 0 10px 22px rgba(2,6,23,.22);
}

body.theme-dark .cta-btn:hover,
body.theme-dark .inline-action-btn:hover {
    background: #223454;
    color: #eff6ff;
}

body.theme-dark .cta-btn .material-symbols-rounded,
body.theme-dark .inline-action-btn .material-symbols-rounded {
    color: inherit;
}

body.theme-dark .contact-avatar {
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    color: #eff6ff;
}

body.theme-dark .note-reminder-chip,
body.theme-dark .event-status-chip,
body.theme-dark .message-token-chip,
body.theme-dark .back-events-chip {
    background: rgba(15,23,42,.52);
    color: var(--text);
}

body.theme-dark .note-reminder-chip-button,
body.theme-dark .event-status-chip-button {
    background: rgba(15,23,42,.72);
    border-color: rgba(148,163,184,.28);
    color: #e5eefc;
}

body.theme-dark .note-reminder-chip-button.unread,
body.theme-dark .event-status-chip-button.unread {
    color: #a5f3fc;
}

body.theme-dark .note-reminder-chip-button:hover,
body.theme-dark .event-status-chip-button:hover {
    background: rgba(30,41,59,.92);
}

body.theme-dark .event-card-contact {
    color: #93c5fd;
}

body.theme-dark .calendar-day.today {
    border-color: #facc15;
    box-shadow: 0 0 0 2px rgba(250,204,21,.25), 0 0 18px rgba(250,204,21,.28);
}

/* ── App Shell ── */
#app {
    display: flex; flex-direction: column;
    height: 100%; width: 100%;
    background: var(--bg); position: relative; overflow: hidden;
}

.app-main {
    flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; position: relative;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

/* ── Sidebar brand (hidden on mobile) ── */
.sidebar-brand {
    display: none;
    padding: 20px 20px 12px; font-size: 18px; font-weight: 700; color: #fff;
    align-items: center;
    gap: 10px;
}

.account-switcher-shell {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: calc(100% + 10px);
    z-index: 105;
}

.account-switcher-btn {
    width: 100%;
    border: 1px solid rgba(148,163,184,.28);
    background: rgba(255,255,255,.98);
    color: var(--text);
    border-radius: 16px;
    padding: 10px 12px;
    box-shadow: 0 14px 28px rgba(15,23,42,.14);
    text-align: left;
    cursor: pointer;
}

.account-switcher-kicker {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.account-switcher-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.account-switcher-avatar {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    background: rgba(30,64,175,.12);
    color: var(--primary);
    flex-shrink: 0;
}

.account-switcher-copy {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.account-switcher-copy strong,
.account-switcher-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-switcher-copy strong {
    font-size: 14px;
}

.account-switcher-copy small {
    font-size: 11px;
    color: var(--text-muted);
}

.app-brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 8px 18px rgba(15,23,42,.18);
}

.loading-brand-logo {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    object-fit: cover;
    margin: 0 auto 14px;
    box-shadow: 0 18px 38px rgba(30,64,175,.18);
}

/* ── Top bar ── */
.topbar {
    flex-shrink: 0;
    height: var(--nav-h);
    background: var(--primary); color: #fff;
    display: flex; align-items: center; padding: 0 16px; gap: 12px;
    z-index: 100;
}
.topbar h1 { font-size: 18px; font-weight: 600; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .icon-btn { background: none; border: none; color: #fff; cursor: pointer; padding: 6px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; }
.topbar .icon-btn:hover { background: rgba(255,255,255,.15); }

/* ── Install banner ── */
.install-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fef3c7;
    color: #92400e;
    border-bottom: 1px solid #f59e0b;
    box-shadow: 0 1px 0 rgba(245,158,11,.18);
}
.install-banner-copy {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.install-banner-copy strong {
    font-size: 14px;
    font-weight: 700;
}
.install-banner-copy span {
    font-size: 13px;
    line-height: 1.4;
}
.install-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.install-banner-btn {
    background: #d97706;
    color: #fff;
    border: none;
    min-height: 38px;
    white-space: nowrap;
}
.install-banner-info {
    min-height: 38px;
    white-space: nowrap;
    border-color: rgba(146,64,14,.28);
    color: inherit;
    background: rgba(255,255,255,.5);
}
.install-banner-btn:hover {
    background: #b45309;
}
.install-banner-info:hover {
    background: rgba(255,255,255,.74);
}
.install-banner-close {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: inherit;
    border-radius: var(--radius-full);
    cursor: pointer;
}
.install-banner-close:hover {
    background: rgba(146,64,14,.08);
}

body.theme-dark .install-banner {
    background: #3b2f12;
    color: #fde68a;
    border-bottom-color: #d97706;
}

body.theme-dark .install-banner-btn {
    background: #f59e0b;
    color: #111827;
}

body.theme-dark .install-banner-info {
    border-color: rgba(253,230,138,.28);
    background: rgba(17,24,39,.36);
    color: #fde68a;
}

body.theme-dark .install-banner-close:hover {
    background: rgba(253,230,138,.08);
}

/* ── Bottom tabs (mobile) ── */
.bottom-tabs {
    flex-shrink: 0;
    height: var(--tab-h);
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    position: relative;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.tab-btn {
    background: none; border: none; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    justify-content: center;
    color: var(--text-muted); font-size: 12px; font-weight: 600; line-height: 1.1; padding: 6px 4px; transition: var(--transition);
    border-radius: var(--radius-sm);
}
.tab-btn .material-symbols-rounded { font-size: 25px; }
.tab-btn.active { color: var(--primary); }
.tab-btn.active .material-symbols-rounded { font-variation-settings: 'FILL' 1; }
.tab-btn-license {
    display: none;
    gap: 4px;
}
.tab-btn-license-status {
    border: 1px solid var(--border);
    background: transparent;
}
.tab-btn-license-status.is-registered {
    border-color: rgba(16,185,129,.36);
    color: var(--success);
}
.tab-btn-license-status.is-registered .tab-license-copy small {
    color: var(--success);
}
.tab-btn-license-status.is-trial {
    border-color: rgba(245,158,11,.36);
    color: var(--warning);
}
.tab-btn-license-status.is-trial .tab-license-copy small {
    color: #b45309;
}
.tab-btn-license .material-symbols-rounded {
    font-size: 22px;
}
.tab-license-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.05;
    min-width: 0;
}
.tab-license-copy small {
    font-size: 10px;
    color: var(--text-muted);
    min-height: 10px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-dark .tab-btn-license-status {
    background: rgba(15,23,42,.28);
}

body.theme-dark .tab-btn-license-status.is-registered .tab-license-copy small {
    color: #a7f3d0;
}

body.theme-dark .tab-btn-license-status.is-trial .tab-license-copy small {
    color: #fde68a;
}

/* ── Desktop layout ── */
@media (min-width: 768px) {
    #app { flex-direction: row; }
    .sidebar-brand {
        display: flex;
        align-items: center;
        min-height: var(--nav-h);
        border-bottom: 1px solid rgba(255,255,255,.08);
        background: rgba(255,255,255,.04);
    }
    .bottom-tabs {
        flex-direction: column;
        width: 240px;
        height: 100%;
        border-top: none;
        justify-content: flex-start;
        align-items: stretch;
        padding: 0;
        gap: 4px;
        flex-shrink: 0;
        order: -1;
        background: linear-gradient(180deg, #0f172a 0%, #16213f 100%);
        color: rgba(255,255,255,.85);
        box-shadow: inset -1px 0 0 rgba(255,255,255,.06);
    }
    .account-switcher-shell {
        position: static;
        padding: 12px 12px 8px;
    }
    .account-switcher-btn {
        background: rgba(255,255,255,.08);
        border-color: rgba(255,255,255,.1);
        box-shadow: none;
        color: #fff;
    }
    .account-switcher-kicker,
    .account-switcher-copy small {
        color: rgba(255,255,255,.62);
    }
    .account-switcher-avatar {
        background: rgba(147,197,253,.18);
        color: #bfdbfe;
    }
    .tab-btn {
        flex: 0 0 auto;
        height: auto;
        flex-direction: row;
        width: 100%;
        padding: 14px 20px;
        font-size: 14px;
        gap: 10px;
        border-radius: 0 12px 12px 0;
        justify-content: flex-start;
        color: rgba(255,255,255,.72);
        margin-right: 12px;
    }
    .tab-btn:hover {
        background: rgba(255,255,255,.08);
        color: #fff;
    }
    .tab-btn .material-symbols-rounded { color: inherit; }
    .tab-btn.active {
        background: rgba(59,130,246,.22);
        border-left: 3px solid #93c5fd;
        color: #fff;
        padding-left: 17px;
    }
    .tab-btn.active .material-symbols-rounded {
        color: #fff;
        font-variation-settings: 'FILL' 1;
    }
    .tab-btn {
        min-height: 46px;
    }
    .tab-btn-license {
        display: flex;
        width: calc(100% - 24px);
        min-height: 60px;
        margin: auto 12px 16px;
        padding: 14px 16px;
        gap: 12px;
        border-radius: 18px;
        justify-content: flex-start;
    }
    .tab-license-copy {
        align-items: flex-start;
        gap: 2px;
    }
    .tab-license-copy small {
        color: rgba(255,255,255,.55);
        min-height: 14px;
    }
    .view-scroll {
        width: min(100%, var(--content-max));
        margin-left: auto;
        margin-right: auto;
        padding: 20px 24px 96px;
    }
    .search-wrap {
        width: min(100%, var(--list-max));
        margin-left: auto;
        margin-right: auto;
        padding: 16px 24px 12px;
    }
    #contact-list-wrap {
        width: min(100%, var(--list-max));
        margin-left: auto;
        margin-right: auto;
    }
    .detail-header {
        width: min(100%, var(--detail-max));
        margin-left: auto;
        margin-right: auto;
        border-radius: 0 0 24px 24px;
    }
    .detail-section,
    .cta-bar {
        width: min(100%, var(--detail-max));
        margin-left: auto;
        margin-right: auto;
    }
    .modal-content { max-width: 560px; border-radius: var(--radius) !important; margin: auto; }
    .modal-overlay { align-items: center; }
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
    .export-grid { grid-template-columns: repeat(6, 1fr); }
    .fab {
        right: 32px;
        bottom: 32px;
    }
}

@media (max-width: 767px) {
    html, body {
        font-size: 18px;
    }
    body {
        line-height: 1.55;
    }
    .topbar h1 {
        font-size: 21px;
    }
    .install-banner {
        align-items: flex-start;
        padding: 14px 16px;
    }
    .install-banner-copy strong {
        font-size: 17px;
    }
    .install-banner-copy span,
    .card-header,
    .contact-phone,
    .contact-uf,
    .contact-op,
    .detail-label,
    .form-label,
    .settings-card-desc,
    .btn-sm,
    .tag-chip,
    .filter-banner,
    .contacts-filter-banner,
    .events-summary-title,
    .note-actions-item,
    .send-option-title,
    .inline-action-btn {
        font-size: 16px;
    }
    .text-sm,
    .contact-tag,
    .detail-actions .text-muted,
    .note-card-meta,
    .message-card-meta,
    .event-card-meta,
    .event-text-toggle,
    .note-reminder-chip,
    .event-status-chip,
    .message-token-chip,
    .back-events-chip,
    .calendar-weekday,
    .calendar-day-count,
    .contact-note-count,
    .stat-label,
    .chart-bar-label,
    .chart-bar-count,
    .mapping-source,
    .mapping-row select,
    .tab-btn,
    .send-option-desc,
    .event-marker-pill,
    .toast {
        font-size: 15px;
    }
    .search-box {
        height: 46px;
    }

    .contact-tag {
        font-size: 11px;
        line-height: 1.2;
        padding: 3px 8px;
        border-radius: 10px;
    }

    .tag-chip,
    .tag-chip-overflow {
        font-size: 12px;
        line-height: 1.2;
        padding: 4px 10px;
        border-radius: 10px;
    }
    .search-box input,
    .form-input,
    .form-select,
    .form-textarea,
    .detail-value,
    .detail-phone,
    .settings-card-title,
    .modal-header h2,
    .contact-name,
    .note-card-title,
    .message-card-title,
    .event-card-title,
    .note-card-text,
    .message-card-text,
    .event-card-text,
    .send-preview,
    .empty-state h3 {
        font-size: 18px;
    }
    .btn {
        min-height: 46px;
        font-size: 16px;
    }
    .cta-btn {
        min-width: 78px;
        font-size: 14px;
    }
    .tab-btn {
        padding: 8px 4px 6px;
        font-size: clamp(14px, 3.8vw, 16px);
        line-height: 1.15;
    }
    .tab-btn .material-symbols-rounded {
        font-size: 28px;
    }
    .detail-phone {
        font-size: 19px;
    }
    .contacts-summary {
        font-size: 15px;
    }
    .event-status-chip-button {
        padding: 4px 7px;
        font-size: 12px;
        min-height: 28px;
    }
    .check-item,
    .export-btn,
    .progress-label,
    .import-result .result-line,
    .radio-item,
    .settings-switch-row {
        font-size: 15px;
    }
    .empty-state h3 {
        font-size: 20px;
        line-height: 1.25;
    }
    .empty-state p {
        font-size: 17px;
        line-height: 1.45;
    }

    .phone-detected-grid {
        grid-template-columns: 1fr;
        font-size: 16px;
        line-height: 1.35;
    }

    .detail-email-send-btn {
        font-size: 14px !important;
    }
}

/* ── Filter banner ── */
.filter-banner {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 16px;
    background: #eff6ff; color: var(--primary);
    font-size: 13px; font-weight: 500;
    border-bottom: 1px solid var(--border);
}
.filter-banner .icon-btn { color: var(--primary); }

/* ── Views container ── */
.views { flex: 1; overflow: hidden; position: relative; }
.view {
    position: absolute; inset: 0;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    display: none; flex-direction: column; padding: 0;
}
.view.active { display: flex; }
.view-scroll { flex: 1; overflow-y: auto; padding: 16px; padding-bottom: 80px; }

/* ── Search bar ── */
.search-wrap {
    padding: 12px 16px; background: var(--bg);
    position: sticky; top: 0; z-index: 10;
}
.search-box {
    display: flex; align-items: center;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 0 12px; height: 42px; gap: 8px;
}
.search-box input {
    flex: 1; border: none; outline: none; font-size: 15px;
    background: transparent; color: var(--text);
}
.search-box .material-symbols-rounded { color: var(--text-muted); font-size: 20px; }

.contacts-filter-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
    font-size: 13px;
    font-weight: 600;
}

.contacts-summary {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
}

.contacts-summary.filtered {
    color: var(--primary);
}

.contacts-filter-banner .filter-clear-link {
    margin-left: auto;
    color: inherit;
    cursor: pointer;
    text-decoration: underline;
    font-weight: 700;
}

body.theme-dark .contacts-filter-banner {
    background: #3b2f12;
    border-color: #d97706;
    color: #fde68a;
}

/* ── Cards ── */
.card {
    background: var(--surface); border-radius: var(--radius); padding: 16px;
    box-shadow: var(--shadow); margin-bottom: 12px;
}
.card-header { font-size: 14px; font-weight: 600; color: var(--text-muted); margin-bottom: 12px; text-transform: uppercase; letter-spacing: .5px; }

/* ── Contact list ── */
.contact-list { list-style: none; }
.contact-item {
    border-bottom: 1px solid var(--border); cursor: pointer; transition: var(--transition);
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
}
.contact-item:hover { background: var(--surface-alt); }
.contact-item:last-child { border-bottom: none; }

.contact-item-main {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    width: 100%;
    min-width: 0;
    position: relative;
    z-index: 1;
    background: inherit;
    transition: transform .18s ease;
}

.contact-item.swiped .contact-item-main {
    transform: translateX(-96px);
}

.contact-swipe-delete {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 96px;
    border: none;
    background: var(--danger);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .02em;
}

.contact-avatar {
    width: 44px; height: 44px; border-radius: var(--radius-full);
    background: var(--primary-light); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 16px; flex-shrink: 0; text-transform: uppercase;
}
.contact-info { flex: 1; min-width: 0; }
.contact-name { font-size: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-phone { font-size: 14px; color: var(--text-muted); margin-top: 1px; }
.contact-note-preview {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: .92;
}
.contact-tags { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.contact-tag {
    font-size: 10px; padding: 3px 8px; border-radius: 10px;
    background: var(--primary-light); color: #fff; font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.contact-tag-more {
    background: var(--surface-alt);
    color: var(--text);
    border: 1px dashed var(--border);
}
.contact-check {
    width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--border);
    display: none; align-items: center; justify-content: center; flex-shrink: 0;
    cursor: pointer; transition: var(--transition);
}
.contact-check.checked { background: var(--primary); border-color: var(--primary); color: #fff; }
.select-mode .contact-check { display: flex; }
.contact-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
.contact-uf { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.contact-op { font-size: 13px; color: var(--text-muted); }
.contact-note-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    padding: 3px 7px;
    border-radius: var(--radius-full);
    background: var(--surface-alt);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

/* ── Letter dividers ── */
.letter-divider {
    padding: 6px 16px; font-size: 13px; font-weight: 700;
    color: var(--primary); background: var(--surface-alt);
    position: sticky; top: 0; z-index: 5;
}

/* ── FAB ── */
.fab {
    position: absolute; bottom: 24px; right: 24px; z-index: 50;
    width: 56px; height: 56px; border-radius: var(--radius-full);
    background: var(--primary); color: #fff; border: none; cursor: pointer;
    box-shadow: var(--shadow-lg); display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.fab:hover { background: var(--primary-dark); transform: scale(1.05); }
.fab .material-symbols-rounded { font-size: 28px; }

/* ── Detail view ── */
.detail-header {
    position: relative;
    text-align: center; padding: 24px 16px 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff; border-radius: 0 0 24px 24px;
}
.detail-header-icon {
    position: absolute;
    top: 14px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: var(--radius-full);
    background: rgba(255,255,255,.12);
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
}
.detail-header-icon:hover {
    background: rgba(255,255,255,.22);
}
.detail-header-icon-left { left: 14px; }
.detail-header-icon-right { right: 14px; }
.detail-header-icon.danger:hover {
    background: rgba(239,68,68,.22);
}
.detail-avatar {
    width: 80px; height: 80px; border-radius: var(--radius-full);
    background: rgba(255,255,255,.2); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 700; margin: 0 auto 12px; text-transform: uppercase;
}
.detail-name { font-size: 22px; font-weight: 700; }
.detail-phone { font-size: 17px; font-weight: 600; opacity: .9; margin-top: 4px; }

/* CTA buttons */
.cta-bar {
    display: flex; gap: 8px; justify-content: center;
    padding: 16px; margin-top: -20px; position: relative; z-index: 5;
}
.cta-btn {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 12px 16px; border-radius: var(--radius);
    background: var(--surface); box-shadow: var(--shadow);
    border: none; cursor: pointer; color: var(--primary); font-size: 11px; font-weight: 500;
    transition: var(--transition); min-width: 72px;
}
.cta-btn:hover { background: var(--surface-alt); }
.cta-btn, .cta-btn:link, .cta-btn:visited, .cta-btn:hover, .cta-btn:active { text-decoration: none; }
.cta-btn .material-symbols-rounded { font-size: 22px; }
.cta-btn.whatsapp { color: #25D366; }
.cta-btn.danger { color: var(--danger); }
.inline-action-btn, .inline-action-btn:link, .inline-action-btn:visited, .inline-action-btn:hover, .inline-action-btn:active { text-decoration: none; }

/* Detail sections */
.detail-section { padding: 8px 16px; }
.detail-row {
    display: flex; align-items: center; gap: 12px; padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.detail-row:last-child { border-bottom: none; }
.detail-row .material-symbols-rounded { color: var(--text-muted); font-size: 20px; flex-shrink: 0; }
.detail-label { font-size: 13px; color: var(--text-muted); }
.detail-value { font-size: 16px; white-space: pre-wrap; word-break: break-word; }

.detail-row-email {
    align-items: flex-start;
}

/* ── Form ── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 14px; font-weight: 500; color: var(--text-muted); margin-bottom: 4px; }
.form-input, .form-select, .form-textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: 15px; color: var(--text);
    background: var(--surface); outline: none; transition: var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(59,130,246,.1); }
.form-textarea { min-height: 80px; resize: vertical; font-family: inherit; }
.form-input[type="date"],
.form-input[type="time"],
input[type="date"],
input[type="time"] {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    display: block;
}
.note-editor-text { min-height: 170px; }
.form-grid-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid-two > * { min-width: 0; }

.note-reminder-grid > .form-group {
    min-width: 0;
}

.note-reminder-input {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    display: block;
}

.phone-detected-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    font-size: 14px;
    line-height: 1.35;
}

body.theme-dark input[type="date"],
body.theme-dark input[type="time"] {
    color-scheme: dark;
}

body.theme-dark input[type="date"]::-webkit-calendar-picker-indicator,
body.theme-dark input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(2.05) contrast(1.25);
    opacity: .96;
}

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 20px; border-radius: var(--radius-sm); font-size: 15px;
    font-weight: 500; border: none; cursor: pointer; transition: var(--transition);
}
.btn, .btn:link, .btn:visited, .btn:hover, .btn:active {
    text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--surface-alt); }
.btn-sm { padding: 6px 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn:disabled {
    opacity: .65;
    cursor: not-allowed;
    filter: saturate(.6);
}

/* ── Modal / Drawer ── */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.4);
    z-index: 200; display: none; align-items: flex-end; justify-content: center;
}
.modal-overlay.open { display: flex; }

/* Keep confirm dialogs above any currently open modal. */
#modal-confirm {
    z-index: 260;
}

.modal-content {
    background: var(--surface); border-radius: 20px 20px 0 0;
    width: 100%; max-width: 480px; max-height: 85vh;
    display: flex; flex-direction: column;
    color: var(--text);
    animation: slideUp .25s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } }
.modal-header {
    display: flex; align-items: center; padding: 16px; gap: 12px;
    border-bottom: 1px solid var(--border);
}
.modal-header h2 { flex: 1; font-size: 17px; font-weight: 600; color: var(--text); }
.modal-body { flex: 1; overflow-y: auto; padding: 16px; }
.modal-footer { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }

.install-help-card {
    margin-bottom: 0;
}

.install-help-note {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 14px;
}

.install-steps {
    padding-left: 20px;
    display: grid;
    gap: 10px;
    color: var(--text);
}

.update-version-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 16px 0 10px;
}

.update-version-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: var(--radius-full);
    background: var(--surface-alt);
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.update-version-arrow {
    display: inline-flex;
    align-items: center;
    color: var(--primary);
}

body.theme-dark .update-version-chip {
    background: rgba(15,23,42,.52);
}

/* ── Toast ── */
.toast-container { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast {
    padding: 10px 20px; border-radius: var(--radius-sm);
    background: var(--text); color: #fff; font-size: 14px;
    box-shadow: var(--shadow-lg); animation: fadeIn .2s ease; max-width: 360px;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } }

/* ── Settings cards ── */
.settings-card {
    background: var(--surface); border-radius: var(--radius); padding: 16px;
    box-shadow: var(--shadow); margin-bottom: 12px; cursor: pointer;
    transition: var(--transition);
}
.settings-card:hover { box-shadow: var(--shadow-lg); }
.settings-card-title { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.settings-card-desc { font-size: 14px; color: var(--text-muted); margin-top: 4px; }
.settings-card .material-symbols-rounded { color: var(--primary); font-size: 22px; }
.settings-update-banner {
    width: 100%;
    margin-bottom: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(245,158,11,.42);
    border-radius: 16px;
    background: #fef3c7;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    cursor: pointer;
    box-shadow: var(--shadow);
}
.settings-update-banner .material-symbols-rounded {
    color: inherit;
    flex-shrink: 0;
}
.settings-update-banner-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.settings-update-banner-copy strong {
    font-size: 14px;
    font-weight: 800;
}
.settings-update-banner-copy span {
    font-size: 12px;
    line-height: 1.45;
}
body.theme-dark .settings-update-banner {
    background: #3b2f12;
    color: #fde68a;
    border-color: rgba(245,158,11,.4);
}
.settings-install-card {
    border: 1px solid rgba(217, 119, 6, .35);
    background: var(--surface);
    box-shadow: inset 0 0 0 1px rgba(217, 119, 6, .08), var(--shadow);
}
.settings-install-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}
.settings-install-actions .btn {
    min-width: 132px;
}
body.theme-dark .settings-install-card {
    border-color: rgba(245, 158, 11, .42);
    background: var(--surface);
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .14), var(--shadow);
}
.welcome-card-shell {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    text-align: center;
}
.welcome-hero-icon {
    width: 76px;
    height: 76px;
    border-radius: 22px;
    background: linear-gradient(135deg, #1d4ed8, #06b6d4);
    display: grid;
    place-items: center;
    box-shadow: 0 16px 34px rgba(30, 64, 175, .22);
}
.welcome-copy {
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: #334155;
    line-height: 1.6;
}
.welcome-title {
    margin: 0;
    font-size: 21px;
    font-weight: 800;
    color: var(--text);
}
.welcome-toggle-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--surface-alt);
}
.welcome-toggle-row span:first-child {
    text-align: left;
    font-size: 14px;
    color: var(--text);
}
.trial-modal-shell {
    display: flex;
    flex-direction: column;
    gap: 14px;
    color: #334155;
    line-height: 1.6;
}
.trial-modal-lead {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}
.trial-limit-card {
    padding: 14px;
    border-radius: 14px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
}
.trial-limit-title {
    margin: 0 0 8px 0;
    font-weight: 700;
    color: var(--text);
}
body.theme-dark .welcome-hero-icon {
    background: linear-gradient(135deg, #2563eb, #0891b2);
    box-shadow: 0 16px 34px rgba(37, 99, 235, .2);
}

body.theme-dark .welcome-copy,
body.theme-dark .trial-modal-shell {
    color: #d6e2f3;
}

/* Radio group */
.radio-group { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.radio-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    cursor: pointer; transition: var(--transition);
}
.radio-item:hover { background: var(--surface-alt); }
.radio-item.selected { border-color: var(--primary); background: #eff6ff; }
.radio-dot {
    width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.radio-item.selected .radio-dot { border-color: var(--primary); }
.radio-item.selected .radio-dot::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }

/* ── Dashboard / Stats ── */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.stat-card {
    background: var(--surface); border-radius: var(--radius); padding: 16px;
    box-shadow: var(--shadow); text-align: center; cursor: pointer; transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-lg); }
.stat-value { font-size: 28px; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.chart-bar-wrap { margin-bottom: 16px; }
.chart-bar-item { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; cursor: pointer; padding: 2px 0; border-radius: 4px; transition: var(--transition); }
.chart-bar-item:hover { background: var(--surface-alt); }
.chart-bar-label { font-size: 12px; color: var(--text-muted); width: 70px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart-bar { flex: 1; height: 22px; background: var(--surface-alt); border-radius: 4px; overflow: hidden; position: relative; }
.chart-bar-fill { height: 100%; border-radius: 4px; transition: width .4s ease; min-width: 2px; }
.chart-bar-count { font-size: 11px; color: var(--text-muted); width: 30px; }

/* ── Import mapping ── */
.mapping-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mapping-source { flex: 1; font-size: 13px; font-weight: 500; padding: 8px; background: var(--surface-alt); border: 1px solid transparent; border-radius: var(--radius-sm); color: var(--text); transition: var(--transition); }
.mapping-row.mapped .mapping-source,
.mapping-source.mapped { background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.28); color: var(--success); }
.mapping-arrow { color: var(--text-muted); font-size: 18px; }
.mapping-row select { flex: 1; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; }

body.theme-dark .mapping-row.mapped .mapping-source,
body.theme-dark .mapping-source.mapped { background: rgba(16,185,129,.18); border-color: rgba(52,211,153,.34); color: #a7f3d0; }

.context-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 16px;
}

.context-item .material-symbols-rounded {
    font-size: 20px;
}

/* ── Tags / Chips ── */
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-filter-strip {
    display: flex;
    align-items: stretch;
    gap: 8px;
    min-width: 0;
}

.tag-filter-strip-scroller {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    padding-bottom: 2px;
    min-width: 0;
    flex: 1 1 auto;
    scrollbar-width: thin;
}

.tag-filter-strip-scroller::-webkit-scrollbar {
    height: 6px;
}

.tag-filter-strip-scroller::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, .65);
    border-radius: 999px;
}

.tag-filter-strip .tag-chip {
    flex: 0 0 auto;
    white-space: nowrap;
}

.tag-filter-more-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 44px;
    padding: 0 14px;
    border: 1px solid rgba(59,130,246,.24);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(59,130,246,.12), rgba(14,165,233,.14));
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
}

.tag-filter-more-btn:hover {
    border-color: rgba(59,130,246,.42);
    background: linear-gradient(135deg, rgba(59,130,246,.18), rgba(14,165,233,.2));
}

.tag-filter-more-btn .material-symbols-rounded {
    font-size: 18px;
}

.tag-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 10px;
    font-size: 12px; font-weight: 700; cursor: pointer; transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.mask-preview-list {
    display: grid;
    gap: 10px;
}

.mask-preview-item {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
}

.mask-preview-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.mask-preview-code {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    word-break: break-all;
}
.tag-chip-overflow {
    border: 1px dashed var(--border);
    background: var(--surface);
}
.tag-chip-remove {
    width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 14px; cursor: pointer; opacity: .7; background: rgba(0,0,0,.1);
}
.tag-chip-remove:hover { opacity: 1; }

/* ── Toolbar (selection mode) ── */
.selection-toolbar {
    display: none;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    min-height: var(--nav-h);
    background: var(--primary-dark);
    color: #fff;
    align-items: center;
    align-content: flex-start;
    padding: 10px 16px;
    gap: 8px;
    z-index: 110;
    flex-wrap: wrap;
}
.selection-toolbar.visible { display: flex; }
.selection-toolbar .count {
    order: 1;
    flex: 1 0 calc(100% - 52px);
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}
.selection-toolbar .icon-btn {
    order: 2;
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,.12); border: none; color: #fff;
    cursor: pointer; padding: 8px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}
.selection-toolbar .icon-btn:first-child { order: 0; }
.selection-toolbar .icon-btn:hover { background: rgba(255,255,255,.22); }

/* ── Export format picker ── */
.export-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.share-contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.export-btn {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 16px 8px; border: 1px solid var(--border); border-radius: var(--radius);
    cursor: pointer; transition: var(--transition); background: var(--surface);
    font-size: 12px; font-weight: 500; color: var(--text);
}
.export-btn:hover { border-color: var(--primary); background: #eff6ff; color: var(--primary); }
.export-btn .material-symbols-rounded { font-size: 28px; color: var(--primary); }

/* ── Checkbox item (filter / bulk) ── */
.check-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 0;
    cursor: pointer; font-size: 14px;
}
.check-item input[type="checkbox"] {
    width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer;
}

/* ── Empty state ── */
.empty-state {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 48px 24px; text-align: center; color: var(--text-muted);
}
.empty-state .material-symbols-rounded { font-size: 64px; opacity: .3; margin-bottom: 12px; }
.empty-state h3 { font-size: 17px; color: var(--text); margin-bottom: 4px; }
.empty-state p { font-size: 14px; }

/* Loading */
.loading { display: flex; align-items: center; justify-content: center; height: 100%; }
.spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.link-status-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 10px;
    z-index: 320;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(15,23,42,.92);
    color: #e2e8f0;
    font-size: 12px;
    line-height: 1.4;
    box-shadow: 0 12px 28px rgba(15,23,42,.24);
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.theme-dark .link-status-bar {
    background: rgba(2,6,23,.92);
    color: #dbeafe;
}

@media (hover: none) {
    .link-status-bar {
        display: none !important;
    }
}

/* Scroll bar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* Utilities */
.hidden { display: none !important; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 14px; }
.w-full { width: 100%; }

/* ── Export scope radio ── */
.export-scope-option {
    display: flex; align-items: center; gap: 8px; padding: 10px 12px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    cursor: pointer; margin-bottom: 8px; transition: var(--transition);
}
.export-scope-option:hover { background: var(--surface-alt); }
.export-scope-option.selected { border-color: var(--primary); background: #eff6ff; }
.export-scope-option input[type="radio"] { accent-color: var(--primary); }

/* ── Trash toolbar ── */
.trash-toolbar {
    display: flex; gap: 8px; padding: 0 16px 8px; flex-wrap: wrap;
}
.trash-toolbar .btn {
    cursor: pointer;
}

/* ── Progress bar ── */
.progress-wrap {
    background: var(--surface-alt); border-radius: var(--radius-sm); height: 24px;
    overflow: hidden; position: relative; margin: 12px 0;
}
.progress-fill {
    height: 100%; background: var(--primary); border-radius: var(--radius-sm);
    transition: width .15s ease; min-width: 0;
}
.progress-label {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600; color: var(--text);
}

/* ── Import result modal ── */
.import-result {
    text-align: center; padding: 24px 16px;
}
.import-result .result-icon {
    width: 72px; height: 72px; border-radius: 50%;
    background: var(--success-light); color: var(--success);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px; font-size: 40px;
}
.import-result .result-line {
    font-size: 15px; margin: 6px 0;
}

/* ── Color picker ── */
.color-picker-grid {
    display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;
}
.color-dot {
    width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
    border: 2px solid transparent; transition: var(--transition);
}
.color-dot:hover { transform: scale(1.15); }
.color-dot.selected { border-color: var(--text); box-shadow: 0 0 0 2px #fff inset; }

/* ── Filter banner button fix ── */
.filter-banner .icon-btn {
    background: none; border: none; cursor: pointer;
    color: var(--primary); display: flex; align-items: center;
}

/* ── Notes / Events / Messages ── */
.notes-list,
.message-list,
.events-list {
    display: grid;
    gap: 12px;
}

.note-card {
    position: relative;
    padding: 16px;
    border-radius: 18px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(15,23,42,.06);
    overflow: hidden;
    color: #1f2937;
}

.note-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 58px;
    height: 58px;
    background: rgba(255,255,255,.32);
    border-radius: 0 0 0 28px;
}

.note-card-header,
.message-card-header,
.event-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.note-card-title-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.note-card-main {
    flex: 1;
    min-width: 0;
}

.note-title-check {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.note-card-title,
.message-card-title,
.event-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.event-card-contact {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--primary);
    margin-bottom: 2px;
}

.note-card-title {
    color: #111827;
}

.note-card-meta,
.message-card-meta,
.event-card-meta {
    font-size: 13px;
    color: rgba(15,23,42,.64);
}

.note-card-meta,
.note-card-text,
.note-card .check-item,
.note-card .material-symbols-rounded {
    color: #1f2937;
}

.note-card .btn .material-symbols-rounded,
.note-card .event-marker-pill .material-symbols-rounded {
    color: currentColor;
}

.note-card-text,
.message-card-text,
.event-card-text,
.send-preview {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 15px;
    line-height: 1.5;
}

.event-card-text {
    color: rgba(15,23,42,.82);
}

.event-card-title {
    color: rgba(15,23,42,.84);
}

.note-card-actions,
.event-card-actions,
.message-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.event-card-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.event-card-actions {
    flex: 1 1 260px;
    margin-top: 0;
}

.event-card-marker-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
}

.note-card-footer {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.note-card-actions {
    flex: 1 1 240px;
    margin-top: 0;
}

.note-card-actions:empty {
    display: none;
}

.note-card-icon-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.note-card-icon-btn {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 999px;
    background: rgba(255,255,255,.42);
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 1px 2px rgba(15,23,42,.08);
}

.note-card-icon-btn:hover {
    background: rgba(255,255,255,.74);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(15,23,42,.12);
}

.note-card-icon-btn.danger {
    color: #b91c1c;
}

.note-reminder-chip,
.event-status-chip,
.message-token-chip,
.back-events-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    background: rgba(255,255,255,.55);
    color: var(--text);
    white-space: nowrap;
}

.back-events-chip {
    cursor: pointer;
}

.note-reminder-chip-button,
.event-status-chip-button {
    border: 1px solid rgba(15,23,42,.12);
    cursor: pointer;
    transition: var(--transition);
    font: inherit;
    appearance: none;
    flex-shrink: 0;
    line-height: 1.1;
}

.note-reminder-chip-button:hover,
.event-status-chip-button:hover {
    transform: translateY(-1px);
    border-color: rgba(59,130,246,.3);
}

.note-reminder-chip-button.unread,
.event-status-chip-button.unread {
    color: #0f766e;
}

.note-reminder-chip-button.read,
.event-status-chip-button.read {
    color: rgba(15,23,42,.78);
}

.note-card .note-reminder-chip {
    background: rgba(255,255,255,.72);
    color: #1f2937;
}

.note-card .note-reminder-chip-button {
    background: rgba(255,255,255,.82);
}

.note-card .note-reminder-chip-button:hover {
    background: rgba(255,255,255,.96);
}

.note-card .btn-outline {
    background: rgba(255,255,255,.42);
    border-color: rgba(15,23,42,.14);
    color: #1f2937;
}

.note-card .btn-outline:hover {
    background: rgba(255,255,255,.68);
}

.tag-filter-item {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 6px;
    padding: 8px 10px;
    border: 0;
    border-left: 3px solid var(--tag-color, var(--primary));
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

.tag-filter-item + .tag-filter-item {
    margin-top: 0;
}

.tag-filter-item:hover {
    background: var(--surface-alt);
}

.tag-filter-item.selected {
    background: rgba(59,130,246,.10);
    color: var(--primary);
    box-shadow: none;
}

.tag-filter-cloud {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tag-filter-name {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-dark .tag-filter-more-btn {
    border-color: rgba(96,165,250,.28);
    background: linear-gradient(135deg, rgba(37,99,235,.22), rgba(14,165,233,.18));
    color: #dbeafe;
}

.note-color-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.note-color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.note-color-option.selected {
    transform: scale(1.08);
    border-color: var(--text);
    box-shadow: 0 0 0 2px rgba(255,255,255,.8) inset;
}

.events-layout {
    display: grid;
    gap: 16px;
}

.events-summary-card,
.messages-toolbar-card {
    background: var(--surface);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 16px;
}

.events-summary-header,
.messages-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.events-calendar-header {
    align-items: stretch;
}

.events-summary-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

.calendar-toolbar {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.calendar-nav-btn {
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.calendar-select-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(96px, .82fr);
    gap: 8px;
    min-width: 0;
}

.calendar-select {
    min-width: 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none;
    padding-right: 12px;
}

.calendar-select::-ms-expand {
    display: none;
}

.calendar-select-year {
    min-width: 96px;
    font-variant-numeric: tabular-nums;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.calendar-weekday {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
    padding: 4px 0;
}

.calendar-day {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    min-height: 92px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.calendar-day:hover {
    border-color: var(--primary-light);
    transform: translateY(-1px);
}

.calendar-day.other-month {
    opacity: .45;
    background: rgba(255,255,255,.45);
}

.calendar-day.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

.calendar-day.has-events {
    background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
}

.calendar-day.today {
    border: 3px solid #facc15;
    box-shadow: 0 0 0 2px rgba(250,204,21,.22), 0 0 14px rgba(250,204,21,.26);
}

.calendar-day-number {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.calendar-day-count {
    margin-top: auto;
    align-self: flex-start;
    padding: 4px 8px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.event-card {
    background: var(--surface);
    border-radius: 18px;
    border: 1px solid var(--border);
    padding: 16px;
    box-shadow: var(--shadow);
}

.event-card.unread {
    border-left: 5px solid var(--accent);
    background: linear-gradient(180deg, #ffffff 0%, #f0fdfa 100%);
}

.event-card.read {
    opacity: .92;
}

.event-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
}

.message-card {
    background: var(--surface);
    border-radius: 18px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
}

.message-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-1px);
}

.message-fields-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.message-token-chip {
    border: 1px solid var(--border);
    cursor: pointer;
    background: var(--surface-alt);
}

.note-tools-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.note-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.note-section-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.note-section-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.note-new-btn {
    min-height: 42px;
    padding-inline: 16px;
}

.note-selection-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: var(--radius-full);
    background: rgba(59,130,246,.12);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

.note-actions-menu-wrap {
    position: relative;
}

.note-actions-menu-btn {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.note-actions-menu-btn:hover {
    color: var(--primary);
    border-color: var(--primary-light);
    background: var(--surface-alt);
}

.note-actions-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    display: grid;
    gap: 4px;
    z-index: 25;
}

.note-actions-item {
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--text);
    text-align: left;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.note-actions-item:hover {
    background: var(--surface-alt);
}

.note-actions-item.danger {
    color: var(--danger);
}

.note-actions-item:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.note-actions-item:disabled:hover {
    background: transparent;
}

.note-select-check {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.dashboard-inline-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.dashboard-inline-meta {
    font-size: 14px;
    color: var(--text);
}

.email-problem-list {
    display: grid;
    gap: 12px;
}

.email-problem-item {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
}

.email-problem-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.email-problem-contact {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.email-problem-meta {
    font-size: 13px;
    color: var(--text-muted);
}

.email-problem-value {
    margin-bottom: 10px;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 14px;
    color: var(--text);
    word-break: break-all;
}

.email-problem-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.email-problem-issue {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
    font-size: 12px;
    font-weight: 600;
}

.event-marker-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--radius-full);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.event-text-toggle {
    display: inline-flex;
    margin-top: 8px;
    font-size: 12px;
    color: var(--primary);
    cursor: pointer;
    font-weight: 700;
}

.manager-list {
    display: grid;
    gap: 10px;
}

.account-overview-card {
    overflow: hidden;
}

.account-overview-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.account-current-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(30,64,175,.08), rgba(15,118,110,.08));
    border: 1px solid rgba(30,64,175,.12);
}

.account-manager-item.is-current {
    border-color: rgba(30,64,175,.3);
    background: rgba(239,246,255,.92);
}

.account-manager-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.account-list-avatar {
    width: 38px;
    height: 38px;
}

textarea[data-autosize-max-rows] {
    resize: none;
    overflow-y: hidden;
}

body.theme-dark .account-switcher-btn {
    background: rgba(15,23,42,.96);
    border-color: rgba(148,163,184,.22);
    color: #e5eefc;
}

body.theme-dark .account-switcher-kicker,
body.theme-dark .account-switcher-copy small {
    color: rgba(226,232,240,.68);
}

body.theme-dark .account-switcher-avatar {
    background: rgba(96,165,250,.18);
    color: #bfdbfe;
}

body.theme-dark .account-current-banner {
    background: linear-gradient(135deg, rgba(30,64,175,.18), rgba(15,118,110,.16));
    border-color: rgba(96,165,250,.24);
}

body.theme-dark .account-manager-item.is-current {
    background: rgba(30,41,59,.86);
    border-color: rgba(96,165,250,.3);
}

.manager-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.manager-item-main {
    flex: 1;
    min-width: 180px;
}

.manager-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-left: auto;
}

.utility-phone-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.utility-phone-categories .tag-chip {
    border: 1px solid var(--border);
    background: var(--surface-alt);
    color: var(--text);
}

.utility-phone-categories .tag-chip.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.utility-phone-category-card {
    margin-bottom: 10px;
}

.utility-phone-category-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.utility-phone-item {
    align-items: flex-start;
}

.utility-phone-number {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    margin-top: 4px;
}

.utility-phone-note {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.55;
    margin-top: 6px;
}

.utility-phone-actions {
    justify-content: flex-end;
}

.manager-marker-pill {
    max-width: 100%;
}

.settings-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.settings-switch {
    position: relative;
    width: 54px;
    height: 30px;
    flex-shrink: 0;
}

.settings-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.settings-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.settings-slider::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: #fff;
    transition: var(--transition);
}

.settings-switch input:checked + .settings-slider {
    background: var(--primary);
}

.settings-switch input:checked + .settings-slider::before {
    transform: translateX(24px);
}

.settings-font-select {
    margin-top: 10px;
}

.send-mode-list {
    display: grid;
    gap: 8px;
}

.send-option {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    cursor: pointer;
    transition: var(--transition);
    background: var(--surface);
}

.send-option.selected {
    border-color: var(--primary);
    background: #eff6ff;
}

.send-option-title {
    font-size: 14px;
    font-weight: 700;
}

.send-option-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.inline-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--primary);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.inline-action-btn.inline-action-btn-compact {
    padding: 6px 10px;
    font-size: 11px;
}

.detail-email-send-btn {
    margin-top: 8px;
    align-self: flex-start;
}

.inline-action-btn:hover {
    background: #eff6ff;
}

@media (min-width: 1024px) {
    .events-layout {
        grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
        align-items: start;
    }
}

@media (max-width: 767px) {
    .detail-header {
        padding-top: 28px;
    }

    .events-summary-header,
    .messages-toolbar {
        gap: 10px;
    }

    .events-calendar-header {
        flex-direction: column;
        align-items: stretch;
    }

    .note-section-header,
    .note-section-toolbar {
        width: 100%;
        align-items: stretch;
        flex-wrap: wrap;
    }

    .note-section-toolbar .btn {
        flex: 1 1 auto;
    }

    .dashboard-inline-action,
    .email-problem-header {
        align-items: stretch;
    }

    .note-actions-menu {
        min-width: min(240px, calc(100vw - 48px));
    }

    .note-card {
        padding: 14px;
        border-radius: 20px;
    }

    .note-card-header {
        flex-direction: column;
    }

    .note-card-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .note-card-actions {
        flex: 1 1 auto;
    }

    .note-card-icon-actions {
        margin-left: 0;
        justify-content: flex-end;
    }

    .form-grid-two {
        grid-template-columns: 1fr;
    }

    .calendar-grid {
        gap: 6px;
    }

    .calendar-toolbar {
        grid-template-columns: 34px minmax(0, 1fr) 34px;
        gap: 6px;
    }

    .calendar-nav-btn {
        width: 34px;
        min-width: 34px;
        height: 40px;
        border-radius: 12px;
    }

    .calendar-select-group {
        gap: 6px;
        grid-template-columns: minmax(0, 1fr) 92px;
    }

    .calendar-select {
        min-height: 40px;
        padding: 0 12px;
        font-size: 15px;
    }

    .calendar-day {
        min-height: 74px;
        padding: 8px;
    }

    .event-card-actions {
        flex-basis: 100%;
    }

        .note-card-icon-btn {
            width: 34px;
            height: 34px;
        }

    .event-card-marker-row,
    .manager-item-actions {
        width: 100%;
        justify-content: flex-end;
        margin-left: 0;
    }
}

    /* ── Mobile comfort profile (optional) ── */
    @media (max-width: 767px) {
        body.mobile-font-comfort {
            line-height: 1.6;
        }

        body.mobile-font-comfort .topbar h1 {
            font-size: 23px !important;
        }

        body.mobile-font-comfort .install-banner-copy strong {
            font-size: 18px !important;
        }

        body.mobile-font-comfort .search-box {
            height: 50px;
        }

        body.mobile-font-comfort .btn {
            min-height: 50px;
        }

        body.mobile-font-comfort .tab-btn {
            font-size: clamp(15px, 4vw, 17px) !important;
        }

        body.mobile-font-comfort .detail-phone {
            font-size: 21px !important;
        }

        body.mobile-font-comfort .contacts-summary {
            font-size: 17px !important;
        }

        body.mobile-font-comfort .event-status-chip-button {
            font-size: 13px !important;
        }

        body.mobile-font-comfort .check-item,
        body.mobile-font-comfort .export-btn,
        body.mobile-font-comfort .progress-label,
        body.mobile-font-comfort .import-result .result-line,
        body.mobile-font-comfort .radio-item,
        body.mobile-font-comfort .settings-switch-row {
            font-size: 16px !important;
        }

        body.mobile-font-comfort .install-banner-copy span,
        body.mobile-font-comfort .card-header,
        body.mobile-font-comfort .contact-phone,
        body.mobile-font-comfort .contact-note-preview,
        body.mobile-font-comfort .contact-uf,
        body.mobile-font-comfort .contact-op,
        body.mobile-font-comfort .detail-label,
        body.mobile-font-comfort .form-label,
        body.mobile-font-comfort .settings-card-desc,
        body.mobile-font-comfort .filter-banner,
        body.mobile-font-comfort .contacts-filter-banner,
        body.mobile-font-comfort .events-summary-title,
        body.mobile-font-comfort .note-actions-item,
        body.mobile-font-comfort .send-option-title,
        body.mobile-font-comfort .inline-action-btn,
        body.mobile-font-comfort .text-sm,
        body.mobile-font-comfort .contact-tag,
        body.mobile-font-comfort .detail-actions .text-muted,
        body.mobile-font-comfort .note-card-meta,
        body.mobile-font-comfort .message-card-meta,
        body.mobile-font-comfort .event-card-meta,
        body.mobile-font-comfort .event-text-toggle,
        body.mobile-font-comfort .note-reminder-chip,
        body.mobile-font-comfort .event-status-chip,
        body.mobile-font-comfort .message-token-chip,
        body.mobile-font-comfort .back-events-chip,
        body.mobile-font-comfort .calendar-weekday,
        body.mobile-font-comfort .calendar-day-count,
        body.mobile-font-comfort .contact-note-count,
        body.mobile-font-comfort .stat-label,
        body.mobile-font-comfort .chart-bar-label,
        body.mobile-font-comfort .chart-bar-count,
        body.mobile-font-comfort .mapping-source,
        body.mobile-font-comfort .mapping-row select,
        body.mobile-font-comfort .tab-btn,
        body.mobile-font-comfort .send-option-desc,
        body.mobile-font-comfort .event-marker-pill,
        body.mobile-font-comfort .toast,
        body.mobile-font-comfort .check-item,
        body.mobile-font-comfort .export-btn,
        body.mobile-font-comfort .progress-label,
        body.mobile-font-comfort .import-result .result-line,
        body.mobile-font-comfort .radio-item,
        body.mobile-font-comfort .settings-switch-row,
        body.mobile-font-comfort .utility-phone-note,
        body.mobile-font-comfort .utility-phone-category-desc,
        body.mobile-font-comfort .empty-state p {
            font-size: 17px !important;
            line-height: 1.45;
        }

        body.mobile-font-comfort .contact-tag {
            font-size: 11px !important;
            line-height: 1.2;
            padding: 3px 8px;
            border-radius: 10px;
        }

        body.mobile-font-comfort .search-box input,
        body.mobile-font-comfort .form-input,
        body.mobile-font-comfort .form-select,
        body.mobile-font-comfort .form-textarea,
        body.mobile-font-comfort .detail-value,
        body.mobile-font-comfort .detail-phone,
        body.mobile-font-comfort .settings-card-title,
        body.mobile-font-comfort .modal-header h2,
        body.mobile-font-comfort .contact-name,
        body.mobile-font-comfort .note-card-title,
        body.mobile-font-comfort .message-card-title,
        body.mobile-font-comfort .event-card-title,
        body.mobile-font-comfort .note-card-text,
        body.mobile-font-comfort .message-card-text,
        body.mobile-font-comfort .event-card-text,
        body.mobile-font-comfort .send-preview,
        body.mobile-font-comfort .empty-state h3,
        body.mobile-font-comfort .utility-phone-number,
        body.mobile-font-comfort .btn {
            font-size: 20px !important;
            line-height: 1.3;
        }

        body.mobile-font-comfort .cta-btn {
            font-size: 16px !important;
        }

        body.mobile-font-comfort .phone-detected-grid {
            grid-template-columns: 1fr;
            font-size: 17px;
            line-height: 1.4;
        }

        body.mobile-font-comfort .detail-email-send-btn {
            font-size: 15px !important;
        }

        body.mobile-font-comfort .btn-sm,
        body.mobile-font-comfort .event-status-chip-button,
        body.mobile-font-comfort .note-reminder-chip,
        body.mobile-font-comfort .event-marker-pill,
        body.mobile-font-comfort .message-token-chip,
        body.mobile-font-comfort .tag-chip,
        body.mobile-font-comfort .contacts-summary {
            font-size: 15px !important;
        }

        body.mobile-font-comfort .tag-chip,
        body.mobile-font-comfort .tag-chip-overflow {
            font-size: 12px !important;
            line-height: 1.2;
            padding: 4px 10px;
            border-radius: 10px;
        }

        body.mobile-font-comfort .empty-state h3 {
            font-size: 22px !important;
        }

        body.mobile-font-comfort .empty-state p {
            font-size: 18px !important;
        }

        body.mobile-font-comfort input::placeholder,
        body.mobile-font-comfort textarea::placeholder {
            font-size: 17px;
        }
    }
