h1:focus {
    outline: none;
}

/* Dashboard Pro Styles */
.dashboard-bg {
    background: linear-gradient(120deg, #f8fafc 0%, #e9f0ff 100%);
    min-height: 100vh;
}
.dashboard-title {
    letter-spacing: 0.5px;
    color: #1a2442;
}
.dashboard-card {
    border: none;
    border-radius: 1.1rem;
    box-shadow: 0 2px 16px 0 rgba(30, 34, 90, 0.07);
    transition: box-shadow 0.2s;
}
.dashboard-card:hover {
    box-shadow: 0 4px 32px 0 rgba(30, 34, 90, 0.13);
}

.dashboard-link-card {
    cursor: pointer;
}

.dashboard-link-card:focus-visible {
    outline: 3px solid rgba(13, 110, 253, 0.45);
    outline-offset: 2px;
}
.dashboard-icon {
    font-size: 1.7rem;
    opacity: 0.85;
}
.gradient-leads {
    background: linear-gradient(120deg, #e0eaff 0%, #f8fafc 100%);
}
.gradient-members {
    background: linear-gradient(120deg, #eafff0 0%, #f8fafc 100%);
}

.gradient-active-members {
    background: linear-gradient(120deg, #e6fffb 0%, #f8fafc 100%);
}

.gradient-month-leads {
    background: linear-gradient(120deg, #eef2ff 0%, #f8fafc 100%);
}

.gradient-week-leads {
    background: linear-gradient(120deg, #ecfeff 0%, #f8fafc 100%);
}

.text-teal {
    color: #0f766e;
}

.text-indigo {
    color: #4338ca;
}

.text-cyan {
    color: #0e7490;
}
.gradient-archived {
    background: linear-gradient(120deg, #f7eaff 0%, #f8fafc 100%);
}
.gradient-conversion {
    background: linear-gradient(120deg, #eafffa 0%, #f8fafc 100%);
}

.gradient-member-trend {
    background: linear-gradient(120deg, #eafff0 0%, #f8fafc 100%);
}

.gradient-latest-leads {
    background: linear-gradient(120deg, #e8f0ff 0%, #f8fafc 100%);
}

.gradient-recent-members {
    background: linear-gradient(120deg, #f0fdf4 0%, #f8fafc 100%);
}
.dashboard-chart-placeholder {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: repeating-linear-gradient(135deg, #f3f6fa, #f3f6fa 10px, #e9f0ff 10px, #e9f0ff 20px);
    border-radius: 0.7rem;
}
.dashboard-activity-list li {
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.dashboard-activity-list i {
    font-size: 1.2rem;
}

.kyn-snapshot-chart-wrap {
    width: 100%;
    aspect-ratio: 5 / 1;
    max-height: 210px;
}

.kyn-snapshot-chart {
    width: 100%;
    height: 100%;
    display: block;
}

.kyn-chart-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

.kyn-chart-dot-total {
    background: #2563eb;
}

.kyn-chart-dot-active {
    background: #16a34a;
}

.kyn-chart-point {
    cursor: pointer;
    transition: opacity 120ms ease;
    stroke: #ffffff;
    stroke-width: 0.22;
}

.kyn-chart-point:hover {
    opacity: 0.9;
}

.kyn-chart-point-total {
    fill: #2563eb;
}

.kyn-chart-point-active {
    fill: #16a34a;
}

.kyn-market-board {
    border-radius: 0;
    background: transparent;
    border: none;
    overflow: hidden;
    box-shadow: none;
}

.kyn-market-table {
    color: #1e293b;
    margin: 0;
    min-width: 100%;
    table-layout: fixed;
    --bs-table-bg: transparent;
    --bs-table-color: #1e293b;
}

.kyn-market-table thead th {
    color: #1e3a68;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid rgba(59, 98, 167, 0.28);
    white-space: nowrap;
}

.kyn-market-table tbody td {
    padding: 0.72rem 1rem;
    border-top: 1px solid rgba(114, 147, 199, 0.18);
    white-space: normal;
}

.kyn-market-table th:first-child,
.kyn-market-table td:first-child {
    width: 50%;
}

.kyn-market-table th:not(:first-child),
.kyn-market-table td:not(:first-child) {
    width: 25%;
}

.kyn-market-table tbody tr:hover {
    background: transparent;
}

.kyn-stock-screen .kyn-market-table tbody tr:nth-child(even) {
    background: transparent;
}

.kyn-market-inline-delta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.25rem;
    margin-left: 0.45rem;
    font-weight: 700;
    font-size: 0.92rem;
    font-variant-numeric: tabular-nums;
}

.kyn-market-inline-delta.is-up {
    color: #16a34a;
}

.kyn-market-inline-delta.is-down {
    color: #dc2626;
}

.kyn-market-inline-delta.is-flat {
    color: #64748b;
}

.kyn-dashboard-activity-list {
    border-top: 1px solid #eef2f8;
}

.kyn-dashboard-activity-item {
    border: 0;
    border-bottom: 1px solid #eef2f8;
    padding: 0.75rem 0;
    background: transparent;
}

.kyn-dashboard-activity-item:last-child {
    border-bottom: 0;
}

.kyn-dashboard-activity-item:hover,
.kyn-dashboard-activity-item:focus-visible {
    background: #f8fbff;
}

/* Table and Avatar Styles for Leads/Members */
.kyn-table-card {
    border: none;
    border-radius: 1.1rem;
    box-shadow: 0 2px 16px 0 rgba(30, 34, 90, 0.07);
}
.kyn-table {
    font-size: 1.08rem;
    border-radius: 1.1rem;
    overflow: hidden;
}
.kyn-table-row {
    transition: background 0.16s;
}
.kyn-table-row:hover {
    background: #f3f6fa;
}
.kyn-avatar-sm {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 1px 4px 0 rgba(30, 34, 90, 0.10);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.kyn-badge-lead {
    background: #e0eaff;
    color: #1a2442;
    font-weight: 500;
    border-radius: 0.7rem;
    padding: 0.4em 0.9em;
    font-size: 0.98em;
}

.kyn-paged-table-card {
    height: clamp(340px, calc(100vh - 320px), 900px);
    overflow: hidden;
}

.kyn-paged-table-card .card-body {
    min-height: 0;
}

.kyn-table-scroll {
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.kyn-booking-pill {
    font-size: 0.76rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.35rem 0.6rem;
}

.kyn-booking-trial {
    background: #dcfce7;
    color: #166534;
}

.kyn-booking-showed {
    background: #dbeafe;
    color: #1d4ed8;
}

.kyn-booking-nutrition {
    background: #ede9fe;
    color: #6d28d9;
}

.kyn-lead-filters {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.kyn-lead-filters .form-check-label {
    font-weight: 500;
}

.kyn-lead-filters .form-select {
    min-width: 170px;
}

.kyn-loading-hud {
    position: absolute;
    inset: 0;
    z-index: 20;
    background: rgba(248, 250, 252, 0.78);
    backdrop-filter: blur(1.5px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
}

.kyn-loading-hud-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    padding: 0.9rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

.kyn-toast-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: min(360px, calc(100vw - 2rem));
}

.kyn-toast-item {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
    border-radius: 0.75rem;
}

.kyn-command-palette {
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid #e8ecf8;
}

.kyn-skeleton {
    position: relative;
    overflow: hidden;
    background: #e9edf5;
    border-radius: 0.6rem;
}

.kyn-skeleton::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120px;
    height: 100%;
    width: 120px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
    animation: kyn-shimmer 1.2s infinite;
}

.kyn-skeleton-title { height: 18px; width: 45%; }
.kyn-skeleton-line { height: 14px; width: 100%; }
.kyn-skeleton-btn { height: 36px; width: 35%; }

@keyframes kyn-shimmer {
    100% { transform: translateX(320px); }
}

.kyn-empty-state {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 2px 16px rgba(30, 34, 90, 0.07);
}

.kyn-mobile-item {
    border: none;
    border-radius: 0.9rem;
    box-shadow: 0 2px 12px rgba(30, 34, 90, 0.08);
}

.kyn-mobile-actions .btn {
    min-height: 42px;
}

.kyn-mobile-actions-collapsible {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(8px);
    transition: all 180ms ease;
}

.kyn-mobile-actions-collapsible.open {
    max-height: 80px;
    opacity: 1;
    transform: translateY(0);
}

/* Global nav fallback styles (ensures polished look even if scoped CSS doesn't apply) */
.kyn-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0 0.75rem 0.75rem 0.75rem;
}

.kyn-nav-section-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.58);
    font-weight: 700;
    padding: 0.35rem 0.65rem;
}

.kyn-nav-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.72rem 0.8rem;
    border-radius: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none !important;
    font-weight: 600;
    transition: all 0.18s ease;
}

.kyn-nav-link i {
    font-size: 1.05rem;
    opacity: 0.95;
}

.kyn-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
    transform: translateX(2px);
}

.kyn-nav-link.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(13,110,253,0.45), rgba(13,110,253,0.15));
    border-left: 3px solid #4ea0ff;
    box-shadow: 0 8px 16px rgba(13, 110, 253, 0.2);
}

/* Custom modal overlay (used for lead/member popups) */
.kyn-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2600;
    background: rgba(12, 18, 31, 0.56);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.kyn-modal-window {
    width: min(900px, calc(100vw - 2rem));
    margin: 0 auto;
    border-radius: 1rem;
    overflow: visible;
    pointer-events: auto;
}

.kyn-modal-window .modal-content {
    background-color: #ffffff !important;
    opacity: 1 !important;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 26px 64px rgba(15, 23, 42, 0.26);
}

.kyn-modal-window .modal-header,
.kyn-modal-window .modal-body,
.kyn-modal-window .modal-footer {
    background-color: #ffffff;
}

.kyn-modal-window .modal-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #eef2f7;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
    gap: 0.75rem;
}

.kyn-modal-window .modal-title {
    font-weight: 700;
    color: #14213d;
}

.kyn-modal-window .modal-body {
    padding: 1.1rem 1.25rem;
    max-height: calc(100vh - 230px);
    overflow-y: auto;
    overflow-x: hidden;
}

.kyn-modal-window .modal-footer {
    padding: 0.85rem 1.25rem;
    border-top: 1px solid #eef2f7;
    background: #f8fafc;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.kyn-modal-close {
    margin-left: auto;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 0;
}

.kyn-modal-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.kyn-modal-close i {
    font-size: 0.9rem;
    line-height: 1;
}

.kyn-modal-window .form-label {
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.35rem;
}

.kyn-modal-window .form-control,
.kyn-modal-window .form-select {
    min-height: 44px;
    border-radius: 0.65rem;
}

.kyn-modal-window .row {
    --bs-gutter-x: 1rem;
}

@media (max-width: 767.98px) {
    .kyn-has-mobile-bar {
        padding-bottom: 5rem;
    }

    .kyn-mobile-bottom-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1200;
        background: rgba(255, 255, 255, 0.98);
        border-top: 1px solid #e6e8f0;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
        padding: 0.65rem 0.75rem calc(0.65rem + env(safe-area-inset-bottom));
        box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
    }

    .kyn-mobile-bottom-bar .btn {
        min-height: 44px;
        font-weight: 600;
    }

    .kyn-modal-responsive {
        margin: 0;
        max-width: 100%;
        height: 100%;
    }

    .kyn-modal-responsive .modal-content {
        height: 100dvh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .kyn-modal-responsive .modal-content form {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
    }

    .kyn-modal-responsive .modal-body {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        max-height: none;
    }

    .kyn-modal-responsive .modal-footer {
        position: sticky;
        bottom: 0;
        background: #fff;
        border-top: 1px solid #e6e8f0;
    }

    .kyn-modal-overlay {
        align-items: flex-start;
        padding: 0;
    }

    .kyn-table {
        font-size: 0.95rem;
    }

    .kyn-snapshot-chart-wrap {
        aspect-ratio: 3 / 1;
        max-height: 150px;
    }

    .kyn-market-table thead th,
    .kyn-market-table tbody td {
        padding: 0.62rem 0.65rem;
        font-size: 0.9rem;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .kyn-table {
        font-size: 0.98rem;
    }
}
.kyn-badge-member {
    background: #eafff0;
    color: #1a2442;
    font-weight: 500;
    border-radius: 0.7rem;
    padding: 0.4em 0.9em;
    font-size: 0.98em;
}
.kyn-badge-inactive {
    background: #f7eaff;
    color: #1a2442;
    font-weight: 500;
    border-radius: 0.7rem;
    padding: 0.4em 0.9em;
    font-size: 0.98em;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdG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c4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}