@import '../../base/variables.css';
@import '../../base/reset.css';

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--brand-cream), #fff6ef 48%, #f7ece5);
  color: var(--text-dark);
  overflow-x: hidden;
}

:root {
  --panel-bg: #fff;
}

.agenda-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 24px 32px;
  background: var(--panel-bg);
  box-shadow: 0 18px 40px rgba(47, 31, 27, 0.08);
  overflow-x: clip;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand img {
  width: 72px;
}

.brand h1 {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 22px;
  font-family: var(--font-body);
}

.brand p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.agenda-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.agenda-main {
  max-width: 1500px;
  width: 100%;
  margin: 24px auto;
  padding: 0 12px 40px;
  display: grid;
  gap: 20px;
  overflow-x: clip;
}

.panel {
  background: var(--panel-bg);
  border-radius: 24px;
  box-shadow: 0 30px 60px rgba(47, 31, 27, 0.08);
  padding: 20px;
  overflow: hidden;
}

.panel-header {
  margin-bottom: 16px;
}

.panel-header h2 {
  margin: 0;
  font-size: 24px;
}

.panel-header p {
  margin: 8px 0 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.booking-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.selected-date-inline {
  min-height: 50px;
  border: 1px solid #dac6bc;
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff8f4;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.selected-date-inline strong {
  font-size: 15px;
}

.selected-date-inline span {
  font-size: 13px;
  color: var(--text-muted);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

label {
  font-weight: 700;
  color: var(--text-dark);
}

select,
input,
textarea {
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 12px 14px;
  background: #fffaf7;
  font-size: 15px;
  width: 100%;
  min-width: 0;
}

textarea {
  resize: vertical;
}

.availability-note {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff9f4, #f9ede3);
  color: var(--text-muted);
  border: 1px solid #efddcf;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.97fr) minmax(200px, 0.68fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.calendar-panel,
.day-panel {
  border: 1px solid #ead8cb;
  border-radius: 22px;
  background: linear-gradient(180deg, #fffdfa, #fff7f1);
  padding: 10px;
  min-width: 0;
}

.calendar-toolbar,
.day-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.calendar-toolbar-text h3,
.day-panel-header h3 {
  margin: 2px 0 0;
  font-size: 10px;
}

.calendar-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.calendar-nav {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(112, 83, 66, 0.25);
  background: #fff;
  color: var(--brand-brown-dark);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.calendar-nav:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.calendar-weekdays {
  margin-bottom: 10px;
}

.calendar-weekdays span {
  text-align: center;
  font-size: 10px;
  font-weight: 300;
  color: var(--text-muted);
  text-transform: uppercase;
}

.calendar-day,
.calendar-placeholder {
  min-height: 30px;
  border-radius: 16px;
}

.calendar-placeholder {
  background: transparent;
}

.calendar-day {
  border: 1px solid #ead4c7;
  background: #fff;
  padding: 8px 6px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  color: var(--text-dark);
}

.calendar-day strong {
  font-size: 12px;
  line-height: 1;
}

.calendar-day small {
  font-size: 11px;
  color: var(--text-muted);
}

.calendar-day.is-selected {
  border-color: var(--brand-brown);
  background: linear-gradient(180deg, #fff2e8, #fbe6d8);
  box-shadow: inset 0 0 0 1px rgba(112, 83, 66, 0.14);
}

.calendar-day.is-available {
  background: linear-gradient(180deg, #fffdfb, #f8f4ef);
}

.calendar-day.is-occupied {
  background: linear-gradient(180deg, #fff7f5, #f8ebe6);
}

.calendar-day.is-empty {
  opacity: 0.45;
  cursor: default;
}

.calendar-day.is-mine {
  border-color: rgba(112, 83, 66, 0.28);
}

.selected-date-meta {
  margin: 0;
  color: var(--text-muted);
  text-align: right;
  max-width: 100px;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  min-width: 0;
}

.slot-card {
  border: 1px solid #ead4c7;
  border-radius: 16px;
  padding: 12px;
  background: #fffdfa;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.slot-card h3 {
  margin: 0;
  font-size: 12px;
}

.slot-card time {
  font-size: 12px;
  font-weight: 700;
}

.slot-card p {
  margin: 0;
  color: var(--text-muted);
}

.slot-card.unavailable {
  opacity: 0.6;
}

.slot-card.is-mine {
  opacity: 1;
  border-color: #d3beb0;
  background: linear-gradient(180deg, #fff8f2, #f8eee7);
}

.slot-card-status {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-brown-dark);
}

.slot-card .primary-button[disabled] {
  cursor: not-allowed;
  opacity: 0.7;
}

.status-badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-pendente {
  background: #fff0cc;
  color: #8d5b00;
}

.status-confirmado {
  background: #e3f5e8;
  color: #27633a;
}

.status-recusado,
.status-cancelado {
  background: #ffe5e5;
  color: #8c1d1d;
}

.status-pago {
  background: #deefff;
  color: #174b86;
}

.primary-button,
.ghost-button,
.secondary-button {
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-button {
  background: var(--brand-brown);
  color: #fff;
}

.primary-button:hover {
  background: var(--brand-brown-dark);
}

.ghost-button {
  background: transparent;
  border: 1px solid var(--brand-brown);
  color: var(--brand-brown);
}

.secondary-button {
  background: rgba(112, 83, 66, 0.12);
  color: var(--brand-brown-dark);
}

.action-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.booking-sections {
  display: grid;
  gap: 16px;
}

.booking-section-card {
  border: 1px solid #ead8cb;
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(180deg, #fffdfa, #fff7f1);
}

.booking-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.booking-section-heading h3 {
  margin: 4px 0 6px;
  font-size: 20px;
}

.booking-section-heading p {
  margin: 0;
  color: var(--text-muted);
}

.booking-count {
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f5e6d9;
  color: var(--brand-brown-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.booking-section-scroll {
  max-height: 420px;
  overflow-y: auto;
  padding-right: 6px;
}

.booking-card-list {
  display: grid;
  gap: 12px;
}

.booking-status-card {
  border: 1px solid #edd8cb;
  border-radius: 18px;
  padding: 16px;
  background: #fff;
  display: grid;
  gap: 14px;
}

.booking-status-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.booking-status-header strong {
  display: block;
  font-size: 17px;
}

.booking-status-header span:not(.status-badge) {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 14px;
}

.booking-status-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.booking-status-meta div {
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff8f4;
  border: 1px solid #f0ddd1;
}

.booking-status-meta dt {
  margin: 0 0 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
}

.booking-status-meta dd {
  margin: 0;
  color: var(--text-dark);
  font-weight: 600;
}

.booking-admin-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff9f4, #f9ede3);
  color: var(--text-muted);
  border: 1px solid #efddcf;
}

.empty-state {
  color: var(--text-muted);
  font-style: italic;
}

.form-message {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 16px;
}

.form-message.is-error {
  background: #ffe5e5;
  color: #8c1d1d;
}

.form-message.is-success {
  background: #e6f7ea;
  color: #245b34;
}
