/**
 * Wash — tema visual: legível, fluido, elegante
 */
:root {
  --wash-font: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --wash-bg0: #e8f4fc;
  --wash-bg1: #f0f7ff;
  --wash-bg2: #f5f3ff;
  --wash-surface: #ffffff;
  --wash-surface-2: rgba(255, 255, 255, 0.72);
  --wash-ink: #0f172a;
  --wash-ink-muted: #64748b;
  --wash-ink-soft: #94a3b8;
  --wash-primary: #0c8bce;
  --wash-primary-hover: #0a7ab5;
  --wash-primary-soft: rgba(12, 139, 206, 0.1);
  --wash-accent: #0891b2;
  --wash-success: #059669;
  --wash-border: rgba(15, 23, 42, 0.08);
  --wash-border-strong: rgba(15, 23, 42, 0.12);
  --wash-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --wash-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --wash-shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.08);
  --wash-radius: 16px;
  --wash-radius-sm: 10px;
  --wash-radius-pill: 9999px;
  --wash-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
}

body.wash-app {
  font-family: var(--wash-font);
  background: fixed linear-gradient(
    155deg,
    var(--wash-bg0) 0%,
    var(--wash-bg1) 42%,
    var(--wash-bg2) 100%
  );
  color: var(--wash-ink);
  font-size: 0.9375rem;
  line-height: 1.55;
  min-height: 100vh;
  letter-spacing: -0.01em;
}

/* ——— Navbar ——— */
.navbar-wash {
  background: var(--wash-surface-2) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--wash-border);
  box-shadow: var(--wash-shadow-sm);
  padding: 0.6rem 0;
}

.navbar-wash .navbar-brand {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--wash-ink) !important;
  letter-spacing: -0.03em;
  transition: opacity var(--wash-transition);
}

.navbar-wash .navbar-brand:hover {
  opacity: 0.85;
}

.navbar-wash .navbar-brand .wash-logo-icon {
  color: var(--wash-primary);
  font-size: 1.35rem;
  vertical-align: -0.1em;
}

.navbar-wash .nav-link {
  color: var(--wash-ink-muted) !important;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 0.85rem !important;
  border-radius: var(--wash-radius-sm);
  transition: color var(--wash-transition), background var(--wash-transition), transform var(--wash-transition);
}

.navbar-wash .nav-link:hover {
  color: var(--wash-ink) !important;
  background: rgba(12, 139, 206, 0.06);
}

.navbar-wash .nav-link i {
  opacity: 0.85;
}

.navbar-wash .navbar-toggler {
  border-color: var(--wash-border-strong);
  border-radius: var(--wash-radius-sm);
}

.wash-main {
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1rem, 3vw, 2rem) !important;
  padding-right: clamp(1rem, 3vw, 2rem) !important;
  padding-bottom: 3rem !important;
}

/* ——— Page header ——— */
.wash-page-head {
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--wash-border);
}

.wash-page-head h1,
.wash-page-head .wash-title {
  font-size: clamp(1.35rem, 2.5vw, 1.6rem);
  font-weight: 700;
  color: var(--wash-ink);
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1.25;
}

.wash-page-head .wash-lead {
  color: var(--wash-ink-muted);
  font-size: 0.9375rem;
  margin: 0.35rem 0 0;
  max-width: 52ch;
  line-height: 1.5;
}

/* ——— Cards ——— */
.wash-card,
.card.wash-card,
.card {
  background: var(--wash-surface);
  border: 1px solid var(--wash-border) !important;
  border-radius: var(--wash-radius) !important;
  box-shadow: var(--wash-shadow) !important;
  transition: box-shadow var(--wash-transition), border-color var(--wash-transition);
  overflow: hidden;
}

.wash-card:hover,
.card:hover {
  box-shadow: var(--wash-shadow-lg) !important;
  border-color: rgba(12, 139, 206, 0.12) !important;
}

.card .card-body {
  padding: 1.35rem 1.5rem;
}

.card-title,
h5.card-title {
  font-weight: 600;
  color: var(--wash-ink);
  letter-spacing: -0.02em;
}

/* ——— Stat cards (dashboard) ——— */
.wash-stat-card {
  border: 1px solid var(--wash-border);
  border-radius: var(--wash-radius);
  background: var(--wash-surface);
  box-shadow: var(--wash-shadow);
  padding: 1.35rem 1.4rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform var(--wash-transition), box-shadow var(--wash-transition);
  text-decoration: none;
  color: inherit;
}

a.wash-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--wash-shadow-lg);
  border-color: rgba(12, 139, 206, 0.15);
  color: inherit;
}

.wash-stat-card .wash-stat-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.wash-stat-card .wash-stat-icon.c1 {
  background: linear-gradient(135deg, rgba(12, 139, 206, 0.15), rgba(8, 145, 178, 0.12));
  color: var(--wash-primary);
}

.wash-stat-card .wash-stat-icon.c2 {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.14), rgba(5, 150, 105, 0.08));
  color: var(--wash-success);
}

.wash-stat-card .wash-stat-icon.c3 {
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.16), rgba(12, 139, 206, 0.1));
  color: var(--wash-accent);
}

.wash-stat-card .wash-stat-value {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--wash-ink);
  line-height: 1.1;
}

.wash-stat-card .wash-stat-label {
  font-size: 0.8125rem;
  color: var(--wash-ink-muted);
  font-weight: 500;
  margin-top: 0.15rem;
}

.wash-stat-card .wash-stat-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--wash-primary);
  margin-top: 0.35rem;
  display: inline-block;
}

.wash-stat-card .wash-stat-link:hover {
  text-decoration: underline;
}

/* ——— Filter bar ——— */
.wash-filter-bar {
  background: var(--wash-surface);
  border: 1px solid var(--wash-border);
  border-radius: var(--wash-radius);
  padding: 1.15rem 1.35rem;
  margin-bottom: 1.35rem;
  box-shadow: var(--wash-shadow-sm);
}

/* ——— Forms ——— */
.form-control,
.form-select {
  border-radius: var(--wash-radius-sm);
  border-color: var(--wash-border-strong);
  padding: 0.55rem 0.9rem;
  transition: border-color var(--wash-transition), box-shadow var(--wash-transition);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--wash-primary);
  box-shadow: 0 0 0 3px var(--wash-primary-soft);
}

.form-label {
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--wash-ink-muted);
  margin-bottom: 0.35rem;
}

/* ——— Buttons ——— */
.btn-primary {
  background: linear-gradient(180deg, var(--wash-primary) 0%, var(--wash-primary-hover) 100%);
  border: none;
  font-weight: 600;
  border-radius: var(--wash-radius-pill);
  padding: 0.5rem 1.35rem;
  box-shadow: 0 2px 8px rgba(12, 139, 206, 0.25);
  transition: transform 0.15s ease, box-shadow var(--wash-transition);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #0d9ae0 0%, var(--wash-primary) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(12, 139, 206, 0.3);
}

.btn-success {
  border-radius: var(--wash-radius-pill);
  font-weight: 600;
}

.btn-outline-secondary {
  border-radius: var(--wash-radius-pill);
  border-color: var(--wash-border-strong);
  color: var(--wash-ink-muted);
  font-weight: 500;
}

.btn-outline-secondary:hover {
  background: rgba(15, 23, 42, 0.04);
  border-color: var(--wash-ink-soft);
  color: var(--wash-ink);
}

.btn-sm {
  border-radius: var(--wash-radius-sm);
  font-weight: 600;
}

/* ——— Tables ——— */
.table-responsive {
  border-radius: var(--wash-radius-sm);
}

.table {
  --bs-table-border-color: var(--wash-border);
}

.table thead th {
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--wash-ink-soft);
  border-bottom: 1px solid var(--wash-border-strong);
  padding: 0.85rem 1rem;
  background: rgba(248, 250, 252, 0.9);
}

.table tbody td {
  padding: 0.9rem 1rem;
  vertical-align: middle;
  border-bottom-color: var(--wash-border);
}

.table-hover tbody tr {
  transition: background var(--wash-transition);
}

.table-hover tbody tr:hover {
  background: rgba(12, 139, 206, 0.04) !important;
}

.table-light thead th {
  background: rgba(248, 250, 252, 0.95);
}

/* ——— Alerts ——— */
.alert {
  border-radius: var(--wash-radius-sm);
  border: none;
  box-shadow: var(--wash-shadow-sm);
}

/* ——— Footer ——— */
.footer-wash {
  background: var(--wash-surface-2);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--wash-border);
  padding: 1.1rem 1.5rem;
  font-size: 0.75rem;
  color: var(--wash-ink-muted);
  margin-top: auto;
}

/* ——— Utilities ——— */
h1.h4,
.h4 {
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--wash-ink);
}

.text-muted {
  color: var(--wash-ink-muted) !important;
}

.badge {
  font-weight: 600;
  border-radius: 8px;
  padding: 0.35em 0.65em;
}

.nav-select-empresa {
  min-width: 160px;
  max-width: 220px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--wash-ink);
  cursor: pointer;
  border: 1px solid var(--wash-border);
  border-radius: var(--wash-radius-sm);
  background: var(--wash-surface);
  padding: 0.35rem 2rem 0.35rem 0.65rem;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 0.85rem;
}

.nav-select-empresa:focus {
  outline: none;
  border-color: var(--wash-primary);
  box-shadow: 0 0 0 3px var(--wash-primary-soft);
}

/* ========== Auth pages (login / agendar público) ========== */
body.wash-auth {
  font-family: var(--wash-font);
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: fixed
    radial-gradient(ellipse 100% 80% at 50% -30%, rgba(12, 139, 206, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 100%, rgba(139, 92, 246, 0.08), transparent 50%),
    radial-gradient(ellipse 60% 40% at 0% 80%, rgba(8, 145, 178, 0.1), transparent 45%),
    linear-gradient(165deg, #e0f2fe 0%, #f0f9ff 35%, #f8fafc 70%, #eef2ff 100%);
  color: var(--wash-ink);
}

.wash-auth-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  padding: 2.25rem 2rem;
  animation: wash-fade-in 0.5s ease-out;
}

@keyframes wash-fade-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wash-auth-card .wash-auth-logo {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--wash-ink);
  margin-bottom: 0.35rem;
}

.wash-auth-card .wash-auth-logo i {
  color: var(--wash-primary);
  font-size: 1.5rem;
  vertical-align: -0.08em;
}

.wash-auth-card .wash-auth-sub {
  font-size: 0.9rem;
  color: var(--wash-ink-muted);
  line-height: 1.5;
  margin-bottom: 1.75rem;
}

.wash-auth-card .form-control,
.wash-auth-card .form-select {
  padding: 0.65rem 1rem;
  border-radius: 12px;
}

.wash-auth-card .form-label {
  font-weight: 600;
  color: var(--wash-ink);
}

.wash-auth-card .btn-wash-submit {
  width: 100%;
  padding: 0.8rem 1.25rem;
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--wash-radius-pill);
  border: none;
  background: linear-gradient(180deg, var(--wash-primary) 0%, #0a7ab5 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(12, 139, 206, 0.35);
  margin-top: 0.5rem;
  transition: transform 0.15s ease, box-shadow var(--wash-transition);
}

.wash-auth-card .btn-wash-submit:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(12, 139, 206, 0.4);
}

.wash-auth-card .btn-wash-outline {
  display: block;
  width: 100%;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  line-height: 1.4;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  border-radius: var(--wash-radius-pill);
  border: 2px solid var(--wash-primary);
  background: transparent;
  color: var(--wash-primary);
  text-decoration: none;
  transition: background var(--wash-transition), color var(--wash-transition);
}

.wash-auth-card .btn-wash-outline:hover {
  background: var(--wash-primary-soft);
  color: var(--wash-primary-hover);
}

.wash-auth-footer {
  margin-top: 2.5rem;
  text-align: center;
  font-size: 0.72rem;
  color: var(--wash-ink-muted);
  max-width: 420px;
  line-height: 1.5;
}

.wash-auth-footer p {
  margin: 0.25rem 0;
}

.wash-link-muted {
  font-size: 0.9rem;
  color: var(--wash-primary);
  font-weight: 600;
  text-decoration: none;
}

.wash-link-muted:hover {
  text-decoration: underline;
  color: var(--wash-primary-hover);
}

/* Chart card on dashboard */
.wash-chart-card .card-body {
  padding: 1.5rem;
}

.wash-chart-card .card-title {
  font-size: 1rem;
  font-weight: 700;
}

@media (max-width: 991.98px) {
  .navbar-wash .navbar-collapse {
    padding-top: 0.75rem;
    border-top: 1px solid var(--wash-border);
    margin-top: 0.5rem;
  }
}

/* Agendamento público — bloco data/hora */
.wash-auth-card--agendar {
  max-width: 460px;
}

.agendar-bloco-datahora {
  border-radius: 14px;
  border: 1px solid var(--wash-border);
  background: rgba(12, 139, 206, 0.05);
  padding: 1rem 1rem 0.35rem;
}

.agendar-datahora-row > [class*="col-"] {
  min-width: 0;
}

.agendar-input-datahora {
  width: 100%;
}

/* Smartphone: data e hora na mesma linha, área de toque confortável, 16px evita zoom iOS */
@media (max-width: 767.98px) {
  .wash-auth-card--agendar {
    padding: 1.65rem 1.25rem;
    max-width: 100%;
  }
  .agendar-datahora-titulo {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wash-ink-muted);
    margin-bottom: 0.5rem !important;
  }
  .agendar-bloco-datahora {
    padding: 0.85rem 0.75rem 0.65rem;
    background: rgba(12, 139, 206, 0.08);
    border-color: rgba(12, 139, 206, 0.18);
  }
  .agendar-datahora-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wash-ink-muted);
    margin-bottom: 0.3rem !important;
    display: block;
  }
  .agendar-input-datahora {
    min-height: 3rem;
    padding: 0.55rem 0.5rem;
    font-size: 16px;
    line-height: 1.35;
  }
}

@media (min-width: 768px) {
  .agendar-datahora-titulo {
    display: none;
  }
  .agendar-bloco-datahora {
    background: transparent;
    border: none;
    padding: 0;
  }
  .agendar-datahora-label {
    font-size: inherit;
    text-transform: none;
    letter-spacing: normal;
    color: inherit;
    margin-bottom: 0.375rem !important;
  }
  .agendar-input-datahora {
    min-height: unset;
    font-size: inherit;
    padding: 0.375rem 0.75rem;
  }
}

/* Agenda interna (logado): mesma lógica em telas estreitas */
@media (max-width: 767.98px) {
  .agenda-mob-datahora-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wash-ink-muted, #6c757d);
    margin-bottom: 0.3rem !important;
  }
  .agenda-input-datahora {
    min-height: 3rem;
    font-size: 16px;
    padding: 0.55rem 0.5rem;
  }
  .agenda-col-datahora {
    min-width: 0;
  }
}
