/* The app's own styles. The screens' pieces (ui.page, ui.tabScreen, ui.welcome, ui.list, ui.card…) and the kit's
   (buttons, fields, alerts, windows, drawers) come from the core in vbox.css: change their look in ⋯ › Tema › App
   (colours, corners, density, the tokens --vb-app-*) or, last, in @layer project over the public classes the guide lists
   (core/<version>/docs/app.md §6.4) — never by restyling the others. No inline styles: the CSP refuses them. */
.app { min-height: 100vh; min-height: 100dvh; }
.app-stack { display: flex; flex-direction: column; gap: var(--vb-space-4); }
.app-center { display: flex; flex-direction: column; align-items: center; gap: var(--vb-space-4); text-align: center; }
.app-muted { color: var(--vb-text-muted); font-size: var(--vb-text-sm); }
.app-lead { margin: 0; color: var(--vb-text-muted); }
.app-brand { font-size: var(--vb-text-lg); }
.app-form-alert:empty { display: none; }
.app-login-row { display: flex; align-items: center; justify-content: space-between; gap: var(--vb-space-3); flex-wrap: wrap; }

/* "Minha conta" */
.app-profile { display: flex; flex-direction: column; align-items: center; gap: var(--vb-space-1); padding: var(--vb-space-2) 0; text-align: center; }
.app-profile .vb-app-avatar { margin-bottom: var(--vb-space-2); }
.app-profile__name { font-size: var(--vb-text-lg); }
.app-file { position: absolute; width: 1px; height: 1px; opacity: 0; }
.app-file:focus-visible + label { box-shadow: var(--vb-focus); }
label.is-busy { opacity: 0.6; pointer-events: none; }

/* Sobre */
.app-about { display: flex; flex-direction: column; align-items: center; gap: var(--vb-space-2); padding: var(--vb-space-4) 0; text-align: center; }
.app-about .app-brand { font-size: var(--vb-text-xl); }
.app-about__version { padding: var(--vb-space-1) var(--vb-space-3); border-radius: var(--vb-radius-pill); background: var(--vb-app-group-bg); color: var(--vb-text-muted); font-size: var(--vb-text-sm); }
.app-news { margin: var(--vb-space-1) 0 0; padding-left: var(--vb-space-5); }
.app-news li + li { margin-top: var(--vb-space-1); }

/* Publicações */
.app-prose { padding: var(--vb-space-4); border-radius: var(--vb-app-group-radius); background: var(--vb-app-group-bg); }
.app-check-item { display: flex; align-items: center; justify-content: space-between; gap: var(--vb-space-3); padding: var(--vb-space-3) var(--vb-space-4); }
.app-link { display: inline-flex; align-items: center; gap: var(--vb-space-1); color: var(--vb-accent); text-decoration: none; white-space: nowrap; }
.app-coautor { display: flex; flex-direction: column; gap: var(--vb-space-3); margin: 0; padding: var(--vb-space-4); border: 0;
  border-radius: var(--vb-app-group-radius); background: var(--vb-app-group-bg); }
.app-coautor legend { padding: 0; float: left; }

/* the "Mensagens" screen */
.app-message { padding: var(--vb-space-4); border-radius: var(--vb-app-group-radius); background: var(--vb-app-group-bg); }
.app-message--unread { box-shadow: inset 3px 0 0 var(--vb-accent); }
.app-message__head { display: flex; justify-content: space-between; gap: var(--vb-space-3); }
.app-message__body { margin: var(--vb-space-2) 0 0; white-space: pre-line; }
.app-message__actions { display: flex; flex-wrap: wrap; gap: var(--vb-space-2); margin-top: var(--vb-space-3); }

/* Eventos: the card with its cover, the event's page and the ticket shown at the desk */
.app-evento-capa { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--vb-app-group-radius); }
.app-clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

.app-ticket { display: flex; flex-direction: column; align-items: center; gap: var(--vb-space-2); padding: var(--vb-space-5) var(--vb-space-4);
  border-radius: var(--vb-app-group-radius); background: var(--vb-app-group-bg); text-align: center; }
.app-ticket__head { display: flex; flex-direction: column; gap: var(--vb-space-1); }
.app-ticket__event { font-size: var(--vb-text-lg); line-height: 1.25; }
.app-ticket__when { color: var(--vb-text-muted); font-size: var(--vb-text-sm); }
/* the QR on white, whatever the theme (a reader needs the contrast; the image brings its quiet zone), about 70% of the column */
.app-ticket__qr { display: block; width: min(72vw, 18rem); height: auto; aspect-ratio: 1; margin: var(--vb-space-3) 0 var(--vb-space-1);
  border-radius: var(--vb-radius-md, 0.75rem); background: #fff; image-rendering: pixelated; }
.app-ticket__code { margin: 0; font-family: var(--vb-font-mono, ui-monospace, monospace); font-size: 2rem; font-weight: 700; letter-spacing: 0.12em; }
.app-ticket__name { margin: 0; font-size: var(--vb-text-lg); font-weight: 600; }
.app-ticket__mod { margin: 0; color: var(--vb-text-muted); }
.app-ticket--off .app-ticket__qr { opacity: 0.25; }
.app-ticket--off .app-ticket__code { text-decoration: line-through; color: var(--vb-text-muted); }
.app-ticket__hint { text-align: center; }
/* checked in: still readable (a room reads the badge, not this), a little quieter */
.app-ticket--done .app-ticket__qr { opacity: 0.6; }

/* The wide view (computer, tablet lying down; core app.md §6.5, decision 2026-11-02): the kit keeps lists, forms and a
   page at the reading width, centred (core 0.27); the app's own blocks do the same, never stretched to the content's width. */
@layer project {
  html[data-vb-wide] :is(.vb-app-page__body, .vb-app-content) > .app-stack,
  html[data-vb-wide] :is(.app-center, .app-profile, .app-about, .app-prose, .app-message, .app-ticket, .app-evento-capa) {
    width: 100%; max-width: var(--vb-app-read-width); margin-left: auto; margin-right: auto;
  }
}
