:root {
  --bg: #0f0f12;
  --bg-card: #1a1a21;
  --bg-elevated: #22222c;
  --text: #f4f4f6;
  --text-muted: #9b9bab;
  --accent: #c8f542;
  --accent-dim: #a3c935;
  --whatsapp: #25d366;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 16px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --font: "DM Sans", system-ui, sans-serif;
  --font-display: "Playfair Display", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 15, 18, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  gap: 0.75rem;
  position: relative;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.user-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

#userName {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
}

/* Hero */
.hero {
  padding: 5rem 0 4rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(200, 245, 66, 0.12), transparent),
    var(--bg);
}

.hero__tag {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.15;
  margin: 0 0 1.25rem;
  max-width: 16ch;
}

.hero__text {
  color: var(--text-muted);
  max-width: 52ch;
  margin: 0 0 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

@media (hover: none) {
  .btn:hover {
    transform: none;
  }

  .btn:active {
    transform: scale(0.98);
    opacity: 0.92;
  }
}

/* Evita zoom ao focar campos no iOS */
input,
select,
textarea,
.auth-form input,
.admin-novo-form input,
.admin-novo-form select,
.agenda-form input,
.agenda-form textarea,
.agenda-form select,
.arquivo-label input[type="date"],
.arquivo-label select {
  font-size: 16px;
}

.btn--primary {
  background: var(--accent);
  color: #111;
}

.btn--primary:hover {
  background: var(--accent-dim);
}

.btn--outline {
  border-color: var(--border);
  color: var(--text);
  background: transparent;
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--whatsapp {
  background: var(--whatsapp);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn--small {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

/* Botão de login genérico no header */
.btn--login {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid rgba(200, 245, 66, 0.45);
  padding: 0.55rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}

.btn--login:hover {
  background: rgba(200, 245, 66, 0.1);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section--dark {
  background: var(--bg-card);
}

.section--cta {
  text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, #14141a 100%);
}

.section__header {
  margin-bottom: 2.5rem;
}

.section__header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin: 0 0 0.5rem;
}

.section__header p {
  color: var(--text-muted);
  margin: 0;
  max-width: 55ch;
}

/* Equipe */
.equipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.equipe-card {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  transition: border-color 0.2s, transform 0.2s;
}

.equipe-card:hover {
  border-color: rgba(200, 245, 66, 0.3);
  transform: translateY(-4px);
}

.equipe-card img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 3px solid var(--bg-elevated);
}

.equipe-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
}

.equipe-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Projetos */
.projetos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.projeto-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.projeto-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(200, 245, 66, 0.25);
}

.projeto-card__img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.projeto-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.projeto-card:hover .projeto-card__img-wrap img {
  transform: scale(1.05);
}

.projeto-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.projeto-card:hover .projeto-card__overlay {
  opacity: 1;
}

.projeto-card__overlay span {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}

.projeto-card__body {
  padding: 1.25rem;
}

.projeto-card__categoria {
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.projeto-card h3 {
  margin: 0.35rem 0 0.5rem;
  font-size: 1.15rem;
}

.projeto-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Agenda */
.agenda-bloqueio {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.agenda-bloqueio p {
  color: var(--text-muted);
  margin: 0 0 1.25rem;
}

.agenda-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.agenda-erro-rede__icone {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.agenda-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

/* Calendário semanal */
.agenda-calendario {
  grid-column: 1 / -1;
}

.agenda-cal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.agenda-cal__header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.agenda-cal__semana {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.agenda-cal__grid {
  display: grid;
  grid-template-columns: 70px repeat(6, minmax(72px, 1fr));
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  font-size: 0.82rem;
  -webkit-overflow-scrolling: touch;
}

.agenda-cal__empty {
  padding: 1rem;
  color: var(--text-muted);
  grid-column: 1 / -1;
  margin: 0;
}

.agenda-cal__cell {
  padding: 0.55rem 0.4rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
  vertical-align: middle;
}

.agenda-cal__cell:last-child,
.agenda-cal__cell.agenda-cal__cell--last-col {
  border-right: none;
}

.agenda-cal__cell--header {
  background: var(--bg-elevated);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.agenda-cal__cell--hora {
  background: var(--bg-elevated);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: right;
  padding-right: 0.75rem;
}

.agenda-cal__cell--livre {
  cursor: pointer;
  transition: background 0.15s;
}

.agenda-cal__cell--livre:hover {
  background: rgba(200, 245, 66, 0.12);
}

.agenda-cal__slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(200, 245, 66, 0.1);
  border: 1px solid rgba(200, 245, 66, 0.3);
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s, border-color 0.15s;
}

.agenda-cal__slot:hover,
.agenda-cal__slot.selected {
  background: rgba(200, 245, 66, 0.25);
  border-color: var(--accent);
}

.agenda-cal__slot.selected {
  color: #111;
  background: var(--accent);
  border-color: var(--accent);
}

.agenda-cal__cell--passado {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  opacity: 0.35;
  font-size: 0.75rem;
}

.agenda-cal__cell--ocupado {
  background: rgba(255, 255, 255, 0.03);
}

.agenda-cal__ocupado {
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.6;
}

.agenda-lista__header h3 {
  margin: 0;
  font-size: 1.15rem;
}

.agenda-lista-card {
  margin-top: 1.5rem;
}

#agendaLogado {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.agenda-cal__hint {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: -0.75rem 0 1rem;
}

.slot-form-wrap {
  margin-top: 1.5rem;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.slot-form__topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.slot-form__slot-info {
  font-weight: 600;
  font-size: 1rem;
}

.slot-form__slot-info span {
  color: var(--accent);
}

.slot-form__fechar {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 1.4rem;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
}

.slot-form__fechar:hover {
  color: var(--text);
}

.agenda-usuario-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.agenda-usuario-info img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.agenda-usuario-info strong {
  display: block;
  font-size: 0.95rem;
}

.agenda-usuario-info span {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.agenda-form h3,
.agenda-lista h3 {
  margin: 0 0 1.25rem;
  font-size: 1.15rem;
}

.agenda-form label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.agenda-form input,
.agenda-form select,
.agenda-form textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.agenda-form input:focus,
.agenda-form select:focus,
.agenda-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.assunto-picker {
  margin-bottom: 1rem;
}

.assunto-picker__label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.assunto-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.assunto-chip {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: 0.2s ease;
}

.assunto-chip:hover {
  border-color: var(--accent);
}

.assunto-chip.is-active {
  background: var(--accent);
  color: #121212;
  border-color: var(--accent);
  font-weight: 700;
}

.form-feedback {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  min-height: 1.4em;
}

.form-feedback--ok {
  color: var(--accent);
}

.form-feedback--erro {
  color: #ff6b6b;
}

.agenda-lista__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.agenda-lista__hint {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0 0 1rem;
}

.agenda-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.agenda-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

.agenda-item__assunto {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.agenda-item__meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.agenda-item__status {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(200, 245, 66, 0.12);
  color: var(--accent);
}

.agenda-item__status--past {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.agenda-item__status--cancelled {
  background: rgba(255, 107, 107, 0.14);
  color: #ff8b8b;
}

.agenda-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.agenda-item__actions button {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
}

.agenda-item__actions button:hover {
  border-color: var(--accent);
}

.agenda-item__actions .btn-remover:hover {
  border-color: #ff6b6b;
  color: #ff6b6b;
}

.agenda-empty {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 2rem 1rem;
}

.hidden {
  display: none !important;
}

.auth-gate {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 14, 0.88);
  backdrop-filter: blur(4px);
  z-index: 999;
}

.auth-gate.hidden {
  display: none !important;
}

/* Auth modal */
.auth-gate-modal {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(440px, 92vw);
  width: 100%;
}

.auth-gate-modal[open] {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 100vw;
  max-height: 100dvh;
  margin: auto;
  padding: 1rem;
  box-sizing: border-box;
}

.auth-gate-modal::backdrop {
  background: rgba(8, 8, 12, 0.82);
  backdrop-filter: blur(10px);
}

.auth-gate-modal .auth-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: calc(var(--radius) + 4px);
  padding: 2.25rem 1.75rem 1.75rem;
  text-align: center;
  background:
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(200, 245, 66, 0.14), transparent 55%),
    linear-gradient(180deg, #22222c 0%, var(--bg-card) 100%);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(200, 245, 66, 0.06) inset;
}

.auth-gate-modal .auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 56%;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.85;
}

.auth-card__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.auth-card__close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.auth-card__icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(200, 245, 66, 0.12);
  border: 1px solid rgba(200, 245, 66, 0.28);
  color: var(--accent);
}

.auth-card__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.auth-gate-modal .auth-card h2 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 4vw, 1.85rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.auth-card__desc {
  margin: 0 auto 1.35rem;
  max-width: 30ch;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.auth-card__google {
  width: 100%;
  overflow: visible;
}

.btn-google-wrap {
  position: relative;
  width: 100%;
  min-height: 50px;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: 100%;
  min-height: 50px;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
}

.btn-google--visual {
  pointer-events: none;
  background: #fff;
  color: #1f1f1f;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.btn-google__icon {
  flex-shrink: 0;
}

.btn-google__native {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  border-radius: 999px;
  opacity: 0.01;
  cursor: pointer;
}

.btn-google__native > div,
.btn-google__native iframe {
  width: 100% !important;
  min-height: 50px !important;
  margin: 0 !important;
}

.auth-gate-modal .form-feedback {
  margin: 0.85rem 0 0;
  min-height: 1.25rem;
  font-size: 0.88rem;
}

.auth-card__cancel {
  margin-top: 1rem;
  padding: 0.35rem 0.5rem;
  border: none;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.auth-card__cancel:hover {
  color: var(--text);
}

.auth-card--loading {
  pointer-events: none;
  opacity: 0.92;
}

.auth-card--loading .auth-form__submit {
  cursor: wait;
}

.account-tab--locked {
  opacity: 0.55;
}

.account-tab--locked.is-active {
  opacity: 1;
}

.auth-tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0.25rem;
  margin-bottom: 1.1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  border: none;
  border-radius: 999px;
  padding: 0.55rem 0.75rem;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.auth-tab.is-active {
  background: var(--accent);
  color: #111;
}

.auth-panel__hint {
  margin: 0 0 0.85rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.auth-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-password-wrap input {
  width: 100%;
  padding: 0.72rem 2.75rem 0.72rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-password-wrap input:focus {
  outline: none;
  border-color: rgba(200, 245, 66, 0.45);
  box-shadow: 0 0 0 3px rgba(200, 245, 66, 0.12);
}

.auth-password-toggle {
  position: absolute;
  right: 0.35rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.auth-password-toggle:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.auth-password-strength {
  margin-top: 0.35rem;
}

.auth-password-strength__bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.auth-password-strength__bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #ef4444;
  transition: width 0.25s ease, background 0.25s ease;
}

.auth-password-strength.is-weak .auth-password-strength__bar span {
  width: 33%;
  background: #ef4444;
}

.auth-password-strength.is-fair .auth-password-strength__bar span {
  width: 66%;
  background: #f59e0b;
}

.auth-password-strength.is-strong .auth-password-strength__bar span {
  width: 100%;
  background: #22c55e;
}

.auth-password-strength__hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

.auth-terms {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-top: 0.15rem;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-muted);
  cursor: pointer;
}

.auth-terms input {
  width: 1rem;
  height: 1rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.auth-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.auth-card__security {
  margin: 0.85rem 0 0;
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--text-muted);
  opacity: 0.85;
}

.auth-form input {
  width: 100%;
  padding: 0.72rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form input:focus {
  outline: none;
  border-color: rgba(200, 245, 66, 0.45);
  box-shadow: 0 0 0 3px rgba(200, 245, 66, 0.12);
}

.auth-form__submit {
  width: 100%;
  margin-top: 0.25rem;
}

.auth-forgot-link {
  margin-top: 0.85rem;
  padding: 0;
  border: none;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-forgot-link:hover {
  color: var(--accent);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.15rem 0 1rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

@media (max-width: 480px) {
  .auth-gate-modal .auth-card {
    padding: 2rem 1.25rem 1.5rem;
  }

  .btn-google {
    min-height: 48px;
    font-size: 0.9rem;
  }
}

@media (max-width: 768px), (hover: none) and (pointer: coarse) {
  .btn-google--visual {
    display: none;
  }

  .btn-google__native {
    position: static;
    opacity: 1;
    overflow: visible;
    min-height: 48px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .btn-google-wrap {
    min-height: 48px;
  }

  .btn-google__native > div,
  .btn-google__native iframe {
    width: 100% !important;
    min-height: 48px !important;
    height: 48px !important;
  }
}

.toast-stack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: min(92vw, 360px);
}

.toast {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  box-shadow: var(--shadow);
  padding: 0.8rem 0.9rem;
  font-size: 0.9rem;
}

.toast--ok {
  border-color: rgba(200, 245, 66, 0.45);
}

.toast--erro {
  border-color: rgba(255, 107, 107, 0.45);
}

.confirm-dialog {
  border: none;
  padding: 0;
  background: transparent;
  width: min(92vw, 420px);
}

.confirm-dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
}

.confirm-dialog__card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 1.25rem;
}

.confirm-dialog__card h3 {
  margin: 0 0 0.35rem;
}

.confirm-dialog__card p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.confirm-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Modal */
.modal {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(520px, 92vw);
  width: 100%;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.modal__content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
  box-shadow: var(--shadow);
}

.modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
}

.modal__img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.modal__categoria {
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.modal__content h2 {
  margin: 0.35rem 0 0.75rem;
  font-family: var(--font-display);
}

.modal__content p {
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.modal__assunto {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.modal__assunto span {
  color: var(--accent);
}

.modal__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Campo WhatsApp no formulário de agendamento */
.whatsapp-field {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.whatsapp-field__label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.whatsapp-field input {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  margin-top: 0;
  transition: border-color 0.2s;
}

.whatsapp-field input:focus {
  outline: none;
  border-color: var(--whatsapp);
}

/* Contato & Footer */
.contato__inner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 0.75rem;
}

.contato__inner p {
  color: var(--text-muted);
  max-width: 50ch;
  margin: 0 auto 1.5rem;
}

.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer__small {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    width: min(1120px, 94vw);
  }

  .hero {
    padding: 3rem 0 2.5rem;
  }

  .hero__title {
    max-width: none;
    font-size: clamp(1.85rem, 8vw, 2.6rem);
  }

  .hero__text {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }

  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .section {
    padding: 3rem 0;
  }

  .section__header h2 {
    font-size: 1.55rem;
  }

  .equipe-grid,
  .projetos-grid {
    gap: 0.85rem;
  }

  .projeto-card__body {
    padding: 0.85rem 1rem 1rem;
  }

  .header__inner {
    gap: 0.5rem;
    flex-wrap: nowrap;
  }

  .logo {
    font-size: 1rem;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .user-box {
    width: auto;
    flex-shrink: 0;
    justify-content: flex-end;
    gap: 0.35rem;
  }

  #userName {
    display: none;
  }

  .btn--account,
  .btn--admin {
    font-size: 0;
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
  }

  .btn--account svg,
  .btn--admin svg {
    width: 16px;
    height: 16px;
  }

  .btn--login {
    font-size: 0.78rem;
    padding: 0.5rem 0.75rem;
  }

  .btn--small {
    font-size: 0.78rem;
    padding: 0.45rem 0.7rem;
  }

  .btn {
    padding: 0.75rem 1.1rem;
    font-size: 0.88rem;
    min-height: 44px;
  }

  .card {
    padding: 1rem;
    border-radius: 14px;
  }

  .agenda-bloqueio {
    padding: 1.5rem 1rem;
    text-align: center;
  }

  .agenda-calendario {
    padding: 0;
    overflow: hidden;
  }

  .agenda-cal__header {
    padding: 1rem 1rem 0.5rem;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .slot-form__topo {
    align-items: flex-start;
  }

  .slot-form-wrap {
    margin-top: 0.75rem;
  }

  .slot-form__slot-info {
    font-size: 0.92rem;
    line-height: 1.35;
    max-width: calc(100% - 40px);
  }

  .agenda-form input,
  .agenda-form textarea {
    font-size: 16px;
  }

  .agenda-form textarea {
    min-height: 92px;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }

  .assunto-chips {
    gap: 0.45rem;
  }

  .assunto-chip {
    font-size: 0.8rem;
    padding: 0.45rem 0.75rem;
    min-height: 40px;
  }

  .agenda-cal__grid {
    grid-template-columns: 52px repeat(6, minmax(76px, 1fr));
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.76rem;
    scroll-snap-type: x proximity;
    padding-bottom: 0.25rem;
  }

  .agenda-cal__cell {
    min-height: 44px;
    padding: 0.35rem 0.2rem;
  }

  .agenda-cal__cell--hora {
    min-width: 52px;
    font-size: 0.72rem;
  }

  .agenda-cal__slot {
    min-height: 36px;
    font-size: 0.78rem;
  }

  .toast-stack {
    left: max(0.75rem, env(safe-area-inset-left));
    right: max(0.75rem, env(safe-area-inset-right));
    width: auto;
    bottom: max(0.75rem, env(safe-area-inset-bottom));
  }

  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: -4vw;
    right: -4vw;
    flex-direction: column;
    background: var(--bg-card);
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    gap: 0.25rem;
    z-index: 120;
  }

  .nav a {
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    font-size: 1rem;
  }

  .nav a:active {
    background: rgba(255, 255, 255, 0.06);
  }

  .nav.is-open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }

  .admin-pending-banner {
    padding: 0.75rem 0;
  }

  .admin-pending-banner__inner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .admin-pending-banner__inner .btn {
    width: 100%;
  }

  .auth-gate-modal .auth-card {
    width: min(100%, 420px);
    margin: auto 0 0;
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
    overflow-y: auto;
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  }

  .auth-gate-modal[open] {
    justify-content: flex-end;
    align-items: stretch;
    padding: 0;
  }

  .admin-panel__card {
    max-height: 96vh;
    border-radius: 16px 16px 0 0;
  }

  .admin-panel {
    align-items: flex-end;
    padding: 0;
  }

  .agenda-layout {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .admin-novo-row {
    grid-template-columns: 1fr;
  }

  .admin-booking-card {
    flex-wrap: wrap;
  }

  .admin-booking-card__actions {
    width: 100%;
    flex-direction: row;
  }
}

/* ── Admin panel ────────────────────────────────────────────────────────── */
.btn--admin {
  background: linear-gradient(135deg, #6d28d9, #4f46e5);
  color: #fff;
  border: none;
  padding: 0.5rem 0.9rem;
  font-size: 0.82rem;
  gap: 0.4rem;
  box-shadow: 0 2px 10px rgba(109, 40, 217, 0.4);
}

.btn--admin:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.admin-panel {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(860px, 96vw);
  width: 100%;
  max-height: 92vh;
}

.admin-panel::backdrop {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.admin-panel__card {
  background: var(--bg-card);
  border: 1px solid rgba(109, 40, 217, 0.3);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  max-height: 92vh;
  overflow: hidden;
}

.admin-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.admin-panel__title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #a78bfa;
}

.admin-panel__title h2 {
  margin: 0;
  font-size: 1.2rem;
  font-family: var(--font-display);
  color: var(--text);
}

.admin-panel__close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 1.3rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.admin-panel__close:hover {
  color: var(--text);
  background: rgba(255,255,255,0.1);
}

.admin-close-day-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 1.25rem 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: rgba(109, 40, 217, 0.1);
  flex-shrink: 0;
}

.admin-close-day-bar--atraso {
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(251, 191, 36, 0.1);
}

.admin-close-day-bar--wait {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  opacity: 0.85;
}

.admin-close-day-bar--ready {
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(74, 222, 128, 0.08);
}

.admin-close-day-bar__info {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  flex: 1;
  min-width: 0;
}

.admin-close-day-bar__icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}

.admin-close-day-bar__info strong {
  display: block;
  font-size: 0.88rem;
  color: #f1f5f9;
  margin-bottom: 0.15rem;
}

.admin-close-day-bar__info p {
  margin: 0;
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
}

.admin-close-day-bar .admin-close-day-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Banner global — dias pendentes (admin logado) */
.admin-pending-banner {
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.15), rgba(251, 191, 36, 0.08));
  border-bottom: 1px solid rgba(251, 191, 36, 0.35);
  padding: 0.65rem 0;
}

.admin-pending-banner--atraso {
  background: linear-gradient(90deg, rgba(248, 113, 113, 0.18), rgba(251, 191, 36, 0.1));
  border-bottom-color: rgba(248, 113, 113, 0.4);
}

.admin-pending-banner__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-pending-banner__icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.admin-pending-banner__inner p {
  flex: 1;
  margin: 0;
  font-size: 0.84rem;
  color: #fde68a;
  min-width: 200px;
}

.admin-pending-banner--atraso .admin-pending-banner__inner p {
  color: #fecaca;
}

.btn--primary-outline {
  border-color: rgba(139, 92, 246, 0.5);
  color: #c4b5fd;
  background: rgba(109, 40, 217, 0.1);
}

.btn--primary-outline:hover {
  background: rgba(109, 40, 217, 0.22);
}

.admin-history-panel__header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.admin-panel__stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.admin-stat-fechar-btn {
  margin-left: auto;
}

.admin-panel__tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0 1.5rem 0.5rem;
}

.admin-tab {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.admin-tab.is-active {
  border-color: rgba(109, 40, 217, 0.6);
  background: rgba(109, 40, 217, 0.2);
  color: #c4b5fd;
}

.admin-stat {
  background: var(--bg-elevated);
  border: 1px solid rgba(109, 40, 217, 0.2);
  border-radius: 10px;
  padding: 0.5rem 1rem;
  min-width: 110px;
}

.admin-stat__num {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #a78bfa;
  line-height: 1.1;
}

.admin-stat__label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.admin-panel__content {
  flex: 1;
  overflow-y: auto;
  padding: 0 1.5rem 1.5rem;
}

.admin-users-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
  margin-top: 0.75rem;
}

.admin-users-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.admin-users-toolbar select {
  min-width: 96px;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.admin-users-group {
  margin-top: 1rem;
}

.admin-users-group__title {
  font-size: 0.85rem;
  color: #c4b5fd;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.admin-user-row {
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  padding: 0.65rem 0.8rem;
  margin-bottom: 0.45rem;
}

.admin-user-row__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.admin-user-row__main strong {
  font-size: 0.9rem;
}

.admin-user-row__main span,
.admin-user-row__main small {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.admin-user-row__actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.admin-history-list {
  max-height: 42vh;
  overflow-y: auto;
  border-top: 1px solid var(--border);
  padding-top: 0.6rem;
}

/* Painel historico do cliente */
.admin-history-panel {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(560px, 94vw);
  width: 100%;
}

.admin-history-panel::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.admin-history-panel__card {
  background: #1a1a2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}

.admin-history-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(109, 40, 217, 0.12), transparent);
}

.admin-history-panel__eyebrow {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a78bfa;
  margin: 0 0 0.2rem;
}

.admin-history-panel__header h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #f1f5f9;
}

.admin-history-panel__close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
  flex-shrink: 0;
}

.admin-history-panel__close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

#adminUserHistoryBody {
  padding: 1rem 1.25rem 1.25rem;
  max-height: 68vh;
  overflow-y: auto;
}

.admin-history-loading {
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  padding: 2rem 0;
}

.admin-history-loading span {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #a78bfa;
  animation: historyPulse 1s ease-in-out infinite;
}

.admin-history-loading span:nth-child(2) { animation-delay: 0.15s; }
.admin-history-loading span:nth-child(3) { animation-delay: 0.3s; }

@keyframes historyPulse {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.85); }
  40% { opacity: 1; transform: scale(1); }
}

.admin-history-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.admin-history-summary__item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.82rem;
  color: #e2e8f0;
}

.admin-history-summary__item--wide {
  grid-column: 1 / -1;
}

.admin-history-summary__label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.45);
}

.admin-history-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.5rem;
}

.admin-history-timeline__item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid rgba(255, 255, 255, 0.2);
}

.admin-history-timeline__item--past { border-left-color: #4ade80; }
.admin-history-timeline__item--scheduled { border-left-color: #fbbf24; }
.admin-history-timeline__item--cancelled { border-left-color: #f87171; opacity: 0.85; }
.admin-history-timeline__item--sheets { background: rgba(74, 222, 128, 0.04); }

.admin-history-timeline__date {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.admin-history-timeline__date strong {
  font-size: 0.78rem;
  color: #c4b5fd;
}

.admin-history-timeline__date span {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f1f5f9;
  font-variant-numeric: tabular-nums;
}

.admin-history-timeline__body strong {
  display: block;
  font-size: 0.84rem;
  color: #f1f5f9;
  margin-bottom: 0.3rem;
}

.admin-history-timeline__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.badge--sheets {
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.25);
}

.admin-history-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  margin-bottom: 0.4rem;
  background: var(--bg);
}

.admin-history-item strong {
  display: block;
  font-size: 0.84rem;
}

.admin-history-item span {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.admin-bookings-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-top: 1rem;
}

.admin-date-header {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a78bfa;
  padding: 0.6rem 0 0.25rem;
  margin-top: 0.25rem;
}

.admin-booking-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  transition: border-color 0.15s;
}

.admin-booking-card:hover {
  border-color: rgba(109, 40, 217, 0.3);
}

.admin-booking-card__time {
  font-size: 0.95rem;
  font-weight: 700;
  color: #a78bfa;
  background: rgba(109, 40, 217, 0.12);
  border-radius: 8px;
  padding: 0.3rem 0.55rem;
  flex-shrink: 0;
  min-width: 52px;
  text-align: center;
}

.admin-booking-card__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.admin-booking-card__nome {
  font-weight: 600;
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-booking-card__email {
  font-size: 0.8rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-booking-card__assunto {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
}

.admin-booking-card__wa {
  font-size: 0.78rem;
}

.admin-wa-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--whatsapp);
  background: rgba(37, 211, 102, 0.1);
  border: 1px solid rgba(37, 211, 102, 0.25);
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  font-size: 0.78rem;
  transition: background 0.15s;
}

.admin-wa-link:hover {
  background: rgba(37, 211, 102, 0.2);
}

.admin-sem-wa {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.admin-booking-card__actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex-shrink: 0;
}

.admin-edit-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.admin-edit-row, .admin-novo-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.admin-edit-form label, .admin-novo-form label {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.admin-edit-form input,
.admin-edit-form select,
.admin-novo-form input,
.admin-novo-form select {
  padding: 0.55rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.88rem;
  font-family: var(--font);
  width: 100%;
}

.admin-edit-form input:focus,
.admin-edit-form select:focus,
.admin-novo-form input:focus,
.admin-novo-form select:focus {
  outline: none;
  border-color: var(--accent);
}

.admin-edit-actions, .admin-novo-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Form de novo agendamento (details/summary) */
.admin-novo-form {
  padding: 0.75rem 0 0.25rem;
}

.admin-novo-cliente {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.admin-novo-cliente .admin-novo-label {
  flex: 1;
  margin: 0;
}

.admin-novo-selected {
  margin-bottom: 0.65rem;
}

.admin-novo-selected__chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: rgba(109, 40, 217, 0.12);
  border: 1px solid rgba(109, 40, 217, 0.35);
}

.admin-novo-selected__avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #c4b5fd;
  background: rgba(109, 40, 217, 0.25);
}

.admin-novo-selected__chip strong {
  display: block;
  font-size: 0.84rem;
}

.admin-novo-selected__chip span {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.user-picker {
  position: relative;
}

.user-picker input[type="search"] {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.84rem;
  padding: 0.45rem 0.65rem;
  outline: none;
}

.user-picker input[type="search"]:focus {
  border-color: rgba(139, 92, 246, 0.55);
}

.user-picker__dropdown {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: #1e1e32;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.user-picker__item {
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
}

.user-picker__item:hover {
  background: rgba(109, 40, 217, 0.15);
}

.user-picker__item strong {
  display: block;
  font-size: 0.82rem;
  color: #f1f5f9;
}

.user-picker__item span {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.user-picker__empty {
  padding: 0.65rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  list-style: none;
}

.btn--history {
  border-color: rgba(139, 92, 246, 0.45);
  color: #c4b5fd;
  background: rgba(109, 40, 217, 0.12);
}

.btn--history:hover {
  background: rgba(109, 40, 217, 0.22);
}

.admin-novo-wrap {
  border-top: 1px solid var(--border);
  padding: 0 1.5rem;
  flex-shrink: 0;
}

.admin-novo-toggle {
  font-size: 0.85rem;
  font-weight: 600;
  color: #a78bfa;
  cursor: pointer;
  padding: 0.75rem 0;
  list-style: none;
  user-select: none;
}

.admin-novo-toggle:hover {
  color: var(--text);
}

.admin-novo-form {
  padding-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn--account {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
  gap: 0.35rem;
}

.btn--account:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn--admin-action {
  border-color: rgba(109, 40, 217, 0.45);
  color: #c4b5fd;
}

.btn--admin-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.45);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge--ok {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}

.badge--warn {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
}

.badge--muted {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.badge--admin {
  background: rgba(109, 40, 217, 0.25);
  color: #c4b5fd;
}

.email-verify-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
}

.email-verify-banner__text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.88rem;
}

.email-verify-banner__text strong {
  color: #fcd34d;
}

.email-verify-banner__text span {
  color: var(--text-muted);
}

.account-panel {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(520px, 96vw);
  width: 100%;
}

.account-panel::backdrop {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
}

.account-panel__card {
  background: var(--bg-card);
  border: 1px solid rgba(200, 245, 66, 0.15);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.account-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.35rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.account-panel__header h2 {
  margin: 0.15rem 0 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.account-panel__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.account-panel__close {
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
}

.account-summary {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.35rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
}

.account-summary__avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: rgba(200, 245, 66, 0.12);
  color: var(--accent);
  border: 1px solid rgba(200, 245, 66, 0.25);
}

.account-summary__info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.account-summary__info span {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.account-summary__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.account-tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0.75rem 1.35rem 0;
}

.account-tab {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.account-tab.is-active {
  border-color: rgba(200, 245, 66, 0.45);
  background: rgba(200, 245, 66, 0.12);
  color: var(--accent);
}

.account-panel__body {
  padding: 1rem 1.35rem 1.35rem;
  max-height: min(60vh, 520px);
  overflow-y: auto;
}

.account-verify-status__ok,
.account-verify-status__pending {
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 0.85rem;
}

.account-verify-status__ok {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #86efac;
}

.account-verify-status__pending {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #fcd34d;
}

.account-verify-help {
  margin-bottom: 0.85rem;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.account-verify-help h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--text);
}

.account-verify-help ol {
  margin: 0;
  padding-left: 1.1rem;
}

.account-verify-note {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
}

.admin-users-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 0.75rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.admin-users-toolbar__filters,
.admin-users-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: flex-end;
}

.admin-users-search-wrap input {
  min-width: 180px;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.admin-users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.65rem;
}

.admin-user-card {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "avatar body"
    "actions actions";
  gap: 0.65rem 0.75rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
}

.admin-user-card__avatar {
  grid-area: avatar;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #c4b5fd;
  background: rgba(109, 40, 217, 0.2);
  border: 1px solid rgba(109, 40, 217, 0.35);
}

.admin-user-card__body {
  grid-area: body;
  min-width: 0;
}

.admin-user-card__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.admin-user-card__top strong {
  font-size: 0.92rem;
}

.admin-user-card__email {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  word-break: break-all;
}

.admin-user-card__meta,
.admin-user-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  margin-top: 0.35rem;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.admin-user-card__stats em {
  font-style: normal;
  color: #c4b5fd;
  font-weight: 700;
}

.admin-user-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.4rem;
}

.admin-user-card__actions {
  grid-area: actions;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  padding-top: 0.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-users-hint {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
  background: rgba(109, 40, 217, 0.08);
  border: 1px solid rgba(109, 40, 217, 0.2);
}

.admin-users-hint strong {
  color: #ddd6fe;
}

.admin-initial-bar {
  margin-top: 0.75rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.admin-initial-bar__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
}

.admin-initial-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.admin-initial-chip {
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.45rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}

.admin-initial-chip:hover:not(:disabled) {
  border-color: rgba(167, 139, 250, 0.55);
  color: #ddd6fe;
}

.admin-initial-chip.is-active {
  background: linear-gradient(180deg, #7c3aed, #6d28d9);
  border-color: #8b5cf6;
  color: #fff;
  box-shadow: 0 4px 14px rgba(109, 40, 217, 0.35);
}

.admin-initial-chip.is-empty:not(.is-active) {
  opacity: 0.35;
  cursor: not-allowed;
}

.admin-users-group__title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  margin-bottom: 0.55rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.5), rgba(91, 33, 182, 0.25));
  border: 1px solid rgba(167, 139, 250, 0.35);
}

.admin-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.admin-stat-pill em {
  font-style: normal;
  font-weight: 800;
  color: var(--text);
}

.admin-stat-pill--live {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.1);
}

.admin-stat-pill--live em {
  color: #86efac;
}

.admin-stat-pill--muted em {
  color: var(--text-muted);
}

.admin-stat--live .admin-stat__num {
  color: #86efac;
}

.admin-user-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.admin-history-item--sheets {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.06);
}

.admin-history-note {
  font-size: 0.82rem;
  color: #86efac;
  margin: 0.35rem 0 0.75rem;
}

@media (max-width: 640px) {
  .email-verify-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-users-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-users-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════
   Aba Historico — Gaveta de arquivos
═══════════════════════════════════════════ */

.arquivo-mes-bar {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.5rem 0 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.arquivo-mes-bar__label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
}

.arquivo-mes-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.arquivo-mes-chip {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.arquivo-mes-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.arquivo-mes-chip.is-active {
  background: rgba(109, 40, 217, 0.22);
  border-color: rgba(139, 92, 246, 0.5);
  color: #c4b5fd;
}

.arquivo-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.75rem 0 1rem;
  margin-bottom: 0.5rem;
}

.arquivo-label--grow {
  flex: 1;
  min-width: 160px;
}

.arquivo-toolbar__filtros {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex: 1;
}

.arquivo-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.arquivo-label select,
.arquivo-label input[type="date"] {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 0.82rem;
  padding: 0.35rem 0.6rem;
  outline: none;
  min-width: 140px;
  color-scheme: dark;
  transition: border-color 0.18s;
}

.arquivo-label select:focus,
.arquivo-label input[type="date"]:focus {
  border-color: rgba(139, 92, 246, 0.55);
}

/* Gaveta */
.arquivo-gaveta {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Pasta / arquivo */
.arquivo-pasta {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  user-select: none;
}

.arquivo-pasta:hover {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.arquivo-pasta.is-open {
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.18);
}

/* Cores por status */
.arquivo-pasta.arquivo--ok      { border-left: 3px solid #4ade80; }
.arquivo-pasta.arquivo--cancelado { border-left: 3px solid #f87171; }
.arquivo-pasta.arquivo--misto   { border-left: 3px solid #fbbf24; }
.arquivo-pasta.arquivo--vazio   { border-left: 3px solid rgba(255, 255, 255, 0.2); }

/* Aba superior (tab do arquivo) */
.arquivo-aba {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.3rem 0.85rem 0.3rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.arquivo-pasta.is-open .arquivo-aba {
  background: rgba(139, 92, 246, 0.1);
  color: #c4b5fd;
}

.arquivo-aba__dow {
  font-weight: 600;
}

.arquivo-aba__toggle {
  font-size: 1rem;
  transition: transform 0.25s;
  display: inline-block;
}

.arquivo-pasta.is-open .arquivo-aba__toggle {
  transform: rotate(90deg);
}

/* Corpo */
.arquivo-corpo {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
}

/* Data grande */
.arquivo-data {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  min-width: 90px;
}

.arquivo-data__dia {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  color: #f1f5f9;
  font-variant-numeric: tabular-nums;
}

.arquivo-data__resto {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.arquivo-data__mes {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.55);
}

.arquivo-data__ano {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.35);
}

/* Separador vertical */
.arquivo-corpo::after {
  display: none;
}

/* Meta */
.arquivo-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.arquivo-meta__total {
  font-size: 0.85rem;
  font-weight: 600;
  color: #e2e8f0;
}

.arquivo-meta__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.arquivo-pill {
  font-size: 0.68rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.arquivo-pill--ok     { background: rgba(74, 222, 128, 0.15); color: #4ade80; border: 1px solid rgba(74,222,128,0.3); }
.arquivo-pill--cancel { background: rgba(248, 113, 113, 0.15); color: #f87171; border: 1px solid rgba(248,113,113,0.3); }
.arquivo-pill--sched  { background: rgba(251, 191, 36, 0.15); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }

.arquivo-meta__fechado {
  font-size: 0.67rem;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 0.1rem;
}

/* Linha detalhes expandidos */
.arquivo-detalhes {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.5rem 1rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.15);
}

.arquivo-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  font-size: 0.81rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.arquivo-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.arquivo-item__hora {
  font-size: 0.78rem;
  font-weight: 600;
  color: #a5b4fc;
  min-width: 40px;
  font-variant-numeric: tabular-nums;
}

.arquivo-item__info {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  flex: 1;
}

.arquivo-item__info strong {
  color: #f1f5f9;
  font-weight: 600;
}

.arquivo-item__info span {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.73rem;
}

/* Badges reutilizados */
.badge--past      { background: rgba(74, 222, 128, 0.12); color: #4ade80; border: 1px solid rgba(74,222,128,0.25); }
.badge--cancelled { background: rgba(248, 113, 113, 0.12); color: #f87171; border: 1px solid rgba(248,113,113,0.25); }
.badge--scheduled { background: rgba(251, 191, 36, 0.12); color: #fbbf24; border: 1px solid rgba(251,191,36,0.25); }

/* Erro inline */
.agenda-empty.erro { color: #f87171; }

@media (max-width: 560px) {
  .arquivo-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-history-summary {
    grid-template-columns: 1fr;
  }
  .admin-history-timeline__item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .arquivo-data__dia {
    font-size: 1.7rem;
  }
  .arquivo-item {
    flex-wrap: wrap;
  }
}
