/* Identidade LS Energy sobre o Pico.css. Cores da marca em um lugar so. */
:root:not([data-theme=dark]) {
  --brand-ink: #150f00;
  --brand-accent: #f5b400;
  --brand-accent-hover: #dfa300;
  --page-bg: #f4f2ed;
  --line: #e4e0d6;
  --muted: #6b6558;

  --pico-background-color: var(--page-bg);
  --pico-color: #2a251a;
  --pico-h1-color: var(--brand-ink);
  --pico-h2-color: var(--brand-ink);
  --pico-muted-color: var(--muted);
  --pico-muted-border-color: var(--line);
  --pico-border-radius: .625rem;

  --pico-primary: var(--brand-ink);
  --pico-primary-hover: #5a4700;
  --pico-primary-underline: rgba(21, 15, 0, .35);
  --pico-primary-hover-underline: var(--pico-primary-hover);
  --pico-primary-background: var(--brand-accent);
  --pico-primary-border: var(--brand-accent);
  --pico-primary-hover-background: var(--brand-accent-hover);
  --pico-primary-hover-border: var(--brand-accent-hover);
  --pico-primary-inverse: var(--brand-ink);
  --pico-primary-focus: rgba(245, 180, 0, .4);

  --pico-card-background-color: #fff;
  --pico-card-border-color: var(--line);
  --pico-card-box-shadow: 0 1px 2px rgba(21, 15, 0, .05), 0 6px 20px rgba(21, 15, 0, .06);
  --pico-form-element-background-color: #fff;
  --pico-form-element-border-color: #cfc9bb;
  --pico-form-element-active-border-color: var(--brand-ink);
  --pico-form-element-focus-color: var(--pico-primary-focus);
}

body { min-height: 100vh; display: flex; flex-direction: column; }
h1 { font-size: 1.6rem; margin-bottom: .35rem; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin-bottom: .75rem; }
button, [type=submit], [type=button], [role=button] { font-weight: 600; }

/* Cabecalho da marca */
body > header.brand { background: var(--brand-ink); padding: 0; }
.brand-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 auto; padding: .9rem 1.25rem; max-width: 72rem; }
.brand-logo { display: block; line-height: 0; }
.brand-logo img { height: 2.25rem; width: auto; }
.is-public .brand-inner { justify-content: center; padding: 1.75rem 1.25rem; }
.is-public .brand-logo img { height: 3rem; }
.brand-actions { display: flex; align-items: center; gap: .9rem; margin: 0; }
.brand-user { color: #cfc8b4; font-size: .875rem; }
.btn-ghost { width: auto; margin: 0; padding: .35rem .9rem; font-size: .875rem; background: transparent; border: 1px solid rgba(255, 255, 255, .35); color: #fff; }
.btn-ghost:hover, .btn-ghost:focus { background: rgba(255, 255, 255, .12); border-color: #fff; color: #fff; }

/* Estrutura */
body > main { flex: 1; width: 100%; margin: 0 auto; padding: 2rem 1.25rem 3rem; }
.page-narrow { max-width: 27rem; }
.page-wide { max-width: 72rem; }
.is-public > main { padding-top: 2.5rem; }
body > footer.site-footer { text-align: center; padding: 1.25rem; color: var(--muted); }

.panel { margin: 0; padding: 1.75rem; border: 1px solid var(--line); }
.panel form { margin: 0; }
.panel form > button[type=submit] { margin: .5rem 0 0; }
.panel-center { text-align: center; }
.lead { color: var(--muted); margin-bottom: 1.25rem; }
.hint { color: var(--muted); font-size: .9rem; }
.eyebrow { margin: 0 0 .35rem; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8a6500; }
.below-panel { text-align: center; margin-top: 1.25rem; }
.panel-center .hint { margin: 1rem 0 0; }

.notice { padding: .7rem .9rem; border-radius: var(--pico-border-radius); background: #fff7dc; border: 1px solid #f0d98a; color: #4a3a00; font-size: .95rem; }
.notice.error { background: #fdecea; border-color: #f3b9b3; color: #8f1d14; }

.open-button { display: flex; width: 100%; align-items: center; justify-content: center; gap: .6rem; margin-top: 1.25rem; padding: 1.05rem 1rem; font-size: 1.2rem; }
.icon { flex: none; }

/* Admin: cabecalho da pagina e filtro */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head h1 { margin: 0; }
.page-head [role=button] { margin: 0; }
.page-sub { margin: .25rem 0 0; color: var(--muted); font-size: .95rem; }
.back { margin: 0 0 .75rem; font-size: .9rem; }
.filter-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.filter { flex: 1; max-width: 30rem; margin: 0; }
.filter-row a { font-size: .9rem; white-space: nowrap; }

/* Admin: projetos em cartoes */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr)); gap: 1rem; }
.project-card { display: flex; flex-direction: column; gap: 1rem; margin: 0; padding: 1.15rem 1.25rem 1.25rem; border: 1px solid var(--line); border-top: 3px solid var(--brand-accent); }
.project-card.is-inactive { border-top-color: #b9b3a5; background: #faf9f6; box-shadow: none; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.card-top h2 { margin: 0; font-size: 1.1rem; line-height: 1.3; overflow-wrap: anywhere; }
.card-top h2 a { text-decoration: none; }
.card-top h2 a:hover { text-decoration: underline; }
.is-inactive .card-top h2 a { color: var(--muted); }
.card-meta { display: flex; gap: 1.5rem; margin: 0; font-size: .875rem; }
.card-meta dt { font-weight: 400; color: var(--muted); font-size: .75rem; }
.card-meta dd { margin: 0; }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: auto; }
.card-actions form { margin: 0; }
.card-actions button, .card-actions [role=button] { width: auto; margin: 0; padding: .4rem .8rem; font-size: .875rem; }

.badge { flex: none; padding: .15rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.badge-on { background: #e3f4e8; color: #17603a; }
.badge-off { background: #ebe8e0; color: #5f594c; }

.empty { margin: 0; padding: 2.5rem 1.5rem; text-align: center; border: 1px dashed #cfc9bb; box-shadow: none; background: transparent; color: var(--muted); }
.empty p { margin-bottom: 1rem; }
.empty p:last-child { margin-bottom: 0; }

/* Admin: formulario do projeto */
.single { max-width: 38rem; }
.split { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.side { display: grid; gap: 1rem; align-content: start; }
@media (min-width: 60rem) { .split { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; } }
.password-row { display: flex; gap: .5rem; }
.password-row input { margin-bottom: .25rem; }
.password-row button { width: auto; margin-bottom: .25rem; white-space: nowrap; }
.qr { display: block; width: 11rem; height: auto; margin: 0 0 .75rem; border: 1px solid var(--line); border-radius: .5rem; }
code.url { display: block; padding: .5rem .65rem; font-size: .75rem; word-break: break-all; }
.btn-danger { background: transparent; border: 1px solid #d9a19b; color: #a3261b; }
.btn-danger:hover, .btn-danger:focus { background: #a3261b; border-color: #a3261b; color: #fff; }

@media (max-width: 30rem) {
  body > main { padding: 1.25rem 1rem 2rem; }
  .panel { padding: 1.25rem; }
  .brand-user { display: none; }
  .page-head [role=button] { width: 100%; text-align: center; }
}

/* Menu do admin */
.brand-nav { display: flex; gap: 1.25rem; margin-left: auto; margin-right: .75rem; }
.brand-nav a { color: #e9e3d0; font-size: .95rem; font-weight: 600; text-decoration: none; }
.brand-nav a:hover, .brand-nav a:focus { color: #fff; text-decoration: underline; text-decoration-color: var(--brand-accent); text-underline-offset: .35rem; }

/* Seguranca e usuarios */
.split-even { grid-template-columns: 1fr; }
@media (min-width: 60rem) { .split.split-even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.panel-head h2 { margin: 0; }
.panel form + form { margin-top: .75rem; }
.code-input { max-width: 11rem; font-size: 1.25rem; letter-spacing: .2em; font-variant-numeric: tabular-nums; }
.steps { padding-left: 1.2rem; color: var(--muted); font-size: .9rem; }
.steps li { margin-bottom: .35rem; }
.badge-brand { background: var(--brand-ink); color: #fff; }
.project-card.is-plain { border-top-color: #b9b3a5; }
.btn-link { width: auto; margin: 0; padding: 0; background: none; border: 0; color: var(--muted); font-size: .9rem; font-weight: 400; text-decoration: underline; }
.btn-link:hover, .btn-link:focus { background: none; color: var(--brand-ink); }
.panel small + button[type=submit], .panel .btn-danger { margin-top: .5rem; }
.panel form > .btn-danger { display: block; width: auto; }
.panel form small + label { margin-top: .9rem; }

@media (max-width: 40rem) {
  .brand-inner { flex-wrap: wrap; row-gap: .6rem; }
  .brand-nav { order: 3; width: 100%; margin: 0; gap: 1.5rem; padding-top: .6rem; border-top: 1px solid rgba(255, 255, 255, .15); }
}
