/* =============================================
   ALAGADOS RESERVAS — Public CSS
   Paleta: verde escuro #1a3a2a, dourado #b8872a,
   creme #f5f0e8, branco, sombras suaves
   ============================================= */

:root {
  --al-green:     #1a3a2a;
  --al-green-mid: #2d6a4f;
  --al-gold:      #b8872a;
  --al-gold-lt:   #d4a843;
  --al-cream:     #f5f0e8;
  --al-white:     #ffffff;
  --al-gray:      #6b7280;
  --al-gray-lt:   #e5e7eb;
  --al-radius:    12px;
  --al-shadow:    0 4px 20px rgba(26,58,42,0.12);
  --al-font:      'Segoe UI', system-ui, sans-serif;
}

/* ---- BASE ---- */
.al-wrap, .al-painel-admin {
  font-family: var(--al-font);
  color: #1a1a1a;
  line-height: 1.5;
  max-width: 900px;
  margin: 0 auto;
}

/* ---- CARD ---- */
.al-card {
  background: var(--al-white);
  border-radius: var(--al-radius);
  box-shadow: var(--al-shadow);
  overflow: hidden;
  margin-bottom: 24px;
}
.al-card__header {
  background: var(--al-green);
  color: var(--al-white);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.al-icon { font-size: 1.6rem; }
.al-card__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff !important;
}
.al-card__header,
.al-card__header *,
.al-card__header h1,
.al-card__header h2,
.al-card__header h3,
.al-card__header h4 {
  color: #ffffff !important;
}
.al-card__body {
  padding: 28px;
}

/* ---- FIELDS ---- */
.al-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.al-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.al-field > label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--al-green);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.al-input {
  border: 2px solid var(--al-gray-lt);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
  width: 100%;
  box-sizing: border-box;
  background: var(--al-white);
}
.al-input:focus {
  outline: none;
  border-color: var(--al-green-mid);
}
.al-hint {
  font-size: 0.78rem;
  color: var(--al-gray);
}

/* ---- COUNTER ---- */
.al-counter {
  display: flex;
  align-items: center;
  border: 2px solid var(--al-gray-lt);
  border-radius: 8px;
  overflow: hidden;
}
.al-counter__btn {
  background: var(--al-cream);
  border: none;
  width: 38px;
  height: 42px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.al-counter__btn:hover { background: var(--al-gold-lt); color: white; }
.al-counter__val {
  flex: 1;
  border: none;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  padding: 0;
  -moz-appearance: textfield;
}
.al-counter__val::-webkit-inner-spin-button,
.al-counter__val::-webkit-outer-spin-button { -webkit-appearance: none; }

/* ---- UNIT CARDS ---- */
.al-units-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-bottom: 20px;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  overflow: hidden;
}
.al-unit-card {
  cursor: pointer;
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}
.al-unit-card:nth-child(3n) { border-right: none; }
/* Remove bottom border from last row items */
.al-unit-card:nth-last-child(-n+3) { border-bottom: none; }
@media (max-width: 600px) {
  .al-units-grid { grid-template-columns: repeat(2, 1fr); }
  .al-unit-card:nth-child(2n) { border-right: none; }
  .al-unit-card:nth-child(3n) { border-right: 1px solid #e5e7eb; }
}
.al-unit-card {
  cursor: pointer;
}
.al-unit-card input[type="radio"] { display: none; }
.al-unit-card__inner { border-radius: 0 !important; }
.al-unit-card__inner {
  border: 2px solid var(--al-gray-lt);
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
  transition: all 0.2s;
  background: var(--al-white);
}
.al-unit-card input:checked + .al-unit-card__inner {
  border-color: var(--al-green);
  background: var(--al-cream);
  box-shadow: 0 0 0 3px rgba(26,58,42,0.15);
}
.al-unit-card__inner:hover {
  border-color: var(--al-green-mid);
}
.al-unit-card__name {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--al-green);
  margin-bottom: 4px;
}
.al-unit-card__cap {
  display: block;
  font-size: 0.78rem;
  color: var(--al-gray);
}
.al-unit-card__avail {
  display: block;
  font-size: 0.72rem;
  margin-top: 6px;
  font-weight: 600;
}
.al-unit-card.al-unavailable .al-unit-card__inner {
  opacity: 0.45;
  cursor: not-allowed;
}
.al-unit-card__avail.avail--yes { color: #16a34a; }
.al-unit-card__avail.avail--no  { color: #dc2626; }

/* ---- CAPACITY MESSAGE ---- */
.al-capacity-msg {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.88rem;
  color: #92400e;
  margin-bottom: 16px;
}

/* ---- PRICE BOX ---- */
.al-price-box {
  background: var(--al-cream);
  border: 2px solid var(--al-gold);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 16px;
}
.al-price-box__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--al-gray);
  text-transform: uppercase;
}
.al-price-box__value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--al-green);
  margin-left: auto;
}
.al-price-box__detail {
  font-size: 0.8rem;
  color: var(--al-gray);
}

/* ---- MESSAGE ---- */
.al-msg {
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}
.al-msg--error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.al-msg--success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }

/* ---- BUTTON ---- */
.al-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  width: 100%;
}
.al-btn--primary {
  background: var(--al-green);
  color: var(--al-white);
}
.al-btn--primary:hover { background: var(--al-green-mid); transform: translateY(-1px); }
.al-btn--whatsapp { background: #25d366; color: white; }
.al-btn--whatsapp:hover { background: #1ebe5d; }

/* ---- CONFIRM ---- */
.al-confirm {
  background: var(--al-white);
  border-radius: var(--al-radius);
  box-shadow: var(--al-shadow);
  padding: 40px 28px;
  text-align: center;
}
.al-confirm__icon { font-size: 3rem; margin-bottom: 12px; }
.al-confirm h3 { font-size: 1.5rem; color: var(--al-green); margin: 0 0 12px; }
.al-confirm__detail { font-size: 1rem; color: var(--al-gray); margin-bottom: 8px; }
.al-confirm__info { font-size: 0.9rem; color: var(--al-gray); margin-bottom: 24px; }

/* ---- PAINEL ADMIN (frontend) ---- */
.al-painel-admin {
  background: #f0f4f1;
  border-radius: var(--al-radius);
  padding: 24px;
  max-width: 100%;
}
.al-painel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--al-green);
  color: white;
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 24px;
}
.al-painel__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
}
.al-painel__logo strong { display: block; font-size: 1.1rem; }
.al-painel__logo small { font-size: 0.8rem; opacity: 0.8; }
.al-painel__date { font-size: 0.9rem; opacity: 0.8; }

/* ---- KPI GRID ---- */
.al-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.al-kpi {
  background: var(--al-white);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  border-left: 4px solid transparent;
}
.al-kpi--green  { border-color: #16a34a; }
.al-kpi--blue   { border-color: #2563eb; }
.al-kpi--orange { border-color: #ea580c; }
.al-kpi--teal   { border-color: #0d9488; }
.al-kpi--purple { border-color: #7c3aed; }
.al-kpi--dark   { border-color: var(--al-green); }
.al-kpi__icon   { font-size: 2rem; }
.al-kpi__val    { display: block; font-size: 1.4rem; font-weight: 800; color: var(--al-green); }
.al-kpi__label  { display: block; font-size: 0.78rem; color: var(--al-gray); }

/* ---- TABS ---- */
.al-tabs {
  display: flex;
  gap: 4px;
  background: var(--al-white);
  border-radius: 10px;
  padding: 6px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.al-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--al-gray);
  transition: all 0.2s;
}
.al-tab--active,
.al-tab:hover {
  background: var(--al-green);
  color: white;
}

/* ---- TAB CONTENT ---- */
.al-tab-content { display: none; }
.al-tab-content--active { display: block; }

/* ---- TABLE ---- */
.al-table-wrap { overflow-x: auto; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.al-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--al-white);
  font-size: 0.88rem;
}
.al-table th {
  background: var(--al-green);
  color: white;
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.al-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--al-gray-lt);
  vertical-align: middle;
}
.al-table tr:last-child td { border-bottom: none; }
.al-table tr:hover td { background: #f9fafb; }
.al-empty { text-align: center; color: var(--al-gray); padding: 32px !important; }

/* ---- STATUS SELECT ---- */
.al-status-select {
  border: 1px solid var(--al-gray-lt);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 0.82rem;
  cursor: pointer;
}

/* ---- BADGES ---- */
.al-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
}
.al-badge--yellow { background: #fef3c7; color: #92400e; }
.al-badge--green  { background: #d1fae5; color: #065f46; }
.al-badge--red    { background: #fee2e2; color: #991b1b; }
.al-badge--blue   { background: #dbeafe; color: #1e40af; }

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
  .al-card__body { padding: 16px; }
  .al-kpi-grid { grid-template-columns: 1fr 1fr; }
  .al-tabs { flex-direction: column; }
  .al-units-grid { grid-template-columns: 1fr 1fr; }
  .al-price-box { flex-direction: column; text-align: center; }
  .al-price-box__value { margin-left: 0; }
}

/* ---- GLAMPING GROUPED GRID ---- */
.al-units-grouped {
  display: flex;
  flex-direction: column;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}
.al-units-group {
  border-bottom: 2px solid #2d6a4f;
}
.al-units-group:last-child {
  border-bottom: none;
}
.al-units-grid--3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: none;
  border-radius: 0;
}
.al-units-grid--3 .al-unit-card {
  border-right: 1px solid #e5e7eb;
  border-bottom: none;
  border-radius: 0;
}
.al-units-grid--3 .al-unit-card:last-child {
  border-right: none;
}
.al-units-grid--3 .al-unit-card__inner {
  border-radius: 0 !important;
  padding: 10px 14px;
}
@media (max-width: 600px) {
  .al-units-grid--3 { grid-template-columns: repeat(2, 1fr); }
}
