/* AppBar, tab strip, and the main content column. */

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

.appbar {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    border-bottom: 1px solid color-mix(in oklab, var(--border) 40%, transparent);
    background: var(--appbar);
    padding-top: env(safe-area-inset-top);
}

.appbar__inner {
    display: flex;
    height: 4rem;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .appbar__inner {
        padding: 0 1.5rem;
    }
}

.appbar__logo img {
    height: 2.5rem;
    width: auto;
    object-fit: contain;
}
.appbar__logo--sm {
    display: block;
}
.appbar__logo--lg {
    display: none;
}
@media (min-width: 768px) {
    .appbar__logo--sm {
        display: none;
    }
    .appbar__logo--lg {
        display: block;
    }
}

/* Read-only demo: the account control is inert, so it is a plain element with
   no hover, no pointer and no focus stop — nothing here claims to be a button. */
.appbar__user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.5rem;
    border-radius: 999px;
}

.avatar {
    display: flex;
    height: 2rem;
    width: 2rem;
    flex: none;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 2px solid color-mix(in oklab, var(--primary) 20%, transparent);
    background: var(--primary);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
}

.appbar__username {
    display: none;
    font-size: 0.875rem;
    font-weight: 500;
}
@media (min-width: 768px) {
    .appbar__username {
        display: inline-block;
    }
}

.tabs {
    position: sticky;
    top: 4rem;
    z-index: 10;
    border-bottom: 1px solid var(--border);
    background: var(--card);
}

.tabs__inner {
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}
.tabs__list {
    display: flex;
    gap: 0.25rem;
}

.tab {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    background: none;
    border: 0;
    cursor: pointer;
    color: var(--muted-foreground);
    transition: color 200ms;
}

.tab:hover:not([disabled]) {
    color: var(--foreground);
}
.tab[aria-selected="true"] {
    color: var(--primary);
}
.tab[disabled] {
    cursor: not-allowed;
    opacity: 0.5;
}

.tab__indicator {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    background: var(--primary);
}

.main {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
}

/* The product ships this tab full-bleed because it is primarily a Capacitor
   app on a phone. Read on a desktop browser that leaves the summary row and the
   energy diagram stranded at opposite ends of the viewport, so the preview caps
   the measure instead. Phone rendering is unchanged. */
.panel {
    width: 100%;
    max-width: 90rem;
    margin-inline: auto;
}
.stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
