:root {
    color-scheme: light;
    --tblr-primary: #0878b5;
    --tblr-primary-rgb: 8, 120, 181;
    --tblr-body-bg: light-dark(#f6f8fb, #111827);
    --tblr-body-color: light-dark(#182433, #e5eaf2);
    --tblr-border-color: light-dark(#e3e8ed, #37465a);
    --tblr-secondary: light-dark(#667382, #b2becf);
    --tblr-link-color: light-dark(#087ab8, #78c9f5);
}
:root[data-theme='dark'] {
    color-scheme: dark;
}
.nav-tabs {
    --tblr-nav-link-color: var(--tblr-secondary);
    --tblr-nav-link-hover-color: var(--tblr-link-color);
}
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.customer-header {
    background: light-dark(#fff, #1f2937);
    border-bottom: 1px solid var(--tblr-border-color);
    padding: 1rem 3vw;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}
.brand img {
    width: 160px;
    height: auto;
}
:root[data-theme='dark'] .brand img {
    background: white;
    padding: 0.3rem;
    border-radius: 0.3rem;
}
.brand span {
    color: var(--tblr-secondary);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}
.theme-toggle { width: 44px; height: 44px; padding: 0; flex-shrink: 0; }
.theme-toggle .theme-sun { display: none; }
[data-theme='dark'] .theme-toggle .theme-sun { display: block; }
[data-theme='dark'] .theme-toggle .theme-moon { display: none; }
.account-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: min(20rem, calc(100vw - 2rem));
    padding: 1rem;
    background: light-dark(#fff, #1f2937);
    border: 1px solid var(--tblr-border-color);
    border-radius: 0.5rem;
    z-index: 10;
    display: grid;
    gap: 0.75rem;
    max-height: calc(100dvh - 6rem);
    overflow-y: auto;
    overscroll-behavior: contain;
}
.account-dropdown a,
.account-dropdown button {
    width: 100%;
}
.customer-shell {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    max-width: 1600px;
    width: 100%;
    margin: auto;
    flex: 1;
}
.customer-nav {
    padding: 1.5rem 1rem;
    border-right: 1px solid var(--tblr-border-color);
}
.customer-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.4rem;
    color: var(--tblr-body-color);
    margin-bottom: 0.25rem;
}
.customer-nav a[aria-current='page'] {
    background: light-dark(#eaf5fc, #223e52);
    color: var(--tblr-link-color);
    font-weight: 600;
}
.icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}
main {
    min-width: 0;
    padding: 2rem;
}
.page-title {
    font-size: 1.6rem;
    letter-spacing: -0.025em;
}
.page-intro {
    margin-bottom: 1.75rem;
}
.page-intro p {
    color: var(--tblr-secondary);
    margin: 0.5rem 0 0;
}
.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.metric {
    padding: 1.25rem;
}
.metric strong {
    display: block;
    font-size: 1.6rem;
    margin: 0.6rem 0 0.2rem;
}
.metric small,
.muted {
    color: var(--tblr-secondary);
}
.content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    align-items: start;
}
.card {
    min-width: 0;
    overflow-wrap: anywhere;
    margin-bottom: 1.25rem;
}
.card-body {
    padding: 1.5rem;
}
.card-title {
    margin-bottom: 0.5rem;
}
form.stack {
    display: grid;
    gap: 1rem;
}
.form-label {
    display: grid;
    gap: 0.4rem;
    margin: 0;
}
textarea {
    min-height: 110px;
}
.empty-panel {
    text-align: center;
    padding: 2.5rem 1rem;
}
.empty-panel .icon {
    width: 36px;
    height: 36px;
    color: var(--tblr-secondary);
    margin-bottom: 1rem;
}
.empty-panel p {
    color: var(--tblr-secondary);
    max-width: 36rem;
    margin: 0.5rem auto 1rem;
}
.empty-panel .empty-action {
    justify-content: center;
}
.customer-timeline {
    --tblr-timeline-icon-size: 2rem;
    margin: 0 0 1.25rem;
}
.customer-timeline .timeline-event-card {
    min-width: 0;
    margin-bottom: 0;
}
.customer-timeline .timeline-event-icon .icon {
    width: 1.125rem;
    height: 1.125rem;
}
.timeline-event-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .25rem 1rem;
    margin-bottom: .75rem;
    overflow-wrap: anywhere;
}
.timeline-event-heading > * {
    min-width: 0;
    max-width: 100%;
}
.timeline-event-heading time {
    font-size: .8125rem;
}
.customer-activity-timeline {
    --tblr-timeline-icon-size: 1.75rem;
    margin: 1rem 0 0;
}
.customer-activity-timeline .timeline-event-card {
    padding-block: .25rem;
    overflow-wrap: anywhere;
}
.customer-activity-timeline .timeline-event-heading {
    margin-bottom: 0;
}
#new-support-ticket {
    scroll-margin-top: 1rem;
}
.table-responsive {
    max-width: 100%;
}
.table th {
    white-space: nowrap;
}
.table td {
    overflow-wrap: anywhere;
}
.table td:first-child {
    min-width: 10rem;
}
.mobile-nav {
    display: none;
}
.login-shell {
    max-width: 440px;
    width: 100%;
    margin: 3rem auto;
    padding: 0 1rem;
}
.login-shell .card-body {
    padding: 2rem;
}
footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--tblr-secondary);
    font-size: 0.8rem;
}
.message-body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.qr svg {
    max-width: 100%;
    height: auto;
}
.recovery-codes {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.alert ul {
    margin: 0;
}
.organization-switch {
    margin: 0 0 1.5rem;
}
.security-form {
    max-width: 32rem;
}
.auth-divider {
    border-top: 1px solid var(--tblr-border-color);
    padding-top: 1rem;
    margin-top: 1rem;
}
@media (max-width: 900px) {
    .customer-shell {
        grid-template-columns: 180px minmax(0, 1fr);
    }
    main {
        padding: 1.5rem;
    }
    .content-grid {
        grid-template-columns: 1fr;
    }
    .metric-grid {
        grid-template-columns: 1fr;
    }
    input,
    select,
    textarea {
        font-size: 16px !important;
    }
}
@media (max-width: 650px) {
    .customer-shell {
        display: block;
    }
    .customer-nav {
        display: none;
    }
    .mobile-nav {
        display: block;
        margin-bottom: 1.25rem;
    }
    main {
        padding: 1.25rem 1rem;
    }
    .customer-header {
        padding: .75rem 1rem;
        gap: .5rem;
    }
    .header-actions {
        margin-left: auto;
    }
    .brand {
        min-height: 44px;
    }
    .brand img { width: 120px; }
    .brand span { display: none; }
    .btn {
        min-height: 44px;
    }
    .card-body {
        padding: 1rem;
    }
    .login-shell {
        margin: 1.5rem auto;
    }
    .metric-grid {
        gap: 0.75rem;
    }
    .metric {
        margin: 0;
    }
    .page-title {
        font-size: 1.4rem;
    }
    .customer-nav a {
        min-height: 44px;
    }
}
@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
.section-heading,
.member-row,
.activity-row,
.button-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.button-row {
    justify-content: flex-start;
}
.member-row,
.activity-row {
    padding: 1rem 0;
    border-bottom: 1px solid var(--tblr-border-color);
}
.member-row > div {
    min-width: 0;
    overflow-wrap: anywhere;
}
.member-row details {
    width: 100%;
}
.service-facts {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.5rem 1rem;
}
.service-facts dt {
    font-weight: 400;
    color: var(--tblr-secondary);
}
.usage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}
.usage-item {
    padding: 1rem;
    background: light-dark(#f6f8fb, #182433);
    border-radius: 0.5rem;
}
progress {
    width: 100%;
    accent-color: var(--tblr-primary);
}
@media (max-width: 650px) {
    .activity-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.25rem;
    }
    .service-facts {
        grid-template-columns: 1fr;
    }
    .service-facts dd {
        margin-bottom: 0.5rem;
    }
}
.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
    gap: 1.25rem;
    align-items: start;
}
.dashboard-grid .content-grid {
    grid-template-columns: 1fr;
}
.quick-actions {
    display: grid;
    gap: 0.75rem;
}
.dashboard-grid > div,
.dashboard-grid aside {
    min-width: 0;
}
@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .metric {
        padding: 1rem;
    }
    .metric strong {
        font-size: 1.4rem;
        margin: 0.25rem 0;
    }
    .metric-grid {
        gap: 0.5rem;
    }
}
.support-filter {
    display: flex;
    gap: 0.75rem;
    align-items: end;
    flex-wrap: wrap;
    margin: 1.25rem 0;
}
.support-filter label:first-child {
    flex: 1;
    min-width: 180px;
}

[data-theme='dark'] .badge.bg-blue-lt {
    color: #9bcfff !important;
    background: #19344f !important;
}
[data-theme='dark'] .badge.bg-green-lt {
    color: #8ce2af !important;
    background: #193d30 !important;
}
[data-theme='dark'] .badge.bg-yellow-lt {
    color: #ffda8a !important;
    background: #49391d !important;
}
.table-scroll-hint { font-size: .8125rem; margin: .75rem 0; }
@media (max-width: 360px) { .brand img { width: 104px; } }
.table-scroll-hint[hidden] { display: none; }
.worker-control-stale[hidden] { display: none; }
@media (max-width: 650px) {
    .metric { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: .25rem .5rem; padding: .75rem 1rem; }
    .metric strong { grid-column: 2; grid-row: 1; text-align: right; font-size: 1rem; margin: 0; }
    .metric small { grid-column: 1 / -1; font-size: .75rem; }
    .metric > span { font-size: .8125rem; }
    .mobile-table { display: block; min-width: 0; }
    .mobile-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .mobile-table tbody { display: grid; gap: .75rem; }
    .mobile-table tr { display: block; border: 1px solid var(--tblr-border-color); border-radius: .5rem; padding: .75rem; }
    .mobile-table td { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: .5rem; min-width: 0 !important; padding: .5rem 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
    .mobile-table td[data-label]::before { content: attr(data-label); color: var(--tblr-secondary); font-weight: 500; }
    .mobile-table td:first-child, .mobile-table td[colspan] { grid-template-columns: 1fr; }
    .mobile-table td > * { min-width: 0; max-width: 100%; justify-self: start; }
}
.notification-toggle { position: relative; width: 44px; height: 44px; box-sizing: border-box; min-height: 44px; padding: .5rem; }
.apple-sign-in { background: #000; color: #fff; border: 1px solid #000; font-size: 1rem; font-weight: 500; min-height: 44px; width: 100%; gap: .5rem; }
.apple-sign-in:hover, .apple-sign-in:focus-visible { background: #222; color: #fff; }
[data-theme='dark'] .apple-sign-in { background: #fff; color: #000; border-color: #fff; }
.notification-toggle .badge { position: absolute; right: -4px; top: -4px; font-size: .625rem; padding: .15rem .25rem; }
@media (max-width: 360px) { .customer-header { display: grid; grid-template-columns: 88px minmax(0, 1fr); padding-inline: .5rem; gap: .25rem; } .customer-header .brand img { width: 88px; } .header-actions { gap: .25rem; margin-left: 0; justify-content: flex-end; } [data-account-menu] > summary { font-size: .75rem; padding-inline: .5rem; } .theme-toggle { width: 44px; padding-inline: .5rem; } }
@media (max-width: 900px), (pointer: coarse) {
    input:not([type='hidden']):not([type='checkbox']):not([type='radio']), select, textarea { font-size: 16px !important; line-height: 1.5 !important; min-height: 44px; }
    .btn, main summary { min-height: 44px; }
    main a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; overflow-wrap: anywhere; }
    main summary:not(.btn):not(.card-body) { padding-block: .6875rem; }
}
