/* Admin stylesheet: same palette as the site, denser layout. */
:root {
  --cream: #faf3f1; --paper: #fffaf8; --sand: #f4e3e4; --ink: #3b2f35; --ink-soft: #6f5c63;
  --rust: #c4687f; --rust-dark: #a04f66; --ochre: #d4a373; --sage: #8ea897; --sage-dark: #5f7a68;
  --blush: #f1d9de; --line: #ecdcd9; --radius: 14px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: "Nunito Sans", "Segoe UI", sans-serif; font-size: 15.5px; line-height: 1.55; color: var(--ink); background: var(--cream); }
a { color: var(--rust); text-decoration: none; }
a:hover { color: var(--rust-dark); }
h1, h2, h3 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; line-height: 1.15; margin: 0 0 .6em; }
h1 { font-size: 2.3rem; }
h2 { font-size: 1.6rem; margin-top: 1.6rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-soft); }
.small { font-size: .88rem; }
img { max-width: 100%; display: block; }

/* Layout */
body.admin { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side { background: var(--ink); color: #e9ddd1; padding: 1.5rem 1.2rem; display: flex; flex-direction: column; gap: 1.5rem; position: sticky; top: 0; height: 100vh; }
.admin-side__brand { color: #fff; font-family: "Cormorant Garamond", serif; font-size: 1.7rem; font-weight: 600; display: block; line-height: 1.1; }
.admin-side__brand small { display: block; font-family: "Nunito Sans", sans-serif; font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; color: var(--ochre); margin-top: .3rem; }
.admin-side__nav { display: flex; flex-direction: column; gap: .2rem; }
.admin-side__nav a { color: #e9ddd1; padding: .55rem .8rem; border-radius: 10px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.admin-side__nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-side__nav a.is-active { background: var(--rust); color: #fff; }
.badge { background: var(--ochre); color: var(--ink); font-size: .75rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; }
.admin-side__foot { margin-top: auto; display: flex; flex-direction: column; gap: .4rem; font-size: .9rem; opacity: .9; }
.admin-side__foot a { color: #f4e6d8; }
.admin-main { padding: 2rem clamp(1.2rem, 4vw, 3rem) 4rem; max-width: 1100px; }
@media (max-width: 800px) {
  body.admin { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
  .admin-side__nav { flex-direction: row; flex-wrap: wrap; }
}

/* Auth box */
body.admin-auth { display: grid; place-items: center; min-height: 100vh; padding: 1rem; }
.admin-auth-box { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 2.2rem; width: min(420px, 100%); }
.admin-auth-box h1 { font-size: 1.9rem; }

/* Cards, tables, forms */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.6rem; margin-bottom: 1.4rem; }
.card h2:first-child { margin-top: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.3rem; }
.stat strong { display: block; font-family: "Cormorant Garamond", serif; font-size: 2.4rem; line-height: 1; color: var(--rust); }
.stat span { color: var(--ink-soft); font-size: .9rem; }
table { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); background: var(--sand); }
tr:last-child td { border-bottom: 0; }
td.actions { white-space: nowrap; text-align: right; }
td.actions form { display: inline; }
.thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; }
.tabs a { padding: .45rem .9rem; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-weight: 600; font-size: .92rem; }
.tabs a.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .6rem 1.1rem; border-radius: 999px; font-weight: 700; font-size: .92rem; border: 1.5px solid transparent; cursor: pointer; font-family: inherit; line-height: 1; background: var(--rust); color: #fff; }
.btn:hover { background: var(--rust-dark); color: #fff; }
.btn--outline { background: transparent; border-color: var(--rust); color: var(--rust); }
.btn--outline:hover { background: var(--rust); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.btn--ghost:hover { background: var(--sand); color: var(--ink); }
.btn--danger { background: transparent; color: #9a3b2a; border-color: #e6c2b8; }
.btn--danger:hover { background: #9a3b2a; color: #fff; }
.btn--sm { padding: .4rem .8rem; font-size: .85rem; }
.btn--ok { background: var(--sage-dark); }
.btn--ok:hover { background: #4b5943; }

label.field { display: block; font-weight: 600; font-size: .9rem; color: var(--ink-soft); margin-bottom: 1rem; }
label.field input, label.field select, label.field textarea {
  display: block; width: 100%; margin-top: .3rem; padding: .65rem .8rem; border: 1.5px solid var(--line);
  border-radius: 10px; background: #fff; font: inherit; color: var(--ink);
}
label.field input[type="checkbox"], label.field input[type="radio"] { display: inline; width: auto; margin: 0 .4rem 0 0; }
/* One identical box for every single-line field, whatever its type (text, date, time, email, select) */
label.field input:not([type=checkbox]):not([type=radio]):not([type=file]), label.field select {
  box-sizing: border-box; height: 42px; min-height: 42px; max-height: 42px; padding: 0 .8rem; margin-top: .3rem;
  font-family: "Nunito Sans", "Segoe UI", sans-serif; font-size: 15px; line-height: 40px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
  -webkit-appearance: none; appearance: none;
}
label.field input[type=date], label.field input[type=time] { line-height: normal; }
label.field input[type=file] { padding: .5rem .8rem; }
.form-inline { align-items: flex-end; }
.form-inline label.field { flex: 1 1 150px; }
.form-inline .btn { box-sizing: border-box; height: 42px; padding-top: 0; padding-bottom: 0; }
label.field input:focus, label.field select:focus, label.field textarea:focus { outline: none; border-color: var(--ochre); box-shadow: 0 0 0 3px rgba(196,104,127,.22); }
label.field textarea { min-height: 140px; resize: vertical; }
label.field textarea.tall { min-height: 420px; font-family: "Nunito Sans", sans-serif; }
.field__help { font-weight: 400; font-size: .83rem; color: var(--ink-soft); margin-top: .3rem; }
.form-grid { display: grid; gap: 0 1.2rem; }
.form-grid--2 { grid-template-columns: 1fr 1fr; }
.form-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
.form-grid--4 { grid-template-columns: repeat(4, 1fr); }
.form-inline { display: flex; gap: .8rem; align-items: end; flex-wrap: wrap; }
.form-inline label.field { margin-bottom: 0; min-width: 120px; }
@media (max-width: 700px) { .form-grid--2, .form-grid--3, .form-grid--4 { grid-template-columns: 1fr; } }
.form-actions { display: flex; gap: .8rem; align-items: center; margin-top: .6rem; flex-wrap: wrap; }
.notice { padding: .9rem 1.1rem; border-radius: 10px; margin-bottom: 1.2rem; }
.notice--ok { background: #e4ecdc; color: #3f5235; border: 1px solid #c8d8bb; }
.notice--error { background: #f6dfd6; color: #7a3a22; border: 1px solid #ecc5b6; }
.notice--info { background: var(--sand); color: var(--ink); border: 1px solid var(--line); }
.admin-error { background: #f6dfd6; color: #7a3a22; padding: .7rem 1rem; border-radius: 10px; }

.status { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.status--pending { background: #fbe7c3; color: #7a5410; }
.status--confirmed { background: #e4ecdc; color: #3f5235; }
.status--cancelled { background: #eee3dc; color: #7a6a62; text-decoration: line-through; }
.status--draft { background: var(--sand); color: var(--ink-soft); }
.status--published { background: #e4ecdc; color: #3f5235; }

/* Photo grid */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
.photo-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.photo-card img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.photo-card form { padding: .7rem; }
.photo-card input[type="text"] { width: 100%; padding: .45rem .6rem; border: 1.5px solid var(--line); border-radius: 8px; font: inherit; font-size: .9rem; margin-bottom: .5rem; }
.photo-card .row { display: flex; justify-content: space-between; gap: .4rem; }

/* Weekly availability */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: .7rem; }
.week__day { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; min-height: 120px; }
.week__day h3 { font-family: "Nunito Sans", sans-serif; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: .6rem; }
.range { display: flex; justify-content: space-between; align-items: center; background: var(--sand); border-radius: 8px; padding: .35rem .5rem; font-size: .88rem; font-weight: 700; margin-bottom: .4rem; }
.range form { display: inline; }
.range button { background: none; border: 0; color: #9a3b2a; cursor: pointer; font-size: 1rem; padding: 0 .2rem; line-height: 1; }
@media (max-width: 900px) { .week { grid-template-columns: repeat(2, 1fr); } }
.chart { width: 100%; overflow: hidden; }
.chart svg { display: block; width: 100%; height: auto; font-family: "Nunito Sans", sans-serif; }
.chart .bar:hover rect:last-of-type { fill: #a04f66; }
.chart .bar:hover rect:first-of-type { fill: rgba(196, 104, 127, .08); }
.preview { max-width: 260px; border-radius: 10px; margin: .4rem 0 .8rem; }

/* Phones: scrollable tables, stacked inline forms, single-column week */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 700px) {
  .admin-main { padding: 1.2rem 1rem 3rem; }
  .admin-main h1 { font-size: 1.8rem; }
  .admin-side { padding: 1rem; gap: .8rem; }
  .admin-side__foot { flex-direction: row; flex-wrap: wrap; gap: 1rem; }
  table { display: block; overflow-x: auto; white-space: nowrap; }
  td.small, td .small { white-space: normal; }
  .form-inline { flex-direction: column; align-items: stretch; }
  .form-inline label.field { min-width: 0; }
  .form-inline .btn { justify-content: center; }
  .week { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: 1fr; }
}
