:root {
  --yellow: #FDB913;
  --yellow-deep: #E0A100;
  --black: #111111;
  --ink: #1a1a1a;
  --white: #ffffff;
  --cloud: #f6f6f4;
  --grey: #6b7280;
  --grey-soft: #e8e8e4;
  --danger: #b42318;
  --ok: #067647;
  --shadow: 0 18px 50px rgba(17, 17, 17, 0.12);
  --radius: 18px;
  --font-display: "Archivo Black", Impact, sans-serif;
  --font-body: "Outfit", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(253, 185, 19, 0.28), transparent 60%),
    radial-gradient(900px 400px at 100% 0%, rgba(17, 17, 17, 0.06), transparent 50%),
    linear-gradient(180deg, #fffdf7 0%, var(--cloud) 100%);
}

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: 0.01em;
  margin: 0 0 0.4rem;
}

p {
  margin: 0 0 0.75rem;
  line-height: 1.5;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--grey);
  margin-bottom: 0.35rem;
}

.lede {
  color: var(--grey);
  max-width: 46ch;
}

.btn {
  appearance: none;
  border: 2px solid transparent;
  border-radius: 999px;
  padding: 0.7rem 1.25rem;
  font: 600 0.95rem/1 var(--font-body);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

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

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--yellow);
  color: var(--black);
  box-shadow: 0 8px 20px rgba(253, 185, 19, 0.35);
}

.btn-primary:hover {
  background: var(--yellow-deep);
}

.btn-card-cta {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.85rem 1.25rem 0.85rem 1.1rem;
  border-radius: 14px;
  text-decoration: none;
  color: var(--black);
  background:
    linear-gradient(135deg, #FFE08A 0%, var(--yellow) 45%, #E8A400 100%);
  border: 1px solid rgba(17, 17, 17, 0.12);
  box-shadow:
    0 10px 24px rgba(253, 185, 19, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  min-width: 11.5rem;
}

.btn-card-cta::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--black);
}

.btn-card-cta::after {
  content: "→";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.15rem;
  font-weight: 700;
  opacity: 0.85;
  transition: transform 0.18s ease;
}

.btn-card-cta:hover {
  transform: translateY(-2px);
  box-shadow:
    0 14px 28px rgba(253, 185, 19, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.btn-card-cta:hover::after {
  transform: translate(3px, -50%);
}

.btn-card-cta-label {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding-right: 1.5rem;
  line-height: 1.2;
}

.btn-card-cta-hint {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.7;
  font-weight: 600;
}

.btn-secondary {
  background: var(--black);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  border-color: var(--grey-soft);
  color: var(--ink);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
}

.form-control {
  width: 100%;
  border: 1.5px solid var(--grey-soft);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font: 500 1rem/1.3 var(--font-body);
  background: var(--white);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 4px rgba(253, 185, 19, 0.25);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.field label {
  font-weight: 600;
  font-size: 0.92rem;
}

.field-error {
  color: var(--danger);
  font-size: 0.85rem;
}

.hint {
  color: var(--grey);
  font-size: 0.85rem;
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.alert-error {
  background: #fef3f2;
  color: var(--danger);
  border: 1px solid #fecdca;
}

/* Login */
body.page-login {
  background: var(--black);
  height: 100%;
  overflow: hidden;
}

html:has(body.page-login) {
  height: 100%;
  overflow: hidden;
}

.login-screen {
  min-height: 100vh;
  min-height: 100dvh;
  height: 100dvh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  overflow: hidden;
}

.login-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 40%, rgba(253, 185, 19, 0.55), transparent 45%),
    linear-gradient(145deg, #1a1a1a 0%, #000 55%, #2a2100 100%);
  display: grid;
  place-items: center;
  padding: 2rem;
}

.login-hero-wash {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 18px,
      rgba(253, 185, 19, 0.04) 18px,
      rgba(253, 185, 19, 0.04) 19px
    );
  animation: drift 18s linear infinite;
}

.login-hero-logo {
  width: min(420px, 70%);
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.45));
  animation: floatIn 0.9s ease both;
  position: relative;
  z-index: 1;
}

.login-panel {
  background: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  min-height: 0;
}

.login-brand {
  margin-bottom: 2rem;
  animation: rise 0.7s ease both;
}

.login-logo {
  width: 88px;
  margin-bottom: 1rem;
}

.login-brand h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.login-brand p,
.login-footnote {
  color: var(--grey);
}

.login-form {
  animation: rise 0.8s ease 0.08s both;
}

.login-form .field {
  margin-bottom: 0.95rem;
}

.login-form .btn {
  margin-top: 0.35rem;
}

@keyframes floatIn {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to { opacity: 1; transform: none; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(-40px); }
}

/* App shell */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem clamp(1rem, 3vw, 2rem);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(17, 17, 17, 0.06);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.app-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.app-nav a {
  font-weight: 600;
  opacity: 0.8;
}

.app-nav a:hover,
.app-nav .nav-cta {
  opacity: 1;
}

.nav-cta {
  background: var(--yellow);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.head-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.profile-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.profile-photo-block,
.data-block,
.section-block,
.table-wrap,
.admin-form .form-section {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(17, 17, 17, 0.06);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.profile-photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
  border: 3px solid var(--yellow);
  margin-bottom: 0;
}

.profile-photo-block--detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.profile-photo--round {
  border-radius: 50%;
  width: min(180px, 100%);
  max-width: 180px;
  aspect-ratio: 1;
  margin: 0 auto;
}

.sidebar-backdrop {
  display: none;
}

.sidebar-close {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: #FDB913;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 1.1rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.data-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 0;
}

.data-list .full {
  grid-column: 1 / -1;
}

.data-list dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey);
}

.data-list dd {
  margin: 0.2rem 0 0;
  font-weight: 600;
}

.vehicle-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.vehicle-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: var(--cloud);
}

.vehicles-section .vehicles-title {
  margin-bottom: 0.85rem;
}

.vehicles-table-wrap {
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: linear-gradient(180deg, #fffdf8 0%, #fff 100%);
}

.vehicles-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.82rem;
}

.vehicles-table thead th {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #111;
  color: #FDB913;
  text-align: left;
  padding: 0.5rem 0.65rem;
}

.vehicles-table thead th:nth-child(1) { width: auto; }
.vehicles-table thead th:nth-child(2) { width: 5.75rem; }
.vehicles-table thead th:nth-child(3) { width: 5.25rem; }

.vehicles-table tbody td {
  padding: 0.5rem 0.55rem;
  border-top: 1px solid rgba(17, 17, 17, 0.06);
  vertical-align: middle;
}

.vehicles-table tbody tr:hover {
  background: rgba(253, 185, 19, 0.08);
}

.vehicle-name {
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-plate {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  font-size: 0.78rem;
  white-space: nowrap;
}

.vehicle-action {
  text-align: center;
  padding-left: 0.35rem;
  padding-right: 0.4rem;
}

.vehicles-table .btn-vehicle-detail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.3rem 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  border-width: 1px;
  border-color: rgba(17, 17, 17, 0.18);
  border-radius: 8px;
  white-space: nowrap;
  transform: none;
}

.vehicles-table .btn-vehicle-detail:hover,
.vehicles-table .btn-vehicle-detail:active {
  transform: none;
}

.vehicles-table--detail thead th:nth-child(1),
.vehicles-table--detail .vehicle-icon-col {
  width: 2.6rem;
  padding-left: 0.55rem;
  padding-right: 0.15rem;
}

.vehicles-table--detail {
  font-size: 0.95rem;
}

.vehicles-table--detail thead th {
  font-size: 0.75rem;
  padding: 0.65rem 0.75rem;
}

.vehicles-table--detail tbody td {
  padding: 0.7rem 0.75rem;
}

.vehicles-table--detail .vehicle-plate {
  font-size: 0.9rem;
}

.vehicles-table--detail .btn-vehicle-detail {
  font-size: 0.78rem;
  padding: 0.4rem 0.55rem;
}

.vehicles-table--detail thead th:nth-child(2) { width: auto; }
.vehicles-table--detail thead th:nth-child(3) { width: 6.5rem; }
.vehicles-table--detail thead th:nth-child(4) { width: 6rem; }

.vehicle-icon-cell {
  text-align: center;
  padding-left: 0.55rem !important;
  padding-right: 0.15rem !important;
}

.vehicle-car-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 9px;
  background: rgba(17, 17, 17, 0.04);
  flex-shrink: 0;
}

.vehicle-car-icon svg {
  display: block;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.12));
}

.vehicle-car-icon--light {
  background: rgba(17, 17, 17, 0.08);
  box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.18);
}

.vehicle-car-icon--lg {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
}

.vehicle-detail-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.vehicle-detail-head h2 {
  margin: 0;
}

.vehicle-detail-panel {
  text-align: left;
}

.vehicle-detail-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1rem;
  margin: 1rem 0 0;
}

.vehicle-detail-list dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey);
}

.vehicle-detail-list dd {
  margin: 0.2rem 0 0;
  font-weight: 700;
}

.vehicle-detail-list .full {
  grid-column: 1 / -1;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 180px auto;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.85rem 0.6rem;
  border-bottom: 1px solid var(--grey-soft);
  vertical-align: middle;
}

.person-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.person-cell span {
  display: block;
  color: var(--grey);
  font-size: 0.85rem;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--yellow);
}

.badge {
  display: inline-flex;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-ok {
  background: #ecfdf3;
  color: var(--ok);
}

.badge-off {
  background: #fef3f2;
  color: var(--danger);
}

/* Não usar display:flex no <td> — quebra o alinhamento da borda da linha */
.data-table td.actions,
.data-table td.actions-cell {
  text-align: right;
  white-space: nowrap;
  vertical-align: middle;
}

.data-table td.actions .btn,
.data-table td.actions-cell .btn,
.data-table td.actions .inline-form {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.data-table td.actions .btn + .btn,
.data-table td.actions .btn + .inline-form,
.data-table td.actions-cell .btn + .btn {
  margin-left: 0.4rem;
}

.inline-form {
  display: inline-flex;
  margin: 0;
}

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

.form-grid .full {
  grid-column: 1 / -1;
}

.vehicle-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr)) auto;
}

.form-section {
  margin-bottom: 1rem;
  border: 0;
  min-inline-size: 0;
}

.form-section .section-heading {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 1rem;
  padding: 0;
  color: var(--ink);
}

.form-section legend {
  display: none;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

.vehicle-row + .vehicle-row {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--grey-soft);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.empty {
  color: var(--grey);
  text-align: center;
  padding: 1rem;
}

/* Modal + processing */
.processing-overlay,
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.processing-overlay {
  display: grid;
  place-items: center;
  background: rgba(17, 17, 17, 0.55);
  backdrop-filter: blur(4px);
}

.processing-overlay[hidden],
.modal[hidden] {
  display: none !important;
}

.processing-panel,
.modal-panel {
  background: var(--white);
  border-radius: 20px;
  padding: 1.5rem;
  width: min(420px, calc(100% - 2rem));
  text-align: center;
  box-shadow: var(--shadow);
  animation: rise 0.25s ease;
}

.spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 4px solid var(--grey-soft);
  border-top-color: var(--yellow);
  margin: 0 auto 0.85rem;
  animation: spin 0.8s linear infinite;
}

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

.modal {
  display: grid;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.45);
}

.modal-panel {
  position: relative;
  z-index: 1;
  text-align: left;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.toast-stack {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1100;
  display: grid;
  gap: 0.5rem;
  width: min(360px, calc(100% - 2rem));
}

.toast {
  background: var(--black);
  color: var(--white);
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border-left: 4px solid var(--yellow);
  animation: rise 0.3s ease;
  box-shadow: var(--shadow);
}

.toast-error,
.toast-danger {
  border-left-color: #f97066;
}

.toast-success {
  border-left-color: #47cd89;
}

/* App shell + sidebar */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  transition: grid-template-columns 0.25s ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 84px 1fr;
}

.sidebar {
  background: #111;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  padding: 1rem 0.75rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
  position: sticky;
  top: 0;
  height: 100dvh;
  max-height: 100dvh;
  z-index: 40;
  border-right: 3px solid var(--yellow);
  /* visible: tooltips laterais não podem ser cortados (overflow-y:auto corta o eixo X) */
  overflow: visible;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0 0.35rem;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.sidebar-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex-shrink: 0;
}

.sidebar-brand-text {
  font-family: var(--font-display);
  font-size: 0.82rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-toggle {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  width: 36px;
  height: 36px;
  display: grid;
  place-content: center;
  gap: 3px;
  cursor: pointer;
  padding: 0;
}

.sidebar-toggle span {
  display: block;
  width: 14px;
  height: 2px;
  background: var(--yellow);
}

.sidebar-nav {
  display: grid;
  gap: 0.35rem;
  align-content: start;
  align-items: stretch;
  flex: 1 1 auto;
  margin-top: 0.25rem;
  min-height: 0;
}

.sidebar-logout-form {
  margin: 0;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  color: rgba(255,255,255,0.82);
  font-weight: 600;
  border: 0;
  background: transparent;
  width: 100%;
  cursor: pointer;
  text-align: left;
  font: inherit;
  position: relative;
}

.sidebar-link:hover,
.sidebar-link.is-active {
  background: rgba(253, 185, 19, 0.16);
  color: #fff;
}

.sidebar-link.is-active {
  box-shadow: inset 3px 0 0 var(--yellow);
}

.sidebar-icon {
  color: var(--yellow);
  width: 1.4rem;
  height: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-icon svg {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
}

/* Balão só com menu recolhido; texto preto no amarelo do clube (legível sobre o fundo claro) */
.app-shell.sidebar-collapsed .sidebar-link[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  background: var(--yellow);
  color: #111;
  border: 1px solid #111;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 80;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.app-shell.sidebar-collapsed .sidebar-link[data-tooltip]::before {
  content: "";
  position: absolute;
  left: calc(100% + 4px);
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right-color: var(--yellow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 81;
}

.app-shell.sidebar-collapsed .sidebar-link[data-tooltip]:hover::after,
.app-shell.sidebar-collapsed .sidebar-link[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.app-shell.sidebar-collapsed .sidebar-link[data-tooltip]:hover::before,
.app-shell.sidebar-collapsed .sidebar-link[data-tooltip]:focus-visible::before {
  opacity: 1;
}

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

.app-main {
  width: min(1100px, calc(100% - 2rem));
  margin: 1.5rem auto 0;
  flex: 1 0 auto;
  padding-bottom: 2rem;
}

.app-footer {
  text-align: center;
  color: var(--grey);
  padding: 1.5rem 1rem 2rem;
  font-size: 0.88rem;
  line-height: 1.5;
  margin-top: auto;
  flex-shrink: 0;
}

.app-footer p {
  margin: 0.15rem 0;
}

.app-footer .footer-copy {
  font-size: 0.8rem;
  opacity: 0.85;
}

.content-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem clamp(1rem, 3vw, 2rem);
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(17,17,17,0.06);
  position: sticky;
  top: 0;
  z-index: 10;
}

.content-header-title {
  font-family: var(--font-display);
  font-size: 1rem;
}

.mobile-only {
  display: none;
}

.app-shell.sidebar-collapsed .sidebar-brand-text,
.app-shell.sidebar-collapsed .sidebar-link-text {
  display: none;
}

.app-shell.sidebar-collapsed .sidebar-link {
  justify-content: center;
  padding-inline: 0.6rem;
}

.app-shell.sidebar-collapsed .sidebar-brand {
  justify-content: center;
  width: 100%;
}

.app-shell.sidebar-collapsed .sidebar-top {
  flex-direction: column;
}

.page-home {
  overflow: hidden;
  height: 100dvh;
  max-height: 100dvh;
}

.page-home .app-shell,
.page-home .app-content {
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.page-home .app-main {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.home-stage {
  height: 100%;
  width: 100%;
  display: grid;
  place-items: center;
  padding: 1.5rem 1rem;
  overflow: hidden;
}

.home-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  max-width: 640px;
}

.home-logo {
  width: min(320px, 70%);
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.12));
  animation: floatIn 0.9s ease both;
}

.home-club-name {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  line-height: 1.25;
  color: var(--black);
  margin: 0;
  animation: rise 0.8s ease 0.08s both;
}

.avatar-fallback,
.profile-photo-fallback {
  display: grid;
  place-items: center;
  background: #111;
  color: var(--yellow);
  font-family: var(--font-display);
}

.avatar-fallback {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--yellow);
  font-size: 1rem;
}

.profile-photo-fallback {
  aspect-ratio: 1;
  border-radius: 14px;
  border: 3px solid var(--yellow);
  margin-bottom: 0.75rem;
}

.password-section {
  margin-top: 1.25rem;
}

.password-modes {
  border: 0;
  padding: 0;
  margin: 0 0 1rem;
  display: grid;
  gap: 0.55rem;
}

.radio-option,
.check-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  cursor: pointer;
}

.password-manual {
  margin-bottom: 0.75rem;
}

.field-check {
  margin-bottom: 1rem;
}


@media (max-width: 900px) {
  body.page-login {
    background:
      radial-gradient(ellipse 120% 80% at 50% -10%, rgba(253, 185, 19, 0.28), transparent 55%),
      linear-gradient(180deg, #fffdf6 0%, #ffffff 42%, #f7f7f7 100%);
  }

  .login-screen {
    grid-template-columns: 1fr;
    place-items: stretch;
    padding: max(0.75rem, env(safe-area-inset-top)) 1rem max(0.75rem, env(safe-area-inset-bottom));
    box-sizing: border-box;
  }

  .login-hero {
    display: none !important;
  }

  .login-panel {
    background: transparent;
    justify-content: center;
    padding: 0;
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
  }

  .login-brand {
    text-align: center;
    margin-bottom: 1.15rem;
  }

  .login-logo {
    width: 108px;
    margin: 0 auto 0.75rem;
    display: block;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.12));
  }

  .login-brand h1 {
    font-size: 1.35rem;
    line-height: 1.15;
    margin: 0 0 0.35rem;
  }

  .login-brand p {
    font-size: 0.88rem;
    margin: 0;
    line-height: 1.35;
  }

  .login-form {
    padding: 1.1rem 1.05rem 1.15rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(17, 17, 17, 0.06);
    box-shadow: 0 12px 32px rgba(17, 17, 17, 0.08);
    backdrop-filter: blur(8px);
  }

  .login-form .field {
    margin-bottom: 0.75rem;
  }

  .login-form label {
    font-size: 0.82rem;
    margin-bottom: 0.3rem;
  }

  .login-form .form-control {
    padding: 0.7rem 0.85rem;
    font-size: 1rem;
  }

  .login-form .btn {
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
  }

  .login-footnote {
    text-align: center;
    font-size: 0.75rem;
    margin: 0.85rem 0 0;
    line-height: 1.35;
  }

  @media (max-height: 720px) {
    .login-brand {
      margin-bottom: 0.75rem;
    }

    .login-logo {
      width: 88px;
      margin-bottom: 0.5rem;
    }

    .login-brand h1 {
      font-size: 1.2rem;
    }

    .login-brand p {
      font-size: 0.8rem;
    }

    .login-form {
      padding: 0.9rem 0.95rem 1rem;
    }

    .login-form .field {
      margin-bottom: 0.6rem;
    }

    .login-footnote {
      margin-top: 0.65rem;
      font-size: 0.7rem;
    }
  }

  .profile-grid,
  .data-list,
  .form-grid,
  .filters,
  .vehicle-grid,
  .address-grid {
    grid-template-columns: 1fr;
  }

  .profile-photo-block {
    max-width: 140px;
    margin: 0 auto;
    padding: 0.85rem;
  }

  .profile-photo,
  .profile-photo-fallback {
    max-width: 110px;
    margin-left: auto;
    margin-right: auto;
  }

  .table-wrap {
    overflow-x: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 35;
  }

  .sidebar-backdrop[hidden] {
    display: none !important;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    width: min(280px, 86vw);
    z-index: 40;
    height: 100dvh;
    max-height: 100dvh;
  }

  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .mobile-only {
    display: inline-flex !important;
  }

  .sidebar-close.mobile-only {
    display: inline-flex !important;
  }

  .desktop-sidebar-toggle {
    display: none !important;
  }
}

/* Consulta FIPE */
.fipe-panel .hint {
  margin-top: -0.25rem;
  margin-bottom: 1rem;
}

.fipe-panel .hint a {
  color: var(--ink);
  font-weight: 600;
}

.fipe-form {
  margin-bottom: 1rem;
}

.fipe-form .field-actions,
.fipe-code-row .field-actions {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.fipe-code-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.fipe-status {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--grey);
}

.fipe-status.is-error {
  color: var(--danger);
}

.fipe-resultado {
  margin-top: 1.25rem;
  padding: 1.15rem 1.25rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #111 0%, #2a2a2a 100%);
  color: #fff;
  border: 1px solid rgba(253, 185, 19, 0.45);
}

.fipe-resultado-valor {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 700;
  color: var(--yellow);
  margin-bottom: 0.85rem;
  letter-spacing: 0.02em;
}

.fipe-resultado .vehicle-detail-list dt {
  color: rgba(255, 255, 255, 0.55);
}

.fipe-resultado .vehicle-detail-list dd {
  color: #fff;
}

.fipe-codigo-resultado {
  margin-top: 1rem;
}

@media (max-width: 700px) {
  .fipe-code-row {
    grid-template-columns: 1fr;
  }
}

/* Parceiros */
.avatar-logo {
  object-fit: contain;
  background: #fff;
  padding: 2px;
}

.partner-logo-preview {
  margin-top: 0.75rem;
}

.partner-logo-preview img {
  max-width: 140px;
  max-height: 90px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: #fff;
  padding: 0.4rem;
}

.partner-detail-logo {
  object-fit: contain;
  background: #fff;
  padding: 0.75rem;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: clamp(0.75rem, 2vw, 1.15rem);
}

.partner-card {
  appearance: none;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, #fffdf8 0%, #fff 100%);
  box-shadow: 0 8px 22px rgba(17, 17, 17, 0.06);
  padding: clamp(0.85rem, 2.5vw, 1.1rem) clamp(0.7rem, 2vw, 0.95rem);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  width: 100%;
  min-height: 100%;
  font: inherit;
  color: inherit;
}

.partner-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(17, 17, 17, 0.1);
  border-color: rgba(253, 185, 19, 0.55);
}

.partner-card:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

.partner-card-logo {
  width: clamp(72px, 18vw, 96px);
  height: clamp(72px, 18vw, 96px);
  border-radius: 18px;
  background: #111;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(253, 185, 19, 0.65);
  flex-shrink: 0;
}

.partner-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  padding: 0.45rem;
}

.partner-card-fallback {
  color: var(--yellow);
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 4vw, 1.7rem);
}

.partner-card-name {
  font-weight: 700;
  font-size: clamp(0.82rem, 2.4vw, 0.95rem);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
}

.partner-detail-panel {
  text-align: left;
  width: min(520px, calc(100vw - 1.5rem));
}

.partner-modal-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

.partner-modal-head h2 {
  margin: 0;
  font-size: clamp(1.1rem, 4vw, 1.4rem);
}

.partner-modal-logo {
  width: clamp(80px, 22vw, 104px);
  height: clamp(80px, 22vw, 104px);
  border-radius: 18px;
  overflow: hidden;
  border: 2px solid var(--yellow);
  background: #fff;
}

.partner-modal-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.4rem;
}

.hint-inline {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--grey);
  text-transform: none;
  letter-spacing: 0;
}

@media (max-width: 900px) {
  .partners-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .app-shell.sidebar-collapsed .sidebar-link[data-tooltip]::after,
  .app-shell.sidebar-collapsed .sidebar-link[data-tooltip]::before {
    display: none;
  }
}

@media (max-width: 480px) {
  .partners-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .partner-card {
    padding: 0.75rem 0.55rem;
    border-radius: 14px;
  }
}

@media (min-width: 1100px) {
  .partners-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}
