/**
 * Padrões de componentes web — espelho EZ-Mobi.mobile
 */

/* Profile */
.ez-profile-header {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--color-border);
  box-shadow: 0 2px 8px rgba(0, 25, 48, 0.06);
}

.ez-profile-header__top {
  display: flex;
  gap: 14px;
  align-items: center;
}

.ez-profile-header__avatar {
  width: 56px;
  height: 56px;
  border-radius: 28px;
  background: rgba(0, 69, 102, 0.12);
  color: var(--color-link);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ez-profile-section {
  margin-bottom: 20px;
}

.ez-profile-section__title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin: 0 0 8px;
}

.ez-profile-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.ez-profile-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
  width: 100%;
  text-align: left;
  background: #fff;
  border-left: none;
  border-right: none;
  border-top: none;
  font-family: inherit;
  cursor: pointer;
}

.ez-profile-row:last-child {
  border-bottom: none;
}

.ez-profile-row:hover {
  background: rgba(0, 69, 102, 0.04);
}

.ez-profile-row__body {
  flex: 1;
  min-width: 0;
}

.ez-profile-row__label {
  display: block;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.ez-profile-row__value {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
}

.ez-profile-row__badge {
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}

.ez-profile-row__badge--success {
  color: var(--color-success);
}

.ez-profile-row__badge--warning {
  color: var(--color-warning);
}

.ez-profile-row__badge--muted {
  color: var(--color-text-muted);
}

.ez-profile-row--readonly {
  cursor: default;
}

.ez-profile-row--readonly:hover {
  background: #fff;
}

button.ez-profile-row {
  cursor: pointer;
  text-align: left;
}

.ez-profile-email-banner {
  background: rgba(154, 123, 0, 0.12);
  border: 1px solid rgba(154, 123, 0, 0.35);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ez-profile-email-banner__text {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-warning, #9a7b00);
}

.ez-profile-email-banner__btn {
  border: none;
  background: var(--color-primary, #001930);
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.ez-profile-email-banner__btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* Vehicle card */
.ez-vehicle-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ez-vehicle-card__plate {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 4px;
}

.ez-vehicle-card__meta {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0;
}

/* Transaction card */
.ez-transaction-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 1px solid var(--color-border);
}

.ez-transaction-card__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 6px;
}

.ez-transaction-card__meta {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.45;
}

/* Invoice row */
.ez-invoice-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
}

.ez-invoice-row:last-child {
  border-bottom: none;
}

/* Accredited */
.ez-accredited-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
  display: block;
}

.ez-accredited-card:hover {
  background: rgba(0, 69, 102, 0.04);
}

/* FAQ */
.ez-faq-item {
  border-bottom: 1px solid var(--color-border);
}

.ez-faq-item__question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
  text-align: left;
  cursor: pointer;
}

.ez-faq-item__answer {
  display: none;
  padding: 0 0 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text-muted);
}

.ez-faq-item.is-open .ez-faq-item__answer {
  display: block;
}

/* Star rating */
.ez-star-rating {
  display: flex;
  gap: 8px;
  margin: 8px 0 16px;
}

.ez-star-rating__btn {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--color-border);
}

.ez-star-rating__btn.is-active {
  color: #f5a623;
}

/* Parking bottom sheet */
.ez-parking-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 32px rgba(0, 25, 48, 0.18);
  max-height: 78vh;
  transform: translateY(100%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
}

.ez-parking-sheet.is-open {
  transform: translateY(0);
}

.ez-parking-sheet__handle {
  width: 40px;
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
  margin: 10px auto 8px;
}

.ez-parking-sheet__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0 16px 12px;
  gap: 12px;
}

.ez-parking-sheet__body {
  overflow-y: auto;
  padding: 0 16px 16px;
  flex: 1;
}

.ez-parking-sheet__footer {
  padding: 12px 16px 20px;
  border-top: 1px solid var(--color-border);
}

.ez-parking-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: var(--color-dialog-backdrop);
  z-index: 299;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.ez-parking-sheet-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Table theme (DataTables / nativas) */
.ez-table-theme {
  width: 100%;
  border-collapse: collapse;
}

.ez-table-theme th,
.ez-table-theme td {
  border-bottom: 1px solid var(--color-border);
  padding: 10px 8px;
  text-align: left;
  font-size: 13px;
  font-family: var(--font-family);
}

.ez-table-theme th {
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
}

/* Skeleton */
.ez-skeleton {
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
  background-size: 200% 100%;
  animation: ez-skeleton 1.2s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes ez-skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.ez-skeleton--line {
  height: 14px;
  margin-bottom: 8px;
}

.ez-skeleton--card {
  height: 72px;
  margin-bottom: 10px;
}

/* Settings toggle */
.ez-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
}

.ez-toggle-row:last-child {
  border-bottom: none;
}

.ez-toggle {
  width: 48px;
  height: 28px;
  border-radius: 14px;
  background: var(--color-border);
  border: none;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}

.ez-toggle.is-on {
  background: var(--color-success);
}

.ez-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}

.ez-toggle.is-on::after {
  transform: translateX(20px);
}

/* Social auth (login) */
.ez-social-auth {
  margin-top: 20px;
}

.ez-social-auth__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.ez-social-auth__divider::before,
.ez-social-auth__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.ez-social-auth__divider span {
  font-size: 13px;
  color: var(--color-text-muted);
}

.ez-social-auth__row {
  display: flex;
  justify-content: center;
  gap: 28px;
}

.ez-social-auth__btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ez-social-auth__btn--google .mdi {
  color: #4285f4;
}

.ez-mini-btn {
  border: 1px solid var(--color-border);
  background: #fff;
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
}

.ez-mini-btn.danger {
  color: var(--color-danger);
  border-color: #f1c3c3;
}

/* Payment (paridade PaymentMethodScreen) */
.ez-payment-hero {
  text-align: center;
  margin-bottom: 20px;
}

.ez-payment-hero__icon {
  width: 56px;
  height: 56px;
  border-radius: 28px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  box-shadow: var(--shadow-card);
}

.ez-payment-hero__icon .mdi {
  font-size: 28px;
  color: var(--color-primary);
}

.ez-payment-hero__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 6px;
}

.ez-payment-hero__subtitle {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0;
}

.ez-payment-preview {
  position: relative;
  background: var(--color-primary-button);
  border-radius: 16px;
  padding: 20px;
  min-height: 168px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 6px 16px rgba(0, 25, 48, 0.2);
  color: #fff;
}

.ez-payment-preview__decor {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.ez-payment-preview__decor--a {
  width: 140px;
  height: 140px;
  top: -40px;
  right: -30px;
}

.ez-payment-preview__decor--b {
  width: 100px;
  height: 100px;
  bottom: -30px;
  left: -20px;
}

.ez-payment-preview__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.ez-payment-preview__number {
  font-size: 20px;
  letter-spacing: 2px;
  font-weight: 600;
  margin: 0 0 16px;
  position: relative;
  z-index: 1;
}

.ez-payment-preview__bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.ez-payment-preview__label {
  font-size: 10px;
  text-transform: uppercase;
  opacity: 0.75;
  margin: 0 0 4px;
}

.ez-payment-preview__value {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.ez-payment-saved {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.ez-payment-saved__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.ez-payment-saved__badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: #e8f8ee;
  color: var(--color-success);
}

.ez-payment-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.ez-payment-tile {
  border: 2px solid var(--color-border);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.ez-payment-tile.is-active {
  border-color: var(--color-link);
  background: rgba(0, 69, 102, 0.06);
}

.ez-payment-tile:disabled,
.ez-payment-tile.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ez-payment-tile__badge {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--color-success);
  color: #fff;
}

.ez-payment-tile__badge--muted {
  background: var(--color-border);
  color: var(--color-text-muted);
}

.ez-payment-security {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 12px;
}

.ez-payment-security .mdi {
  color: var(--color-success);
  font-size: 20px;
  flex-shrink: 0;
}

.ez-status { font-weight: 700; }
.ez-status.ok { color: var(--color-success); }
.ez-status.warn { color: var(--color-link); }
.ez-status.fail { color: var(--color-danger); }

.ez-tx-compact {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  margin-bottom: 8px;
}

/* Operational dashboard */
.ez-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.ez-stat-card {
  border-radius: var(--radius-card);
  padding: 16px;
  color: #fff;
}

.ez-stat-card--primary {
  background: var(--color-primary);
}

.ez-stat-card--button {
  background: var(--color-primary-button);
}

.ez-stat-card__label {
  font-size: 12px;
  opacity: 0.9;
  margin: 0 0 8px;
}

.ez-stat-card__value {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
}

.ez-op-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.ez-op-header__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0;
}

.ez-campaign-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: inherit;
}

.ez-campaign-toggle__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-success);
  color: #fff;
}

.ez-campaign-toggle.is-off .ez-campaign-toggle__icon {
  background: var(--color-text-muted);
}

.ez-campaign-toggle__label {
  font-size: 12px;
  color: var(--color-text-muted);
  text-align: center;
  max-width: 120px;
}

.ez-tracker-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}

.ez-tracker-row:last-child {
  border-bottom: none;
}

.ez-parking-booking {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
  margin-bottom: 10px;
}

.ez-parking-booking__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

/* Admin filter bar */
.ez-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.ez-filter-bar__field {
  flex: 1 1 200px;
  min-width: 0;
  margin-bottom: 0;
}

.ez-filter-bar__field--narrow {
  flex: 0 1 120px;
}

.ez-filter-bar__submit {
  flex: 0 0 auto;
  width: auto;
  min-width: 120px;
}

.ez-filter-bar__check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  padding-bottom: 10px;
}

.ez-filter-presets {
  font-size: 14px;
  margin: 0 0 8px;
}

.ez-filter-presets a {
  margin-right: 12px;
  color: var(--color-link);
}

.ez-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.ez-pagination__controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ez-pagination__btn.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.ez-pagination__page {
  font-size: 14px;
  color: var(--color-text-muted);
}

.ez-wizard__body {
  min-width: 0;
}

/* Wizard admin */
.ez-wizard__steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.ez-wizard__step {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  background: var(--color-border);
  color: var(--color-text-muted);
}

.ez-wizard__step.is-active {
  background: var(--color-primary);
  color: #fff;
}

/* Auth signup progress */
.ez-signup-progress {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.ez-signup-progress__bar {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--color-border);
}

.ez-signup-progress__bar.is-done,
.ez-signup-progress__bar.is-active {
  background: var(--color-link);
}

/* Assistant web */
.ez-assistant-layout {
  display: flex;
  flex-direction: column;
  min-height: 50vh;
  gap: 12px;
}

.ez-assistant-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0;
}

.ez-assistant-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
}

.ez-assistant-bubble--user {
  align-self: flex-end;
  background: var(--color-primary-button);
  color: #fff;
}

.ez-assistant-bubble--bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--color-border);
}

.ez-assistant-compose {
  display: flex;
  gap: 8px;
}

.ez-assistant-compose .ez-field {
  flex: 1;
}

/* DataTables extended */
.ez-table-theme .dataTables_filter input,
.ez-table-theme .dataTables_length select {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-input);
  padding: 6px 10px;
  font-family: inherit;
}

.ez-table-theme .dataTables_paginate .paginate_button.current {
  background: var(--color-primary) !important;
  color: #fff !important;
  border-color: var(--color-primary) !important;
}

.ez-chart-canvas {
  width: 100% !important;
  max-height: 320px;
  height: auto !important;
}

@media (min-width: 1024px) {
  .ez-wizard {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    align-items: start;
  }

  .ez-wizard__steps {
    flex-direction: column;
    position: sticky;
    top: 16px;
  }

  .ez-wizard [data-panel='3'] {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}
