:root{
  --bg:#f4efe6;
  --surface:#ffffff;
  --ink:#23302a;
  --muted:#6e6a62;
  --border:#e2dbcf;
  --primary:#2f6f4e;
  --primary-soft:#4f9d69;
  --accent:#d7c4a3;
  --chip:#f6f1e8;
  --shadow:0 16px 36px rgba(0,0,0,.08);
  --radius:16px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:"Segoe UI", system-ui, sans-serif;
  color:var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(47,111,78,.10), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(215,196,163,.20), transparent 55%),
    var(--bg);
}

.header{
  padding:28px 30px;
  background:linear-gradient(120deg, rgba(47,111,78,.14), rgba(79,157,105,.08));
  border-bottom:1px solid var(--border);
}
.header h1{
  margin:0;
  font-weight:800;
  letter-spacing:.2px;
}
.header p{
  margin:6px 0 0 0;
  color:var(--muted);
  font-weight:600;
}

.container{
  max-width:1200px;
  margin:0 auto;
  padding:28px 22px 40px;
}

.filters{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:18px 18px;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
  gap:16px;
  box-shadow:var(--shadow);
}
label{
  font-size:12px;
  font-weight:700;
  color:var(--muted);
  display:block;
  margin-bottom:6px;
  letter-spacing:.2px;
}
input,select{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fbfaf7;
  font-size:14px;
  outline:none;
}
input:focus,select:focus{
  border-color:var(--primary-soft);
  box-shadow:0 0 0 4px rgba(79,157,105,.12);
  background:#fff;
}

.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:18px;
  margin-top:18px;
}

.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:16px;
  box-shadow:var(--shadow);
  transition:.15s ease;
}
.card:hover{transform:translateY(-2px)}
.card h3{margin:0 0 8px 0}
.card p{margin:0 0 10px 0; color:var(--muted)}

.badge{
  display:inline-block;
  padding:6px 10px;
  font-size:12px;
  border-radius:999px;
  margin-top:2px;
  font-weight:700;
}
.available{ background:#e6f4ea; color:#2f6f4e;}
.busy{ background:#fdeaea; color:#c05a5a;}
.partial{ background:#fff5dd; color:#d4a73f;}

.card-actions{
  margin-top:12px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.btn-mini{
  padding:8px 10px;
  border-radius:10px;
  border:1px solid var(--border);
  background:var(--chip);
  font-weight:700;
  cursor:pointer;
}
.btn-mini:hover{filter:brightness(.98)}
.btn-mini.primary{
  background:var(--primary);
  color:#fff;
  border-color:transparent;
}
.btn-mini.primary:hover{background:var(--primary-soft)}

.selection{
  margin-top:24px;
  padding:16px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:12px;
  box-shadow:var(--shadow);
}

.btn{
  padding:10px 16px;
  border:none;
  border-radius:12px;
  font-weight:700;
  cursor:pointer;
  transition:.15s;
}
.btn-primary{background:var(--primary);color:#fff}
.btn-primary:hover{background:var(--primary-soft)}
.btn-secondary{background:#efe7da}

.modal-backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:999;
}
.modal{
  width:min(920px, 100%);
  background:#fff;
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 20px 60px rgba(0,0,0,.25);
  border:1px solid rgba(0,0,0,.08);
}
.modal-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:14px 16px;
  background:#fbfaf7;
  border-bottom:1px solid var(--border);
}
.modal-title{font-weight:900;color:#1f2a22}
.modal-close{
  border:none;background:transparent;font-size:22px;cursor:pointer;
  line-height:1;padding:6px 10px;border-radius:10px;
}
.modal-close:hover{background:#f0ece4}
.modal-body{display:grid;grid-template-columns: 1fr 280px;gap:0}
@media (max-width: 820px){.modal-body{grid-template-columns:1fr}}

.viewer{
  background:#0f1a12;display:flex;align-items:center;justify-content:center;
  position:relative;min-height:380px;
}
.viewer img{width:100%;height:100%;object-fit:cover;display:block}
.nav-btn{
  position:absolute;top:50%;transform:translateY(-50%);
  border:none;background:rgba(255,255,255,.85);
  width:42px;height:42px;border-radius:12px;cursor:pointer;
  font-size:18px;font-weight:900;
}
.nav-btn:hover{background:#fff}
.nav-prev{left:12px}
.nav-next{right:12px}

.thumbs{
  padding:12px;border-left:1px solid var(--border);background:#fff;
}
@media (max-width: 820px){.thumbs{border-left:none;border-top:1px solid var(--border)}}
.thumbs small{display:block;color:var(--muted);font-weight:800;margin-bottom:10px}
.thumb-grid{display:grid;grid-template-columns:repeat(2, 1fr);gap:10px}
.thumb{border:1px solid var(--border);border-radius:12px;overflow:hidden;cursor:pointer;background:#faf9f6}
.thumb img{width:100%;height:90px;object-fit:cover;display:block}
.thumb.active{outline:3px solid rgba(79,157,105,.35);border-color:rgba(79,157,105,.35)}

.chips{
  display:flex;gap:10px;flex-wrap:wrap;padding:10px;
  border:1px solid var(--border);border-radius:12px;background:#faf9f6;
}
.chip{
  border:1px solid var(--border);background:#f3efe7;
  padding:8px 12px;border-radius:999px;cursor:pointer;
  font-weight:800;font-size:13px;transition:.15s;
}
.chip:hover{filter:brightness(.98)}
.chip.active{
  background:rgba(47,111,78,.12);
  border-color:rgba(47,111,78,.35);
  color:var(--primary);
}

.help{display:block;margin-top:6px;color:var(--muted);font-weight:700;font-size:12px}
