/* ===== ÁREA RESTRITA — Modal de login e área logada ===== */

.ar-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
}

.ar-modal.is-open {
  display: flex;
}

.ar-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}

.ar-modal__card {
  position: relative;
  background: var(--primary-dark);
  border-radius: 16px;
  padding: 36px 32px 28px;
  width: min(420px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  color: var(--white);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: ar-pop 0.2s ease-out;
}

@keyframes ar-pop {
  from { transform: scale(0.95); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.ar-modal__card--wide {
  width: min(720px, calc(100% - 32px));
}

.ar-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.ar-modal__close:hover { opacity: 1; }

.ar-modal__back {
  position: absolute;
  top: 14px;
  left: 14px;
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 16px;
  cursor: pointer;
  opacity: 0.8;
  padding: 6px 10px;
}
.ar-modal__back:hover { opacity: 1; }

.ar-modal__title {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* ===== Form ===== */
.ar-form { display: flex; flex-direction: column; gap: 14px; }

.ar-field { display: flex; flex-direction: column; gap: 6px; }

.ar-field__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.75);
}

.ar-field input {
  width: 100%;
  padding: 14px 16px;
  background: #d9d9d9;
  border: none;
  border-radius: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: 0.05em;
}

.ar-field input::placeholder {
  color: #5a5a5a;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ar-field input:focus {
  outline: 2px solid var(--primary-copper);
  outline-offset: 1px;
}

.ar-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--white);
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  align-self: flex-start;
  text-decoration: none;
}
.ar-link:hover { color: var(--primary-copper); }

.ar-error {
  color: #ffb4a8;
  font-size: 12px;
  font-weight: 600;
  min-height: 16px;
  margin-top: 2px;
}

.ar-success {
  color: #a6e3b2;
  font-size: 13px;
  font-weight: 600;
  margin-top: 2px;
}

.ar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--primary-copper);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}
.ar-btn:hover { background: var(--copper-hover); }
.ar-btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.ar-btn--ghost {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}
.ar-btn--ghost:hover { background: rgba(255, 255, 255, 0.08); }

.ar-btn--full { width: 100%; }

/* Action row: login + cadastro + ícones */
.ar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.ar-actions__spacer { flex: 1; }

.ar-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-size: 16px;
  transition: transform 0.2s;
}
.ar-icon-btn:hover { transform: scale(1.08); }

.ar-icon-btn--whatsapp {
  background: #25d366;
  color: #fff;
}

.ar-icon-btn--lock {
  background: transparent;
  color: var(--white);
  font-size: 20px;
}

/* ===== Área logada ===== */
.ar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.ar-welcome {
  font-size: 14px;
  font-weight: 600;
}
.ar-welcome strong { color: var(--primary-copper); }

.ar-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  margin-bottom: 16px;
}

.ar-tab {
  background: transparent;
  border: none;
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.65);
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.ar-tab:hover { color: var(--white); }
.ar-tab.is-active {
  color: var(--white);
  border-bottom-color: var(--primary-copper);
}

.ar-panel { display: none; }
.ar-panel.is-active { display: block; }

/* Lista de lances */
.ar-bids {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 55vh;
  overflow-y: auto;
}

.ar-bid {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 14px;
  align-items: center;
}

.ar-bid__title {
  font-weight: 700;
  font-size: 14px;
  color: var(--white);
}

.ar-bid__meta {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.03em;
}

.ar-bid__value {
  font-weight: 800;
  font-size: 15px;
  color: var(--primary-copper);
  text-align: right;
}

.ar-bid__status {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
}

.ar-empty {
  text-align: center;
  padding: 30px 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.ar-loading {
  text-align: center;
  padding: 30px 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

/* Turnstile (invisible mode — container collapses to 0 height) */
.ar-turnstile { display: flex; justify-content: center; }

@media (max-width: 480px) {
  .ar-modal__card { padding: 28px 20px 22px; }
  .ar-bid { grid-template-columns: 1fr; }
  .ar-bid__value { text-align: left; }
}
