:root {
  --bg: #FFFFFF;
  --green: #0F5B50;
  --gold: #D4C4A1;
  --gold-dark: #C9A86A;
  --text: #1b1b1b;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji';
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.header {
  padding: 12px 16px;
  background: white;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 2;
}

.header h1 {
  margin: 0;
  font-size: 18px;
  color: var(--green);
}

.content {
  padding: 12px 12px 72px;
}

.card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin-bottom: 12px;
}

.card img, .card .media {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--gold);
}

.card-body {
  padding: 12px;
}

.card-title {
  margin: 0 0 6px 0;
  font-size: 16px;
}

.card-subtitle {
  margin: 0 0 10px 0;
  font-size: 12px;
  color: #666;
}

.row {
  display: flex;
  gap: 8px;
}

.row .flex-1 { flex: 1; }

.btn {
  display: inline-block;
  padding: 10px 12px;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.btn-primary { background: var(--green); color: white; }
.btn-primary:active { filter: brightness(0.95); }

.btn-secondary { background: var(--gold); color: #2b2b2b; }
.btn-secondary:active { filter: brightness(0.95); }

.section {
  background: white;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin-bottom: 12px;
}

.list {
  display: grid;
  gap: 8px;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.badge.ok { background: rgba(15,91,80,0.12); color: var(--green); }
.badge.wait { background: rgba(201,168,106,0.18); color: #8a6d2e; }
.badge.reject { background: rgba(200,0,0,0.10); color: #9b1c1c; }

.tabbar {
  position: sticky;
  bottom: 0;
  background: white;
  border-top: 1px solid rgba(0,0,0,0.06);
  padding: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tabbar a, .tabbar button {
  text-align: center;
  padding: 10px 6px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--green);
  background: rgba(15,91,80,0.08);
  font-weight: 600;
  border: none;
}

.tabbar--three { grid-template-columns: 1fr 1fr 1fr; }

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

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

.input label { font-size: 12px; color: #555; }
.input input, .input select, .input button {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
  font-size: 14px;
}

.input button {
  background: var(--green);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s;
}

.input button:hover {
  background: #2d7a3d;
}

.slider {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.slide {
  height: 220px;
  scroll-snap-align: start;
}

.small { font-size: 12px; color: #666; }

hr.sep {
  height: 1px;
  border: none;
  background: rgba(0,0,0,0.08);
  margin: 12px 0;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.modal .sheet {
  background: #fff;
  border-radius: 12px;
  max-width: 460px;
  width: calc(100% - 24px);
  padding: 16px;
}
.modal .close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #666;
}

/* Calendar styles */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin: 8px 0;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.cal-day.current {
  background: #f5f5f5;
  color: #333;
}

.cal-day.other {
  background: #fafafa;
  color: #999;
}

.cal-day.today {
  background: var(--green);
  color: white;
  font-weight: bold;
}

.cal-day.past {
  opacity: 0.5;
  cursor: not-allowed;
}

.cal-day.booked {
  background: var(--gold);
  color: white;
  font-weight: bold;
}

.cal-day.selected {
  background: var(--green);
  color: white;
  box-shadow: 0 0 0 2px var(--gold);
}

.cal-day:hover:not(.past) {
  background: var(--green);
  color: white;
}
