/* Companion uses the existing palette, cards, and primary button. */
.companion-sidebar-link { margin-bottom: 8px; }
.companion-mobile-access { display: none; }
.companion-page { max-width: 1140px; margin: 0 auto; }
.companion-page .page-title { font-size: clamp(30px, 4vw, 52px); line-height: 1.1; }
.companion-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; list-style: none; margin: 0 0 28px; padding: 0; color: var(--text-soft); font-size: 13px; }
.companion-flow li { display: flex; align-items: center; gap: 12px; }
.companion-flow li:not(:last-child)::after { content: "→"; color: var(--primary-2); }
.companion-app-card { display: grid; grid-template-columns: 1.2fr 1fr; overflow: hidden; }
.companion-app-details, .companion-download-panel, .companion-guide { padding: clamp(22px, 3vw, 34px); min-width: 0; }
.companion-app-heading { display: flex; align-items: center; gap: 16px; }
.companion-app-heading .brand-icon { flex-shrink: 0; }
.companion-page h2 { margin: 6px 0 18px; font-size: 22px; line-height: 1.3; letter-spacing: -.025em; }
.companion-app-heading h2 { margin-bottom: 0; }
.companion-features { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 16px; color: var(--text-soft); line-height: 1.6; font-size: 14px; }
.companion-features li { display: flex; gap: 12px; }
.companion-features li::before { content: "✓"; color: var(--success); font-weight: 700; }
.companion-download-panel { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; background: rgba(124, 92, 255, .08); border-left: 1px solid var(--border); }
.companion-release-status { color: var(--success); font-size: 13px; font-weight: 700; }
.companion-release-status.is-preparing { color: var(--warning); }
.companion-download-panel p { color: var(--text-soft); line-height: 1.6; margin: 16px 0 24px; }
.companion-download-panel small { color: var(--muted); line-height: 1.6; margin-top: 14px; }
.companion-download.primary-button { width: 100%; min-height: 58px; text-align: center; padding: 14px; white-space: normal; }
.companion-download:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; transform: none; }
.companion-notice { display: flex; gap: 14px; padding: 20px 24px; margin: 24px 0; border: 1px solid rgba(124, 92, 255, .35); border-radius: var(--radius-md); background: rgba(124, 92, 255, .1); }
.companion-notice > span { color: #b5a6ff; font-size: 24px; }
.companion-notice p { margin: 0; color: var(--text-soft); font-size: 14px; line-height: 1.8; }
.companion-notice strong { color: var(--text); }
.companion-guide-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; }
.companion-steps { counter-reset: companion-step; list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 18px; }
.companion-steps li { display: flex; align-items: flex-start; gap: 14px; color: var(--text-soft); font-size: 14px; line-height: 1.6; }
.companion-steps li::before { counter-increment: companion-step; content: counter(companion-step); flex: 0 0 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: rgba(124, 92, 255, .16); color: #c4b5fd; font-weight: 700; }
.companion-page a:focus-visible, .companion-mobile-access a:focus-visible, .companion-sidebar-link:focus-visible { outline: 2px solid #b5a6ff; outline-offset: 4px; }
@media (max-width: 1000px) {
    .companion-app-card, .companion-guide-grid { grid-template-columns: 1fr; }
    .companion-download-panel { border-left: 0; border-top: 1px solid var(--border); }
}

/* =========================================================
   WOOCOMMERCE ORDERS
========================================================= */
.woo-page-header { align-items: flex-end; }
.woo-alert { margin-bottom: 16px; padding: 13px 16px; border: 1px solid; border-radius: 14px; overflow-wrap: anywhere; }
.woo-alert.is-success { color: #a7f3d0; border-color: rgba(45,212,191,.28); background: rgba(45,212,191,.08); }
.woo-alert.is-error { color: #fecdd3; border-color: rgba(251,113,133,.28); background: rgba(251,113,133,.08); }
.woo-settings-grid { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(280px,.8fr); gap: 24px; }
.woo-settings-actions { display: grid; align-content: start; gap: 13px; min-width: 0; padding: 18px; border: 1px solid var(--border); border-radius: 18px; background: rgba(255,255,255,.025); }
.woo-settings-actions h2, .woo-status-panel h2 { margin: 10px 0; }
.woo-settings-actions form, .woo-settings-actions button { width: 100%; }
.woo-settings-actions details { padding: 12px; border: 1px solid var(--border); border-radius: 13px; }
.woo-settings-actions summary { cursor: pointer; font-weight: 750; }
.woo-status-badge { display: inline-flex; width: fit-content; padding: 6px 10px; border-radius: 999px; color: #c7bcff; background: rgba(124,92,255,.13); font-size: 12px; font-weight: 800; }
.woo-status-badge.is-ready { color: #a7f3d0; background: rgba(45,212,191,.12); }
.woo-status-badge.is-missing { color: #fde68a; background: rgba(245,204,118,.1); }
.woo-definition-list { display: grid; gap: 1px; margin: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: var(--border); }
.woo-definition-list > div { min-width: 0; display: grid; grid-template-columns: minmax(120px,.6fr) minmax(0,1.4fr); gap: 16px; padding: 13px 15px; background: #12192b; }
.woo-definition-list dt { color: var(--muted); }
.woo-definition-list dd { margin: 0; overflow-wrap: anywhere; }
.woo-filter-card { margin-bottom: 16px; }
.woo-filter-grid { display: grid; grid-template-columns: repeat(5,minmax(145px,1fr)); gap: 12px; }
.woo-filter-grid label { min-width: 0; display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.woo-filter-grid input, .woo-filter-grid select, .woo-campaign-panel input, .woo-campaign-panel select { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); background: rgba(7,11,22,.78); }
.woo-filter-actions { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; grid-column: 1 / -1; }
.woo-summary-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.woo-summary-grid > div { min-width: 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: 15px; background: rgba(255,255,255,.025); }
.woo-summary-grid span, .woo-summary-grid strong { display: block; overflow-wrap: anywhere; }
.woo-summary-grid span { color: var(--muted); font-size: 12px; }
.woo-summary-grid strong { margin-top: 5px; font-size: 22px; }
.woo-list-summary { margin-bottom: 16px; }
.woo-campaign-panel { margin-bottom: 16px; }
.woo-campaign-panel .card-inner { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.woo-campaign-panel h2 { margin: 0 0 4px; }
.woo-campaign-panel form { display: grid; grid-template-columns: minmax(170px,1fr) 120px auto; gap: 8px; min-width: min(100%,560px); }
.woo-order-cards { display: grid; gap: 10px; min-width: 0; }
.woo-order-card { display: block; color: inherit; text-decoration: none; transition: border-color .2s ease, transform .2s ease; }
.woo-order-card:hover { border-color: rgba(199,188,255,.3); transform: translateY(-1px); }
.woo-order-card-head, .woo-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.woo-order-card h2 { margin: 5px 0 0; overflow-wrap: anywhere; }
.woo-order-meta { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 18px; margin-top: 14px; color: var(--muted); }
.woo-order-meta strong { color: var(--text); }
.woo-pagination { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.woo-detail-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 14px; }
.woo-detail-grid p { overflow-wrap: anywhere; line-height: 1.65; }
.woo-items-list { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--border); border-radius: 15px; background: var(--border); }
.woo-items-list > div { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 18px; padding: 13px 15px; background: #12192b; }
.woo-items-list span, .woo-items-list strong, .woo-items-list small { min-width: 0; overflow-wrap: anywhere; }
.woo-items-list small { display: block; margin-top: 4px; color: var(--muted); }
.woo-contact-orders { margin-top: 16px; }
.woo-contact-layout { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(240px,.7fr); gap: 14px; margin-top: 14px; }
.woo-order-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 13px; color: inherit; text-decoration: none; }
.woo-order-row small { display: block; margin-top: 3px; color: var(--muted); }
.woo-product-cloud { display: flex; align-content: flex-start; flex-wrap: wrap; gap: 7px; min-width: 0; }
.woo-product-cloud > strong { flex-basis: 100%; }
.woo-product-cloud > span { max-width: 100%; padding: 6px 9px; border-radius: 999px; color: var(--text-soft); background: rgba(124,92,255,.1); font-size: 12px; overflow-wrap: anywhere; }

@media (max-width: 1100px) {
    .woo-filter-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .woo-detail-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 820px) {
    .mobile-bottom-nav { grid-template-columns: repeat(6,minmax(0,1fr)); }
    .woo-settings-grid, .woo-contact-layout { grid-template-columns: minmax(0,1fr); }
    .woo-filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .woo-campaign-panel .card-inner { align-items: stretch; flex-direction: column; }
    .woo-campaign-panel form { width: 100%; min-width: 0; }
}
@media (max-width: 560px) {
    .mobile-nav-item { font-size: 9px; }
    .mobile-nav-item > span:last-child { overflow-wrap: anywhere; }
    .woo-page-header, .woo-section-heading { align-items: stretch; flex-direction: column; }
    .woo-page-header > a, .woo-section-heading > a { width: 100%; justify-content: center; }
    .woo-filter-grid, .woo-summary-grid, .woo-detail-grid { grid-template-columns: minmax(0,1fr); }
    .woo-campaign-panel form { grid-template-columns: minmax(0,1fr); }
    .woo-order-meta, .woo-items-list > div { grid-template-columns: minmax(0,1fr); gap: 7px; }
    .woo-definition-list > div { grid-template-columns: minmax(0,1fr); gap: 5px; }
    .woo-pagination { flex-direction: column; }
    .woo-pagination a { width: 100%; justify-content: center; }
}
@media (max-width: 820px) {
    .companion-mobile-access { display: block; padding: 8px 16px; border-bottom: 1px solid var(--border); background: var(--bg-soft); }
    .companion-mobile-access a { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 8px 14px; border-radius: 12px; font-size: 14px; color: var(--text-soft); }
    .companion-mobile-access a.active, .companion-mobile-access a:hover { background: rgba(124, 92, 255, .16); color: var(--text); }
    .companion-flow { gap: 10px; font-size: 12px; }
    .companion-page .page-title { font-size: 34px; }
}

:root {
    --bg: #0b1020;
    --bg-soft: #121933;
    --panel: rgba(20, 28, 55, 0.82);
    --panel-solid: #151d38;
    --panel-2: #1c2748;

    --text: #f8fafc;
    --text-soft: #cbd5e1;
    --muted: #8fa0bd;

    --primary: #7c5cff;
    --primary-2: #5e8bff;
    --success: #2dd4bf;
    --danger: #fb7185;
    --warning: #fbbf24;

    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);

    --shadow:
        0 18px 45px rgba(0, 0, 0, 0.25);

    --radius-sm: 14px;
    --radius-md: 20px;
    --radius-lg: 28px;

    --sidebar-width: 290px;
    --topbar-height: 88px;

    --safe-bottom: env(safe-area-inset-bottom, 0px);
}


* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    margin: 0;
    min-height: 100vh;

    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background:
        radial-gradient(
            circle at top left,
            rgba(124, 92, 255, 0.2),
            transparent 34%
        ),
        radial-gradient(
            circle at bottom right,
            rgba(45, 212, 191, 0.12),
            transparent 30%
        ),
        var(--bg);

    color: var(--text);

    overflow-x: hidden;
}


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


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

/* Style both the native select and its OS/browser popup; keep native behavior. */
select {
    color-scheme: dark;
    color: var(--text);
    background-color: var(--panel-solid);
}

select option,
select optgroup {
    color: var(--text);
    background-color: var(--panel-solid);
}

select option:is(:checked, :hover) {
    color: HighlightText;
    background-color: Highlight;
}

select option:disabled,
select optgroup:disabled {
    color: var(--muted);
}


svg {
    display: block;
}


/* =========================================================
   APP SHELL
========================================================= */

.app-shell {
    min-height: 100vh;
    display: flex;
}


.app-sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;

    position: fixed;
    inset: 0 auto 0 0;

    display: flex;
    flex-direction: column;

    padding: 24px 18px;

    background:
        linear-gradient(
            180deg,
            rgba(20, 28, 55, 0.98),
            rgba(12, 17, 34, 0.98)
        );

    border-right: 1px solid var(--border);

    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);

    z-index: 100;
}


.app-main {
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);

    min-height: 100vh;
}


/* =========================================================
   BRAND
========================================================= */

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;

    padding: 4px 8px 26px;
}


.brand-icon {
    width: 52px;
    height: 52px;

    border-radius: 18px;

    display: grid;
    place-items: center;

    font-weight: 800;
    letter-spacing: -0.04em;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-2)
        );

    color: white;

    box-shadow:
        0 12px 28px rgba(124, 92, 255, 0.35);
}


.brand-icon.small {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 14px;
}


.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.08;
}


.brand-copy strong {
    font-size: 18px;
    letter-spacing: -0.02em;
}


.brand-copy span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}


/* =========================================================
   SIDEBAR NAV
========================================================= */

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}


.nav-item {
    min-height: 58px;

    display: flex;
    align-items: center;
    gap: 14px;

    padding: 0 16px;

    border-radius: 18px;

    color: var(--text-soft);

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        color 0.2s ease;
}


.nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: white;
    transform: translateX(2px);
}


.nav-item.active {
    color: white;

    background:
        linear-gradient(
            135deg,
            rgba(124, 92, 255, 0.24),
            rgba(94, 139, 255, 0.14)
        );

    border: 1px solid rgba(124, 92, 255, 0.24);
}


.nav-icon {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
}


.nav-icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}


.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
}

/* Quiet account action; the mobile shell has its own compact control. */
.logout-form { margin: 0; }
.logout-button { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 10px 14px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-size: 13px; cursor: pointer; }
.logout-button:hover { background: rgba(255,255,255,.05); color: var(--text); }
.logout-button:focus-visible { outline: 2px solid #b5a6ff; outline-offset: 2px; }
.sidebar-logout { margin-bottom: 12px; }
.sidebar-logout .logout-button { width: 100%; }
.mobile-logout { display: none; }
.mobile-logout .logout-button { width: 44px; padding: 11px; }
.mobile-logout svg { width: 22px; height: 22px; }
@media (max-width: 820px) {
    .mobile-logout { display: block; }
    .topbar-left { min-width: 0; }
    .topbar-title { min-width: 0; }
    .topbar-title strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}


.sidebar-status {
    display: flex;
    gap: 12px;
    align-items: flex-start;

    padding: 16px;

    border: 1px solid var(--border);

    border-radius: 18px;

    background: rgba(255, 255, 255, 0.035);
}


.status-dot {
    width: 10px;
    height: 10px;

    margin-top: 5px;

    border-radius: 999px;

    background: var(--success);

    box-shadow:
        0 0 0 6px rgba(45, 212, 191, 0.1);
}


.sidebar-status div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}


.sidebar-status strong {
    font-size: 13px;
}


.sidebar-status span {
    font-size: 11px;
    color: var(--muted);
}


/* =========================================================
   TOPBAR
========================================================= */

.app-topbar {
    height: var(--topbar-height);

    position: sticky;
    top: 0;

    z-index: 80;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 0 34px;

    background: rgba(11, 16, 32, 0.72);

    border-bottom: 1px solid var(--border);

    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}


.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}


.mobile-brand {
    display: none;
}


.topbar-title {
    display: flex;
    flex-direction: column;
    gap: 3px;
}


.topbar-title .eyebrow {
    color: var(--muted);

    font-size: 12px;
    font-weight: 700;

    letter-spacing: 0.08em;
    text-transform: uppercase;
}


.topbar-title strong {
    font-size: 22px;
    letter-spacing: -0.03em;
}


.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}


.topbar-add-button {
    min-height: 48px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    padding: 0 17px;

    border-radius: 15px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-2)
        );

    color: white;

    font-weight: 700;

    box-shadow:
        0 10px 24px rgba(94, 139, 255, 0.22);
}


.topbar-add-button svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}


/* =========================================================
   CONTENT
========================================================= */

.app-content {
    width: 100%;
    max-width: 1500px;

    margin: 0 auto;

    padding:
        34px
        34px
        70px;
}


/* =========================================================
   REUSABLE UI
========================================================= */

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;

    margin-bottom: 28px;
}


.page-header-copy {
    max-width: 760px;
}


.page-eyebrow {
    margin-bottom: 8px;

    color: var(--primary-2);

    font-size: 13px;
    font-weight: 800;

    letter-spacing: 0.08em;
    text-transform: uppercase;
}


.page-title {
    margin: 0;

    font-size: clamp(34px, 5vw, 64px);
    line-height: 0.98;

    letter-spacing: -0.055em;
}


.page-subtitle {
    margin: 14px 0 0;

    max-width: 720px;

    color: var(--muted);

    font-size: 16px;
    line-height: 1.6;
}


.card {
    position: relative;

    border: 1px solid var(--border);

    border-radius: var(--radius-lg);

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.055),
            rgba(255, 255, 255, 0.025)
        );

    box-shadow: var(--shadow);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}


.card-inner {
    padding: 24px;
}


.grid {
    display: grid;
    gap: 20px;
}


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


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


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


.section-title {
    margin: 0 0 16px;

    font-size: 20px;

    letter-spacing: -0.03em;
}


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


.badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    min-height: 30px;

    padding: 0 10px;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 700;
}


.badge-primary {
    background: rgba(124, 92, 255, 0.14);
    color: #b9abff;
}


.badge-success {
    background: rgba(45, 212, 191, 0.12);
    color: #6ee7d4;
}


.badge-warning {
    background: rgba(251, 191, 36, 0.11);
    color: #fcd66e;
}


/* =========================================================
   FORM CONTROLS
========================================================= */

.form-card {
    max-width: 860px;
}


.form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;
}


.form-group {
    display: flex;
    flex-direction: column;
    gap: 9px;
}


.form-group.full {
    grid-column: 1 / -1;
}


.form-label {
    color: var(--text-soft);

    font-size: 13px;
    font-weight: 700;
}


.form-control {
    width: 100%;
    min-height: 56px;

    padding: 0 16px;

    border: 1px solid var(--border-strong);

    border-radius: 16px;

    outline: none;

    color: var(--text);

    background: rgba(255, 255, 255, 0.045);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


textarea.form-control {
    min-height: 120px;
    padding-top: 14px;
    resize: vertical;
}


.form-control:focus {
    border-color: rgba(124, 92, 255, 0.65);

    background: rgba(255, 255, 255, 0.065);

    box-shadow:
        0 0 0 4px rgba(124, 92, 255, 0.10);
}


.form-hint {
    margin-top: -2px;

    color: var(--muted);

    font-size: 12px;
    line-height: 1.45;
}


.primary-button {
    min-height: 54px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    padding: 0 20px;

    border: 0;
    border-radius: 16px;

    cursor: pointer;

    color: white;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-2)
        );

    font-weight: 800;

    box-shadow:
        0 12px 28px rgba(94, 139, 255, 0.22);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.primary-button:hover {
    transform: translateY(-1px);

    box-shadow:
        0 16px 32px rgba(94, 139, 255, 0.28);
}


.secondary-button {
    min-height: 52px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 18px;

    border-radius: 16px;

    border: 1px solid var(--border-strong);

    background: rgba(255, 255, 255, 0.04);

    color: var(--text);

    font-weight: 700;
}


/* =========================================================
   CHOICE CARDS
========================================================= */

.choice-stack {
    display: grid;
    gap: 12px;
}


.choice-card {
    position: relative;

    display: flex;
    align-items: center;
    gap: 14px;

    min-height: 62px;

    padding: 14px 16px;

    border: 1px solid var(--border);

    border-radius: 18px;

    background: rgba(255, 255, 255, 0.035);

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}


.choice-card:hover {
    transform: translateY(-1px);
    border-color: rgba(124, 92, 255, 0.4);
}


.choice-card input {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}


.choice-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
}


.choice-copy strong {
    font-size: 15px;
}


.choice-copy span {
    color: var(--muted);
    font-size: 12px;
}


/* =========================================================
   MOBILE NAV
========================================================= */

.mobile-bottom-nav,
.mobile-fab {
    display: none;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1100px) {

    :root {
        --sidebar-width: 240px;
    }


    .app-content {
        padding-left: 24px;
        padding-right: 24px;
    }


    .app-topbar {
        padding-left: 24px;
        padding-right: 24px;
    }


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

}


@media (max-width: 820px) {

    body {
        padding-bottom:
            calc(90px + var(--safe-bottom));
    }


    .app-sidebar {
        display: none;
    }


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


    .app-topbar {
        height: 76px;

        padding:
            0
            18px;

        border-bottom: 1px solid var(--border);
    }


    .mobile-brand {
        display: block;
    }


    .topbar-title .eyebrow {
        display: none;
    }


    .topbar-title strong {
        font-size: 18px;
    }


    .topbar-add-button {
        display: none;
    }


    .app-content {
        padding:
            22px
            16px
            calc(120px + var(--safe-bottom));
    }


    .page-header {
        align-items: flex-start;
        flex-direction: column;

        margin-bottom: 22px;
    }


    .page-title {
        font-size: clamp(36px, 11vw, 52px);
    }


    .page-subtitle {
        font-size: 15px;
    }


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


    .form-group.full {
        grid-column: auto;
    }


    .card {
        border-radius: 22px;
    }


    .card-inner {
        padding: 19px;
    }


    /* ------------------------------
       MOBILE BOTTOM NAV
    ------------------------------ */

    .mobile-bottom-nav {
        position: fixed;

        left: 12px;
        right: 12px;
        bottom:
            calc(10px + var(--safe-bottom));

        z-index: 150;

        min-height: 70px;

        display: grid;

        grid-template-columns:
            repeat(3, 1fr);

        padding: 7px;

        border: 1px solid var(--border-strong);

        border-radius: 24px;

        background: rgba(20, 28, 55, 0.9);

        box-shadow:
            0 20px 50px rgba(0, 0, 0, 0.38);

        backdrop-filter: blur(26px);
        -webkit-backdrop-filter: blur(26px);
    }


    .mobile-nav-item {
        min-height: 56px;

        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;

        gap: 4px;

        border-radius: 18px;

        color: var(--muted);

        font-size: 11px;
        font-weight: 700;

        transition:
            background 0.2s ease,
            color 0.2s ease;
    }


    .mobile-nav-item svg {
        width: 22px;
        height: 22px;
        fill: currentColor;
    }


    .mobile-nav-item.active {
        color: white;

        background:
            linear-gradient(
                135deg,
                rgba(124, 92, 255, 0.22),
                rgba(94, 139, 255, 0.13)
            );
    }


    /* ------------------------------
       FLOATING ADD BUTTON
    ------------------------------ */

    .mobile-fab {
        position: fixed;

        right: 22px;
        bottom:
            calc(96px + var(--safe-bottom));

        z-index: 155;

        width: 58px;
        height: 58px;

        display: grid;
        place-items: center;

        border-radius: 20px;

        background:
            linear-gradient(
                135deg,
                var(--primary),
                var(--primary-2)
            );

        color: white;

        box-shadow:
            0 16px 34px rgba(94, 139, 255, 0.35);
    }


    .mobile-fab svg {
        width: 27px;
        height: 27px;
        fill: currentColor;
    }

}


@media (max-width: 520px) {

    .app-topbar {
        padding-left: 14px;
        padding-right: 14px;
    }


    .app-content {
        padding-left: 13px;
        padding-right: 13px;
    }


    .page-title {
        font-size: 40px;
    }


    .form-control {
        min-height: 58px;
        border-radius: 15px;
    }


    .primary-button,
    .secondary-button {
        width: 100%;
    }


    .mobile-bottom-nav {
        left: 9px;
        right: 9px;
        bottom:
            calc(8px + var(--safe-bottom));
    }

}

/* =========================================================
   CONTACT FORM — APP EXPERIENCE
   ========================================================= */

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}


.form-card {
    width: 100%;
    max-width: 900px;
}


.form-section-heading {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 24px;
}


.form-icon {
    width: 48px;
    height: 48px;

    flex: 0 0 auto;

    display: grid;
    place-items: center;

    border-radius: 16px;

    background:
        linear-gradient(
            135deg,
            rgba(124, 92, 255, 0.20),
            rgba(94, 139, 255, 0.12)
        );

    border: 1px solid rgba(124, 92, 255, 0.20);

    font-size: 21px;
}


.form-section-heading .section-title {
    margin: 0;
}


.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}


.form-field label {
    color: var(--text-soft);

    font-size: 13px;
    font-weight: 700;
}


.optional {
    margin-left: 6px;

    color: var(--muted);

    font-size: 11px;
    font-weight: 500;
}


.form-field input {
    width: 100%;
    min-height: 58px;

    padding: 0 16px;

    border: 1px solid var(--border-strong);
    border-radius: 16px;

    outline: none;

    background: rgba(255, 255, 255, 0.045);

    color: var(--text);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


.form-field input::placeholder {
    color: rgba(143, 160, 189, 0.55);
}


.form-field input:focus {
    border-color: rgba(124, 92, 255, 0.65);

    background: rgba(255, 255, 255, 0.065);

    box-shadow:
        0 0 0 4px rgba(124, 92, 255, 0.10);
}


.form-field input[type="date"] {
    color-scheme: dark;

    cursor: pointer;
}


.form-field input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0.8;
    cursor: pointer;
}


/* =========================================================
   DATE CARD
   ========================================================= */

.date-card {
    display: grid;

    grid-template-columns:
        auto
        minmax(0, 1fr)
        minmax(210px, 250px);

    align-items: center;

    gap: 16px;

    padding: 17px;

    border: 1px solid var(--border);

    border-radius: 20px;

    background: rgba(255, 255, 255, 0.035);
}


.date-card-icon {
    width: 48px;
    height: 48px;

    display: grid;
    place-items: center;

    border-radius: 15px;

    background: rgba(255, 255, 255, 0.06);

    font-size: 21px;
}


.date-card-content {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 4px;
}


.date-card-content label {
    font-size: 15px;
    font-weight: 800;
}


.field-help {
    color: var(--muted);

    font-size: 12px;
    line-height: 1.4;
}


/* =========================================================
   NAME DAY RESULT
   ========================================================= */

.name-day-result,
.name-day-live {
    margin-top: 18px;

    padding: 18px;

    border-radius: 22px;

    border: 1px solid rgba(124, 92, 255, 0.20);

    background:
        linear-gradient(
            135deg,
            rgba(124, 92, 255, 0.09),
            rgba(94, 139, 255, 0.035)
        );
}


.name-day-live[hidden] {
    display: none;
}


.name-day-live {
    overflow: hidden;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        opacity 0.2s ease;
}


.name-day-live .result-header:last-child {
    margin-bottom: 0;
}


.name-day-live.is-empty {
    border-color: var(--border);

    background: rgba(255, 255, 255, 0.025);
}


.name-day-live.is-error {
    border-color: rgba(251, 113, 133, 0.24);

    background: rgba(251, 113, 133, 0.055);
}


.name-day-live.is-error .result-icon {
    background: rgba(251, 113, 133, 0.12);
}


.name-day-live .result-icon.is-loading {
    animation: name-day-pulse 1.1s ease-in-out infinite;
}


@keyframes name-day-pulse {
    0%,
    100% {
        opacity: 0.55;
        transform: scale(0.94);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* =========================================================
   COMMUNICATION ASSISTANT / WISHES
========================================================= */

.nav-emoji,
.mobile-nav-emoji {
    font-size: 20px;
    line-height: 1;
}

.today-celebrations {
    overflow: hidden;
}

.today-celebrations::before {
    content: "";

    position: absolute;
    inset: 0 auto 0 0;

    width: 4px;

    background: linear-gradient(
        180deg,
        var(--success),
        var(--primary)
    );
}

.today-celebrations-heading,
.communication-progress-copy,
.communication-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.today-celebrations-heading h2 {
    margin: 18px 0 0;

    font-size: clamp(34px, 5vw, 54px);
    letter-spacing: -0.05em;
}

.today-status-counts {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 7px;
}

.today-status-counts strong {
    color: #a99aff;
}

.today-status-counts span {
    color: #6ee7d4;
}

.dashboard-celebrant-preview {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;

    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.dashboard-celebrant-preview > a {
    min-width: 190px;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 16px;

    background: rgba(255, 255, 255, 0.035);
}

.dashboard-celebrant-preview > a > span:last-child,
.dashboard-upcoming-item > span:nth-child(2) {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 3px;
}

.dashboard-celebrant-preview strong,
.dashboard-celebrant-preview small,
.dashboard-upcoming-item strong,
.dashboard-upcoming-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-celebrant-preview small,
.dashboard-upcoming-item small {
    color: var(--muted);
    font-size: 11px;
}

.dashboard-more-celebrants {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.today-primary-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;

    margin-top: 22px;
}

.dashboard-no-celebrations {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;

    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.dashboard-no-celebrations > span {
    font-size: 30px;
}

.dashboard-no-celebrations > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dashboard-no-celebrations small {
    color: var(--muted);
}

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

    margin-top: 18px;
}

.dashboard-quick-card {
    min-width: 0;
    min-height: 86px;

    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;

    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 21px;

    background: rgba(255, 255, 255, 0.035);
}

.dashboard-quick-card > span {
    width: 48px;
    height: 48px;

    display: grid;
    place-items: center;

    border-radius: 15px;
    background: rgba(124, 92, 255, 0.13);

    font-size: 21px;
}

.dashboard-quick-card > div {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dashboard-quick-card small {
    color: var(--muted);
}

.dashboard-quick-card em {
    color: var(--muted);
    font-size: 20px;
    font-style: normal;
}

.dashboard-upcoming {
    margin-top: 32px;
    scroll-margin-top: 110px;
}

.communication-section-heading {
    margin-bottom: 15px;
}

.communication-section-heading h2 {
    margin: 0;

    font-size: 26px;
    letter-spacing: -0.035em;
}

.communication-section-heading > span {
    min-width: 42px;
    min-height: 42px;

    display: grid;
    place-items: center;

    border: 1px solid var(--border);
    border-radius: 14px;

    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.04);

    font-weight: 800;
}

.dashboard-upcoming-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-upcoming-item {
    min-width: 0;
    min-height: 74px;

    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;

    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 18px;

    background: rgba(255, 255, 255, 0.03);
}

.dashboard-upcoming-item time {
    color: #b9abff;
    font-size: 13px;
    font-weight: 800;
}

.dashboard-upcoming-empty strong,
.dashboard-upcoming-empty span {
    display: block;
}

.dashboard-upcoming-empty span {
    margin-top: 5px;
}

.celebration-avatar {
    width: 44px;
    height: 44px;

    flex: 0 0 auto;

    display: grid;
    place-items: center;

    border-radius: 14px;

    color: white;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));

    font-size: 15px;
    font-weight: 850;
}

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

.wishes-overview-card {
    min-height: 230px;

    display: flex;
    align-items: flex-start;
    flex-direction: column;

    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 25px;

    background: rgba(255, 255, 255, 0.035);
    box-shadow: var(--shadow);
}

.wishes-overview-card.today {
    border-color: rgba(45, 212, 191, 0.25);
    background: linear-gradient(
        145deg,
        rgba(45, 212, 191, 0.11),
        rgba(124, 92, 255, 0.09)
    );
}

.wishes-overview-card > span {
    color: var(--text-soft);
    font-weight: 750;
}

.wishes-overview-card strong {
    margin-top: 25px;

    font-size: 58px;
    letter-spacing: -0.06em;
    line-height: 0.9;
}

.wishes-overview-card small {
    margin-top: 7px;

    color: var(--muted);
}

.wishes-overview-card em {
    margin-top: auto;

    color: #b9abff;
    font-size: 13px;
    font-style: normal;
    font-weight: 750;
}

.wishes-guidance {
    margin-top: 18px;
}

.wishes-guidance h2 {
    margin: 18px 0 8px;
}

.wishes-guidance p {
    margin: 0;
    max-width: 760px;
}

.communication-progress {
    margin-bottom: 24px;
}

.communication-progress-copy strong,
.communication-progress-copy span {
    display: block;
}

.communication-progress-copy strong {
    font-size: 20px;
}

.communication-progress-copy > span {
    color: var(--muted);
    font-weight: 750;
}

.communication-progress-track {
    height: 10px;

    overflow: hidden;
    margin-top: 17px;
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.07);
}

.communication-progress-track span {
    width: 0;
    height: 100%;

    display: block;

    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), var(--success));

    transition: width 0.35s ease;
}

.communication-progress.compact {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.035);
}

.all-complete-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    margin-bottom: 24px;
    padding: 18px 20px;
    border: 1px solid rgba(45, 212, 191, 0.30);
    border-radius: 20px;

    color: #a7f3e7;
    background: rgba(45, 212, 191, 0.10);
}

.all-complete-banner[hidden] {
    display: none;
}

.communication-section {
    margin-top: 30px;
}

.completed-section {
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.celebration-contact-list {
    display: grid;
    gap: 12px;
}

.celebration-contact-card {
    min-width: 0;

    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;

    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 22px;

    background: rgba(255, 255, 255, 0.035);

    transition:
        border-color 0.25s ease,
        background 0.25s ease,
        opacity 0.25s ease;
}

.celebration-contact-card.is-completed {
    border-color: rgba(45, 212, 191, 0.18);
    background: rgba(45, 212, 191, 0.045);
}

.celebration-contact-main {
    min-width: 0;

    display: grid;
    gap: 10px;
}

.celebration-contact-identity {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 12px;
}

.celebration-contact-identity > span:last-child {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 4px;
}

.celebration-contact-identity strong {
    overflow: hidden;

    font-size: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.celebration-contact-identity small {
    color: #f5cc76;
    font-size: 12px;
}

.celebration-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;

    padding-left: 56px;
}

.celebration-tags span {
    padding: 4px 8px;
    border: 1px solid rgba(124, 92, 255, 0.25);
    border-radius: 999px;

    color: #c7bcff;
    background: rgba(124, 92, 255, 0.09);

    font-size: 10px;
    font-weight: 750;
}

.communication-status {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;

    padding-left: 56px;

    color: #7ce9da;
    font-size: 12px;
}

.communication-status.is-completed {
    color: #d1fae5;
}

.communication-actions {
    width: min(100%, 390px);

    display: grid;
    gap: 10px;
}

.communication-launchers {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.communication-action-button,
.communication-confirm-button {
    min-height: 50px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 16px;
    border: 1px solid var(--border-strong);
    border-radius: 15px;

    color: var(--text);
    background: rgba(255, 255, 255, 0.045);

    font-weight: 800;
    cursor: pointer;
}

.communication-action-button.sms {
    color: #c7bcff;
    border-color: rgba(124, 92, 255, 0.32);
    background: rgba(124, 92, 255, 0.10);
}

.communication-action-button.call {
    color: #7ce9da;
    border-color: rgba(45, 212, 191, 0.30);
    background: rgba(45, 212, 191, 0.08);
}

.communication-action-button.email {
    color: #f5cc76;
    border-color: rgba(251, 191, 36, 0.26);
    background: rgba(251, 191, 36, 0.07);
}

.communication-confirm {
    display: grid;
    justify-items: end;
    gap: 8px;

    padding: 11px;
    border: 1px solid rgba(124, 92, 255, 0.24);
    border-radius: 16px;

    background: rgba(124, 92, 255, 0.08);
}

.communication-confirm[hidden] {
    display: none;
}

.communication-confirm > span {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
    text-align: right;
}

.communication-confirm-button {
    color: white;
    border-color: transparent;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.communication-confirm-button:disabled {
    opacity: 0.65;
    cursor: wait;
}

.communication-confirm.is-error {
    border-color: rgba(251, 113, 133, 0.34);
    background: rgba(251, 113, 133, 0.07);
}

.communication-complete-note {
    justify-self: end;

    color: #7ce9da;
    font-size: 12px;
    font-weight: 750;
}

.communication-section-empty {
    margin: 0;
    padding: 24px;
    border: 1px dashed var(--border-strong);
    border-radius: 18px;

    color: var(--muted);
    text-align: center;
}

.communication-section-empty[hidden] {
    display: none;
}

.wishes-empty-state .card-inner {
    display: grid;
    justify-items: center;
    gap: 10px;

    padding-block: 48px;
    text-align: center;
}

.wishes-empty-state h2,
.wishes-empty-state p {
    margin: 0;
}

.wishes-empty-state p {
    margin-bottom: 10px;
}

.wishes-empty-icon {
    font-size: 42px;
}

.assistant-shell {
    width: min(100%, 780px);
    margin-inline: auto;
}

.assistant-heading {
    margin-bottom: 20px;
    text-align: center;
}

.assistant-back {
    display: inline-flex;

    margin-bottom: 25px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.assistant-heading h1 {
    margin: 6px 0 0;

    font-size: clamp(30px, 6vw, 46px);
    letter-spacing: -0.05em;
}

.assistant-card-wrap .celebration-contact-card {
    grid-template-columns: 1fr;

    padding: 24px;
    border-radius: 27px;
    box-shadow: var(--shadow);
}

.assistant-card-wrap .celebration-avatar {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    font-size: 21px;
}

.assistant-card-wrap .celebration-contact-identity strong {
    font-size: 24px;
}

.assistant-card-wrap .celebration-tags,
.assistant-card-wrap .communication-status {
    padding-left: 76px;
}

.assistant-card-wrap .communication-actions {
    width: 100%;
}

.assistant-card-wrap .communication-launchers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.assistant-card-wrap .communication-action-button.email:last-child {
    grid-column: 1 / -1;
}

.assistant-completed-message,
.assistant-finished {
    display: grid;
    justify-items: center;
    gap: 15px;

    margin-top: 18px;
    padding: 22px;
    border: 1px solid rgba(45, 212, 191, 0.25);
    border-radius: 22px;

    color: #a7f3e7;
    background: rgba(45, 212, 191, 0.08);
    text-align: center;
}

.assistant-completed-message[hidden] {
    display: none;
}

.assistant-finished {
    padding-block: 50px;
}

.assistant-finished > span {
    font-size: 48px;
}

.assistant-finished h1 {
    margin: 0;
}

.assistant-finished > strong {
    font-size: 26px;
}

@media (max-width: 920px) {
    .today-primary-actions,
    .wishes-overview-grid {
        grid-template-columns: 1fr;
    }

    .wishes-overview-card {
        min-height: 190px;
    }

    .celebration-contact-card {
        grid-template-columns: 1fr;
    }

    .communication-actions {
        width: 100%;
    }

    .communication-launchers {
        justify-content: flex-start;
    }

    .communication-complete-note {
        justify-self: start;
        padding-left: 56px;
    }
}

@media (max-width: 820px) {
    .mobile-bottom-nav {
        grid-template-columns: repeat(4, 1fr);
    }

    .dashboard-upcoming-list,
    .dashboard-quick-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .today-celebrations-heading,
    .communication-progress-copy {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .today-status-counts {
        align-items: flex-start;
    }

    .dashboard-no-celebrations {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .dashboard-no-celebrations .secondary-button {
        grid-column: 1 / -1;
    }

    .dashboard-celebrant-preview {
        display: grid;
    }

    .dashboard-celebrant-preview > a {
        min-width: 0;
    }

    .celebration-contact-card {
        padding: 14px;
        border-radius: 19px;
    }

    .celebration-contact-identity {
        align-items: flex-start;
    }

    .celebration-contact-identity small {
        white-space: normal;
    }

    .celebration-tags,
    .communication-status,
    .assistant-card-wrap .celebration-tags,
    .assistant-card-wrap .communication-status,
    .communication-complete-note {
        padding-left: 0;
    }

    .communication-launchers,
    .assistant-card-wrap .communication-launchers {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        display: grid;
    }

    .communication-action-button {
        width: 100%;
        padding-inline: 10px;
    }

    .communication-confirm {
        justify-items: stretch;
    }

    .communication-confirm > span {
        text-align: left;
    }

    .communication-confirm-button {
        width: 100%;
    }

    .assistant-card-wrap .celebration-contact-card {
        padding: 17px;
        border-radius: 22px;
    }

    .assistant-card-wrap .celebration-avatar {
        width: 54px;
        height: 54px;
        border-radius: 17px;
    }

    .assistant-card-wrap .celebration-contact-identity strong {
        font-size: 20px;
    }
}

/* =========================================================
   CONTACT BROWSER
========================================================= */

.contact-browser-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.contact-browser-add {
    flex: 0 0 auto;
}

.contact-browser-controls {
    position: relative;
    z-index: 2;

    display: grid;
    gap: 14px;

    margin-bottom: 18px;
    padding: 18px;

    border: 1px solid var(--border);
    border-radius: 24px;

    background: rgba(18, 23, 40, 0.86);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(18px);
}

.contact-search {
    min-width: 0;
    min-height: 58px;

    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;

    padding: 0 10px 0 17px;

    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 18px;

    background: rgba(255, 255, 255, 0.055);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.contact-search:focus-within {
    border-color: rgba(124, 92, 255, 0.72);
    background: rgba(255, 255, 255, 0.075);
    box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.12);
}

.contact-search-icon {
    font-size: 19px;
}

.contact-search input {
    width: 100%;
    min-width: 0;

    padding: 0;
    border: 0;
    outline: 0;

    color: var(--text);
    background: transparent;

    font: inherit;
    font-size: 16px;
}

.contact-search input::placeholder {
    color: var(--muted);
}

.contact-search-clear {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    padding: 0;
    border: 0;
    border-radius: 13px;

    color: var(--muted);
    background: rgba(255, 255, 255, 0.07);

    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.contact-search-clear[hidden] {
    display: none;
}

.contact-search-clear:hover,
.contact-search-clear:focus-visible {
    color: var(--text);
    background: rgba(255, 255, 255, 0.12);
}

.contact-filter-chips {
    min-width: 0;

    display: flex;
    gap: 9px;

    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 1px 1px 5px;
    scrollbar-width: thin;
}

.contact-filter-chip {
    min-height: 44px;

    flex: 0 0 auto;

    padding: 0 17px;
    border: 1px solid var(--border);
    border-radius: 999px;

    color: var(--muted);
    background: rgba(255, 255, 255, 0.035);

    font: inherit;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;

    transition:
        border-color 0.2s ease,
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.contact-filter-chip:hover,
.contact-filter-chip:focus-visible {
    color: var(--text);
    border-color: rgba(124, 92, 255, 0.42);
}

.contact-filter-chip.is-active {
    color: white;
    border-color: rgba(124, 92, 255, 0.62);
    background: linear-gradient(
        135deg,
        rgba(124, 92, 255, 0.84),
        rgba(83, 69, 218, 0.82)
    );
    box-shadow: 0 9px 22px rgba(124, 92, 255, 0.18);
}

.contact-browser-card .card-inner {
    min-width: 0;
}

.contact-results-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    margin-bottom: 20px;
}

.contact-results-heading .section-title {
    margin-bottom: 0;
}

.contact-results-status {
    max-width: 320px;

    color: var(--muted);

    font-size: 12px;
    text-align: right;
}

.contact-browser-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.contact-results {
    min-width: 0;

    transition: opacity 0.18s ease;
}

.contact-results.is-loading {
    opacity: 0.48;
    pointer-events: none;
}

.contact-card-grid {
    display: grid;
    gap: 12px;
}

.contact-list-main {
    min-height: 112px;
}

.contact-card-categories,
.contact-card-details {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;

    overflow: visible;

    white-space: normal;
}

.contact-list-copy .contact-card-category {
    display: inline-flex;
    align-items: center;

    overflow: visible;
    padding: 3px 8px;
    border: 1px solid rgba(124, 92, 255, 0.28);
    border-radius: 999px;

    color: #c7bcff;
    background: rgba(124, 92, 255, 0.10);

    font-size: 10px;
    font-weight: 750;
    line-height: 1.2;
    white-space: normal;
}

.contact-list-copy .contact-card-details {
    color: var(--muted);
}

.contact-list-copy .contact-card-details > span {
    min-width: 0;
    max-width: 100%;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-list-copy .contact-card-occasion {
    color: #f5cc76;
}

.contact-results-empty {
    display: grid;
    justify-items: center;
    gap: 10px;

    padding: 50px 12px;

    text-align: center;
}

.contact-results-empty h3,
.contact-results-empty p {
    margin: 0;
}

.contact-results-empty p {
    max-width: 560px;
    margin-bottom: 10px;
}

.contact-empty-icon {
    width: 64px;
    height: 64px;

    display: grid;
    place-items: center;

    margin-bottom: 4px;
    border-radius: 20px;

    background: rgba(255, 255, 255, 0.055);

    font-size: 24px;
}

@media (max-width: 720px) {
    .contact-browser-header {
        align-items: stretch;
        flex-direction: column;
    }

    .contact-browser-add {
        align-self: flex-start;
    }

    .contact-browser-header-actions {
        justify-content: flex-start;
    }

    .contact-browser-controls {
        padding: 13px;
        border-radius: 20px;
    }

    .contact-results-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .contact-results-status {
        max-width: none;
        text-align: left;
    }
}

/* =========================================================
   VCARD IMPORT CENTER
========================================================= */

.contact-import-header { align-items: flex-end; }
.contact-import-alert,
.contact-import-success { display: grid; gap: 4px; margin-bottom: 18px; padding: 15px 17px; border: 1px solid rgba(251, 113, 133, .30); border-radius: 16px; color: #fecdd3; background: rgba(251, 113, 133, .08); }
.contact-import-success { border-color: rgba(45, 212, 191, .28); color: #99f6e4; background: rgba(45, 212, 191, .08); }
.contact-import-intro-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 16px; }
.contact-import-upload .card-inner,
.contact-import-help .card-inner,
.contact-import-google .card-inner { display: grid; gap: 16px; height: 100%; }
.contact-import-upload h2,
.contact-import-help h2,
.contact-import-history h2 { margin: 0; }
.contact-import-upload form { display: grid; gap: 16px; }
.contact-import-file { min-width: 0; display: grid; gap: 9px; padding: 18px; border: 1px dashed rgba(124, 92, 255, .42); border-radius: 17px; background: rgba(124, 92, 255, .055); }
.contact-import-file > span { color: var(--text-soft); font-weight: 750; }
.contact-import-file input { min-width: 0; max-width: 100%; color: var(--text-soft); }
.contact-import-file input::file-selector-button { min-height: 42px; margin-right: 10px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 12px; color: var(--text); background: rgba(255, 255, 255, .06); cursor: pointer; }
.contact-import-file small,
.contact-import-help p { color: var(--muted); line-height: 1.55; }
.contact-import-help ol { display: grid; gap: 12px; margin: 0; padding-left: 23px; color: var(--text-soft); line-height: 1.5; }
.contact-import-help { grid-column: 1 / -1; }
.contact-import-google .card-inner { align-content: start; }
.contact-import-google-mark { width: 54px; height: 54px; display: grid; place-items: center; border: 1px solid rgba(66, 133, 244, .35); border-radius: 17px; color: #dce8ff; background: linear-gradient(135deg, rgba(66, 133, 244, .22), rgba(52, 168, 83, .12)); font-size: 23px; font-weight: 850; }
.contact-import-google h2 { margin: 5px 0 8px; }
.contact-import-google p,
.contact-import-google small { margin: 0; color: var(--muted); line-height: 1.55; }
.secondary-button.is-disabled { cursor: not-allowed; opacity: .55; }
.contact-import-preview,
.contact-import-history { margin-top: 22px; }
.contact-import-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.contact-import-section-head h2 { margin: 5px 0 0; }
.contact-import-section-head > span { color: #99f6e4; font-size: 12px; }
.contact-import-summary { display: grid; grid-template-columns: repeat(7, minmax(110px, 1fr)); gap: 9px; margin-bottom: 16px; }
.contact-import-summary > div { min-width: 0; display: grid; gap: 3px; padding: 13px; border: 1px solid var(--border); border-radius: 14px; background: rgba(255, 255, 255, .03); }
.contact-import-summary strong { font-size: 22px; }
.contact-import-summary span { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.contact-import-records { display: grid; gap: 11px; }
.contact-import-record { min-width: 0; padding: 17px; border: 1px solid var(--border); border-radius: 17px; background: rgba(255, 255, 255, .025); }
.contact-import-record.is-duplicate { border-color: rgba(245, 204, 118, .30); background: rgba(245, 204, 118, .04); }
.contact-import-record.is-problem { border-color: rgba(251, 113, 133, .28); background: rgba(251, 113, 133, .04); }
.contact-import-record > header { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.contact-import-record > header > div { min-width: 0; }
.contact-import-record > header span { color: var(--muted); font-size: 11px; }
.contact-import-record h3 { margin: 3px 0 0; overflow-wrap: anywhere; }
.contact-import-record > header > strong { flex: 0 0 auto; color: #f5cc76; font-size: 11px; }
.contact-import-record:not(.is-duplicate):not(.is-problem) > header > strong { color: #99f6e4; }
.contact-import-record.is-problem > header > strong,
.contact-import-problem { color: #fecdd3; }
.contact-import-record-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 14px; margin-top: 12px; }
.contact-import-record-details p,
.contact-import-matches p { min-width: 0; margin: 0; color: var(--text-soft); line-height: 1.5; overflow-wrap: anywhere; }
.contact-import-matches { display: grid; gap: 5px; margin-top: 13px; padding: 12px; border-radius: 13px; background: rgba(5, 9, 20, .34); }
.contact-import-choice { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 14px 0 0; padding: 0; border: 0; }
.contact-import-choice legend { width: 100%; margin-bottom: 3px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.contact-import-choice label { display: inline-flex; align-items: center; gap: 7px; color: var(--text-soft); }
.contact-import-target { display: grid; gap: 7px; margin-top: 13px; color: var(--muted); font-size: 12px; }
.contact-import-submit { display: flex; justify-content: flex-end; margin-top: 16px; }
.contact-import-history-list { display: grid; gap: 0; }
.contact-import-history-list article { min-width: 0; display: grid; grid-template-columns: minmax(180px, .7fr) minmax(0, 1.3fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.contact-import-history-list article:last-child { border-bottom: 0; }
.contact-import-history-list article > div { min-width: 0; display: grid; gap: 4px; }
.contact-import-history-list span,
.contact-import-history-list p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.contact-import-confirm { max-width: 900px; margin-inline: auto; }
.contact-import-confirm .card-inner { display: grid; gap: 20px; }
.contact-import-summary.is-final { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.contact-import-safety-note { padding: 16px; border: 1px solid rgba(45, 212, 191, .24); border-radius: 15px; background: rgba(45, 212, 191, .055); }
.contact-import-safety-note p { margin: 6px 0 0; color: var(--muted); line-height: 1.6; }
.contact-import-confirm-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }

@media (max-width: 1000px) {
    .contact-import-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .contact-import-header { align-items: stretch; flex-direction: column; }
    .contact-import-intro-grid { grid-template-columns: minmax(0, 1fr); }
    .contact-import-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .contact-import-record-details { grid-template-columns: minmax(0, 1fr); }
    .contact-import-history-list article { grid-template-columns: minmax(0, 1fr); gap: 7px; }
}

@media (max-width: 520px) {
    .contact-browser-header-actions { align-items: stretch; flex-direction: column; }
    .contact-browser-header-actions > a { width: 100%; }
    .contact-import-section-head,
    .contact-import-record > header { align-items: flex-start; flex-direction: column; }
    .contact-import-summary,
    .contact-import-summary.is-final { grid-template-columns: minmax(0, 1fr); }
    .contact-import-choice { align-items: flex-start; flex-direction: column; }
    .contact-import-submit > button,
    .contact-import-confirm-actions > * { width: 100%; }
}

@media (max-width: 520px) {
    .contact-browser-controls {
        margin-inline: -2px;
    }

    .contact-search {
        min-height: 56px;
    }

    .contact-filter-chips {
        margin-inline: -3px;
        padding-inline: 3px;
    }

    .contact-filter-chip {
        min-height: 46px;
    }

    .contact-list-main {
        min-height: 106px;
        align-items: flex-start;
    }

    .contact-avatar {
        margin-top: 2px;
    }

    .contact-arrow {
        margin-top: 13px;
    }

    .contact-card-details {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
}


.result-header {
    display: flex;

    align-items: center;

    gap: 13px;

    margin-bottom: 16px;
}


.result-icon {
    width: 42px;
    height: 42px;

    flex: 0 0 auto;

    display: grid;
    place-items: center;

    border-radius: 14px;

    background: rgba(124, 92, 255, 0.16);

    font-size: 18px;
}


.result-header div:last-child {
    display: flex;
    flex-direction: column;
    gap: 3px;
}


.result-header strong {
    font-size: 14px;
}


.result-header span {
    color: var(--muted);

    font-size: 12px;

    line-height: 1.45;
}


.name-day-options {
    display: grid;

    gap: 10px;
}


.name-day-option {
    position: relative;

    display: flex;

    align-items: center;

    gap: 12px;

    min-height: 70px;

    padding: 12px 14px;

    border: 1px solid var(--border);

    border-radius: 17px;

    background: rgba(255, 255, 255, 0.035);

    cursor: pointer;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}


.name-day-option:hover {
    transform: translateY(-1px);

    border-color: rgba(124, 92, 255, 0.40);

    background: rgba(255, 255, 255, 0.055);
}


.name-day-option input {
    position: absolute;

    opacity: 0;

    pointer-events: none;
}


.custom-radio {
    width: 22px;
    height: 22px;

    flex: 0 0 auto;

    border: 2px solid rgba(203, 213, 225, 0.30);

    border-radius: 50%;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.name-day-option input:checked + .custom-radio {
    border-color: var(--primary);

    box-shadow:
        inset 0 0 0 5px var(--bg),
        inset 0 0 0 9px var(--primary);
}


.name-day-option-content {
    min-width: 0;

    display: flex;

    flex-direction: column;

    gap: 3px;
}


.name-day-option-content strong {
    font-size: 15px;
}


.name-day-option-content small {
    color: var(--muted);

    font-size: 11px;
}


.option-arrow {
    margin-left: auto;

    color: var(--muted);

    font-size: 19px;

    transition:
        transform 0.2s ease,
        color 0.2s ease;
}


.name-day-option:hover .option-arrow {
    transform: translateX(3px);

    color: var(--text);
}


.name-day-option:has(input:checked) {
    border-color: rgba(124, 92, 255, 0.60);

    background:
        linear-gradient(
            135deg,
            rgba(124, 92, 255, 0.16),
            rgba(94, 139, 255, 0.07)
        );

    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.12);
}


.name-day-option:has(input:checked) .option-arrow {
    color: var(--primary-2);
}


/* =========================================================
   MANUAL DATE
   ========================================================= */

.manual-date {
    margin-top: 18px;

    padding-top: 18px;

    border-top: 1px solid var(--border);
}


.manual-date-toggle {
    width: 100%;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 12px 14px;

    border: 1px solid transparent;
    border-radius: 16px;

    color: var(--text-soft);
    background: transparent;

    text-align: left;
    cursor: pointer;

    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}


.manual-date-toggle:hover,
.manual-date-toggle:focus-visible {
    color: var(--text);

    border-color: var(--border);
    background: rgba(255, 255, 255, 0.035);

    outline: none;
}


.manual-date-toggle-icon {
    width: 34px;
    height: 34px;

    flex: 0 0 auto;

    display: grid;
    place-items: center;

    border-radius: 11px;

    background: rgba(255, 255, 255, 0.05);

    font-size: 15px;
}


.manual-date-toggle-copy {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 3px;
}


.manual-date-toggle-copy strong {
    font-size: 13px;
    font-weight: 700;
}


.manual-date-toggle-copy small {
    color: var(--muted);

    font-size: 12px;
}


.manual-date-toggle-arrow {
    margin-left: auto;

    color: var(--muted);

    transition: transform 0.2s ease;
}


.manual-date.is-open .manual-date-toggle-arrow {
    transform: rotate(180deg);
}


.manual-date-fields {
    padding: 14px 14px 0;
}


.manual-date-fields[hidden] {
    display: none;
}


.name-day-live.has-selection {
    border-color: rgba(45, 212, 191, 0.34);

    background:
        linear-gradient(
            135deg,
            rgba(45, 212, 191, 0.10),
            rgba(94, 139, 255, 0.035)
        );
}


.name-day-live.has-selection .result-icon {
    background: rgba(45, 212, 191, 0.14);
}


/* =========================================================
   ACTIONS
   ========================================================= */

.form-actions {
    width: 100%;
    max-width: 900px;

    display: flex;

    justify-content: flex-end;

    gap: 12px;

    padding-top: 2px;
}


.save-contact-button {
    min-width: 220px;
}


.save-contact-button span {
    font-size: 18px;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 820px) {

    .contact-form {
        gap: 14px;
    }


    .form-card {
        max-width: none;
    }


    .form-section-heading {
        margin-bottom: 20px;
    }


    .form-icon {
        width: 44px;
        height: 44px;

        border-radius: 14px;
    }


    .date-card {
        grid-template-columns:
            auto
            minmax(0, 1fr);

        gap: 12px;
    }


    .date-card input {
        grid-column: 1 / -1;
    }


    .name-day-result,
    .name-day-live {
        padding: 14px;
    }


    .form-actions {
        max-width: none;

        flex-direction: column-reverse;

        padding-bottom: 8px;
    }


    .save-contact-button {
        width: 100%;

        min-width: 0;
    }

}


@media (max-width: 520px) {

    .form-card .card-inner {
        padding: 17px;
    }


    .form-section-heading {
        gap: 11px;
    }


    .form-section-heading .section-title {
        font-size: 19px;
    }


    .form-field input {
        min-height: 58px;

        border-radius: 15px;

        font-size: 16px;
    }


    .date-card {
        padding: 13px;

        border-radius: 18px;
    }


    .date-card-icon {
        width: 43px;
        height: 43px;
    }


    .name-day-option {
        min-height: 66px;

        padding: 11px 12px;
    }


    .custom-radio {
        width: 21px;
        height: 21px;
    }


    .option-arrow {
        font-size: 17px;
    }

}

/* =========================================================
   CONTACT CATEGORIES
========================================================= */

.category-choices,
.category-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}


.category-choice {
    position: relative;

    min-height: 46px;

    display: inline-flex;
    align-items: center;
    gap: 9px;

    padding: 0 14px;

    border: 1px solid var(--border-strong);
    border-radius: 999px;

    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.035);

    font-size: 13px;
    font-weight: 750;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}


.category-choice:hover {
    transform: translateY(-1px);
    color: var(--text);
    border-color: rgba(124, 92, 255, 0.42);
}


.category-choice.is-locked {
    cursor: default;
}


.category-choice.is-locked:hover {
    transform: none;
}


.category-choice > span:last-child {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}


.category-choice small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
}


.category-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}


.category-choice-check {
    width: 20px;
    height: 20px;

    display: grid;
    place-items: center;

    border: 1px solid rgba(203, 213, 225, 0.30);
    border-radius: 7px;

    color: transparent;

    font-size: 12px;

    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}


.category-choice:has(input:checked) {
    color: white;
    border-color: rgba(124, 92, 255, 0.55);

    background:
        linear-gradient(
            135deg,
            rgba(124, 92, 255, 0.22),
            rgba(94, 139, 255, 0.11)
        );
}


.category-choice input:checked + .category-choice-check {
    color: white;
    border-color: var(--primary);
    background: var(--primary);
}


.add-category-button {
    min-height: 42px;

    margin-top: 14px;
    padding: 0 4px;

    border: 0;

    color: #b9abff;
    background: transparent;

    font-weight: 750;

    cursor: pointer;
}


.add-category-button:hover,
.add-category-button:focus-visible {
    color: white;
    outline: none;
}


.category-creator {
    margin-top: 10px;
    padding: 16px;

    border: 1px solid rgba(124, 92, 255, 0.25);
    border-radius: 18px;

    background: rgba(124, 92, 255, 0.06);
}


.category-creator[hidden] {
    display: none;
}


.category-creator > label {
    display: block;
    margin-bottom: 9px;

    color: var(--text-soft);

    font-size: 13px;
    font-weight: 700;
}


.category-creator-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 9px;
}


.category-creator-row input {
    min-width: 0;
    min-height: 50px;

    padding: 0 15px;

    border: 1px solid var(--border-strong);
    border-radius: 14px;
    outline: none;

    color: var(--text);
    background: rgba(255, 255, 255, 0.045);
}


.category-creator-row input:focus {
    border-color: rgba(124, 92, 255, 0.65);
    box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.10);
}


.category-save-button {
    min-height: 50px;
}


.category-save-button:disabled {
    opacity: 0.55;
    cursor: wait;
}


.category-cancel-button {
    min-height: 50px;

    padding: 0 14px;

    border: 0;

    color: var(--muted);
    background: transparent;

    cursor: pointer;
}


.category-creator-status {
    min-height: 18px;
    margin-top: 8px;

    color: var(--success);

    font-size: 12px;
}


.category-creator-status.is-error {
    color: var(--danger);
}


.category-chip {
    display: inline-flex;
    align-items: center;

    min-height: 32px;
    padding: 0 11px;

    border: 1px solid rgba(124, 92, 255, 0.25);
    border-radius: 999px;

    color: #c8beff;
    background: rgba(124, 92, 255, 0.12);

    font-size: 12px;
    font-weight: 750;
}

/* =========================================================
   CONTACT PROFILE
========================================================= */

.contact-profile-hero .card-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}


.profile-main {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 20px;
}


.profile-avatar {
    width: 86px;
    height: 86px;

    flex: 0 0 auto;

    display: grid;
    place-items: center;

    border-radius: 28px;

    color: white;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-2)
        );

    box-shadow: 0 16px 34px rgba(94, 139, 255, 0.26);

    font-size: 34px;
    font-weight: 850;
}


.profile-copy {
    min-width: 0;
}


.profile-copy h1 {
    margin: 0 0 14px;

    font-size: clamp(30px, 4vw, 48px);
    letter-spacing: -0.05em;
    line-height: 1;
}


.profile-empty-inline {
    color: var(--muted);
    font-size: 13px;
}


.profile-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 9px;
}


.profile-action-button {
    min-height: 52px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 17px;

    border: 1px solid rgba(45, 212, 191, 0.24);
    border-radius: 16px;

    color: #7ce9da;
    background: rgba(45, 212, 191, 0.075);

    font-weight: 750;
}


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

    margin-top: 20px;
}


.profile-history-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;

    margin-top: 20px;
}


.profile-card-heading {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 20px;
}


.profile-card-heading > span {
    width: 42px;
    height: 42px;

    flex: 0 0 auto;

    display: grid;
    place-items: center;

    border-radius: 14px;

    background: rgba(124, 92, 255, 0.13);
}


.profile-card-heading .page-eyebrow {
    margin-bottom: 3px;
}


.profile-card-heading .section-title {
    margin: 0;
}


.profile-data-list {
    display: grid;
    gap: 14px;
}


.profile-data-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;

    padding-bottom: 14px;

    border-bottom: 1px solid var(--border);
}


.profile-data-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}


.profile-data-row > span {
    color: var(--muted);
    font-size: 12px;
}


.profile-data-row > div {
    display: grid;
    gap: 5px;

    text-align: right;
    font-weight: 700;
}


.next-occasion-card .card-inner {
    height: 100%;

    display: flex;
    flex-direction: column;
}


.next-occasion-card .badge {
    align-self: flex-start;
}


.next-occasion-date {
    margin-top: 18px;

    font-size: 27px;
    letter-spacing: -0.035em;
}


.next-occasion-distance {
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
}


.profile-empty-state {
    padding: 18px;

    border: 1px dashed var(--border-strong);
    border-radius: 16px;

    color: var(--muted);
    background: rgba(255, 255, 255, 0.02);

    font-size: 13px;
    line-height: 1.5;
}


.profile-timeline {
    display: grid;
    gap: 16px;
}


.profile-timeline-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
}


.timeline-dot {
    width: 10px;
    height: 10px;

    margin-top: 5px;

    border-radius: 50%;

    background: var(--primary-2);
    box-shadow: 0 0 0 5px rgba(94, 139, 255, 0.10);
}


.profile-timeline-item > div {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 4px;
}


.profile-timeline-item strong {
    font-size: 14px;
}


.profile-timeline-item span,
.profile-timeline-item p {
    margin: 0;

    color: var(--muted);

    font-size: 12px;
    line-height: 1.5;
}


@media (max-width: 1100px) {
    .contact-profile-hero .card-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-actions {
        justify-content: flex-start;
    }

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

    .next-occasion-card {
        grid-column: 1 / -1;
    }
}


@media (max-width: 820px) {
    .category-creator-row,
    .profile-grid,
    .profile-history-grid {
        grid-template-columns: 1fr;
    }

    .next-occasion-card {
        grid-column: auto;
    }

    .category-save-button,
    .category-cancel-button {
        width: 100%;
    }

    .profile-main {
        align-items: flex-start;
    }

    .profile-avatar {
        width: 68px;
        height: 68px;
        border-radius: 22px;
        font-size: 27px;
    }

    .profile-actions {
        width: 100%;
    }
}


@media (max-width: 520px) {
    .category-choice {
        min-height: 44px;
    }

    .category-creator {
        padding: 13px;
    }

    .profile-main {
        width: 100%;
        gap: 14px;
    }

    .profile-copy h1 {
        font-size: 30px;
    }

    .profile-actions > * {
        width: 100%;
    }

    .profile-data-row {
        flex-direction: column;
    }

    .profile-data-row > div {
        text-align: left;
    }
}

/* =========================================================
   APP DATE PICKER
========================================================= */

.app-date-control {
    position: relative;
    width: 100%;
}


.app-date-native {
    width: 100%;
    min-height: 58px;

    padding: 0 15px;

    border: 1px solid var(--border-strong);
    border-radius: 16px;

    color: var(--text);
    background: rgba(255, 255, 255, 0.045);

    color-scheme: dark;
}


.app-date-trigger {
    display: none;
}


.date-picker-ready .app-date-native {
    position: absolute;

    width: 1px;
    height: 1px;

    padding: 0;

    opacity: 0;
    pointer-events: none;
}


.date-picker-ready .app-date-trigger {
    width: 100%;
    min-height: 58px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 0 15px;

    border: 1px solid var(--border-strong);
    border-radius: 16px;
    outline: none;

    color: var(--muted);
    background: rgba(255, 255, 255, 0.045);

    text-align: left;
    cursor: pointer;

    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}


.date-picker-ready .app-date-trigger:hover,
.date-picker-ready .app-date-trigger:focus-visible {
    color: var(--text-soft);
    border-color: rgba(124, 92, 255, 0.58);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.10);
}


.date-picker-ready .app-date-trigger.has-value {
    color: var(--text);
}


.app-date-trigger-value {
    overflow: hidden;

    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.app-date-trigger-icon {
    width: 32px;
    height: 32px;

    flex: 0 0 auto;

    display: grid;
    place-items: center;

    border-radius: 10px;

    color: #b9abff;
    background: rgba(124, 92, 255, 0.12);

    font-size: 13px;
}


body.date-picker-open {
    overflow: hidden;
}


.app-date-picker[hidden],
.date-picker-calendar[hidden],
.date-picker-years[hidden] {
    display: none;
}


.app-date-picker {
    position: fixed;
    inset: 0;

    z-index: 400;

    display: grid;
    place-items: center;

    padding: 20px;
}


.date-picker-backdrop {
    position: absolute;
    inset: 0;

    border: 0;

    background: rgba(3, 7, 18, 0.74);

    cursor: default;

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}


.date-picker-sheet {
    position: relative;

    width: min(100%, 480px);
    max-height: min(780px, calc(100vh - 40px));

    overflow: hidden;

    display: flex;
    flex-direction: column;

    padding: 22px;

    border: 1px solid var(--border-strong);
    border-radius: 28px;

    color: var(--text);
    background:
        linear-gradient(
            180deg,
            rgba(28, 39, 72, 0.99),
            rgba(15, 22, 43, 0.99)
        );

    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);

    animation: date-picker-enter 0.22s ease-out;
}


@keyframes date-picker-enter {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

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


.date-picker-handle {
    display: none;
}


.date-picker-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}


.date-picker-eyebrow {
    color: var(--primary-2);

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}


.date-picker-topbar h2 {
    margin: 4px 0 0;

    font-size: 22px;
    letter-spacing: -0.035em;
}


.date-picker-close,
.date-picker-nav-button {
    border: 1px solid var(--border);

    display: grid;
    place-items: center;

    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.04);

    cursor: pointer;
}


.date-picker-close {
    width: 42px;
    height: 42px;

    flex: 0 0 auto;

    border-radius: 14px;

    font-size: 25px;
}


.date-picker-navigation {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    align-items: center;
    gap: 10px;

    margin-top: 20px;
}


.date-picker-nav-button {
    width: 48px;
    height: 48px;

    border-radius: 15px;

    font-size: 30px;
}


.date-picker-close:hover,
.date-picker-nav-button:hover {
    color: white;
    border-color: rgba(124, 92, 255, 0.38);
    background: rgba(124, 92, 255, 0.11);
}


.date-picker-period-button {
    min-width: 0;
    min-height: 52px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;

    padding: 5px 12px;

    border: 0;
    border-radius: 15px;

    color: var(--text);
    background: transparent;

    cursor: pointer;
}


.date-picker-period-button:hover,
.date-picker-period-button[aria-expanded="true"] {
    background: rgba(124, 92, 255, 0.10);
}


.date-picker-period-button strong {
    font-size: 17px;
    letter-spacing: -0.025em;
}


.date-picker-period-button small {
    color: var(--muted);
    font-size: 10px;
}


.date-picker-calendar {
    margin-top: 14px;
}


.date-picker-weekdays,
.date-picker-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
}


.date-picker-weekdays {
    margin-bottom: 6px;
}


.date-picker-weekdays span {
    display: grid;
    place-items: center;

    min-height: 28px;

    color: var(--muted);

    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}


.date-picker-day,
.date-picker-day-spacer {
    aspect-ratio: 1;
    min-height: 44px;
}


.date-picker-day {
    position: relative;

    border: 1px solid transparent;
    border-radius: 14px;

    color: var(--text-soft);
    background: transparent;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    transition:
        color 0.16s ease,
        border-color 0.16s ease,
        background 0.16s ease,
        transform 0.16s ease;
}


.date-picker-day:hover {
    transform: translateY(-1px);
    color: white;
    background: rgba(255, 255, 255, 0.055);
}


.date-picker-day.is-today {
    border-color: rgba(45, 212, 191, 0.48);
}


.date-picker-day.is-current-value::after {
    content: "";

    position: absolute;
    left: 50%;
    bottom: 4px;

    width: 4px;
    height: 4px;

    border-radius: 50%;

    background: var(--success);

    transform: translateX(-50%);
}


.date-picker-day.is-draft {
    color: white;
    border-color: transparent;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-2)
        );

    box-shadow: 0 8px 20px rgba(94, 139, 255, 0.25);
}


.date-picker-years {
    min-height: 270px;
    margin-top: 14px;

    overflow: hidden;
}


.date-picker-year-help {
    margin-bottom: 10px;

    color: var(--muted);

    font-size: 12px;
    text-align: center;
}


.date-picker-year-grid {
    max-height: 280px;

    overflow-y: auto;
    overscroll-behavior: contain;

    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;

    padding: 3px 4px 12px;

    scrollbar-width: thin;
    scrollbar-color: rgba(124, 92, 255, 0.45) transparent;
}


.date-picker-year {
    min-height: 46px;

    border: 1px solid var(--border);
    border-radius: 13px;

    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.03);

    font-size: 13px;
    font-weight: 750;

    cursor: pointer;
}


.date-picker-year:hover,
.date-picker-year.is-selected {
    color: white;
    border-color: rgba(124, 92, 255, 0.55);
    background: rgba(124, 92, 255, 0.17);
}


.date-picker-selection {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    margin-top: 14px;
    padding: 12px 14px;

    border: 1px solid var(--border);
    border-radius: 15px;

    background: rgba(255, 255, 255, 0.03);
}


.date-picker-selection span {
    color: var(--muted);
    font-size: 11px;
}


.date-picker-selection strong {
    font-size: 13px;
    text-align: right;
}


.date-picker-actions {
    display: grid;
    grid-template-columns: auto auto minmax(130px, 1fr);
    gap: 8px;

    margin-top: 14px;
}


.date-picker-text-button {
    min-height: 50px;

    padding: 0 12px;

    border: 0;
    border-radius: 14px;

    color: var(--text-soft);
    background: transparent;

    font-size: 12px;
    font-weight: 750;

    cursor: pointer;
}


.date-picker-text-button:hover {
    background: rgba(255, 255, 255, 0.045);
}


.date-picker-text-button.is-danger {
    color: #fda4af;
}


.date-picker-confirm {
    min-height: 50px;
}


@media (max-width: 820px) {
    .date-card .app-date-control {
        grid-column: 1 / -1;
    }

    .app-date-picker {
        align-items: end;

        padding: 0;
    }

    .date-picker-sheet {
        width: 100%;
        max-height: min(92dvh, 820px);

        padding:
            10px
            17px
            calc(16px + var(--safe-bottom));

        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 28px 28px 0 0;

        animation: date-picker-sheet-enter 0.24s ease-out;
    }

    @keyframes date-picker-sheet-enter {
        from {
            transform: translateY(100%);
        }

        to {
            transform: translateY(0);
        }
    }

    .date-picker-handle {
        width: 42px;
        height: 5px;

        display: block;

        margin: 0 auto 9px;

        border-radius: 999px;

        background: rgba(203, 213, 225, 0.25);
    }

    .date-picker-year-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


@media (max-width: 520px) {
    .date-picker-sheet {
        padding-right: 13px;
        padding-left: 13px;
    }

    .date-picker-topbar h2 {
        font-size: 20px;
    }

    .date-picker-navigation {
        grid-template-columns: 46px minmax(0, 1fr) 46px;
        margin-top: 14px;
    }

    .date-picker-nav-button {
        width: 46px;
        height: 46px;
    }

    .date-picker-day,
    .date-picker-day-spacer {
        min-height: 41px;
    }

    .date-picker-day {
        border-radius: 13px;
    }

    .date-picker-selection {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .date-picker-selection strong {
        text-align: left;
    }

    .date-picker-actions {
        grid-template-columns: 1fr 1fr;
    }

    .date-picker-confirm {
        grid-column: 1 / -1;
        grid-row: 1;
    }
}

/* =========================================================
   CONTACT LIST ACTIONS
========================================================= */

.contact-list-card {
    min-width: 0;

    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;

    border: 1px solid var(--border);
    border-radius: 20px;

    background: rgba(255, 255, 255, 0.03);

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}


.contact-list-card:hover {
    transform: translateY(-1px);
    border-color: rgba(124, 92, 255, 0.28);
    background: rgba(255, 255, 255, 0.045);
}


.contact-list-main {
    min-width: 0;
    min-height: 82px;

    display: flex;
    align-items: center;
    gap: 14px;

    padding: 12px 14px;

    border-radius: 19px;
    outline: none;
}


.contact-list-main:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(124, 92, 255, 0.60);
}


.contact-avatar {
    width: 52px;
    height: 52px;

    flex: 0 0 auto;

    display: grid;
    place-items: center;

    border-radius: 17px;

    color: white;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-2)
        );

    font-size: 18px;
    font-weight: 850;
}


.contact-list-copy {
    min-width: 0;

    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 5px;
}


.contact-list-copy strong {
    overflow: hidden;

    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.contact-list-copy span {
    overflow: hidden;

    color: var(--muted);

    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.contact-arrow {
    flex: 0 0 auto;

    color: var(--muted);

    font-size: 20px;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}


.contact-list-main:hover .contact-arrow {
    color: var(--text);
    transform: translateX(3px);
}


.contact-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 14px;
}

.contact-call-action,
.contact-history-action {
    min-width: 104px;
    min-height: 54px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    padding: 0 15px;

    border: 1px solid rgba(45, 212, 191, 0.28);
    border-radius: 16px;
    outline: none;

    color: #7ce9da;
    background: rgba(45, 212, 191, 0.08);

    font-size: 13px;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.contact-history-action {
    min-width: 96px;
    border-color: var(--border-strong);
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.035);
}

.contact-history-action:hover,
.contact-history-action:focus-visible {
    border-color: rgba(124, 92, 255, 0.42);
    color: #d8d0ff;
    background: rgba(124, 92, 255, 0.10);
}

.contact-call-flow {
    grid-column: 1 / -1;
    min-width: 0;
    padding: 0 14px 14px;
}

.contact-call-flow[hidden],
.contact-call-confirm[hidden],
.contact-call-result[hidden] { display: none; }

.contact-call-confirm,
.contact-call-result {
    padding: 18px;
    border: 1px solid rgba(199, 188, 255, 0.20);
    border-radius: 18px;
    background: rgba(12, 17, 34, 0.88);
}

.contact-call-confirm h3 { margin: 0 0 14px; }
.contact-call-confirm > div { display: flex; flex-wrap: wrap; gap: 10px; }
.contact-call-result { display: grid; gap: 18px; }
.contact-call-result fieldset { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.contact-call-result legend { margin-bottom: 9px; color: #eee9ff; font-weight: 750; }
.contact-call-save { width: 100%; }


.contact-call-action:hover,
.contact-call-action:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(45, 212, 191, 0.58);
    background: rgba(45, 212, 191, 0.14);
    box-shadow: 0 10px 24px rgba(45, 212, 191, 0.10);
}


@media (max-width: 520px) {
    .contact-list-card {
        grid-template-columns: 1fr;
    }

    .contact-list-main {
        min-height: 76px;
        padding: 11px 12px;
    }

    .contact-avatar {
        width: 48px;
        height: 48px;
        border-radius: 16px;
    }

    .contact-card-actions {
        margin: 0 12px 12px;
    }

    .contact-call-action,
    .contact-history-action {
        min-width: 0;
        min-height: 50px;
        flex: 1 1 0;
    }

    .contact-call-flow {
        padding: 0 12px 12px;
    }
}

/* =========================================================
   CONTACT COMMUNICATION HISTORY
========================================================= */

.contact-history-header { align-items: flex-end; }
.contact-history-shell { max-width: 980px; margin: 0 auto; }
.contact-history-timeline { display: grid; gap: 16px; }
.contact-history-entry { min-width: 0; display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 14px; }
.contact-history-marker { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid rgba(124, 92, 255, .25); border-radius: 15px; color: #d8d0ff; background: rgba(124, 92, 255, .10); font-size: 19px; }
.contact-history-entry.is-call .contact-history-marker { color: #7ce9da; border-color: rgba(45, 212, 191, .28); background: rgba(45, 212, 191, .08); }
.contact-history-entry.is-callback .contact-history-marker { color: #f5cc76; border-color: rgba(245, 204, 118, .28); background: rgba(245, 204, 118, .08); }
.contact-history-card { min-width: 0; }
.contact-history-card .card-inner { display: grid; gap: 10px; padding: clamp(17px, 3vw, 24px); }
.contact-history-entry-head { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.contact-history-entry-head h2 { margin: 4px 0 0; font-size: 20px; }
.contact-history-entry-head time { flex: 0 0 auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.contact-history-card p { min-width: 0; margin: 0; color: var(--text-soft); line-height: 1.6; overflow-wrap: anywhere; white-space: pre-wrap; }
.contact-history-message { padding: 12px 14px; border-radius: 13px; background: rgba(255, 255, 255, .035); }
.contact-history-source { color: var(--muted) !important; font-size: 12px; }
.contact-history-error { color: #fecdd3 !important; }

@media (max-width: 700px) {
    .contact-history-header { align-items: stretch; flex-direction: column; }
    .contact-history-header > .secondary-button { align-self: flex-start; }
    .contact-history-entry { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .contact-history-marker { width: 40px; height: 40px; border-radius: 13px; }
    .contact-history-entry-head { flex-direction: column; gap: 7px; }
    .contact-history-entry-head time { white-space: normal; }
}

/* =========================================================
   MESSAGE TEMPLATES
========================================================= */

.template-page-header,
.template-form-header {
    align-items: flex-end;
}

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

.message-template-card {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 20px;

    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 24px;

    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.05),
        rgba(255, 255, 255, 0.025)
    );
    box-shadow: var(--shadow);
}

.message-template-card.is-default {
    border-color: rgba(124, 92, 255, 0.22);
}

.message-template-heading {
    min-width: 0;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.message-template-heading > div {
    min-width: 0;
}

.message-template-heading h2 {
    margin: 8px 0 0;

    overflow-wrap: anywhere;

    font-size: 22px;
    letter-spacing: -0.035em;
}

.message-template-type {
    color: var(--muted);

    font-size: 12px;
    font-weight: 750;
}

.system-template-badge,
.custom-template-badge {
    min-height: 30px;

    display: inline-flex;
    align-items: center;

    flex: 0 0 auto;

    padding: 0 10px;
    border-radius: 999px;

    font-size: 10px;
    font-weight: 800;
}

.system-template-badge {
    color: #c7bcff;
    background: rgba(124, 92, 255, 0.12);
}

.custom-template-badge {
    color: #7ce9da;
    background: rgba(45, 212, 191, 0.09);
}

.message-template-card blockquote {
    flex: 1;

    margin: 0;
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 18px;

    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.03);

    font-size: 15px;
    line-height: 1.65;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.message-template-actions,
.message-template-form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

.message-template-actions form {
    margin: 0;
}

.template-delete-button {
    min-height: 52px;

    padding: 0 17px;
    border: 1px solid rgba(251, 113, 133, 0.28);
    border-radius: 16px;

    color: #fda4af;
    background: rgba(251, 113, 133, 0.07);

    font-weight: 750;
    cursor: pointer;
}

.template-alert,
.template-form-errors {
    display: grid;
    gap: 4px;

    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(251, 113, 133, 0.28);
    border-radius: 16px;

    color: #fecdd3;
    background: rgba(251, 113, 133, 0.07);

    font-size: 13px;
}

.message-template-form-card {
    max-width: 820px;
}

.message-template-form {
    display: grid;
    gap: 20px;
}

.template-message-input {
    min-height: 190px;
    padding-block: 15px;

    line-height: 1.6;
}

.template-type-readonly {
    min-height: 56px;

    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 4px;

    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 16px;

    background: rgba(255, 255, 255, 0.035);

    font-weight: 750;
}

.template-type-readonly small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
}

.wish-message-preview {
    display: grid;
    gap: 8px;

    margin-left: 56px;
    padding: 13px 14px;
    border: 1px solid rgba(124, 92, 255, 0.22);
    border-radius: 17px;

    background: rgba(124, 92, 255, 0.07);
}

.wish-message-preview-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.wish-message-preview-heading > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.wish-message-preview-heading button {
    min-height: 38px;

    padding: 0 10px;
    border: 0;
    border-radius: 11px;

    color: #c7bcff;
    background: rgba(124, 92, 255, 0.11);

    font-size: 11px;
    font-weight: 750;
    cursor: pointer;
}

.wish-message-preview > strong {
    font-size: 13px;
}

.wish-message-preview > p {
    margin: 0;

    color: var(--text-soft);

    font-size: 13px;
    line-height: 1.55;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.wish-template-picker {
    display: grid;
    gap: 9px;

    margin-top: 3px;
    padding-top: 11px;
    border-top: 1px solid var(--border);
}

.wish-template-picker[hidden] {
    display: none;
}

.wish-template-picker label {
    display: grid;
    gap: 6px;
}

.wish-template-picker label > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.wish-template-picker select {
    width: 100%;
    min-height: 48px;

    padding: 0 12px;
    border: 1px solid var(--border-strong);
    border-radius: 13px;

    color: var(--text);
    background: var(--panel-solid);
}

.wish-template-picker > a {
    justify-self: start;

    min-height: 38px;
    display: inline-flex;
    align-items: center;

    color: #b9abff;
    font-size: 11px;
    font-weight: 750;
}

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

@media (max-width: 820px) {
    .mobile-bottom-nav {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .mobile-nav-item {
        min-width: 0;
        font-size: 10px;
    }
}

@media (max-width: 620px) {
    .template-page-header,
    .template-form-header {
        align-items: stretch;
    }

    .message-template-card {
        padding: 17px;
        border-radius: 21px;
    }

    .message-template-heading {
        align-items: flex-start;
        flex-direction: column-reverse;
    }

    .message-template-actions {
        display: grid;
        grid-template-columns: 1fr auto;
    }

    .message-template-actions .secondary-button,
    .message-template-actions form,
    .template-delete-button {
        width: 100%;
    }

    .message-template-form-actions {
        display: grid;
    }

    .wish-message-preview,
    .assistant-card-wrap .wish-message-preview {
        margin-left: 0;
    }
}

@media (max-width: 390px) {
    .mobile-bottom-nav {
        left: 8px;
        right: 8px;
        padding-inline: 4px;
    }

    .mobile-nav-item {
        font-size: 9px;
    }
}

/* Contact selection and review retain the existing cards and button styles. */
.selection-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 18px 0; }
.selection-toolbar small { flex-basis: 100%; color: var(--muted); }
.selection-toolbar button { min-height: 44px; white-space: normal; }
.selection-toolbar button:disabled { opacity: .55; cursor: not-allowed; }
.contact-select { display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; }
.contact-list-card > .contact-select { grid-column: 1 / -1; }
.contact-select input { width: 24px; height: 24px; accent-color: var(--primary); }
.contact-notes { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.contact-name-link, .celebration-contact-identity strong { color: #c7bcff; text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }
.contact-name-link:hover, .celebration-contact-identity:hover strong { color: #eee9ff; }
.contact-name-link:focus-visible { outline: 2px solid #c7bcff; outline-offset: 4px; }
.sms-error-detail { overflow-wrap: anywhere; font-size: 13px; line-height: 1.5; }
[data-retry-confirm][hidden] { display: none !important; }
.sms-history-item { padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
textarea.form-control { width: 100%; box-sizing: border-box; resize: vertical; font: inherit; }
.wishes-workflow .dashboard-celebrant-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.wishes-workflow .dashboard-celebrant-preview > a { width: auto; min-height: 140px; padding: 20px; border-radius: 18px; align-items: flex-start; }
.wishes-workflow .dashboard-celebrant-preview > a > span:last-child { display: grid; gap: 8px; min-width: 0; }
.wishes-workflow .dashboard-celebrant-preview strong { font-size: 18px; white-space: normal; overflow-wrap: anywhere; }
.wishes-workflow .dashboard-celebrant-preview small { white-space: normal; line-height: 1.5; }
.wishes-workflow .dashboard-celebrant-preview .dashboard-sms-status { font-size: 14px; font-weight: 700; }
.wishes-workflow .dashboard-celebrant-preview > .dashboard-more-celebrants { min-height: 48px; grid-column: 1 / -1; }
@media (max-width: 620px) {
    .selection-toolbar > button { flex: 1 1 180px; }
}

/* Dashboard and Wishes only: preserve the layout of unrelated pages. */
.wishes-workflow .mobile-fab { display: none; }
.wishes-workflow [hidden] { display: none !important; }
.wishes-workflow .app-content { min-width: 0; }
.wishes-workflow .assistant-back { min-height: 44px; align-items: center; }
.wishes-workflow .workflow-list-link { display: flex; margin-top: 14px; }
.wishes-workflow .dashboard-group-label { margin: 20px 0 0; font-size: 16px; }
.wishes-workflow .dashboard-celebrant-preview { margin-top: 8px; padding-top: 0; border-top: 0; }
.wishes-workflow .communication-progress { margin-top: 18px; }
.wishes-workflow .today-celebrations .communication-progress-copy > span { display: none; }
.wishes-workflow .communication-section-heading h2 { font-size: 21px; }
.wishes-workflow .wish-template-picker { padding-top: 0; border-top: 0; }
.wishes-workflow .wish-template-picker select { min-width: 0; max-width: 100%; font-size: 16px; }
.wishes-workflow .wish-template-picker label > span { font-size: 13px; }
.wishes-workflow .celebration-contact-identity strong { white-space: normal; overflow-wrap: anywhere; }
.wishes-workflow .communication-action-button.is-preferred { order: -1; border-width: 2px; background: rgba(124, 92, 255, 0.22); }
.wishes-workflow .assistant-completed-message .primary-button { width: 100%; white-space: normal; text-align: center; }
.wishes-workflow .communication-confirm { max-width: 100%; }
.wishes-workflow :is(.communication-confirm, .mass-delivery-options) .secondary-button { min-height: 48px; }
.wishes-workflow :is(.primary-button, .secondary-button, .communication-confirm-button) { white-space: normal; text-align: center; }
.wishes-workflow :is(.primary-button, .secondary-button)[aria-disabled="true"],
.wishes-workflow button:disabled { opacity: 0.55; cursor: not-allowed; }
.wishes-workflow :is(a, button, select, input):focus-visible { outline: 2px solid #c7bcff; outline-offset: 3px; }
.mass-wish-shell { overflow-wrap: anywhere; }
.mass-wish-shell .wish-message-preview { margin-left: 0; }
.mass-occasion-groups, .mass-delivery-options { display: grid; gap: 12px; }
.mass-occasion-groups [aria-current="page"] { border-color: #c7bcff; }
.mass-delivery-options { margin-top: 24px; }
.mass-delivery-options :is(h2, p) { margin: 0; }
.mass-warning { padding: 14px; border: 1px solid rgba(245, 204, 118, 0.3); border-radius: 14px; color: #f5cc76; font-size: 13px; line-height: 1.6; }
.mass-recipient { grid-template-columns: minmax(0, 1fr); }
.mass-recipient-choice { min-height: 48px; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.mass-recipient-choice input { width: 24px; height: 24px; flex: 0 0 24px; accent-color: var(--primary); }
.mass-recipient-choice span { min-width: 0; display: grid; gap: 4px; }
.mass-recipient-choice small { color: var(--muted); }
.mass-recipient .communication-status { padding-left: 0; }
@media (max-width: 620px) {
    .wishes-workflow .dashboard-header .page-title { font-size: 28px; }
    .wishes-workflow .dashboard-header .page-subtitle { font-size: 13px; margin-top: 8px; }
    .wishes-workflow .today-celebrations .communication-progress { padding: 14px; }
    .wishes-workflow .today-primary-actions { grid-template-columns: minmax(0, 1fr); }
    .wishes-workflow .today-primary-actions a { min-height: 52px; }
    .wishes-workflow .assistant-card-wrap .communication-action-button.is-preferred { grid-column: 1 / -1; min-height: 56px; }
    .wishes-workflow .communication-confirm { justify-items: stretch; }
    .wishes-workflow .communication-confirm button { width: 100%; }
    .wishes-workflow .all-complete-banner { align-items: flex-start; flex-direction: column; gap: 8px; }
}

/* Celebrations center: compact navigation, scoped away from the Dashboard. */
.wishes-center .center-header { margin-bottom: 18px; }
.wishes-center .center-header h1 { margin: 0 0 8px; font-size: 28px; letter-spacing: -0.03em; }
.wishes-center .center-header p { margin: 0; font-size: 14px; line-height: 1.5; }
.wishes-center .wishes-overview-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.wishes-center .wishes-overview-card { min-width: 0; min-height: 100px; gap: 12px; padding: 16px; border-radius: 18px; }
.wishes-center .wishes-overview-card[aria-current="page"] { border-color: #c7bcff; }
.wishes-center .wishes-overview-card > span { font-size: 14px; }
.wishes-center .center-overview-count { display: flex; align-items: baseline; gap: 6px; }
.wishes-center .wishes-overview-card strong { margin: 0; font-size: 26px; line-height: 1; }
.wishes-center .wishes-overview-card small { margin: 0; font-size: 12px; }
.wishes-center .center-controls { margin: 18px 0; }
.wishes-center .center-controls h2 { margin: 0 0 16px; font-size: 18px; }
.wishes-center .center-day-navigation { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: end; gap: 8px; }
.wishes-center .center-day-navigation > a { min-height: 48px; padding: 0; font-size: 20px; }
.wishes-center .center-date-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.wishes-center .center-controls label { min-width: 0; display: grid; gap: 7px; }
.wishes-center .center-controls label > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.wishes-center .center-controls :is(input[type="date"], select) { min-width: 0; width: 100%; max-width: 100%; min-height: 48px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 12px; color: var(--text); background: var(--panel-solid); font: inherit; font-size: 16px; color-scheme: dark; }
.wishes-center .center-controls input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.wishes-center .center-controls button { min-height: 48px; padding-inline: 12px; }
.wishes-center .center-filter-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 10px; margin-top: 16px; }
.wishes-center .center-results { scroll-margin-top: 90px; }
.wishes-center .center-today { margin-bottom: 22px; }
.wishes-center .center-today h2 { margin: 0 0 12px; font-size: 20px; }
.wishes-center .center-today-counts { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 14px; }
.wishes-center .center-today .communication-progress { padding: 0; border: 0; margin: 14px 0; background: none; }
.wishes-center .center-today .communication-progress-copy { display: none; }
.wishes-center .center-today .communication-progress-track { margin: 0; }
.wishes-center .center-action-note { margin: 14px 0 0; font-size: 12px; line-height: 1.6; }
.wishes-center .center-results-heading { margin-bottom: 16px; }
.wishes-center .center-results-heading h2 { margin: 0 0 6px; font-size: 21px; }
.wishes-center .center-results-heading p { margin: 0; font-size: 13px; }
.wishes-center .center-date-groups { display: grid; gap: 12px; }
.wishes-center .center-date-group { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 18px; border-radius: 18px; }
.wishes-center .center-date-group > div { min-width: 0; display: grid; gap: 8px; }
.wishes-center .center-date-group time { font-size: 17px; font-weight: 750; }
.wishes-center .center-date-group strong { font-size: 14px; }
.wishes-center .center-date-group :is(small, .center-occasion-types) { font-size: 12px; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
.wishes-center .center-date-group .center-occasion-types { color: #f5cc76; }
.wishes-center .center-availability { margin: 0; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.wishes-center .communication-section { margin-top: 20px; }
@media (max-width: 1100px) {
    .wishes-center .wishes-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .wishes-center .wishes-overview-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .wishes-center .wishes-overview-card { min-height: 64px; flex-direction: row; align-items: center; justify-content: space-between; padding: 12px 14px; gap: 10px; }
    .wishes-center .center-overview-count { flex: 0 0 auto; }
    .wishes-center .center-controls .card-inner { padding: 14px; }
    .wishes-center .center-day-navigation { grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 6px; align-items: start; }
    .wishes-center .center-day-navigation > a { margin-top: 24px; }
    .wishes-center .center-date-form { grid-template-columns: minmax(0, 1fr); }
    .wishes-center .center-filter-form { grid-template-columns: minmax(0, 1fr); }
    .wishes-center .center-today h2 { font-size: 19px; }
    .wishes-center .center-date-group { padding: 15px; }
}

/* Today's selection and plain-text email previews, using existing controls. */
.today-contact-selection { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 14px; cursor: pointer; }
.today-contact-selection input { width: 22px; height: 22px; accent-color: var(--primary); flex: 0 0 22px; }
.today-contact-selection input:disabled { cursor: not-allowed; opacity: .55; }
.secondary-button.is-selection-active {
    border-color: rgba(199, 188, 255, .78);
    color: #fff;
    background: linear-gradient(135deg, rgba(124, 92, 255, .48), rgba(153, 125, 255, .28));
    box-shadow: 0 0 0 3px rgba(124, 92, 255, .13), 0 10px 28px rgba(63, 42, 135, .24);
}
[data-today-section] { margin-top: 20px; }
[data-today-section] .communication-launchers form { display: contents; }
[data-today-section] .communication-launchers small { align-self: center; color: var(--muted); }
[data-today-section] [id^="today-contact-"] { scroll-margin-top: 90px; }
.email-preview-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; margin: 16px 0; }
[data-email-confirm] { margin-top: 18px; }

/* Compact premium dashboard hub and focused daily views. */
.dashboard-entry-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.dashboard-entry-card { position: relative; min-width: 0; min-height: 330px; display: grid; grid-template-rows: auto 1fr auto; gap: 24px; padding: 24px; overflow: hidden; border: 1px solid var(--border); border-radius: 28px; color: var(--text); text-decoration: none; background: linear-gradient(155deg, rgba(255,255,255,.075), rgba(255,255,255,.025)); box-shadow: var(--shadow); transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.dashboard-entry-card::before { content: ""; position: absolute; width: 180px; height: 180px; right: -70px; top: -70px; border-radius: 50%; background: var(--entry-glow); filter: blur(8px); opacity: .65; pointer-events: none; }
.dashboard-entry-card:hover { transform: translateY(-4px); border-color: rgba(199,188,255,.42); background: linear-gradient(155deg, rgba(255,255,255,.1), rgba(255,255,255,.035)); }
.dashboard-entry-card.is-nameday { --entry-glow: rgba(124,92,255,.34); }
.dashboard-entry-card.is-birthday { --entry-glow: rgba(245,204,118,.27); }
.dashboard-entry-card.is-callback { --entry-glow: rgba(45,212,191,.25); }
.dashboard-entry-visual { width: 76px; height: 76px; display: grid; place-items: center; position: relative; border: 1px solid rgba(255,255,255,.13); border-radius: 24px; font-size: 34px; background: rgba(8,12,24,.42); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.dashboard-entry-visual > span:first-child { position: absolute; top: 8px; right: 10px; color: #f5cc76; font-size: 15px; }
.dashboard-entry-copy { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dashboard-entry-copy > small { color: #a99aff; font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.dashboard-entry-copy > strong { font-size: clamp(23px, 2.2vw, 30px); line-height: 1.08; letter-spacing: -.035em; }
.dashboard-entry-copy > span { color: var(--muted); line-height: 1.65; }
.dashboard-entry-count { position: absolute; top: 25px; right: 25px; display: flex; align-items: flex-end; flex-direction: column; }
.dashboard-entry-count strong { font-size: 32px; line-height: 1; }
.dashboard-entry-count small { color: var(--muted); font-size: 11px; }
.dashboard-entry-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 17px; border-top: 1px solid rgba(255,255,255,.09); color: #e8e2ff; font-weight: 750; }

.occasion-hero { position: relative; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 24px; margin-bottom: 20px; padding: 28px; overflow: hidden; border: 1px solid var(--border); border-radius: 28px; background: linear-gradient(135deg, rgba(124,92,255,.16), rgba(255,255,255,.025)); box-shadow: var(--shadow); }
.occasion-hero.is-birthday { background: linear-gradient(135deg, rgba(245,204,118,.13), rgba(255,255,255,.025)); }
.occasion-hero.is-callback { background: linear-gradient(135deg, rgba(45,212,191,.13), rgba(255,255,255,.025)); }
.occasion-hero-visual { width: 82px; height: 82px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.14); border-radius: 26px; font-size: 38px; background: rgba(7,11,23,.46); }
.occasion-hero h1 { margin: 8px 0; font-size: clamp(28px, 4vw, 44px); letter-spacing: -.045em; }
.occasion-hero p { max-width: 720px; margin: 0; color: var(--muted); line-height: 1.6; }
.occasion-hero-count { min-width: 90px; display: flex; align-items: flex-end; flex-direction: column; }
.occasion-hero-count strong { font-size: 40px; line-height: 1; }
.occasion-hero-count span { color: var(--muted); font-size: 12px; }
.occasion-information, .occasion-actions { margin-top: 16px; }
.occasion-information .card-inner { background: linear-gradient(100deg, rgba(124,92,255,.08), transparent); }
.occasion-information h2, .occasion-actions h2 { margin: 8px 0; font-size: 21px; }
.occasion-information p, .occasion-actions p { margin: 0; color: var(--muted); line-height: 1.7; }
.occasion-section-label { display: flex; align-items: center; gap: 8px; color: #c7bcff; font-size: 11px; font-weight: 800; letter-spacing: .11em; }
.occasion-action-bar { margin: 18px 0 0; padding: 16px; border: 1px solid rgba(255,255,255,.09); border-radius: 18px; background: rgba(5,9,20,.34); }
.occasion-action-bar > strong { margin-right: auto; color: #eee9ff; }
.occasion-contact-section { margin-top: 18px; }
.occasion-empty-state .card-inner { min-height: 210px; display: grid; place-items: center; align-content: center; gap: 10px; text-align: center; }
.occasion-empty-state .card-inner > span { font-size: 34px; }
.occasion-empty-state h2, .occasion-empty-state p { margin: 0; }
.occasion-empty-state p { color: var(--muted); }

.callback-list { display: grid; gap: 16px; }
.callback-item { overflow: visible; }
.callback-item .card-inner { display: grid; gap: 20px; padding: clamp(18px,3vw,26px); }
.callback-card-head { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 16px; min-width: 0; }
.callback-phone-visual { width: 62px; height: 62px; display: grid; place-items: center; border: 1px solid rgba(45,212,191,.24); border-radius: 20px; color: #8cf1df; font-size: 27px; background: linear-gradient(145deg,rgba(45,212,191,.12),rgba(124,92,255,.08)); }
.callback-identity { min-width: 0; }
.callback-identity h2 { margin: 5px 0; font-size: clamp(20px,2.4vw,25px); line-height: 1.2; overflow-wrap: anywhere; }
.callback-identity h2 a { color: #eee9ff; }
.callback-phone { display: inline-block; max-width: 100%; color: #a99aff; font-size: 15px; overflow-wrap: anywhere; }
.callback-schedule { display: grid; grid-template-columns: repeat(2,minmax(110px,1fr)); gap: 8px; }
.callback-schedule > div { padding: 10px 12px; border: 1px solid var(--border); border-radius: 13px; background: rgba(255,255,255,.025); }
.callback-schedule span, .callback-detail > span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.callback-schedule strong { color: #eee9ff; font-size: 14px; white-space: normal; overflow-wrap: anywhere; }
.callback-details-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.callback-detail { min-width: 0; padding: 13px 14px; border: 1px solid rgba(148,163,184,.12); border-radius: 14px; background: rgba(5,9,20,.3); }
.callback-detail p { margin: 0; color: var(--text-soft); line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.callback-detail.is-empty p { color: var(--muted); font-style: italic; }
.callback-actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: 9px; padding-top: 2px; }
.callback-actions > a, .callback-actions > form, .callback-actions > details { flex: 1 1 180px; min-width: 0; }
.callback-actions button, .callback-actions summary, .callback-actions > a { width: 100%; min-height: 48px; justify-content: center; text-align: center; }
.callback-actions form { margin: 0; }
.callback-danger-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border: 1px solid rgba(251,113,133,.34); border-radius: 14px; color: #fecdd3; background: rgba(251,113,133,.08); font-weight: 750; cursor: pointer; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.callback-danger-button:hover { border-color: rgba(251,113,133,.58); background: rgba(251,113,133,.14); transform: translateY(-1px); }
.callback-call-confirm, .callback-result-panel { padding: 18px; border: 1px solid rgba(199,188,255,.2); border-radius: 18px; background: rgba(12,17,34,.88); }
.callback-call-confirm[hidden], .callback-result-panel[hidden] { display: none; }
.callback-call-confirm h3 { margin: 0 0 14px; }
.callback-call-confirm > div { display: flex; flex-wrap: wrap; gap: 10px; }
.callback-result-panel { display: grid; gap: 18px; }
.callback-result-panel fieldset { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.callback-result-panel legend { margin-bottom: 9px; color: #eee9ff; font-weight: 750; }
.callback-save-result { width: 100%; min-height: 54px; }

@media (max-width: 1050px) { .dashboard-entry-grid { grid-template-columns: minmax(0,1fr); } .dashboard-entry-card { min-height: 250px; } }
@media (max-width: 700px) {
    .occasion-hero { grid-template-columns: minmax(0,1fr) auto; padding: 20px; }
    .occasion-hero-visual { width: 60px; height: 60px; grid-row: 1; font-size: 28px; }
    .occasion-hero > div:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
    .occasion-hero-count { grid-column: 2; grid-row: 1; }
    .callback-card-head { grid-template-columns: auto minmax(0,1fr); align-items: start; }
    .callback-schedule { grid-column: 1 / -1; }
    .callback-details-grid { grid-template-columns: minmax(0,1fr); }
    .callback-actions { flex-direction: column; }
    .callback-actions > a, .callback-actions > form, .callback-actions > details { flex-basis: auto; width: 100%; }
}

/* Premium Email Composer */
.email-compose-shell {
    max-width: 980px;
}

.email-compose-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.email-compose-summary h2,
.email-review-subject {
    margin: 4px 0 0;
}

.email-compose-kicker {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.email-compose-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.email-compose-stats span {
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-soft);
    font-size: 13px;
}

.email-recipient-details {
    margin-bottom: 22px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025);
}

.email-recipient-details summary {
    cursor: pointer;
    color: var(--text-soft);
    font-weight: 750;
}

.email-recipient-details ul {
    margin: 14px 0 0;
    padding-left: 20px;
}

.email-compose-template-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: end;
}

.email-editor-frame {
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
}

.email-editor-frame:focus-within {
    border-color: rgba(124, 92, 255, 0.65);
    box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.10);
}

.email-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.025);
}

.email-editor-tool,
.email-editor-format {
    min-height: 38px;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.email-editor-tool:hover,
.email-editor-format:hover {
    background: rgba(255, 255, 255, 0.075);
}

.email-editor-divider {
    width: 1px;
    height: 26px;
    background: var(--border);
}

.email-rich-editor {
    min-height: 320px;
    padding: 20px;
    outline: none;
    color: var(--text);
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.email-rich-editor:empty::before {
    content: attr(data-placeholder);
    color: var(--muted);
    pointer-events: none;
}

.email-rich-editor p:first-child,
.email-html-preview p:first-child {
    margin-top: 0;
}

.email-rich-editor p:last-child,
.email-html-preview p:last-child {
    margin-bottom: 0;
}

.email-rich-editor a,
.email-html-preview a {
    color: #9fb4ff;
    text-decoration: underline;
}

.email-review-card {
    margin-top: 4px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
}

.email-review-divider {
    height: 1px;
    margin: 18px 0;
    background: var(--border);
}

.email-html-preview {
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.email-review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.email-confirm-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 14px;
    color: var(--text-soft);
    line-height: 1.5;
}

.email-confirm-check input {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    accent-color: var(--primary);
}

.email-compose-expiry {
    margin-top: 18px;
    font-size: 12px;
}

@media (max-width: 720px) {
    .email-compose-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .email-compose-template-row {
        grid-template-columns: 1fr;
    }

    .email-editor-toolbar {
        align-items: stretch;
    }

    .email-editor-tool,
    .email-editor-format {
        flex: 1 1 auto;
    }

    .email-rich-editor {
        min-height: 260px;
        padding: 16px;
    }

    .email-review-actions {
        flex-direction: column;
    }

    .email-review-actions form,
    .email-review-actions .primary-button,
    .email-review-actions .secondary-button {
        width: 100%;
    }
}

/* Email attachments */
.email-attachment-picker {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.email-attachment-picker input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.email-attachment-picker-text {
    color: var(--muted);
    font-size: 13px;
}

.email-attachment-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.email-attachment-item,
.email-review-attachments li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.email-attachment-item small,
.email-review-attachments small {
    color: var(--muted);
    white-space: nowrap;
}

.email-attachment-item.is-invalid {
    border-color: rgba(251, 113, 133, 0.45);
}

.email-attachment-warning {
    padding: 10px 12px;
    border: 1px solid rgba(251, 113, 133, 0.35);
    border-radius: 12px;
    color: #fecdd3;
    background: rgba(251, 113, 133, 0.07);
    font-size: 13px;
}

.email-review-attachments {
    margin-top: 22px;
}

.email-review-attachments ul {
    display: grid;
    gap: 8px;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

/* Focused call campaign runner. */
.call-campaign-cta { margin: 20px 0; }
.call-runner-cta { min-height: 54px; padding: 15px 24px; font-size: 16px; }
.campaign-recipient-state { transition: opacity .2s ease, border-color .2s ease, background .2s ease; }
.campaign-recipient-state.is-processed { border-color: rgba(148,163,184,.12); background: rgba(8,12,24,.58); opacity: .72; }
.campaign-recipient-state.is-call-history { opacity: 1; }
.campaign-recipient-state.is-call-history:hover { border-color: rgba(124,92,255,.3); background: rgba(124,92,255,.045); }
.campaign-recipient-heading { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.campaign-recipient-heading > a:first-child { min-width: 0; overflow-wrap: anywhere; font-weight: 750; }
.campaign-call-view { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 10px; color: #c7bcff; background: rgba(124,92,255,.08); font-size: 12px; font-weight: 750; transition: color .2s ease, background .2s ease, transform .2s ease; }
.campaign-call-view:hover { color: #eee9ff; background: rgba(124,92,255,.16); transform: translateX(2px); }
.campaign-sms-queue-panel { margin: 20px 0 4px; padding: 18px; border: 1px solid rgba(124,92,255,.22); border-radius: 18px; background: rgba(124,92,255,.045); }
.campaign-sms-queue-form { display: grid; gap: 14px; }
.campaign-sms-queue-form textarea { min-height: 140px; resize: vertical; }
.campaign-sms-queue-form > .primary-button { justify-self: start; }
.campaign-call-result { color: var(--text-soft); font-weight: 700; }

.campaign-call-detail-header { align-items: flex-end; }
.campaign-call-detail-card { max-width: 980px; margin-inline: auto; }
.campaign-call-detail-card > .card-inner { display: grid; gap: 22px; }
.campaign-call-detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.campaign-call-detail-grid > div { min-width: 0; padding: 14px 15px; border: 1px solid var(--border); border-radius: 14px; background: rgba(255,255,255,.025); }
.campaign-call-detail-grid .is-wide { grid-column: 1 / -1; }
.campaign-call-detail-grid span,
.campaign-call-notes > span,
.campaign-call-callback-list article > div span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.campaign-call-detail-grid strong { display: block; overflow-wrap: anywhere; }
.campaign-call-notes { min-width: 0; padding: 17px; border: 1px solid rgba(199,188,255,.18); border-radius: 16px; background: rgba(12,17,34,.66); }
.campaign-call-notes p { margin: 0; color: var(--text-soft); line-height: 1.65; overflow-wrap: anywhere; white-space: pre-wrap; }
.campaign-call-callbacks > header h2 { margin: 5px 0 12px; }
.campaign-call-callback-list { display: grid; gap: 10px; }
.campaign-call-callback-list article { min-width: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 16px; padding: 15px; border: 1px solid rgba(245,204,118,.2); border-radius: 15px; background: rgba(245,204,118,.04); }
.campaign-call-callback-list article p { grid-column: 1 / -1; margin: 0; color: var(--text-soft); line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }

@media (max-width: 700px) {
    .campaign-call-detail-header { align-items: stretch; flex-direction: column; }
    .campaign-call-detail-header > .secondary-button { width: 100%; }
    .campaign-call-detail-grid,
    .campaign-call-callback-list article { grid-template-columns: minmax(0,1fr); }
    .campaign-call-detail-grid .is-wide,
    .campaign-call-callback-list article p { grid-column: auto; }
    .campaign-sms-queue-panel { padding: 14px; }
    .campaign-sms-queue-form > .primary-button { width: 100%; }
}

@media (max-width: 520px) {
    .campaign-recipient-heading { align-items: flex-start; flex-direction: column; }
    .campaign-call-view { align-self: stretch; justify-content: space-between; }
}
.call-skip-badge { display: inline-flex; width: fit-content; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 750; }
.call-skip-badge { color: var(--muted); background: rgba(148,163,184,.1); }

.call-runner-shell { max-width: 1040px; margin: 0 auto; }
.call-runner-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.call-runner-header h1 { margin: 7px 0 0; font-size: clamp(28px,4vw,44px); }
.call-runner-header > strong { color: #c7bcff; font-size: 18px; }
.call-runner-current .card-inner { padding: clamp(22px,4vw,38px); }
.call-runner-person { display: flex; align-items: center; gap: 18px; }
.call-runner-person h2 { margin: 5px 0; font-size: clamp(28px,5vw,46px); letter-spacing: -.04em; }
.call-runner-person a { color: #bfb2ff; font-size: 20px; }
.call-runner-avatar { width: 82px; height: 82px; display: grid; place-items: center; flex: 0 0 82px; border: 1px solid rgba(199,188,255,.28); border-radius: 26px; color: #eee9ff; background: linear-gradient(135deg,rgba(124,92,255,.3),rgba(45,212,191,.12)); font-size: 32px; font-weight: 800; }
.call-runner-primary-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.call-runner-primary-actions > * { flex: 1 1 220px; }
.call-runner-primary-actions form button, .call-button { width: 100%; min-height: 58px; justify-content: center; font-size: 17px; }
.call-confirm-panel, .call-result-panel { margin-top: 22px; padding: 20px; border: 1px solid rgba(199,188,255,.2); border-radius: 20px; background: rgba(12,17,34,.88); }
.call-confirm-panel h3 { margin: 0 0 15px; }
.call-confirm-panel > div { display: flex; flex-wrap: wrap; gap: 12px; }
.call-result-panel { display: grid; gap: 20px; }
.call-result-panel[hidden], .call-confirm-panel[hidden] { display: none; }
.call-result-panel fieldset { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.call-result-panel legend { margin-bottom: 10px; color: #eee9ff; font-weight: 750; }
.call-result-option { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; cursor: pointer; background: rgba(255,255,255,.025); }
.call-notes-group { display: grid; gap: 10px; padding-top: 4px; }
.call-notes-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: #eee9ff; font-size: 16px; font-weight: 750; }
.call-notes-label span { color: var(--muted); font-size: 12px; font-weight: 650; }
.call-notes-textarea { min-height: 180px; padding: 15px 16px; line-height: 1.55; resize: vertical; }
.call-callback-choice > div { display: flex; flex-wrap: wrap; gap: 20px; }
.call-callback-choice label { display: inline-flex; align-items: center; gap: 8px; color: var(--text-soft); cursor: pointer; }
.call-callback-fields { display: grid; gap: 14px; padding: 17px; border: 1px solid rgba(245,204,118,.2); border-radius: 16px; background: rgba(245,204,118,.045); }
.call-callback-fields[hidden] { display: none; }
.call-callback-date { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.call-save-next { min-height: 56px; justify-content: center; }
.call-runner-progress { margin-top: 20px; }
.call-progress-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.call-progress-summary span { padding: 12px; border: 1px solid var(--border); border-radius: 14px; color: var(--muted); background: rgba(255,255,255,.025); font-size: 12px; }
.call-progress-summary strong { display: block; color: var(--text); font-size: 22px; }
.call-progress-track { height: 8px; margin: 18px 0; overflow: hidden; border-radius: 999px; background: rgba(148,163,184,.12); }
.call-progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--primary),#2dd4bf); }
.call-progress-list { display: grid; gap: 7px; }
.call-progress-row { display: grid; grid-template-columns: 24px minmax(0,1fr) auto; gap: 10px; padding: 9px 11px; border-radius: 11px; }
.call-progress-row.is-processed { background: rgba(255,255,255,.025); opacity: .72; }
.call-progress-row small { color: var(--muted); text-align: right; }

.callback-group { margin-top: 24px; }
.callback-group-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.callback-group-header h2 { margin: 5px 0 0; font-size: 24px; }
.callback-group-header > strong { display: grid; place-items: center; min-width: 38px; height: 38px; border-radius: 12px; background: rgba(124,92,255,.13); }
.callback-group.is-overdue .callback-group-header > strong { color: #fecdd3; background: rgba(251,113,133,.12); }
.callback-group-empty { padding: 18px; border: 1px dashed var(--border); border-radius: 16px; color: var(--muted); }
.callback-reschedule { position: relative; }
.callback-reschedule > summary { list-style: none; cursor: pointer; }
.callback-reschedule[open] { flex-basis: 100%; }
.callback-reschedule > form { width: 100%; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 10px; padding: 16px; border: 1px solid rgba(199,188,255,.24); border-radius: 16px; background: #11182b; box-shadow: var(--shadow); }
.callback-reschedule label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.callback-reschedule label:last-of-type, .callback-reschedule button { grid-column: 1 / -1; }

@media (max-width: 760px) {
    .call-runner-header { align-items: flex-start; flex-direction: column; }
    .call-runner-person { align-items: flex-start; }
    .call-runner-avatar { width: 62px; height: 62px; flex-basis: 62px; border-radius: 20px; }
    .call-progress-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .call-callback-date { grid-template-columns: 1fr; }
    .call-progress-row { grid-template-columns: 22px minmax(0,1fr); }
    .call-progress-row small { grid-column: 2; text-align: left; }
    .callback-reschedule > form { grid-template-columns: minmax(0,1fr); }
    .callback-reschedule label:last-of-type, .callback-reschedule button { grid-column: auto; }
}

/* =========================================================
   FOCUSED MOBILE / RESPONSIVE POLISH
========================================================= */

.app-shell,
.app-main,
.app-content,
.card,
.card-inner,
.profile-card,
.call-runner-person > div:last-child {
    min-width: 0;
}

.profile-data-row > div,
.profile-data-row > div > *,
.campaign-recipient-state p,
.email-recipient-details li,
.email-attachment-item > span,
.email-review-attachments li,
.call-progress-row strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.campaign-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.call-runner-person h2,
.call-runner-person a,
.call-runner-header h1,
.page-title,
.section-title {
    overflow-wrap: anywhere;
}

@media (max-width: 820px) {
    .mobile-fab {
        display: none !important;
    }

    .page-title {
        font-size: clamp(30px, 8vw, 36px);
        line-height: 1.08;
    }

    .mobile-bottom-nav {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 2px;
        overflow: clip;
    }

    .mobile-nav-item {
        min-width: 0;
        min-height: 56px;
        padding: 4px 1px;
        font-size: clamp(10px, 2.65vw, 11px);
        line-height: 1.15;
        text-align: center;
    }

    .mobile-nav-item > span:last-child {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: normal;
    }

    .primary-button,
    .secondary-button,
    .profile-action-button,
    .communication-action-button,
    .callback-danger-button,
    .email-editor-tool,
    .email-editor-format {
        min-height: 44px;
    }

    .profile-card,
    .profile-card .card-inner {
        width: 100%;
        max-width: 100%;
    }

    .call-runner-person {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
    }

    .call-runner-person h2 {
        line-height: 1.12;
    }

    .call-result-option {
        min-height: 48px;
    }

    .email-editor-tool {
        flex: 1 1 44px;
    }

    .email-editor-format {
        flex: 1 1 150px;
        min-width: 0;
        max-width: 100%;
    }

    .email-rich-editor {
        font-size: 16px;
    }
}

@media (max-width: 520px) {
    .app-content {
        padding-bottom: calc(126px + var(--safe-bottom));
    }

    .page-title {
        font-size: 30px;
    }

    .mobile-bottom-nav {
        left: 6px;
        right: 6px;
        padding: 6px 4px;
        border-radius: 21px;
    }

    .mobile-nav-item {
        min-height: 58px;
        border-radius: 16px;
        font-size: 10px;
    }

    .mobile-nav-item svg {
        width: 21px;
        height: 21px;
    }

    .profile-copy h1 {
        font-size: 28px;
        line-height: 1.1;
        overflow-wrap: anywhere;
    }

    .profile-data-row > div {
        width: 100%;
    }

    .campaign-summary-grid,
    .callback-schedule {
        grid-template-columns: minmax(0, 1fr);
    }

    .campaign-summary-grid .card-inner {
        padding: 15px 17px;
    }

    .call-runner-current .card-inner {
        padding: 17px;
    }

    .call-runner-person {
        gap: 13px;
    }

    .call-runner-avatar {
        width: 54px;
        height: 54px;
        flex-basis: 54px;
        border-radius: 17px;
        font-size: 24px;
    }

    .call-runner-person h2 {
        margin-block: 4px;
        font-size: 24px;
    }

    .call-runner-person a {
        font-size: 17px;
    }

    .call-runner-primary-actions > * {
        flex-basis: 100%;
    }

    .call-runner-primary-actions form button,
    .call-button,
    .call-save-next,
    .callback-save-result {
        min-height: 56px;
    }

    .call-confirm-panel,
    .call-result-panel,
    .callback-call-confirm,
    .callback-result-panel {
        padding: 15px;
        border-radius: 17px;
    }

    .call-notes-label {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .call-notes-textarea {
        min-height: 170px;
    }

    .call-callback-fields {
        padding: 14px;
    }

    .callback-card-head {
        gap: 12px;
    }

    .callback-schedule {
        width: 100%;
    }

    .callback-actions,
    .callback-call-confirm > div {
        gap: 10px;
    }

    .callback-actions button,
    .callback-actions summary,
    .callback-actions > a {
        min-height: 50px;
        white-space: normal;
    }

    .email-editor-toolbar {
        gap: 6px;
        padding: 8px;
    }

    .email-editor-divider {
        display: none;
    }

    .email-editor-tool {
        padding-inline: 9px;
    }

    .email-editor-format {
        flex-basis: 100%;
    }

    .email-rich-editor {
        min-height: 240px;
        padding: 14px;
    }

    .email-attachment-picker {
        align-items: stretch;
        flex-direction: column;
    }

    .email-attachment-picker .secondary-button,
    .email-attachment-picker-text {
        width: 100%;
    }

    .email-attachment-item,
    .email-review-attachments li {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .email-attachment-item small,
    .email-review-attachments small {
        white-space: normal;
    }

    .contact-import-file input::file-selector-button {
        min-height: 44px;
        margin: 0 0 10px;
    }

    .contact-import-choice label {
        width: 100%;
        min-height: 44px;
    }

    .contact-import-record {
        padding: 14px;
    }

    .contact-history-header > .secondary-button {
        width: 100%;
    }

    .contact-history-card .card-inner {
        padding: 16px;
    }
}

/* Keep the sixth Orders destination inside the fixed mobile navigation. */
@media (max-width: 820px) {
    .mobile-bottom-nav { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .mobile-nav-item { font-size: 9px; }
    .mobile-nav-item > span:last-child { overflow-wrap: anywhere; }
}

/* Contact edit/delete safety */
.contact-form-alert { margin-bottom: 16px; padding: 13px 16px; border: 1px solid rgba(45,212,191,.3); border-radius: 14px; color: #a7f3d0; background: rgba(45,212,191,.08); overflow-wrap: anywhere; }
.contact-form-alert.is-error { border-color: rgba(251,113,133,.34); color: #fecdd3; background: rgba(251,113,133,.08); }
.contact-identifiers-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.contact-identifier-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.contact-identifier-heading .secondary-button { min-height: 38px; padding: 7px 10px; }
.contact-identifier-list { display: grid; gap: 9px; }
.contact-identifier-row { display: grid; grid-template-columns: minmax(0,1fr) 42px; gap: 8px; min-width: 0; }
.contact-identifier-remove { min-height: 44px; border: 1px solid rgba(251,113,133,.28); border-radius: 12px; color: #fecdd3; background: rgba(251,113,133,.07); cursor: pointer; font-size: 20px; }
.contact-delete-shell { max-width: 820px; margin: 0 auto; }
.contact-delete-card .card-inner { padding: clamp(22px,5vw,42px); }
.contact-delete-icon { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 18px; color: #fecdd3; background: rgba(251,113,133,.13); font-size: 28px; font-weight: 850; }
.contact-delete-impact { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 22px 0; }
.contact-delete-impact > div { min-width: 0; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: rgba(255,255,255,.025); }
.contact-delete-impact span, .contact-delete-impact strong { display: block; overflow-wrap: anywhere; }
.contact-delete-impact span { color: var(--muted); font-size: 12px; }
.contact-delete-impact strong { margin-top: 5px; font-size: 22px; }
.contact-delete-note { padding: 14px; border-left: 3px solid #f5cc76; color: var(--text-soft); background: rgba(245,204,118,.06); line-height: 1.6; }
.contact-delete-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.contact-delete-actions form, .contact-delete-actions button { min-width: 0; }

@media (max-width: 620px) {
    .contact-identifiers-grid, .contact-delete-impact { grid-template-columns: minmax(0,1fr); }
    .contact-identifier-heading { align-items: stretch; flex-direction: column; }
    .contact-delete-actions { align-items: stretch; flex-direction: column-reverse; }
    .contact-delete-actions > *, .contact-delete-actions form button { width: 100%; justify-content: center; }
}

/* =========================================================
   WOOCOMMERCE ANALYTICS
========================================================= */
.analytics-header { align-items: flex-end; }
.analytics-filter-card, .analytics-section { margin-bottom: 18px; }
.analytics-period-form { display: grid; grid-template-columns: 1.15fr repeat(3,minmax(145px,1fr)) auto; gap: 10px; align-items: end; }
.analytics-period-form label, .analytics-inline-filter label, .analytics-segment-builder label { min-width: 0; display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.analytics-period-form input, .analytics-period-form select, .analytics-inline-filter input, .analytics-segment-builder input, .analytics-segment-builder select, .analytics-campaign-form input, .analytics-campaign-form select { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); background: rgba(7,11,22,.78); }
.analytics-filter-note { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.analytics-kpi-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 11px; margin-bottom: 18px; }
.analytics-kpi { min-width: 0; min-height: 132px; display: flex; flex-direction: column; justify-content: space-between; padding: 17px; border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(145deg,rgba(24,33,62,.95),rgba(12,17,33,.9)); box-shadow: 0 14px 34px rgba(0,0,0,.13); }
.analytics-kpi.is-accent { border-color: rgba(124,92,255,.34); background: linear-gradient(145deg,rgba(124,92,255,.18),rgba(12,17,33,.92)); }
.analytics-kpi.is-success { border-color: rgba(45,212,191,.28); background: linear-gradient(145deg,rgba(45,212,191,.12),rgba(12,17,33,.92)); }
.analytics-kpi span, .analytics-kpi small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.analytics-kpi strong { margin: 10px 0 6px; font-size: clamp(23px,2.2vw,32px); letter-spacing: -.035em; overflow-wrap: anywhere; }
.analytics-two-column { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin-bottom: 18px; }
.analytics-two-column > * { min-width: 0; }
.analytics-section-head { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.analytics-section-head h2 { margin: 5px 0 0; font-size: clamp(20px,2.4vw,27px); overflow-wrap: anywhere; }
.analytics-section-head > small { color: var(--muted); text-align: right; }
.analytics-pill { flex: 0 0 auto; padding: 6px 10px; border-radius: 999px; color: #c7bcff; background: rgba(124,92,255,.13); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.analytics-buckets { display: grid; gap: 14px; }
.analytics-buckets > div > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.analytics-buckets span { color: var(--muted); font-size: 12px; }
.analytics-progress { height: 7px; margin: 7px 0 9px; overflow: hidden; border-radius: 999px; background: rgba(148,163,184,.12); }
.analytics-progress span { display: block; min-width: 2px; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#7c5cff,#2dd4bf); }
.analytics-retention-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.analytics-retention-grid > div { min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: 15px; background: rgba(255,255,255,.025); }
.analytics-retention-grid span, .analytics-retention-grid strong { display: block; overflow-wrap: anywhere; }
.analytics-retention-grid span { color: var(--muted); font-size: 12px; }
.analytics-retention-grid strong { margin-top: 7px; font-size: 23px; }
.analytics-chart { min-width: 0; height: 260px; display: flex; align-items: end; gap: clamp(5px,1vw,13px); overflow-x: auto; padding: 8px 4px 2px; scrollbar-width: thin; }
.analytics-chart-column { min-width: 34px; height: 100%; flex: 1 0 34px; display: grid; grid-template-rows: minmax(0,1fr) 34px; gap: 8px; text-align: center; }
.analytics-chart-bar { min-height: 0; display: flex; align-items: end; overflow: hidden; border-radius: 10px 10px 4px 4px; background: rgba(124,92,255,.055); }
.analytics-chart-bar span { width: 100%; min-height: 3px; border-radius: inherit; background: linear-gradient(180deg,#9c83ff,#6f52e8 70%,#2dd4bf); }
.analytics-chart-column small { color: var(--muted); font-size: 9px; white-space: nowrap; transform: rotate(-30deg); transform-origin: top center; }
.analytics-mobile-list { display: none; }
.analytics-series-table { max-height: 310px; margin-top: 16px; overflow: auto; }
.analytics-table-wrap { width: 100%; min-width: 0; overflow-x: auto; }
.analytics-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.analytics-table th { padding: 10px 12px; color: var(--muted); border-bottom: 1px solid var(--border); text-align: left; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.analytics-table td { min-width: 90px; padding: 13px 12px; border-bottom: 1px solid rgba(148,163,184,.1); vertical-align: top; }
.analytics-table td:first-child { min-width: 150px; }
.analytics-table td span, .analytics-table td small { display: block; overflow-wrap: anywhere; }
.analytics-table td small { margin-top: 4px; color: var(--muted); }
.analytics-product-list, .analytics-compact-list { display: grid; gap: 8px; }
.analytics-product-list > a, .analytics-compact-list > a { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 13px; border: 1px solid var(--border); border-radius: 14px; color: inherit; background: rgba(255,255,255,.02); }
.analytics-product-list > a:hover, .analytics-compact-list > a:hover { border-color: rgba(124,92,255,.32); }
.analytics-product-list > a > div, .analytics-compact-list > a > div { min-width: 0; }
.analytics-product-list strong, .analytics-product-list small, .analytics-compact-list strong, .analytics-compact-list small { display: block; overflow-wrap: anywhere; }
.analytics-product-list small, .analytics-compact-list small { margin-top: 4px; color: var(--muted); line-height: 1.4; }
.analytics-product-list > a > span, .analytics-compact-list > a > span { flex: 0 0 auto; text-align: right; }
.analytics-product-list > a > span strong { margin-top: 4px; }
.analytics-segment-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; }
.analytics-segment-grid article { min-width: 0; display: grid; gap: 7px; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: rgba(255,255,255,.025); }
.analytics-segment-grid article > span, .analytics-segment-grid article > small { color: var(--muted); }
.analytics-segment-grid article > strong { font-size: 21px; }
.analytics-campaign-form { display: grid; grid-template-columns: minmax(130px,1fr) 100px auto; gap: 7px; margin-top: 13px; }
.analytics-buckets .analytics-campaign-form, .analytics-segment-grid .analytics-campaign-form { grid-template-columns: minmax(0,1fr); }
.analytics-buckets .analytics-campaign-form input, .analytics-segment-grid .analytics-campaign-form input { display: none; }
.analytics-campaign-form .secondary-button { min-width: 0; white-space: normal; text-align: center; }
.analytics-inline-filter { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.analytics-inline-filter label { flex: 1 1 130px; }
.analytics-segment-builder { display: grid; grid-template-columns: repeat(4,minmax(145px,1fr)); gap: 10px; align-items: end; }

@media (max-width: 1180px) {
    .analytics-kpi-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .analytics-period-form { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .analytics-period-form button { width: 100%; }
    .analytics-segment-builder { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 820px) {
    .analytics-header { align-items: stretch; flex-direction: column; }
    .analytics-header > a { width: 100%; justify-content: center; }
    .analytics-kpi-grid, .analytics-segment-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .analytics-two-column { grid-template-columns: minmax(0,1fr); }
    .analytics-period-form, .analytics-segment-builder { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 560px) {
    .analytics-period-form, .analytics-kpi-grid, .analytics-segment-grid, .analytics-retention-grid, .analytics-segment-builder { grid-template-columns: minmax(0,1fr); }
    .analytics-kpi { min-height: 112px; }
    .analytics-section-head { align-items: flex-start; flex-direction: column; }
    .analytics-section-head > small { text-align: left; }
    .analytics-chart { display: none; }
    .analytics-mobile-list { display: grid; gap: 8px; }
    .analytics-series-table { display: none; }
    .analytics-mobile-list > div { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 10px; padding: 12px; border: 1px solid var(--border); border-radius: 13px; }
    .analytics-mobile-list span { color: var(--muted); font-size: 12px; }
    .analytics-table-wrap { overflow: visible; }
    .analytics-table, .analytics-table thead, .analytics-table tbody, .analytics-table tr, .analytics-table td { display: block; width: 100%; }
    .analytics-table thead { display: none; }
    .analytics-table tr { margin-bottom: 10px; padding: 13px; border: 1px solid var(--border); border-radius: 15px; background: rgba(255,255,255,.02); }
    .analytics-table td { min-width: 0; display: grid; grid-template-columns: 105px minmax(0,1fr); gap: 10px; padding: 7px 0; border: 0; overflow-wrap: anywhere; }
    .analytics-table td::before { content: attr(data-label); color: var(--muted); font-size: 11px; font-weight: 700; }
    .analytics-table td[colspan]::before { content: none; }
    .analytics-campaign-form { grid-template-columns: minmax(0,1fr); }
    .analytics-product-list > a, .analytics-compact-list > a { align-items: flex-start; flex-direction: column; }
    .analytics-product-list > a > span, .analytics-compact-list > a > span { text-align: left; }
}
