/* ── Brand ── */
.brand-wordmark {
    font-weight: 800;
    letter-spacing: -0.02em;
}
.brand-wordmark-accent {
    background: linear-gradient(135deg, #22c55e, #84cc16);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ── Auth Card ── */
.auth-card {
    width: 100%;
    border-radius: 1rem;
    border: 1px solid rgba(229, 229, 229, 0.8);
    background-color: #fff;
    padding: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}
@media (min-width: 640px) {
    .auth-card { padding: 2rem; }
}

.auth-card-dark {
    width: 100%;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(23, 23, 23, 0.95);
    padding: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
}
@media (min-width: 640px) {
    .auth-card-dark { padding: 2rem; }
}

/* ── Auth Form Fields ── */
.auth-field {
    margin-top: 0.375rem;
    display: block;
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid #d4d4d4;
    background-color: #fff;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #171717;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
.auth-field::placeholder { color: #a3a3a3; }
.auth-field:focus {
    border-color: #10b981;
    outline: none;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}

.auth-field-dark {
    margin-top: 0.375rem;
    display: block;
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid #404040;
    background-color: rgba(23, 23, 23, 0.6);
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #fff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
.auth-field-dark::placeholder { color: #737373; }
.auth-field-dark:focus {
    border-color: #10b981;
    outline: none;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.auth-label {
    display: block;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    color: #404040;
}
.auth-label-dark {
    display: block;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    color: #d4d4d4;
}

/* ── Auth Buttons ── */
.btn-primary {
    display: inline-flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background-color: #059669;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
.btn-primary:hover { background-color: #047857; }
.btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 2px #10b981, 0 0 0 4px #fff;
}
.btn-primary:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.btn-primary-dark {
    display: inline-flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background-color: #10b981;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
.btn-primary-dark:hover { background-color: #34d399; }
.btn-primary-dark:focus {
    outline: none;
    box-shadow: 0 0 0 2px #34d399, 0 0 0 4px #171717;
}
.btn-primary-dark:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.btn-secondary {
    display: inline-flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    border: 1px solid #d4d4d4;
    background-color: #fff;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #404040;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
.btn-secondary:hover { background-color: #fafafa; }
.btn-secondary:focus {
    outline: none;
    box-shadow: 0 0 0 2px #10b981, 0 0 0 4px #fff;
}

/* ── Registration stepper ── */
.register-stepper-track {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    gap: 0.5rem;
}
.register-stepper-track .register-stepper-bar {
    flex: 1 1 0%;
    min-width: 0;
}

/* ── User Portal ── */
.user-header-gradient {
    background: linear-gradient(135deg, #22c55e 0%, #84cc16 100%);
}

.user-metric-card {
    border-radius: 0.75rem;
    border: 1px solid rgba(229, 229, 229, 0.9);
    background-color: #fff;
    padding: 1.25rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    box-shadow: 0 0 0 1px #f5f5f5;
}

.user-metric-card-accent {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    border: 1px solid rgba(167, 243, 208, 0.8);
    background-color: #fff;
    padding: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    box-shadow: 0 0 0 1px rgba(209, 250, 229, 0.8);
}
.user-metric-card-accent::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #22c55e, #84cc16);
}

.user-account-chevron {
    transition: transform 0.2s;
}
.user-account-chevron.is-open {
    transform: rotate(180deg);
}

.dashboard-balance-card > p {
    color: white;
    position: relative;
}
.dashboard-balance-card > p:first-of-type {
    color: #94a3b8;
}

/* ── Dashboard V2 ── */
.dashboard-v2 { width: 100%; }

.dashboard-summary-card {
    min-height: 9rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    padding: 1rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.dashboard-summary-card p {
    font-size: 10px;
    font-weight: 600;
    color: #475569;
}
.dashboard-summary-card strong {
    margin-top: 1.75rem;
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.025em;
    color: #020617;
}
.dashboard-summary-card > span {
    margin-top: 0.5rem;
    display: block;
    font-size: 10px;
    font-weight: 600;
}

.dashboard-summary-icon {
    display: flex;
    height: 2rem;
    width: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.dashboard-panel {
    overflow: hidden;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background-color: #fff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.dashboard-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid #f1f5f9;
    padding: 1rem 1.25rem;
}
.dashboard-panel-heading h2 {
    font-size: 0.875rem;
    font-weight: 700;
    color: #020617;
}
.dashboard-panel-heading p {
    margin-top: 0.25rem;
    font-size: 10px;
    color: #94a3b8;
}

/* ── Customer Portal Pages ── */
.portal-page {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    overflow-x: hidden;
}
@media (min-width: 640px) {
    .portal-page {
        padding-left: 0;
        padding-right: 0;
        overflow: visible;
    }
}

.portal-page-header {
    margin-bottom: 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background-color: #fff;
    padding: 1.25rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
@media (min-width: 640px) {
    .portal-page-header {
        padding: 1.5rem 1.5rem;
    }
}
.portal-page-header h1 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #020617;
}
@media (min-width: 640px) {
    .portal-page-header h1 { font-size: 1.5rem; }
}
.portal-page-header p {
    font-size: 0.75rem;
    line-height: 1.625;
    color: #64748b;
}

.portal-page-header-accent {
    border-color: #059669;
    background-color: #059669;
    color: #fff;
}
.portal-page-header-accent h1 { color: #fff; }
.portal-page-header-accent p { color: #ecfdf5; }

.portal-page-header-dark {
    border-color: #1e293b;
    background-color: #020617;
    color: #fff;
}
.portal-page-header-dark h1 { color: #fff; }
.portal-page-header-dark p { color: #cbd5e1; }

.portal-section {
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background-color: #fff;
    padding: 1.25rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
@media (min-width: 640px) {
    .portal-section { padding: 1.5rem; }
}

.portal-page > section,
.portal-page > div,
.portal-page > header { scroll-margin-top: 1rem; }

.portal-page table { font-size: 0.75rem; }

.portal-page .table-wrap {
    margin-left: -1rem;
    margin-right: -1rem;
    overflow-x: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    -webkit-overflow-scrolling: touch;
}
@media (min-width: 640px) {
    .portal-page .table-wrap {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }
}

.portal-page table thead {
    background-color: #f8fafc;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.portal-page input:not([type='checkbox']):not([type='radio']),
.portal-page select,
.portal-page textarea { border-radius: 0.5rem; }

@media (max-width: 767px) {
    .portal-page-header {
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
        padding: 1.25rem 0;
    }
    .portal-section {
        border-radius: 0.75rem;
        padding: 1.25rem 0;
    }
}

/* ── Dashboard Product Rail ── */
.dashboard-product-rail {
    scrollbar-width: none;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
}
.dashboard-product-rail::-webkit-scrollbar { display: none; }
.dashboard-product-card { scroll-snap-align: start; }

/* ── Dashboard Orders ── */
.dashboard-orders-panel {
    display: flex;
    min-height: 0;
    height: clamp(9rem, calc(100dvh - 47rem), 30rem);
    flex-direction: column;
}
.dashboard-orders-scroll {
    min-height: 0;
    flex: 1 1 auto;
    overscroll-behavior: contain;
}

@media (max-width: 767px) {
    .dashboard-orders-panel {
        min-height: 0;
        height: clamp(12rem, 40dvh, 24rem);
    }
}
@media (min-height: 900px) {
    .dashboard-orders-panel {
        height: clamp(14rem, calc(100dvh - 47rem), 34rem);
    }
}
@media (min-width: 768px) and (max-height: 850px) {
    .dashboard-analytics-row { display: none; }
    .dashboard-orders-panel {
        height: clamp(10rem, calc(100dvh - 29rem), 26rem);
    }
}
@media (min-width: 1024px) {
    .dashboard-v2 {
        display: flex;
        height: 100%;
        min-height: 0;
        flex-direction: column;
        overflow: hidden;
    }
    .dashboard-orders-panel {
        height: auto;
        min-height: 8rem;
        flex: 1 1 8rem;
    }
}

/* ── User Profile ── */
.profile-shell { position: relative; }

.profile-hero {
    position: relative;
    margin-bottom: 2rem;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid rgba(167, 243, 208, 0.4);
    background-image: linear-gradient(to bottom right, rgba(236, 253, 245, 0.9), #fff, rgba(247, 254, 231, 0.4));
    padding: 1.5rem 1.25rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    box-shadow: 0 0 0 1px rgba(209, 250, 229, 0.5);
}
@media (min-width: 640px) {
    .profile-hero { margin-bottom: 2.5rem; padding: 2rem; }
}

.profile-hero-accent {
    pointer-events: none;
    position: absolute;
    right: -3rem;
    top: -3rem;
    height: 10rem;
    width: 10rem;
    border-radius: 50%;
    background-color: rgba(52, 211, 153, 0.15);
    filter: blur(64px);
}
.profile-hero-accent-2 {
    pointer-events: none;
    position: absolute;
    bottom: -4rem;
    left: -2rem;
    height: 11rem;
    width: 11rem;
    border-radius: 50%;
    background-color: rgba(163, 230, 53, 0.2);
    filter: blur(64px);
}

.profile-panel {
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid rgba(229, 229, 229, 0.8);
    background-color: #fff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    box-shadow: 0 0 0 1px rgba(245, 245, 245, 0.9);
}
.profile-panel-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(245, 245, 245, 0.9);
    background-image: linear-gradient(to right, rgba(250, 250, 250, 0.95), #fff, rgba(236, 253, 245, 0.2));
    padding: 1rem 1.25rem;
}
@media (min-width: 640px) {
    .profile-panel-header { padding: 1.25rem 1.5rem; }
}

.profile-aside {
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid rgba(167, 243, 208, 0.5);
    background-color: #fff;
    box-shadow: 0 10px 15px -3px rgba(6, 78, 59, 0.06);
    box-shadow: 0 0 0 1px rgba(209, 250, 229, 0.6);
}

.profile-aside-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-image: linear-gradient(to bottom right, #059669, #059669, #65a30d);
    padding: 2rem 1.25rem;
    text-align: center;
    color: #fff;
}
@media (min-width: 640px) {
    .profile-aside-hero { padding: 2rem 1.5rem; }
}
.profile-aside-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 80% 60% at 90% 0%, rgba(255, 255, 255, 0.14), transparent 55%);
}

.profile-avatar {
    position: relative;
    z-index: 1;
    display: flex;
    height: 4.75rem;
    width: 4.75rem;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 1rem;
    background-color: rgba(255, 255, 255, 0.2);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #fff;
    box-shadow: 0 10px 15px -3px rgba(6, 78, 59, 0.2);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.profile-field {
    margin-top: 0.375rem;
    display: block;
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid rgba(229, 229, 229, 0.9);
    background-color: #fff;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    color: #171717;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
.profile-field::placeholder { color: #a3a3a3; }
.profile-field:hover { border-color: rgba(212, 212, 212, 0.9); }
.profile-field:focus {
    border-color: #10b981;
    outline: none;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.profile-save-bar {
    display: flex;
    flex-direction: column-reverse;
    gap: 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(167, 243, 208, 0.4);
    background-image: linear-gradient(to right, rgba(236, 253, 245, 0.8), #fff, rgba(247, 254, 231, 0.3));
    padding: 1rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    box-shadow: 0 0 0 1px rgba(209, 250, 229, 0.4);
}
@media (min-width: 640px) {
    .profile-save-bar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1.5rem;
        padding: 1.25rem 1.5rem;
    }
}

.profile-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 0;
    transition: background-color 150ms;
}
.profile-stat-row:hover { background-color: rgba(250, 250, 250, 0.6); }
@media (min-width: 640px) {
    .profile-stat-row { gap: 1rem; }
}

.profile-stat-icon {
    display: flex;
    height: 2.25rem;
    width: 2.25rem;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 0.5rem;
    background-color: #f5f5f5;
    color: #737373;
    box-shadow: 0 0 0 1px rgba(229, 229, 229, 0.8);
}

/* ── User Support Page ── */
.support-hero {
    position: relative;
    margin-bottom: 2rem;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid rgba(186, 230, 253, 0.4);
    background-image: linear-gradient(to bottom right, rgba(240, 249, 255, 0.9), #fff, rgba(236, 253, 245, 0.4));
    padding: 1.5rem 1.25rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    box-shadow: 0 0 0 1px rgba(224, 242, 254, 0.5);
}
@media (min-width: 640px) {
    .support-hero { margin-bottom: 2.5rem; padding: 2rem; }
}

.support-hero-blob {
    pointer-events: none;
    position: absolute;
    right: -2.5rem;
    top: -2.5rem;
    height: 9rem;
    width: 9rem;
    border-radius: 50%;
    background-color: rgba(125, 211, 252, 0.2);
    filter: blur(64px);
}
.support-hero-blob-2 {
    pointer-events: none;
    position: absolute;
    bottom: -3rem;
    left: -2.5rem;
    height: 10rem;
    width: 10rem;
    border-radius: 50%;
    background-color: rgba(110, 231, 183, 0.15);
    filter: blur(64px);
}

.support-status-pulse {
    position: relative;
    display: flex;
    height: 0.75rem;
    width: 0.75rem;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: #10b981;
    animation: support-pulse 2s ease-in-out infinite;
}
@keyframes support-pulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45);
    }
    50% {
        opacity: 0.95;
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
}

.support-channel {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid rgba(229, 229, 229, 0.8);
    background-color: #fff;
    padding: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    box-shadow: 0 0 0 1px rgba(245, 245, 245, 0.9);
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
.support-channel:hover {
    border-color: rgba(110, 231, 183, 0.8);
    box-shadow: 0 10px 15px -3px rgba(6, 78, 59, 0.05);
}
@media (min-width: 640px) {
    .support-channel { padding: 1.5rem; }
}

.support-channel-primary {
    border-color: rgba(167, 243, 208, 0.7);
    background-image: linear-gradient(to bottom right, #fff, rgba(236, 253, 245, 0.4));
    box-shadow: 0 0 0 1px rgba(209, 250, 229, 0.5);
}

.support-faq {
    border-radius: 0.75rem;
    border: 1px solid rgba(229, 229, 229, 0.8);
    background-color: #fff;
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 500;
    color: #171717;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    box-shadow: 0 0 0 1px rgba(245, 245, 245, 0.8);
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
.support-faq:hover { background-color: rgba(250, 250, 250, 0.8); }

.support-shortcut {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(229, 229, 229, 0.8);
    background-color: #fff;
    padding: 1.25rem 1rem;
    text-align: center;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    box-shadow: 0 0 0 1px rgba(245, 245, 245, 0.8);
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
.support-shortcut:hover {
    border-color: #a7f3d0;
    background-color: rgba(236, 253, 245, 0.4);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ── Mobile User Bottom Nav ── */
.user-bottom-nav {
    -webkit-tap-highlight-color: transparent;
}

/* ── Admin Panel ── */
.admin-app {
    font-size: 15px;
    line-height: 1.625;
    color: #171717;
}
@media (min-width: 640px) {
    .admin-app {
        font-size: 1rem;
        line-height: 1.625;
    }
}

.admin-app main th { font-weight: 600; color: #262626; }

.admin-app main table { width: 100%; font-size: 0.875rem; }

.admin-app .table-responsive {
    margin-left: -1rem;
    margin-right: -1rem;
    overflow-x: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    -webkit-overflow-scrolling: touch;
}
@media (min-width: 640px) {
    .admin-app .table-responsive {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }
}

.admin-app main table thead {
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    background-color: rgba(248, 250, 252, 0.9);
}
.admin-app main table th {
    white-space: nowrap;
    padding: 0.75rem 1rem;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
}
.admin-app main table td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
    color: #334155;
}
.admin-app main table tbody { border-collapse: collapse; }
.admin-app main table tbody tr { transition: background-color 150ms; }
.admin-app main table tbody tr:hover { background-color: rgba(236, 253, 245, 0.3); }

.admin-app main section,
.admin-app main .rounded-2xl,
.admin-app main .rounded-xl { scroll-margin-top: 6rem; }

.admin-app main input:not([type='checkbox']):not([type='radio']):not([type='hidden']),
.admin-app main select,
.admin-app main textarea {
    border-color: #e2e8f0;
    background-color: #fff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
.admin-app main input:not([type='checkbox']):not([type='radio']):not([type='hidden'])::placeholder,
.admin-app main select::placeholder,
.admin-app main textarea::placeholder { color: #94a3b8; }
.admin-app main input:not([type='checkbox']):not([type='radio']):not([type='hidden']):focus,
.admin-app main select:focus,
.admin-app main textarea:focus {
    border-color: #10b981;
    outline: none;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}

.admin-app main button:focus,
.admin-app main a:focus { outline: none; }
.admin-app main button:focus-visible,
.admin-app main a:focus-visible {
    box-shadow: 0 0 0 2px #10b981, 0 0 0 4px #fff;
}

.admin-pagination nav,
.admin-app main nav[role='navigation'] {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.admin-pagination nav > div,
.admin-app main nav[role='navigation'] > div { min-width: 0; }

.admin-pagination nav span[aria-current='page'] > span {
    border-color: #059669;
    background-color: #059669;
    color: #fff;
}
.admin-pagination nav a,
.admin-pagination nav span { border-radius: 0.5rem; }

/* ── Force hide mobile drawer on large screens ── */
@media (min-width: 1024px) {
    #user-mobile-drawer {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
}

/* ── Closed overlays must never intercept taps ── */
#user-mobile-drawer.hidden,
#admin-mobile-drawer.hidden,
#user-ai-mobile-overlay.hidden,
#user-ai-sidebar.hidden,
#buy-data-modal.hidden,
#dashboard-welcome-notice.hidden {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.user-bottom-nav,
.user-bottom-nav a,
.user-bottom-nav button,
#user-ai-mobile-open,
.user-whatsapp-fab,
#user-mobile-menu-open,
#admin-mobile-menu-open {
    pointer-events: auto !important;
}

#user-ai-mobile-open {
    z-index: 80 !important;
}
.user-whatsapp-fab {
    z-index: 45 !important;
}
.user-bottom-nav {
    z-index: 40 !important;
}

/* ── AI chat message formatting ── */
.user-ai-messages {
    scroll-behavior: smooth;
}
.user-ai-row {
    display: flex;
    gap: 0.625rem;
    align-items: flex-start;
}
.user-ai-row-user {
    justify-content: flex-end;
}
.user-ai-avatar {
    margin-top: 0.125rem;
    display: flex;
    height: 1.75rem;
    width: 1.75rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.75rem;
}
.user-ai-bubble {
    max-width: 88%;
    border-radius: 1rem;
    padding: 0.8rem 0.95rem;
    font-size: 0.8125rem;
    line-height: 1.55;
    word-break: break-word;
}
.user-ai-bubble-user {
    border-top-right-radius: 0.375rem;
    background: #059669;
    color: #fff;
    white-space: pre-wrap;
}
.user-ai-bubble-assistant {
    border-top-left-radius: 0.375rem;
    background: #f1f5f9;
    color: #334155;
}
.user-ai-bubble-assistant > :first-child {
    margin-top: 0;
}
.user-ai-bubble-assistant > :last-child {
    margin-bottom: 0;
}
.user-ai-bubble-assistant p {
    margin: 0 0 0.55rem;
}
.user-ai-bubble-assistant .user-ai-heading {
    margin: 0 0 0.45rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #0f172a;
}
.user-ai-bubble-assistant strong {
    font-weight: 700;
    color: #0f172a;
}
.user-ai-bubble-assistant em {
    font-style: italic;
}
.user-ai-bubble-assistant .user-ai-code {
    display: inline-block;
    border-radius: 0.35rem;
    background: #e2e8f0;
    padding: 0.05rem 0.35rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    color: #0f172a;
}
.user-ai-list {
    margin: 0.15rem 0 0.65rem;
    padding-left: 1.1rem;
}
.user-ai-list li {
    margin: 0.2rem 0;
    padding-left: 0.15rem;
}
.user-ai-list li::marker {
    color: #059669;
}
.user-ai-notice {
    border-radius: 0.75rem;
    border: 1px solid #fde68a;
    background: #fffbeb;
    padding: 0.65rem 0.8rem;
    font-size: 0.625rem;
    line-height: 1.4;
    color: #92400e;
}

/* ── User AI Sidebar width constraint ── */
@media (max-width: 1279px) {
    #user-ai-sidebar {
        width: min(100vw, 24rem) !important;
        max-width: 100vw !important;
    }
}

/* ── Mobile green header for customer portal pages ── */
@media (max-width: 767px) {
    .portal-page > .portal-page-header,
    .portal-page > header.portal-page-header,
    .profile-hero.portal-page-header,
    .support-hero.portal-page-header {
        margin-left: -1rem;
        margin-right: -1rem;
        margin-top: -1.25rem;
        margin-bottom: 1.25rem;
        border-radius: 0 0 2rem 2rem;
        border: none;
        background-color: #10b981;
        padding: 1.75rem 1rem 2rem 1rem;
        text-align: left;
        color: #fff;
        box-shadow: 0 10px 15px -3px rgba(21, 128, 61, 0.15);
        background-image: none;
    }
    .portal-page > .portal-page-header h1,
    .portal-page > header.portal-page-header h1,
    .profile-hero.portal-page-header h1,
    .support-hero.portal-page-header h1 {
        font-size: 1.5rem;
        font-weight: 800;
        letter-spacing: -0.025em;
        color: #fff;
    }
    .portal-page > .portal-page-header p,
    .portal-page > header.portal-page-header p,
    .profile-hero.portal-page-header p,
    .support-hero.portal-page-header p { color: #ecfdf5; }
    .portal-page > .portal-page-header a,
    .portal-page > header.portal-page-header a,
    .profile-hero.portal-page-header a,
    .support-hero.portal-page-header a,
    .portal-page > .portal-page-header button,
    .portal-page > header.portal-page-header button {
        border-color: rgba(255, 255, 255, 0.3);
        background-color: #fff;
        color: #065f46;
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    }
    .portal-page > .portal-page-header a:hover,
    .portal-page > header.portal-page-header a:hover,
    .profile-hero.portal-page-header a:hover,
    .support-hero.portal-page-header a:hover,
    .portal-page > .portal-page-header button:hover,
    .portal-page > header.portal-page-header button:hover {
        background-color: #ecfdf5;
    }
}
