/**
 * Structural layout (Sprint U1): the app shell, the club header, and the
 * page container. No component styling here — that lives in components.css.
 */

/* App shell: header pinned on top, scrollable content below. */
.app-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    min-height: var(--header-h);
    padding: var(--sp-2) var(--sp-4);
    background: var(--c-blue-dark);
    color: var(--c-on-dark);
    box-shadow: var(--shadow);
}

.app-header__brand {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    min-width: 0;
}

.app-header__logo {
    height: 40px;
    width: auto;
    max-width: 60px;
    object-fit: contain;
    flex: 0 0 auto;
}

.app-header__titles {
    min-width: 0;
}

.app-header__title {
    font-size: var(--fs-md);
    font-weight: var(--fw-bold);
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-header__subtitle {
    font-size: var(--fs-xs);
    color: var(--c-on-dark-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-header__spacer {
    flex: 1 1 auto;
}

.app-header__meta {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    flex: 0 0 auto;
}

.app-header__user {
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--c-on-dark);
    max-width: 30vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-header__logout,
.app-header__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border-radius: var(--radius-sm);
    color: var(--c-on-dark);
    background: rgba(255, 255, 255, 0.12);
}
.app-header__logout:hover,
.app-header__back:hover { background: rgba(255, 255, 255, 0.22); }
.app-header__logout svg,
.app-header__back svg { width: 20px; height: 20px; }

/* The Back button sits first (far left), same position on every screen. */
.app-header__back { margin-right: var(--sp-1); }

/* Mobile: keep the full header (back · logo · title · user · sync · logout)
   on one row without horizontal scroll — tighten gaps, drop the subtitle,
   and let the title/user truncate. The logged user stays visible (§5). */
@media (max-width: 480px) {
    .app-header { gap: var(--sp-2); padding-left: var(--sp-2); padding-right: var(--sp-2); }
    .app-header__subtitle { display: none; }
    .app-header__title { font-size: var(--fs-sm); }
    .app-header__user { max-width: 22vw; }
}

/* Page container: centred, comfortable reading width, mobile padding. */
.container {
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: var(--sp-5) var(--sp-4) var(--sp-10);
}

.container--wide {
    max-width: var(--content-max-wide);
}

/* Vertical rhythm between stacked blocks. */
.stack > * + * {
    margin-top: var(--sp-4);
}

/* Centred single-column screen (login). */
.screen-center {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--sp-6) var(--sp-4);
}
